{"docstore/metadata": {"/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/helloworld.py__": {"doc_hash": "542c22145ef0a6a68810ae908f3f455087dc351145d0cd2280a85f1cadfd948f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_IngredientIndex_IngredientIndex.generate.return.content_True": {"doc_hash": "792ca28128dfbec938a89a6ca5730bb26d44304457dade169434bb47c53caa76"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_RecipeIndex_RecipeIndex.generate.return.content_True": {"doc_hash": "6ac8c5f6fb7eef6d5323b72cdff56fd2f1c24b478136c1dccb449596985d0ece"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_RecipeDomain_RecipeDomain.get_objects.for_obj_in_self_data_rec.yield_obj_": {"doc_hash": "11de3b29a529eb3fbcdfbae08edbca126f5c02cfe84ce500b568ebcd742bb7c3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_RecipeDomain.resolve_xref_": {"doc_hash": "c413916934a3e0737833d0b269b1e46d7f461cd9e3c21f8c2c2535ac3cbe96f9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_from_docutils_import_node_TodolistDirective.run.return._todolist_": {"doc_hash": "5a0b71b672c021fb8e7fd4df28704a99bd07818a7d1e285b874b2e3c1d4e71d4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_process_todo_nodes_process_todo_nodes.for_node_in_doctree_trave.node_replace_self_content": {"doc_hash": "676c88d1238c36f7b37043ad899ac3f75b4c282618b8cd5555895740d618ba98"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_setup_": {"doc_hash": "a3c56385dc11ba1e8ddd80d7a7d969c83ffa3b798af03294938cded062406124"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py__Example_Google_style_d_module_level_variable2.98765": {"doc_hash": "5ee7ff8b3cf2d18df328f5d1be7929e1749096f3c70522ed07f7949a7caa7160"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py__int_Module_level_vari_function_with_pep484_type_annotations._Example_function_with_": {"doc_hash": "ff055e1c0f3ad76a218658d84b8e505304659aace21fa9fdb7b3fc13ce5ddee0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_module_level_function_module_level_function.return.True": {"doc_hash": "132e85885e94099b420ce1e21df194267819bef08925b77ebe46cdb98de80458"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_example_generator_example_generator.for_i_in_range_n_.yield_i": {"doc_hash": "5a9f17b605558d2e803bb5844a868a8c6a6fc061d0974ff1c96c16c9f686feda"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleError_ExampleError.__init__.self.code.code": {"doc_hash": "9a713a20221e1b3f06e27381fc20bb3596fd4e1b9b4f075ac14833bcbc576f7c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleClass_ExampleClass.example_method.return.True": {"doc_hash": "f28bbd23d6404d4c492adcfddea26af38611ba0d09fbedd0fd917fac81ced677"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleClass.__special___ExampleClass.__special__.pass": {"doc_hash": "c55dc795236fb5086c287195c8637a581f9d370e3a7bdc449ee5fb3d2690c6b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py__Example_NumPy_style_do_module_level_variable2.98765": {"doc_hash": "e1c01b80b888c3190cf8ef5b8036d219ac8127a1768d7746082c708947123a5a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py__int_Module_level_vari_function_with_pep484_type_annotations._Example_function_with_": {"doc_hash": "0dd71a30ea45b24ed4c086b60261d9e5cf32100dd60febbc874eaea30b86f495"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_module_level_function_module_level_function.return.True": {"doc_hash": "0f66171a15d01f5cb8c87d16b8876cdf146131d2abb97c319e44cd0ba2fb0b35"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_example_generator_example_generator.for_i_in_range_n_.yield_i": {"doc_hash": "de0d14652216ec70d1b7b3bc96890dd04af438939c92d25669e0f9d79cdc463f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleError_ExampleError.__init__.self.code.code": {"doc_hash": "a3ea59dbcfd3a39f5628e5ca0ad72bd2d027d5d2fbd3f80eecf3e8142b0cc52f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleClass_ExampleClass.example_method.return.True": {"doc_hash": "12ccd073ec0d25624972d2bb71b5102b55c2dde27a01cc7f7e4a80e8bcb84abf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleClass.__special___ExampleClass.__special__.pass": {"doc_hash": "72304ee3d34ecc4df0db8056889122a1678658358b5ca1741e8669899e9047e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleClass.__special_without_docstring___": {"doc_hash": "662435242c8eb30adff195c37a84521877e5245a5be3fb6aaa65ad7f60d2d058"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/setup.py_os_Tee.flush.self_stream_flush_": {"doc_hash": "fcd2aa9e95eae19895d734354d2acf691ab986e48cbcbcdee295d429fc52822d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/setup.py_try__try_.else_.cmdclass_compile_catalog": {"doc_hash": "fb4538214fe4b2bab3702fd5fc9d21edf47ff44e1b93f16dd5ad4937efdeda61"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/setup.py_setup__": {"doc_hash": "12c73f0518098a6a64846feb22ac37226ee301b801d82c6128e5d96c928dbcfd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/__main__.py__": {"doc_hash": "c7106457281e38c9f99b47c55c34df10819aed6bbcc6181a73ece6c74361e7b2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_toctree_toctree.extract_original_messages.return.messages": {"doc_hash": "2aebb93b39cf2e46f84abcf38854444ec31dad3163c104dceab0de75e5420b76"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_setup_": {"doc_hash": "20a60ed834fc013a3dd977f3c5189603dc76018dbf3cb0df1320570f373ac960"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_builtin_extensions_logger.logging_getLogger___name_": {"doc_hash": "58ea4d6906fc101e6062c0847a2dbc1d874382685d56b2d03215c5ffacffd748"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx_Sphinx.__init__.self__init_builder_": {"doc_hash": "538998ae009776e432a3b41efed881dce83e0e679df04ea359ac6d4e98f78bf6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._init_env_Sphinx._init_env.if_freshenv_or_not_os_pat.else_.try_.except_Exception_as_err_.self__init_env_freshenv_T": {"doc_hash": "970d32f55ad67045575ee8a8b0414e4590244c6d767b79a133bf2d716cd51552"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.preload_builder_Sphinx._main_build_metho": {"doc_hash": "c53623981e4757102e301290dca09753c7d24d3bda0b3a119bdbcb137e0e82d7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.build_Sphinx.build.self_builder_cleanup_": {"doc_hash": "b0d95589380908992847f9ec9db7adc580b03accf0d8b8384ca3452b8c8666fc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.disconnect_Sphinx.emit.return.self_events_emit_event_": {"doc_hash": "1a7f32204c94f3237d69b76b56aa422a499940b6b50b6936287237c997d49e43"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_config_value_Sphinx.add_config_value.self_config_add_name_def": {"doc_hash": "2cefae694bfffc2413959dc346b7e9feddd94816cf13ea680ef4a5ef01d4c21c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_event_Sphinx.set_translator.self_registry_add_transla": {"doc_hash": "3a7ed7bef80425bfa4d913cdf782d8079beff7b0ab5e3c98e973181f92f31d65"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_node_Sphinx.add_node.self_registry_add_transla": {"doc_hash": "ac68805ae461df798a3bdf835d3973a8dee1238ef14782ca17c0b991da82e050"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_enumerable_node_Sphinx.add_enumerable_node.self_add_node_node_overr": {"doc_hash": "8ab758743a08df7acdc96a8e654125c6a4fc675ce1e9c8751f02e23f06306a01"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_directive_Sphinx.add_directive.docutils_register_directi": {"doc_hash": "d7c1e3c474cc0b4e691d7910dd7e8eef043ba0c04042fc7fb2dedb47dc87a0fe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_role_Sphinx.add_role.docutils_register_role_na": {"doc_hash": "2cfd317dde9cfebf9872829a1f94bf12b1ae6a576dd706d4550ca33b9a00c7f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_generic_role_Sphinx.add_generic_role.docutils_register_role_na": {"doc_hash": "983a66bd2d9af0ec34934df509467b1537e5aa267470cf2ece1893a2f6386222"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_domain_Sphinx.add_domain.self_registry_add_domain_": {"doc_hash": "3750a307fe4ebfa19e9d3ac78bd70e3f045b1524c0b15bec5f6e4b9f5a530197"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_directive_to_domain_Sphinx.add_directive_to_domain.self_registry_add_directi": {"doc_hash": "14c6978e23c2f1d59ad11a5e0b026c916dabf820e782735d711b3d5e30e85f56"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_role_to_domain_Sphinx.add_role_to_domain.self_registry_add_role_to": {"doc_hash": "d5ed0d78b264c31bcbe9bc919f8d4b21cbc948d0917e1b46f62b68c228fd0ea3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_index_to_domain_Sphinx.add_index_to_domain.self_registry_add_index_t": {"doc_hash": "51ea11a49f9c9a8f098bed5869b66cee4e755acc20aa98d6542fc25372c93b7c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_object_type_Sphinx.add_object_type.self_registry_add_object_": {"doc_hash": "239f2a5d968fdc7f65133858dcc4d9f0a0d65a42b2cc56e471fd69bc83a7a74b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_crossref_type_Sphinx.add_crossref_type.self_registry_add_crossre": {"doc_hash": "23646e920cbf64008ff99df354f9b90dedb4be029303907fe004641cdc020232"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_js_file_Sphinx.add_js_file.if_hasattr_self_builder_._type_ignore": {"doc_hash": "d89e97ed600dc67981f3024a28ac640f3ed4bf012899d92ffbf3df8e517d36a3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_css_file_Sphinx.add_css_file.if_hasattr_self_builder_._type_ignore": {"doc_hash": "9f9006036e3b274f4208db1a7bede253a8c72aead4aeb81755527352fa3de460"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_latex_package_Sphinx.add_latex_package.self_registry_add_latex_p": {"doc_hash": "32e9d6f5befaf72a5641873a6195ff46cb0188dabd52647537b0b85ffe1792b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_autodocumenter_Sphinx.add_autodocumenter.self_add_directive_auto_": {"doc_hash": "b6659ee3e2a4d7047259b951c4436efb02b223ea97771720a13f72db66fe967b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_autodoc_attrgetter_Sphinx.add_autodoc_attrgetter.self_registry_add_autodoc": {"doc_hash": "f5e522a52062fd4ed25b2efc577a06973cc13a5e1b4c9acc8252a26a2fa4196a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_search_language_Sphinx.add_search_language.languages_cls_lang_cls": {"doc_hash": "2132d81050bd2fae6d1eb8e87448611f5431ac95b02ed2bdc54953d3464b22fe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_html_math_renderer_Sphinx.add_html_math_renderer.self_registry_add_html_ma": {"doc_hash": "7cb4e45b88b589abc6155fcc958037b5e91b787f91844af9a5f314b6dc60a60d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_message_catalog_Sphinx._other_methods_": {"doc_hash": "f9beb9242e050005adb6f31e8bf0bf0893d76e3a6806bd4821c5c94a61fc5dda"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.is_parallel_allowed_Sphinx.is_parallel_allowed.return.True": {"doc_hash": "1839e74a7ef698b765689123e04377dc4d4d68489367abef769ee4140ce8101b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_TemplateBridge_TemplateBridge.init.raise_NotImplementedError": {"doc_hash": "a0d3ececb2627db4c615019da054c07c3b52616b2580d6f2162640c6a9e63cc9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_TemplateBridge.newest_template_mtime_": {"doc_hash": "3614417e357cd281ff43a9c73b105d9252861aae9d81b2c1370295d8e17faae8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder_Builder.get_target_uri.raise_NotImplementedError": {"doc_hash": "86e1f4efe63abe381247b204dc8ec71cc5aa539ddbdc3b5882a5110274deb3aa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.get_relative_uri_Builder.get_asset_paths.return._": {"doc_hash": "eaa1fc6d0f12fd10907dcb369f7b0345f75f94ced39887ab0208d74bfb6ad5b2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._compile_po_methods_Builder.compile_all_catalogs.self_compile_catalogs_set": {"doc_hash": "f26289bb093fc9eb95195c29901eb10ef66d9a251ef8698c0bfda63fe70193b0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.compile_specific_catalogs_Builder.compile_specific_catalogs.self_compile_catalogs_cat": {"doc_hash": "4a3f3e8e101e5a03561679df2c6afb8d784dd6e4f3d7bec96384bb97b91ff8f9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.compile_update_catalogs_Builder.build_all.self_build_None_summary_": {"doc_hash": "f81773ec5401df7f363c8737f6c7eb3aebd0ba2ab34d0cc8616358044765507e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.build_specific_Builder.build_update.if_isinstance_to_build_s.else_.self_build_to_build_": {"doc_hash": "d18c3cdd2c4722363907de1dddd0758d3ef807e943e0482cb877b98ca7bcd5e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.build_Builder.build.self_finish_tasks_join_": {"doc_hash": "344b1c6075ee9d9564bfc6f84d59471540c01e2a6f518dc223fb1aab6d3caf9d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.read_Builder.read.return.sorted_docnames_": {"doc_hash": "6ca2871395221197292bf84e3555e37ed69d3415a848186eb349bf566312da39"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._read_serial_Builder._read_parallel.tasks_join_": {"doc_hash": "7ba2045e046f59abe73a02e6f60ab0960ce8a1d9f93b6aaff92eca410135ec01"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.read_doc_Builder.read_doc.self_write_doctree_docnam": {"doc_hash": "13741f9d017c0195e0712420cb2cb764dcbaf8fec7d8fd29336387ddd4fe8f27"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.write_doctree_Builder.write_doctree.with_open_doctree_filenam.pickle_dump_doctree_f_p": {"doc_hash": "b89cac518b3b28c1ee1a4920ffbed744e3ede514624fb939ca8cdfe890ec140a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.write_Builder.write.if_self_parallel_ok_.else_.self__write_serial_sorted": {"doc_hash": "4de689aaa8ab84ea42620ff3203fb46df18f6b30551f478a505668af81db760b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._write_serial_Builder._write_serial.with_logging_pending_warn.for_docname_in_status_ite.self_write_doc_docname_d": {"doc_hash": "fe0d815326b199f609e0b62b6a94bbb2982f5b89d757bc4a9cac7c5d60964320"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._write_parallel_Builder._write_parallel.tasks_join_": {"doc_hash": "13c4e7f06286436d507323c20555b6ec9904203950877190e640c35b9e127a2c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.prepare_writing_Builder.cleanup.pass": {"doc_hash": "c02420ab2c110dad1b12940ab8c8faeb70a067699289ec01f2d6d10c084df2c3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.get_builder_config_": {"doc_hash": "48d06fa205e0866ef3e8a64da6499c92bcf79784106e41880b1d40f5f8f78610"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py__The_epub_publisher_EpubBuilder.make_id.return.id": {"doc_hash": "1836a0fffc855559db0389af24ea48f9c149326652f06c22f36bb76d5d7633ec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.get_refnodes_EpubBuilder.get_refnodes.return.result": {"doc_hash": "bcb97d50116458e56425acc165c8f96cb42bd63bf1ad9a8ceb8c5c51a98ef9df"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.check_refnodes_EpubBuilder.get_toc.self_toc_add_files_self_r": {"doc_hash": "922d74c5c5bdb1971891ad604a4326e76334520785e30a414349aa3300b58ceb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.toc_add_files_EpubBuilder.fix_fragment.return.prefix_fragment_replace": {"doc_hash": "20038d1285f34370d87a4315e3b8edcb15f4cead47ce371bb41cbdc95b52ceb6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.fix_ids_EpubBuilder.fix_ids.for_desc_signature_in_tre.update_node_id_desc_signa": {"doc_hash": "e2d71c94c67e4553d4972c8fa6e5989ce31e924cbdf124874bda2798b888d5b3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.add_visible_links_EpubBuilder.add_visible_links.make_footnote.return.footnote": {"doc_hash": "f2cbe96cb6b7533b0c15c6e77aa0c4fae907ab2a6e38e4e93d17424d649801f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.add_visible_links.footnote_spot_EpubBuilder.add_visible_links.footnote_spot.return.doc_doc_index_rub_1": {"doc_hash": "5b51c30b4dcb9ca1cf1e84d2699d50a9dbed4d73eb22ba7aeaf9b9b1ceddf966"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.write_doc_EpubBuilder.is_vector_graphics.return.ext_in_VECTOR_GRAPHICS_EX": {"doc_hash": "29d52c3364471aa6f5aa11d7190250a1021990cebf950ee28dd8372bae26d0e2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.copy_image_files_pil_EpubBuilder.copy_image_files_pil.for_src_in_status_iterato.None_1.except_OSError_as_err_.logger_warning____cannot": {"doc_hash": "0c1599aa875b86db6786b52e90839a4ec709b428810f9d012c86273c8c09c8bb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.copy_image_files_EpubBuilder.copy_download_files.pass": {"doc_hash": "3fae549aebfd34628067b613c8fbb0658f4c22572bb2d152dfa99c3ec55f0415"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.handle_page_EpubBuilder.handle_page.super_handle_page_pagen": {"doc_hash": "c1ae485a0393a88c13e795e180bd723cc972769baf0d242db7f8a5324390c7f7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.content_metadata_EpubBuilder.content_metadata.return.metadata": {"doc_hash": "1f4c3d3a8772afbdbd8283dd7219f69b19eaa48b6060dea072033effca157ba1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_content_EpubBuilder.build_content.html_tmpl.None": {"doc_hash": "b1a3564df6dfe6056dd1e1569db76041b1d674b9641248f7e2f58c471f2cb3c0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_content.if_self_config_epub_cover_EpubBuilder.build_content.copy_asset_file_path_join": {"doc_hash": "84cccf1ad6a99caed7826f4a4ddd27d78adab8b652d339f956d9d0be89691fab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.new_navpoint_EpubBuilder.build_navpoints.return.navstack_0_children": {"doc_hash": "ef3b2f8270cab50211a5477e3ceba518efe58e9f1cb5775edeb57e0e91ce7821"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.toc_metadata_EpubBuilder.build_toc.copy_asset_file_path_join": {"doc_hash": "9895b1bab50703d6cfe353dec6feb92a41c751eae5a756327bf4306263d71e69"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_epub_": {"doc_hash": "2b162681987e4ea8ab18414c382bfdf1f6445da5521b5eaa182634bb888d848e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py_ChangesBuilder_ChangesBuilder.typemap._": {"doc_hash": "74d01eb3eda8e69c68008452b1e50719c64273070b92dc5c49809734b494a98d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py_ChangesBuilder.write_ChangesBuilder.write.logger_info_bold____copy": {"doc_hash": "33ab9ca20342b3d45b9260e74e8c44ea95b6d1b030bb82bce73235813a1f6dff"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py_ChangesBuilder.write.for_docname_in_self_env_a_": {"doc_hash": "a7decaac8bc07ebd92ae26ce2a2ea38231cad57d16a5c1818063b9497839261c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder.content_metadata_Epub3Builder.prepare_writing.self_globalcontext_skip_": {"doc_hash": "9308c3031d14d464612c68d2b3967fbc39f42fcd4e74599157f4dabef7efa751"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder.build_navlist_Epub3Builder.build_navlist.return.navstack_0_children": {"doc_hash": "fab97353a1de792e794786640e31eb25bf894cbb1858337e84b84c58d82d5647"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_validate_config_values_validate_config_values.if_not_app_config_version.logger_warning____conf_v": {"doc_hash": "3ceecf701ecccca7320b7ceb2624effae82a5025e9f6fd064b1d768c2280f538"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_convert_epub_css_files_convert_epub_css_files._type_ignore": {"doc_hash": "5af24cf8cdd3d18ea1071ae9983773a02a9cdea2e9c725efe08c835d8f0c7b55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_setup_": {"doc_hash": "7ed906584266e6a041913d5036ae0a33bff0b092091584b67f10a78797b18e17"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_Catalog_Catalog.__iter__.for_message_in_self_messa.yield_Message_message_po": {"doc_hash": "556c8950c0516bbd4643935a8329c02d7dee61dddfc8463e5e0cc20c4c84d734"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MsgOrigin_GettextRenderer.render.return.super_render_filename_": {"doc_hash": "81827f151a2c993136d2a1c31dcbc4bde8425ace124deb35a5df6d8d52359740"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_I18nTags_I18nBuilder.compile_catalogs.return": {"doc_hash": "3283fdd8241c87c4d5f15c9ca903cbb8cd4416f173713fabf54c9d063ede7a50"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py__determine_tzoffset_once_ltz.LocalTimeZone_": {"doc_hash": "1acaab45aa785335a46ba5973c64f34146ee68cd011facb63577ff5d6e0dd709"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_should_write_should_write.return.True": {"doc_hash": "14181654b0251acb69a56c4225724d6f6f0451996fe76e7bfe1d1b96c2fbcc1f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MessageCatalogBuilder_MessageCatalogBuilder._collect_templates.return.template_files": {"doc_hash": "3299c7bc405fe677462410d5371f036acaa6a0cc7ceab122dd5d5f6864cdb773"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MessageCatalogBuilder._extract_from_template_MessageCatalogBuilder.build.super_build_docnames_s": {"doc_hash": "201d2acc019de1a8816983e3013d35ae03e0ac8d632c195237453a44d314dea0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MessageCatalogBuilder.finish_MessageCatalogBuilder.finish.for_textdomain_catalog_i.if_should_write_pofn_con.with_open_pofn_w_enco.pofile_write_content_": {"doc_hash": "0d1f19607ccb6960437104753ab2ad152bca887b1eeb564df50853da17882f54"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_setup_": {"doc_hash": "e3290689435d20dee66e9d3227d9be405023da4627429d255f47c1aee1e51a5c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_BuildInfo_BuildInfo.load.try_.except_Exception_as_exc_.raise_ValueError____buil": {"doc_hash": "a7a997d51c0cc6921784fde5462cd99c200c76a4affbeae1b23c0f59fcdffc55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_BuildInfo.__init___BuildInfo.dump.f_write_Sphinx_build_i": {"doc_hash": "42d00f150dd913d310f564a0fae7529136d434f33e2ac2c5acca9af102e70ec0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_StandaloneHTMLBuilder.init.self.use_index.self_get_builder_config_": {"doc_hash": "ae7b21f3fe61207dde9804d5d655fb79710afbbff7f7290c5e8e39ecea5ceeef"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_highlighter_StandaloneHTMLBuilder.init_highlighter.if_dark_style_is_not_None.else_.self.dark_highlighter.None": {"doc_hash": "b30fb0f29e427cb815e706367fa0199f625a07af808797a968226e2bb1be053c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.get_outdated_docs_StandaloneHTMLBuilder.get_outdated_docs.for_docname_in_self_env_f.None_1.except_OSError_.pass": {"doc_hash": "b237c3c7e3dce3fefb4b88ffa63e56a130b7a03769c180f1710a11e55bb0e02a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.get_asset_paths_StandaloneHTMLBuilder.render_partial.return.publish_parts_reader_name": {"doc_hash": "ab02f14d95bc531c8db1157c3a2116e20b2291eb3396a575f4374797b72c017f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.prepare_writing.self.globalcontext_StandaloneHTMLBuilder.prepare_writing.self_globalcontext_update": {"doc_hash": "03d67aa746a76ee781c5dcf411466b891a707a521e423a93782ee677d5b357e3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.get_doc_context_StandaloneHTMLBuilder.get_doc_context.return._": {"doc_hash": "f99d68a7017c793e2a87a2c207ddf142b66a157053c949ac30a9c9f0b3bd8215"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_doc_StandaloneHTMLBuilder.write_doc.self_handle_page_docname_": {"doc_hash": "65e13d9a187961b4c1aa6abaa8a3b4437b43a42a691f3e2bc3c2706b81ffc1a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_doc_serialized_StandaloneHTMLBuilder.gen_pages_from_extensions.for_pagelist_in_self_even.for_pagename_context_te.self_handle_page_pagename": {"doc_hash": "d7c556ba90ba90787c1631ab349f59224a4376161fc87923d9890d9d3cac2b30"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.gen_additional_pages_StandaloneHTMLBuilder.gen_additional_pages.if_self_config_html_use_o.self_handle_page_opensea": {"doc_hash": "941b781d791659047547f13c7f480e023f38bd83d3139bfce503083fe35c03a0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_genindex_StandaloneHTMLBuilder.write_genindex.if_self_config_html_split.else_.self_handle_page_geninde": {"doc_hash": "b62527fd465866fdb7b68d52a4fd7bdfbff5f3c8fd1f0543ce55a4ff2996b042"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_domain_indices_StandaloneHTMLBuilder.copy_image_files.if_self_images_.for_src_in_status_iterato.try_.except_Exception_as_err_.logger_warning____cannot": {"doc_hash": "fca37e5e8cc3f254c8904d0847d7e27ce7596718e3b7a2f04c3f1558e98c668b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_download_files_StandaloneHTMLBuilder.copy_download_files.if_self_env_dlfiles_.for_src_in_status_iterato.try_.except_OSError_as_err_.logger_warning____cannot": {"doc_hash": "6383a024ab511b99af04d2cf93bace06e29f31f77e4688ea7b561d3bdcdad211"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_static_files_StandaloneHTMLBuilder.copy_static_files.try_.except_OSError_as_err_.logger_warning____cannot": {"doc_hash": "896b27341b6c490e99e18cccca0f0144c022669711cec4e4eb197b52d742df49"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_extra_files_StandaloneHTMLBuilder.cleanup.if_self_theme_.self_theme_cleanup_": {"doc_hash": "a5fd5024a2d17cc2697931e80ef346b11b973cd695d88496d5f4977b59473ca5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.load_indexer_StandaloneHTMLBuilder.load_indexer.self_indexer_prune_keep_": {"doc_hash": "a570ba33c6f712a1bb7fc6f4c0db68a2b28c3ed6585aed8f15e2780013048e21"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder._get_local_toctree_StandaloneHTMLBuilder.get_outfilename.return.path_join_self_outdir_os": {"doc_hash": "ba5ebb7f2b7f86cd564ab6cf968c5ce0b3f9e8a849e2e03ec29071b705283563"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_convert_html_css_files_convert_html_css_files._type_ignore": {"doc_hash": "caddf54de2b8f31486894bd371ecbc0a8d31acf7041cf2cafe0cae7459c9ea8d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_convert_html_js_files_convert_html_js_files._type_ignore": {"doc_hash": "7f524e3fac9c256e885e43b388647d1411d6168c1262b8d00a9f4bfcc4786ad5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup_js_tag_helper_setup_js_tag_helper.context_js_tag_js_ta": {"doc_hash": "6033ac46143eb14bfc9252e4e1541355a9c26829833fbc41814854938a9e2541"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_validate_math_renderer_validate_html_extra_path.for_entry_in_config_html_.if_not_path_exists_extra_.elif_path_splitdrive_app.config_html_extra_path_re": {"doc_hash": "400923f3a7052f212c37ade685f18a5e6a92f21ec55fd7426108c658cdbffc69"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_validate_html_static_path_validate_html_static_path.for_entry_in_config_html_.if_not_path_exists_static.elif_path_splitdrive_app.config_html_static_path_r": {"doc_hash": "d5415b23b948c304fdc33c298fa4c84d1b37e3799d8828f6a731217721843e99"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_XINDY_LANG_OPTIONS_XINDY_LANG_OPTIONS._": {"doc_hash": "09857779c9373defc13ea4bd0955134e97fdf7fd277efb5bf53606ca30ab8885"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.init_document_data_LaTeXBuilder.init_document_data.for_entry_in_preliminary_.self_titles_append_docna": {"doc_hash": "50500c02a0c9c62848078e6d2a847c0eec88530b3e54a8a904499fdbeabb9661"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.init_multilingual_LaTeXBuilder.init_multilingual.if_self_context_babel_.elif_self_context_polygl.self_context_multilingua": {"doc_hash": "da5b39b5715555e486e8ebce4275d5bbce6db07b6cf3baef7b7de3259d58eaa2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.write_stylesheet_LaTeXBuilder.write_stylesheet.with_open_stylesheet_w_.f_write_highlighter_get_s": {"doc_hash": "549c7db0f3307ac06df208102b900bc7d0efc92067c46ced80cfbd3780cb87c2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.write_LaTeXBuilder.write.for_entry_in_self_documen.None_2.docwriter_write_doctree_": {"doc_hash": "dd9658f5bb25776cd17d5a5f39ebcbb2eefe8b205e328424fcd3361e2fcb906d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.get_contentsname_LaTeXBuilder.update_doc_context.self_context_wrapperclas": {"doc_hash": "a8eb4924ace3f396a408a390b2d6ec061524f65883f87eae6766cde4433e89a2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.assemble_doctree_LaTeXBuilder.assemble_doctree.return.largetree": {"doc_hash": "7a221b24573842877a7e7cda21bffd22e4d24b8a7f38d51bb3cb94d2a25f41f4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.copy_latex_additional_files_LaTeXBuilder.copy_image_files.if_self_config_latex_logo.if_not_path_isfile_path_j.else_.copy_asset_file_path_join": {"doc_hash": "7560890cd54fd258dda5b180ea1c91a10475dd2c435e07246012a055589e9b81"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.write_message_catalog_LaTeXBuilder.write_message_catalog.copy_asset_file_filename_": {"doc_hash": "f11e13c2bb5035370a594fb902f99ec30205edfaefd8834b9c625bde6e95b129"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_setup_": {"doc_hash": "37b1811ca58c2231834fa95eb2e5b3b3f839a2de16f69b283d19f545f8e68b63"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/constants.py_ADDITIONAL_SETTINGS_": {"doc_hash": "f86e8c0793a6898279c340fb0966dd7069d50ad3b5c6351ea51a89886cfd1a7a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py_BuiltInTheme_BuiltInTheme.__init__.if_name_howto_and_no.else_.self.toplevel_sectioning._chapter_": {"doc_hash": "8611c9dc669a80d44eaaf3c2c75769fede26d2ca07c115a27c931534d0d50a9e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py_UserTheme_UserTheme.__init__.for_key_in_self_OPTIONAL_.try_.except_configparser_NoOpt.pass": {"doc_hash": "b4a4a81d2b02e45ede347ba37516661d19356beb2c5b280885a795e564953379"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py_ThemeFactory_": {"doc_hash": "aa9a610d6b60c28738a7b4ad39cf7e6292669ee555513fc8a81565493c1bc453"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform_ShowUrlsTransform.run.try_.finally_.settings.id_prefix.id_prefix": {"doc_hash": "788af4c025f807b44fa5fe5cd08486921eb36a04618c774d231155d84c405875"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform.get_docname_for_node_ShowUrlsTransform.create_footnote.return.footnote_footnote_ref": {"doc_hash": "04b0f6e55f396d674471d58ee1df16937bf66c07f619389e9b0f064971517cf0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform.renumber_footnotes_ShowUrlsTransform.renumber_footnotes.for_footnote_in_collector.for_ref_in_collector_foot.if_docname_ref_docnam.ref_nodes_Text_str_num": {"doc_hash": "e6114315cacc426275b84157edc40b8196026b7cf40abe639921a87308e00e95"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_FootnoteCollector_FootnoteCollector.visit_footnote_reference.self_footnote_refs_append": {"doc_hash": "b9f3f36b6be654c4aadad2c08f3f446b5af776ead41eab32dec3896f3cd17a2a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LaTeXFootnoteTransform_LaTeXFootnoteTransform.run.self_document_walkabout_v": {"doc_hash": "d3137f398182ee6f36d3433398acc31588c65e48c78fb36013a0ff1f1589b824"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LaTeXFootnoteVisitor_LaTeXFootnoteVisitor.depart_footnote.self_unrestrict_node_": {"doc_hash": "65a5cf281cded849c730a6540bcc587b41267bc66f5607ab780a174e1823a2c3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LaTeXFootnoteVisitor.visit_footnote_reference_LaTeXFootnoteVisitor.get_footnote_by_reference.return.None": {"doc_hash": "cda0e7d362ba3143de09167e0da47515f56e8b327a5d8dac0cb4b19ff582ffa5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_BibliographyTransform_BibliographyTransform.run.if_len_citations_0_.self_document_citation": {"doc_hash": "db23340fcc3a29438fe245c574d03b708ba6e7a56f58968c0492eb7609a0471d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_CitationReferenceTransform_CitationReferenceTransform.run.for_node_in_self_document.if_docname_.node_replace_self_citatio": {"doc_hash": "9290c57f71622f3d95de27588cce95eccbd1eb060a72545621e55cadbef5d8e9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_MathReferenceTransform_MathReferenceTransform.run.for_node_in_self_document.if_node_refdomain_.if_docname_.node_replace_self_refnode": {"doc_hash": "cb16099d7b4602753cf764298bca99785dabab3828f0da510f6711c8ed868629"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LiteralBlockTransform_DocumentTargetTransform.run.for_node_in_self_document.if_section_._special_label_for_doc_": {"doc_hash": "789653bfa99ab7a5fa4b61ff0d5cbd2de1ebdf974bc54c1db2277dfdb7a9d12c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_setup_": {"doc_hash": "4419920b894520cc252c364c9fcb50b0eaa7c86c1f856969892cc526425740b3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/util.py_ExtBabel.language_name_": {"doc_hash": "3454f1a1515897cdad2647748b705547b12e1a17742ee8840951fef3e1b6a5ec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_check_anchor_check_anchor.return.parser_found": {"doc_hash": "007eccf10f7ae9cf54dcda08263f76c0795e22cf941653d5422eb280da3f43e8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_setup_": {"doc_hash": "0094d0826af22a5347b68a56d26c005c9f3b2c0019d7fd35649fb8ae3d523edb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py_ManualPageBuilder.write_ManualPageBuilder.finish.pass": {"doc_hash": "7d889e96c5641fd0b61b1fa4975f4dfddb7ba2196b03c63bcca4499f463c7749"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py_default_man_pages_": {"doc_hash": "1b51541a2166dc4a00d3ac88c29d93e9fcc0069a9f37a33cc03460d96d480a53"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder_SingleFileHTMLBuilder.get_relative_uri.return.self_get_target_uri_to_t": {"doc_hash": "6f017d3b739c8d50a1c543acd06b0b48fbf64bc20a776ea25e1d2fe865525cb5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder._get_local_toctree_SingleFileHTMLBuilder.assemble_doctree.return.tree": {"doc_hash": "53b5f02e33800aac6409cf221117f68bae4932f734c72187c8dcc11b454213ed"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.get_doc_context_SingleFileHTMLBuilder.get_doc_context.return._": {"doc_hash": "07941f4ff21b9dc11b34edf84409c593ef27e1e74ec95f08cd5c34242d82912d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.write_SingleFileHTMLBuilder.write.None_2.self_write_doc_self_confi": {"doc_hash": "377b6f74bbaa1adc17f45dc877a412f39edc2c0d4c8da97deae7870f4e4bde56"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder_TexinfoBuilder.get_relative_uri.return.self_get_target_uri_to_t": {"doc_hash": "fde6c6446bca90cc44e7b3ce7da75fe77903fd110dc2fb74249e46aed091044d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.init_document_data_TexinfoBuilder.init_document_data.for_entry_in_preliminary_.self_titles_append_docna": {"doc_hash": "fc751c9c847c307e0855a9b3f52e0fd6d1b91e37e94dcee6cb9fb95e6787b5bb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.write_TexinfoBuilder.write.for_entry_in_self_documen.None_3.self_copy_image_files_tar": {"doc_hash": "63606a74371a2fc8a8248fcbd1cf3205f9919af269b3b29f36e4c4b832ad7e4d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.assemble_doctree_TexinfoBuilder.assemble_doctree.return.largetree": {"doc_hash": "ccdf0ab08913ce39bb230be89c5e1ed5870541b87f34ab09a38bde45f23a8391"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.finish_TexinfoBuilder.copy_support_files.try_.except_OSError_as_err_.logger_warning____error_": {"doc_hash": "a217cca52cae01faf5e1d7347aa364692dcbf87d4282aa6313ee182789a1c0c3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_default_texinfo_documents_": {"doc_hash": "3f4d8ae0eda7f0d64c8d522b7927e80833d9e80a05fcc8eaa306eb74985d616b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/text.py_TextBuilder.get_target_uri_TextBuilder.finish.pass": {"doc_hash": "537d53f7aaf64953952256ff00938c369dc48607f7847bc77bee8d5012eb9b0b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/text.py_setup_": {"doc_hash": "807f987689ef5fd1b47d7d6d69bb3367fadb434f9d25ad82946242d3a7f91578"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py_XMLBuilder_XMLBuilder.prepare_writing.self.writer.self__writer_class_self_": {"doc_hash": "2d878ab85e28b2db2fa04590a2bc121f781b96073fdbdb05a71f39e9822835c8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py_XMLBuilder.write_doc_XMLBuilder.finish.pass": {"doc_hash": "6a77b69fcb9155a37337844290ca32e2e294b2cac897483e568a50721bdb12a0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py_PseudoXMLBuilder_": {"doc_hash": "3e367ddb46a6eddff5f072ba040ac31b4f6dd3965aaf76e4231dee3f04f9939f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/__init__.py__": {"doc_hash": "c32d6fc79b8a3868862c723233048f22f2f470b04819d7d7b3a1235616c2e05c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_handle_exception_jobs_argument.if_value_auto_.else_.if_jobs_0_.else_.return.jobs": {"doc_hash": "5f79e911e912e5ca1705aec11e33137223382a1b3c9bbda81e1d30695fbaa206"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_get_parser_get_parser.group_3.parser_add_argument_group": {"doc_hash": "b966010e6695014033bd2b94bd25b61c83492a2e5380223c60b6ee72bc2b92a9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_get_parser.group_add_argument_v__make_main.return.make_mode_run_make_mode_a": {"doc_hash": "4d300400316bdbc2837301dd315d192aa558191e66f41e8c601cd78f635032a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_build_main_": {"doc_hash": "39c7e62248e7a7c1d4215a2b0793d1f30f8c4f76708fee71952f33d3a043bfe7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make_Make.build_clean.return.0": {"doc_hash": "c20962bbc3ffaf315eafd8635f556deea598bc4b90eb80f21f41f97759a5eb53"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make.build_help_Make.build_help.for_osname_bname_descri.if_not_osname_or_os_name_.print_s_s_blue_": {"doc_hash": "3fc3019ae0419f59b62853fb4415ab6382882106f9460add80b8502e13719e41"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make.build_latexpdf_Make.build_gettext.return.0": {"doc_hash": "9a83a4dd8b0bf2b2b9a719515152fd40617b359e3f6a6c7e821df1926407d3ed"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make.run_generic_build_Make.run_generic_build.return.build_main_args_opts_": {"doc_hash": "2dd729e1598da6d44b025d563197aaacd6d61d81c1d5a5702b03945937b77ef2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_run_make_mode_": {"doc_hash": "b674d56863eb29513d4ad3dd1edbb928bec4580d8c38a176b35ef6beeb6fcfd4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_ask_user_ask_user.if_release_not_in_d_.d_release_do_prompt_": {"doc_hash": "30fc28e3c32a0c7a79e9b0bf5b63130685ea6fb55a4bb3558748c7666e38d903"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_ask_user.if_language_not_in_d__ask_user.None_3": {"doc_hash": "46655140d97b433c5f9dc8afe8dc62b97a7dd5373134f9065b66ffe400346558"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_valid_dir_valid_dir.return.True": {"doc_hash": "26e37c6ca241948729aa26e8fd4b5e6ae21c4fb9f2ca2aa3456fcf4c49ecd7e0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_main_": {"doc_hash": "125722a2bd54804d81462aedc65b19d2976163921a730c003e94fc3c1425a64d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.__init___Config.read.return.cls_namespace_overrides_": {"doc_hash": "74628d4114e6b35540aab9cc0ae51cc2c3fc53b279892c2a738e0b051b76abec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.convert_overrides_Config.convert_overrides.if_not_isinstance_value_.else_.if_self_values_name_2_.else_.return.value": {"doc_hash": "47cbee51dc7a84afeaeeb9a44bcbb0026e60c4a79a8854ad7b46837a4d50fa12"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.pre_init_values_Config.pre_init_values.for_name_in_variables_.try_.except_ValueError_as_exc_.logger_warning_s_exc_": {"doc_hash": "9fb5f5c671d636614d5d444a03d6ba0ece32e9567e0e3ffd27bb47467d6993d7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.init_values_Config.init_values.for_name_in_config_.if_name_in_self_values_.self___dict___name_con": {"doc_hash": "185cadfb55ed35024dab85f922cebbd1cd7338775a757f83b90aed5bd2a2188e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.__getstate___Config.__setstate__.self___dict___update_stat": {"doc_hash": "4a0b081a3a5184a06bcfff78b08e950b0379f27ef07e6da693833c69d93b305f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_eval_config_file_eval_config_file.return.namespace": {"doc_hash": "e8c981af9f7875bfd99a8970251b17e3f5cf95f53c74c3ab40dfc914fb033b2c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_convert_source_suffix_convert_source_suffix.if_isinstance_source_suff.else_.logger_warning____The_co": {"doc_hash": "791fb09cde2e2386f9cc1daefb95b2f46d4ef561db30eee884d6c4a7ce97562a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_check_confval_types_check_confval_types.for_confval_in_config_.if_annotations_is_Any_.else_.if_annotations_.else_.logger_warning_msg_format": {"doc_hash": "6e80adf76a96a0bcb07e3510d9f65c4fd87dda23cf55187e6103b1374caa2a43"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_setup_": {"doc_hash": "9547b8da0b76d74faa2e743f33abe442bf78e2b090307282b0934cbaa7995fc5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/deprecation.py_DeprecatedDict_": {"doc_hash": "d7d9259eac56bc858d440b25a1ecededcdd26cdb45a04fc13d3848f2229ea498"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.get_field_type_map_ObjectDescription.get_field_type_map.return.self__doc_field_type_map": {"doc_hash": "7c9d664e9ca5f12f2621db289110c53b0708f51fbfcd14e9165c1a92ae8978d8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.get_signatures_ObjectDescription.get_signatures.if_self_config_strip_sign.else_.return._line_strip_for_line_in": {"doc_hash": "cd539a81f1d767fdb5e6dc81a7e293824eeefe85a839541dfd7cb23f1848d984"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.handle_signature_ObjectDescription.handle_signature.raise_ValueError": {"doc_hash": "0959b06e1aa887dccc686c08f5ff65da7b3cb3a8b548183034e448bbadbdb3c3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.add_target_and_index_ObjectDescription.after_content.pass": {"doc_hash": "3f984e4c25d1dc0e846e68785d61e001fae9eb10393b9acc5faf408c9439aa44"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.run_ObjectDescription.run.return._self_indexnode_node_": {"doc_hash": "eeab22d26558b702f67421edd9199fb849deff263e8aa79303dcf21b9e07e96e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_DefaultRole_DefaultRole.run.return.cast_List_nodes_Node_me": {"doc_hash": "9a3f5a92417985084c9eb0887e7b05587d893cd1c0907ccc6d7b149bcf6c6e7b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_DefaultDomain_DefaultDomain.run.return._": {"doc_hash": "3a8601f79418257c5571826c20f4e9ab41f2f17f698c08b89d65d66756334587"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_sys_logger.logging_getLogger___name_": {"doc_hash": "a061422087456d5b83f2ec28b5776f80c1f19581615e62a6d317e9b18f3aae3e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_Highlight_Highlight.run.return._addnodes_highlightlang_l": {"doc_hash": "f0044e283a4c552a3d645c900d3315dd496459feb6fc0d92dde5979da314942e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_container_wrapper_container_wrapper.if_isinstance_parsed_0_.else_._never_reached": {"doc_hash": "699dde1c8c293bc8dbe326a485e10bdf5b8c11048b11696491dddf6ab2fc7034"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_CodeBlock_CodeBlock.option_spec._": {"doc_hash": "9ee67049e7c54cc8616cdae24769d3f8b81a3676e548c50efeaa7f1c029cb801"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_CodeBlock.run_CodeBlock.run.return._literal_": {"doc_hash": "09407a5f0b0bd34ae678c75282da1820e0bc427596b1e16f67faf692d484f65d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader_LiteralIncludeReader.parse_options.for_option1_option2_in_s.if_option1_in_self_option.raise_ValueError____Cann": {"doc_hash": "aaf0e66f9e03d84ae0c6df0620cc1934062c781351314b1a67fbd2a6c4713f00"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.read_LiteralIncludeReader.show_diff.return.list_diff_": {"doc_hash": "8946f781182281ab3f14449ec6230d5f5684cf29b5f83ef8103004b8cf9ac784"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.pyobject_filter_LiteralIncludeReader.pyobject_filter.return.lines": {"doc_hash": "18b2171e17fe7fcf8973c7f86cf6e809932796117d613c020101bf951462dbde"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.lines_filter_LiteralIncludeReader.lines_filter.return.lines": {"doc_hash": "c7c205721b6c80e973f78f1e1e193b15f3fafd84326a999181e25b11b3e19d02"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.start_filter_LiteralIncludeReader.start_filter.return.lines": {"doc_hash": "22d2bb538fb055dfa649bf0c43bc896dc456aaca23a293b7e3cede2f3fba3051"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.end_filter_LiteralIncludeReader.end_filter.return.lines": {"doc_hash": "dee9ce4e677985128252869a254698f7427915bd2ea44b08df229307afa3479d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.prepend_filter_LiteralIncludeReader.dedent_filter.if_dedent_in_self_optio.else_.return.lines": {"doc_hash": "499db32a0538ece859b91f490cfbfb2591bffca7be538ad3bbbc5089da86bf9c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralInclude_LiteralInclude.option_spec._": {"doc_hash": "c9da8f8eaf269dcce9def13870f0459c111a515d6d048902862a27438fdec7a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralInclude.run_": {"doc_hash": "cf81f2bb4cc77054aef153ec0f4a720894b06040bb2c7da1550e68bdb513fae4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_re_int_or_nothing.return.int_argument_": {"doc_hash": "e75b77abbf57a25c21250df764eb7a50cd1de274a71cb5f4fa71c049aab761cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_TocTree_TocTree.option_spec._": {"doc_hash": "c583b4aa6c732820fd11672ab2d83f7eaf833f11647195aff79e398dcfdbd05e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_TocTree.run_TocTree.run.return.ret": {"doc_hash": "32dc5e4fefb00ced502b8ceebd7fa9720ee0cd7a49ca56cac59658aef64941f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_TocTree.parse_content_TocTree.parse_content.return.ret": {"doc_hash": "71f7e4100aa0815e2edb971ca84dd38ca607c4c8a56af0f4599a42ccf5bc57f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Author_Author.run.return.ret": {"doc_hash": "bb6998c69af379deabdbcbaa8fe03c88b15472873b64c708285e19d0672f56fa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_SeeAlso_TabularColumns.run.return._node_": {"doc_hash": "8286b0cc7e9d5c29a637d4bce788eb3dc98000a10102e21cf27b2c34d286cb12"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Centered_Centered.run.return.ret": {"doc_hash": "69de9c0bb984bb138294e8802ccc3cba3d451367d8deb95310543a245d4dd54f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Acks_Acks.run.return._node_": {"doc_hash": "9b5cc76fe7d9aee8bd4c67b604abc6cee939f7328792aec0d096c92e3011c845"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_HList_HList.run.return._newnode_": {"doc_hash": "e5d77ab87ebd500d8601139403a0925aa7bed089d93172ba4f101511c868c1e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Only_Only.run.try_.finally_.memo.section_level.surrounding_section_level": {"doc_hash": "8ca334b0a4c6ee84d672f27b78b105a1839b22724dd97b96dd7cf5fecdfcbe99"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_setup_": {"doc_hash": "27d6a4b969ef1b52828ff5001c1dcddf8f61dff32d266dbca191fb5325847e36"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_Figure_Figure.run.return._figure_node_": {"doc_hash": "576ca411c4895c4eeb30fdc37524d69ed1784b45437b5f086e7e9aaf71a24df9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_Meta_Meta.run.return.result": {"doc_hash": "63be172eee0d4eaa9b5c27b5eee20cf3dc5cbcd3d6a001c1adb2af85ddc75bb7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_Code_Code.run.return._node_": {"doc_hash": "028f05201a74281f6c9987acc0dcc6002310e55142c903042fd21f239611043b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_MathDirective_MathDirective.run.return.ret": {"doc_hash": "693b521770e22cc0d9f5e5126b96cb7b62313d2e77c280787415a865b14e64fc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Index_Index.__init__.self.domain.domain": {"doc_hash": "a5bb33ad1d7e15255dacbbd6631e1906a0f2578b5bdccf32e17ddfef8522830a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Index.generate_Index.generate.raise_NotImplementedError": {"doc_hash": "074017f0956f2ff5ece4567fc3a8617fa5deaa0b33b7e1e5ebae2efc71409823"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain_Domain.data_version.0": {"doc_hash": "43f0c1ccdd82b0a0964b4bbd1608e9b3cc0f25539e10e6954b508f4e1a43e2cb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.__init___Domain.add_object_type.for_role_in_objtype_roles.self__role2type_setdefaul": {"doc_hash": "65d4d80dc7cdf795fc15b97745a8ee8f30b47dc068a283bf8df01223c113aabd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.role_Domain.role.return.role_adapter": {"doc_hash": "109a0b6c609c41fc7d099265e3ca1a74898fb05ac1a3154c8368111e89e7e812"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.directive_Domain.directive.return.DirectiveAdapter": {"doc_hash": "44d3cc805d706d1f54132ba10d7314f457f3f5d90dd940a5e77f58b55dc45c8c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain._methods_that_should_be__Domain.process_field_xref.pass": {"doc_hash": "c31752ad62ab8165d64ec6bc7940e34ac7016408a290f253fe01e3334184dc89"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.resolve_xref_Domain.resolve_xref.pass": {"doc_hash": "415ad73da5cfbb1ebd3ac02fdac445ef3e8bde52e24ffa660f89039299a0caba"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.resolve_any_xref_Domain.resolve_any_xref.raise_NotImplementedError": {"doc_hash": "a1fb3d3f32e98c8ca03f9808c54950c7b5ddd2d30cf576bdaf6d8ebd16de1396"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.get_objects_Domain.get_objects.return._": {"doc_hash": "4176d20485e9dd37eef9b91794887bf284368afed3a802def1374d60f2d35d25"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.get_type_name_": {"doc_hash": "4b6527c538ac76f69dca5c47a34495fd7a372b74fe91ebbd5b34816534c7a129"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTNestedName_ASTNestedName._stringify.if_self_rooted_.else_.return.res": {"doc_hash": "25ad48e72d9dcc719c0514719dfbe1b1952aaf69177dad36aa053f2fef5aa5af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTNestedName.describe_signature_ASTNestedName.describe_signature.if_mode_noneIsName_.else_.raise_Exception_Unknown_": {"doc_hash": "2f10292b0f173a4832e4b6a7c5543358bebcd0e2dd8f56b9004f28a1f0454ed3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTStringLiteral_ASTIdExpression.describe_signature.self_name_describe_signat": {"doc_hash": "dea3f3e69151a334a9370e43721adbf54db111e441da466d1a9d5a247240c640"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Postfix_expressions_ASTPostfixCallExpr.describe_signature.self_lst_describe_signatu": {"doc_hash": "20b36f5b20726332f17a8e6946f79dd6a2c397b78fd61a3a60cce0ac17304e2f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixMemberOfPointer_ASTPostfixMemberOfPointer.describe_signature.self_name_describe_signat": {"doc_hash": "3bfaf93df026f24ae4f45e2c2a87ef44e2e8578332cd2502b760e8826cc73813"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixExpr_ASTPostfixExpr.describe_signature.for_p_in_self_postFixes_.p_describe_signature_sign": {"doc_hash": "5ee3409e123554854f1ade7ad5c9e4a4f82cbaaa14a1560d3fbe8edb29742acf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Unary_expressions_ASTUnaryOpExpr.describe_signature.self_expr_describe_signat": {"doc_hash": "4511978791ade33f678a48c7991e542f49ddc804abd50e94a248c0184b644305"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTSizeofType_ASTSizeofType.describe_signature.None_2": {"doc_hash": "31ea3d2fc2e79516c66990e750f78b43b5e8ed42f8e711771f9f3ccc4ff91d53"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTSizeofExpr_ASTSizeofExpr.describe_signature.self_expr_describe_signat": {"doc_hash": "380e919d11f60f1608385078536105381c65612108e2593103f3075bec1dff6b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTAlignofExpr_ASTAlignofExpr.describe_signature.None_2": {"doc_hash": "cc086aea41b296fe88c92ecc63debad45ee4f92e2cbf84b26bba67b0e2c032dc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Other_expressions_ASTCastExpr.describe_signature.self_expr_describe_signat": {"doc_hash": "e2cb11eae5e6a60c507c9b731269d2e9267d1f83876dbf76e7e7f44988cb8aa3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTBinOpExpr_ASTBinOpExpr._stringify.return._join_res_": {"doc_hash": "ce796cb5781ac742578222288a3689d52d2ed77c852ae8e9201a765a319333d8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTBinOpExpr.describe_signature_ASTBinOpExpr.describe_signature.for_i_in_range_1_len_sel.self_exprs_i_describe_si": {"doc_hash": "48de92f1f064b2eeb36e03a3b3d1dbfc0dd5dbea27dea8ee21c2301a7a2200a3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTAssignmentExpr_ASTAssignmentExpr._stringify.return._join_res_": {"doc_hash": "204233b39eabb826f163475121298d3bbdc2c39896a2df5a8823af874535f89f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTAssignmentExpr.describe_signature_ASTAssignmentExpr.describe_signature.for_i_in_range_1_len_sel.self_exprs_i_describe_si": {"doc_hash": "1b1aa22fae45998443c0379807ea347ae950697f1e5f76b66e85d12ed90b3cb5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTTrailingTypeSpecName_ASTTrailingTypeSpecName.describe_signature.self_nestedName_describe_": {"doc_hash": "2406503de6741f7f0339ff9846efcaf00f76dcaf957a0ae5cc66d0482b685ba8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTFunctionParameter_ASTFunctionParameter.describe_signature.if_self_ellipsis_.else_.self_arg_describe_signatu": {"doc_hash": "3561566141a677cb15a04a58b3518c6d8e6194f063fac7cf3ad14457b006b874"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecsSimple_ASTDeclSpecsSimple._stringify.return._join_res_": {"doc_hash": "6da10905cda0077c8154bd291cbd3d976fc880f0609777b1ba1addf32270999c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecsSimple.describe_signature_ASTDeclSpecsSimple.describe_signature.if_self_const_._add_modifiers_const_": {"doc_hash": "7f556f53f26790e13632537587b7e0693e8643e3eb3ae2dee0f1d4e8d88a5eb2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecs_ASTDeclSpecs.__init__.self.trailingTypeSpec.trailing": {"doc_hash": "155e0967ed78b53a91a35de26992ec7cf89be56a555a29f1e3475185400f4fbf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecs._stringify_ASTDeclSpecs._stringify.return._join_res_": {"doc_hash": "a108fb68d2049e96d13c4d6152df6706d38ef2d155b0d847f40fd2e642facc84"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecs.describe_signature_ASTDeclSpecs.describe_signature.if_self_trailingTypeSpec_.for_m_in_modifiers_.signode_m": {"doc_hash": "50826eca924ad805becf4e8f120cf27a18cad03928c557668a37fe3fdff3c6ab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Declarator_ASTArray._stringify.return._join_el_": {"doc_hash": "bd2f5bd51ac8c2e08a4431160e248315e31dfdf7a8ef9ee5c5efb3903ada6369"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTArray.describe_signature_ASTDeclarator.require_space_after_declSpecs.raise_NotImplementedError": {"doc_hash": "17c1f88a9dded5b8994e3865e776879ec567f4318e9b328add7b2825f5656e66"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorNameParam_ASTDeclaratorNameParam.describe_signature.if_self_param_.self_param_describe_signa": {"doc_hash": "46d9faca4b2764fc6066f6e954e2c947ac4837ca298d1d2fcd517a7a56a444b2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorNameBitField_ASTDeclaratorNameBitField.describe_signature.self_size_describe_signat": {"doc_hash": "3e89829706fc21fc063409680923bd7d2793a937d85e406f0ebe91f767eb3708"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorPtr_ASTDeclaratorPtr.require_space_after_declSpecs.return.self_const_or_self_volati": {"doc_hash": "50251b77ae3b7781d3ad5b63b28fedc954c45a161db6d3ea37c826c72b7388f6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorPtr._stringify_ASTDeclaratorPtr._stringify.return._join_res_": {"doc_hash": "88df30adf9e0205108061f481254c6cdc05e0d12bee84b75719877ef43a3e9aa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorPtr.describe_signature_ASTDeclaratorPtr.describe_signature.self_next_describe_signat": {"doc_hash": "358191c6f1d1b41eacbf707944ed02e3a8f78bfa600e2159f6c364b10ba92cc2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorParen_ASTDeclaratorParen.describe_signature.self_next_describe_signat": {"doc_hash": "231394625992855bea27f1326371524ebf945668790e42d006d34faa43862d25"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTInitializer_ASTInitializer.describe_signature.self_value_describe_signa": {"doc_hash": "74afd6734b9d4d5f81f6006d4439f8a0bac0dab3448be2f6c8650c16643b5492"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTType_ASTType.get_type_declaration_prefix.if_self_declSpecs_trailin.else_.return._type_": {"doc_hash": "c78e3cb2158c96370ec19adf692b77b40478b4ce746f145bdebf45e18ebbd2b6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTType.describe_signature_ASTType.describe_signature.self_decl_describe_signat": {"doc_hash": "6e5d5032543aec801169bd68c32fcb3939d110ef00666918f9a0d56b33e86a4e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTTypeWithInit_ASTTypeWithInit.describe_signature.if_self_init_.self_init_describe_signat": {"doc_hash": "9c46595d2970043cf3c525d5e05883f7c58d5b42d425e0700d4fba18c3986ccd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTMacroParameter_ASTMacroParameter.describe_signature.if_self_ellipsis_.else_.self_arg_describe_signatu": {"doc_hash": "bbf0271a8f75c96799815c54c2cccc42d242d9241c3da657d18019fca85b7330"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTMacro_ASTMacro._stringify.return._join_res_": {"doc_hash": "bfe00236d6eeb20fb88479ab8a4c5f4887fedf0eb8c2b9122c229a62f693e622"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTMacro.describe_signature_ASTMacro.describe_signature.signode_paramlist": {"doc_hash": "710e9c91e27c9c4667b5da6abbef1d5796be55f8a0b87351e5b1764f86c4efcb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTStruct_ASTStruct.describe_signature.self_name_describe_signat": {"doc_hash": "bd551f45ccac297f40fe824a997bac06a28d08584006428d2acce7f5fa556be0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTUnion_ASTUnion.describe_signature.self_name_describe_signat": {"doc_hash": "a30f7d5b14e131f2717054fdadc433cd4e75d5b830c843a827d789cde47f0838"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTEnum_ASTEnum.describe_signature.self_name_describe_signat": {"doc_hash": "9a01732f9275a5499cdab8817badc5d58fbf8590c92c65ba6fc8c840a55c7608"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTEnumerator_ASTEnumerator.describe_signature.if_self_init_.self_init_describe_signat": {"doc_hash": "d212bab7ca53bfe410d172f963c1ed4a5e43537ecbb8a1676403eee36e033bcd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaration_ASTDeclaration._stringify.return.res": {"doc_hash": "4b00034e45300e273cab5e7a467bbebc1703dcf742d8db68c97a1fdda98dfb26"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_SymbolLookupResult_LookupKey.__str__.return._format_join_": {"doc_hash": "6167c6c15f21b81ee721f2f7a1538c9062d1ae9cfcfb0063b11b318bd6aab7ed"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._add_function_params_Symbol._add_function_params.None_2.Symbol_debug_indent_1": {"doc_hash": "ca8190859a4042e3863150a7454b7daa0c822a9b22875913b8389e3d01b8148b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.get_all_symbols_Symbol.get_lookup_key.return.LookupKey_key_": {"doc_hash": "7c6253b4b36c421ea659aa35bf13a2e354c3d920bc52b9587c2b1d1ebc85cd24"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.get_full_nested_name_Symbol._find_first_named_symbol.try_.except_StopIteration_.return.None": {"doc_hash": "f0433b81ccb032d2a4cdd0ee4692594d4d6ca605e5541ca83d4ac12a8eb8d7f2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._find_named_symbols_Symbol._find_named_symbols.if_Symbol_debug_lookup_.Symbol_debug_print_searc": {"doc_hash": "894e6e7198fa7c917b0a6dc0e8a107d99a6c3e2e064e296d57337df43e6f4e31"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._find_named_symbols.candidates_Symbol._find_named_symbols.None_2.Symbol_debug_indent_2": {"doc_hash": "aa012df604bb65757b965531bd5ca0c4a9f656ea4043e69ed68c927604b2542f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._symbol_lookup_Symbol._symbol_lookup.return.SymbolLookupResult_symbol": {"doc_hash": "02b6e1d24379c67f30b136fe2ab1f2726a16c925af4b49ac380b11a6fa3e2d89"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.merge_with_Symbol.merge_with.None_2.Symbol_debug_indent_1": {"doc_hash": "5796a5908325938febf4a9eb2f8a879c42f9eb1ca21acd6451734192d9867913"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.add_name_Symbol.add_declaration.return.res": {"doc_hash": "3d8b6c6bf159409bf56678e9c5323cef0b6508e6613382de32ae0c677ebba7cf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.find_identifier_Symbol.find_identifier.return.None": {"doc_hash": "c8889d2d399576301254bf4a513c46044a43e0a0a9c3b9f665d960eb34aa2a35"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.direct_lookup_Symbol.direct_lookup.return.s": {"doc_hash": "230251df0bdca0eff017016842d36a8db8428fb44df2e61d97eabdaed816b1f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.find_declaration_Symbol.find_declaration.return.symbols_0_": {"doc_hash": "6b454b42c691c0b0be6922b419a65f706df6e12ef838300a279dbbab262b087e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.to_string_Symbol.dump.return._join_res_": {"doc_hash": "dd99fce393d2bf1dce51e86dbbf1f896bdfd1276f7f9d73d90f12c2e295bd471"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser_DefinitionParser._parse_string.return.self_definition_startPos_": {"doc_hash": "18a5942aee4ff79fe96054b1681b7c65bb5ffe6a80620d42007d29887b4fe8ec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_literal_DefinitionParser._parse_literal.return.None": {"doc_hash": "09670307b18d3b817e46fcbadc14b75b3581d04c3fb262af882d9b943fa770a8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_paren_expression_DefinitionParser._parse_primary_expression.return.None": {"doc_hash": "e0fab68c04d635cd057529e7e1e59163a8f82af5ff4c492ee257f3d455d8ad91"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_initializer_list_DefinitionParser._parse_initializer_list.return.exprs_trailingComma": {"doc_hash": "1cad5b566860ca1d4621c923c0636bf3fde30950ba0b023660f8cf12eab25dfb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_paren_expression_list_DefinitionParser._parse_braced_init_list.return.ASTBracedInitList_exprs_": {"doc_hash": "4b28fab0b21b6cd0cfbc89248be6c490e87550f46fcb721b76d4d563ea8d8858"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_postfix_expression_DefinitionParser._parse_postfix_expression.return.ASTPostfixExpr_prefix_po": {"doc_hash": "4d39e95fa3fb52d306043ce6274c9e15793908340e3934b0ebe07e080db11095"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_unary_expression_DefinitionParser._parse_unary_expression.return.self__parse_postfix_expre": {"doc_hash": "4c2dafef12bad9599efff104321dfb7fffa4157689eed39fad3f63ad48a033c4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_cast_expression_DefinitionParser._parse_cast_expression.if_self_skip_string_.else_.return.self__parse_unary_express": {"doc_hash": "39544715a2005863a173a288da25bcaf0a1f2b5bad7c66336dbba6038ae86546"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_logical_or_expression_DefinitionParser._parse_logical_or_expression._pm_cast_": {"doc_hash": "05785c7ce44fcaf2e5802812a3653f562d2df35e935459dc873e4c2eb4b82150"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_logical_or_expression._parse_bin_op_expr_DefinitionParser._parse_logical_or_expression.return._parse_bin_op_expr_self_": {"doc_hash": "7e29ebac70b9d7c2ee3bd7fc0b5f1518b0af0817a07b83b2f4cb088b22dd40aa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_conditional_expression_tail_DefinitionParser._parse_expression.return.self__parse_assignment_ex": {"doc_hash": "9f587f2d393de48d22475c1ece09440b82de488ce68154edd7237e6ae824546f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_expression_fallback_DefinitionParser._parse_expression_fallback.return.ASTFallbackExpr_value_str": {"doc_hash": "86a058a30698566d1a1ffe5d2b94fdf0172ac6fa1cca6aff0a663ba88031edcc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_nested_name_DefinitionParser._parse_nested_name.return.ASTNestedName_names_root": {"doc_hash": "2b4aad399264a30ceba2104dbcfdacb540b10f49f6d2eead4cee2ba198875158"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_trailing_type_spec_DefinitionParser._parse_trailing_type_spec.return.ASTTrailingTypeSpecName_p": {"doc_hash": "8ab0cbbd765937a91bb5f16e76164bc1e400c35252755b35b75349e511f8a180"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_decl_specs_simple_DefinitionParser._parse_decl_specs_simple.return.ASTDeclSpecsSimple_storag": {"doc_hash": "33e23b60fc46d914d50f83da23a8937eeefdc54983ad8a1a3257b0f76e343867"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_decl_specs_DefinitionParser._parse_decl_specs.return.ASTDeclSpecs_outer_leftS": {"doc_hash": "a50e48955af6db25a8c1d10d388c714c76d330c1258ab0feec01a21a5edb075d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_declarator_name_suffix_DefinitionParser._parse_declarator_name_suffix.return.ASTDeclaratorNameParam_de": {"doc_hash": "5c14ae528d2da628bbe0f7cd21149450a7fe29b159b29d7c8f48b458911d78f4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_declarator_DefinitionParser._parse_declarator.try_.except_DefinitionError_as.raise_self__make_multi_er": {"doc_hash": "e2392829a7bac81764fd4d6eb72cece51d7329972e1df453f5431507396b409c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_initializer_DefinitionParser._parse_initializer.return.ASTInitializer_value_": {"doc_hash": "5969fc466cb943bce828de5053bfa5d8398bc9036623d03d3440055fbe1ee470"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_type_DefinitionParser._parse_type.return.ASTType_declSpecs_decl_": {"doc_hash": "e9bba8241f084e0e6300bd87365a1a2dbc3599302b2a2dfa614ffff70e74faa6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_type_with_init_DefinitionParser._parse_macro.return.ASTMacro_ident_args_": {"doc_hash": "a7531c90ce08deef5746b42c381c54e8708f7025cb73ecc34c76f31be7cf3152"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_struct_DefinitionParser._parse_enumerator.return.ASTEnumerator_name_init_": {"doc_hash": "c61e7393825069f4557e49c723166912a4d8991f28bd41798bf75460b942f6d9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser.parse_declaration_DefinitionParser.parse_declaration.return.ASTDeclaration_objectType": {"doc_hash": "4fc3c7aeb0f7819bb07c8085419421a7bef856f87461bc9363c62e91343896e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.object_type_CObject.describe_signature.ast_describe_signature_si": {"doc_hash": "5a34710db009f3d73826e5555fdefaf0b7a037ce2e802d936c8aecf148a908cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.run_CObject.run.return.super_run_": {"doc_hash": "bccf63cafd2aeb974c5e78122f18b8bb286c54a11255c0ece74b7b3eca6d36c0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.handle_signature_CObject.handle_signature.return.ast": {"doc_hash": "53a6e083822d0661a19c5ca8e042855d19738860943ac832b424da45e3779d39"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.before_content_CObject.make_old_id.return._c_name": {"doc_hash": "7f5bbc5a3b06650b8573fd36bb27334e5d13f56ea3d6a5d3dda45b82eca8108f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CMemberObject_CTypeObject.object_type._type_": {"doc_hash": "ea187af77316038c6968016933eb3f18d85befe67dec75893171703d33f0623e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CNamespaceObject_CNamespaceObject.run.return._": {"doc_hash": "cfc9a1023ff495746719515134563144afb61ba698b07c52bf744f980510ed71"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CNamespacePushObject_CNamespacePushObject.run.return._": {"doc_hash": "6e1192f5001adeaad3bc6fccb76467dd23dd64f3a455aac035ed8e6918a435a2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CNamespacePopObject_CNamespacePopObject.run.return._": {"doc_hash": "69f01fb1ba2db04ec71ba28bf43a7be4e4e22e013e581c65cc1ff5c368bbab28"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CXRefRole_CXRefRole.process_link.return.title_target": {"doc_hash": "761dc1de9fa1d186dbb51d4c338d35d0aea06b0fb6e4b8c3f9646a14c20126cd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CExprRole_CExprRole.run.return._signode_": {"doc_hash": "dff96cc47543e5bca8900099414f2b14bf09544a4297d2f4497d01e71fe6ba1b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.clear_doc_CDomain.process_field_xref.pnode_attributes_update_s": {"doc_hash": "082bfe4b4d53cc80c70eb713fa6b420dc82d6991be06e2b88b5af336b43d845f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain._resolve_xref_inner_CDomain._resolve_xref_inner.return.make_refnode_builder_fro": {"doc_hash": "efb5ff42f96cf8024dbf787b196e28c94ca689594f02534989065b870c7df31e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/changeset.py_VersionChange_VersionChange.run.return.ret": {"doc_hash": "9b7ad4bfa7cf14fb8af0696e53278a7ffe2c8f36d6d504f0443753a9ffaed5ea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/changeset.py_ChangeSetDomain_": {"doc_hash": "eaa5e6f7f13b2fec5f79fa0972451f666e9a506068f739d1d41c63e42a494296"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py_CitationDomain_CitationDomain.resolve_any_xref.if_refnode_is_None_.else_.return._ref_refnode_": {"doc_hash": "320081d0e3bb10d76eceb90fed01b155ea7958b7e24dd9b87e87654cec9c00aa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py_CitationDefinitionTransform_CitationDefinitionTransform.apply.for_node_in_self_document.label_support_smartquote": {"doc_hash": "3b1784bf7bc8756b4a1c9b01f44c0d81695c74c8312d5509d897d5a2f0e45298"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py_CitationReferenceTransform_": {"doc_hash": "e240e8fbd8b78911940eb8550484924cc02d79ccb9b259711378804ab5c16097"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__string_re__id_fundamental_v2._": {"doc_hash": "527082c8e030f3b3f3b11061d6d5f3b88da6895b61c5dc9b91acc093f2a05d60"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__id_operator_v2_ASTNestedName.num_templates.return.count": {"doc_hash": "183a2fd828d07f46bd807ca3f4cf34ba691053cc2a94d6f787a5d5f9d6339b50"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol.merge_with_Symbol.find_name.onMissingQualifiedSymbol.return.None": {"doc_hash": "0a5241e6daa123e4e7066922436129024ef696c05fdf5ae53c960f406475ac41"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol.find_name.try__DefinitionParser._parse_fold_or_paren_expression.return.ASTFoldExpr_leftExpr_op_": {"doc_hash": "73846b57e1d3d01cc8a07aa9bce3e18c820243f003495c64eb694ffd32e4f609"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_primary_expression_DefinitionParser._parse_postfix_expression.return.ASTPostfixExpr_prefix_po": {"doc_hash": "72186abce3d6fa743783a0e973320d6d29288193d5408c98f00400e19ddd15d1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_unary_expression_DefinitionParser._parse_expression.if_len_exprs_1_.else_.return.ASTCommaExpr_exprs_": {"doc_hash": "3f9e92d1d9f409c975310dcf8e937be3cf830d5059d16a74d636293b2762e347"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_expression_fallback_DefinitionParser._parse_operator.return.ASTOperatorType_type_": {"doc_hash": "c734b68a7308997a490049809a33d68f9fdbba44f3e260449d1cfb27d13d0e0b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_declarator_DefinitionParser._parse_type.return.ASTType_declSpecs_decl_": {"doc_hash": "d62b1cbf1c61519c13b6a0d8238dbdc53b538e45eb1c3935a8913ceba050db11"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexDomain_IndexDomain.merge_domaindata.for_docname_in_docnames_.self_entries_docname_o": {"doc_hash": "063d65a7aa4f52e82aafa04bbfbb40f3fa29e45d7ea16fec0e7bd42fc2b26538"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexDirective_IndexDirective.run.return._indexnode_targetnode_": {"doc_hash": "6e26d7a114d075eea8c0fc0106dd8ab10a1f6934325973b0e8a91e163f4ac950"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexRole_": {"doc_hash": "f2ced318c809194d68bf8ae893b2bb8f10d5c701eb4b252f805fcb18a5de20eb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.get_index_text_JSObject.get_index_text.return._": {"doc_hash": "6e388445559abf73589aea41bbd003a67cab1a371252129d87c73df1ca34009f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.before_content_JSObject.before_content.if_prefix_.if_self_allow_nesting_.objects_append_prefix_": {"doc_hash": "ba7b1518456af03599eac31dbcc1ac67ea699d2e4ce851681ca85c961851f284"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.after_content_JSObject.make_old_id.return.fullname_replace__S": {"doc_hash": "0604dff58738a5eede496602556cb42da793e006d82fff3990b9cdbac14ae9c4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSModule_JSModule.option_spec._": {"doc_hash": "01ff6786c1705cfb052812221c8c1e1a6d2ef0f29143a1dcb066b38f3a2d411b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSModule.run_JSModule.make_old_id.return._module_modname": {"doc_hash": "9aa5347cce705ebfde8663b5e3caf46e7316cc6b9fa1a4cc79ecd4a0b73b9cac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSXRefRole_JSXRefRole.process_link.return.title_target": {"doc_hash": "d235effa8b14e03756b5de253bcf8add168d293547a324ca090e2fd6de6d5be4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain_JavaScriptDomain.clear_doc.for_modname_pkg_docname.if_pkg_docname_docname.del_self_modules_modname_": {"doc_hash": "670494ecc688350cb81000e2db66af6ba572bc233debd22ce660d50491db5ae9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.merge_domaindata_JavaScriptDomain.merge_domaindata.for_mod_name_pkg_docnam.if_pkg_docname_in_docname.self_modules_mod_name_": {"doc_hash": "0e394dc8f36740ee1c0df31a6511541686d9edd4ecdb69bb31a3db793448581f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.find_obj_JavaScriptDomain.find_obj.return.newname_self_objects_get": {"doc_hash": "c712a7fb23004ff6766d2907692f7df9327e8dcbcd9618e72adf6567dbf11665"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.resolve_xref_JavaScriptDomain.resolve_xref.return.make_refnode_builder_fro": {"doc_hash": "6b4fa846de7562ba6fbd18a40bd04bc0b7960b15c86bd511352feb2824e29dc7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.resolve_any_xref_JavaScriptDomain.resolve_any_xref.return._js_self_role_for_o": {"doc_hash": "6dca50fe92377733f58338f50f4fcd64319b42d4a5cc71f0489d6e2e1117911b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.get_objects_": {"doc_hash": "d1fa0333fe424a6e9637b08805be80fd1cde9ee348bd15ad361c20f643687008"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py_MathDomain_MathDomain.merge_domaindata.for_docname_in_docnames_.self_data_has_equations_": {"doc_hash": "5ea3136108f473906838b1b23ccd72aebb1010190170cb34d351f23d30078d0e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py_MathDomain.resolve_xref_MathDomain.resolve_xref.if_docname_.else_.return.None": {"doc_hash": "640bc41137861ae7212f6765f480dccd23b83f084f98937ad79adda982495144"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__parse_arglist__parse_arglist.return.params": {"doc_hash": "4f191fb5f655ed64369bf5ffb2c9675c9f06061a78268f775631d5e665cc9486"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__pseudo_parse_arglist__pseudo_parse_arglist.try_.else_.signode_paramlist": {"doc_hash": "ec8099df5f5b7db95b4eaf7ed2812a21b33d95554322a3217ea846640e9a1019"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__This_override_allows_ou_PyXrefMixin.make_xref.return.result": {"doc_hash": "e11bd11cc531c6891247a1dbe5952525d6a11dba165e9c547724b7d3e24abaa5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject_PyObject.needs_arglist.return.False": {"doc_hash": "33af525dc9471e31ab6918d1c86e9e4be5a0ecbe878df5a7d0416469b72104b5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.handle_signature_PyObject.handle_signature.return.fullname_prefix": {"doc_hash": "dce45c1e8123ec48d2c5f09a9cba2237b86e49ece8b49957af1777831f680c83"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.before_content_PyObject.before_content.if_module_in_self_optio.self_env_ref_context_py_": {"doc_hash": "ca12d46404882c113e365f8bfdfc143c328018d069c1cf399d0ff47d99788973"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.after_content_PyObject.after_content.if_module_in_self_optio.if_modules_.else_.self_env_ref_context_pop_": {"doc_hash": "f815e5f199c0c29efe0bdccc6ef8cd99981b6feecc1457aed758c91b123f7a43"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyFunction_PyFunction.get_index_text.return.None": {"doc_hash": "78af23d76bf33643be5de8285d948c5b12e080ccb76d2895213234c384597cb1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyDecoratorFunction_PyDecoratorFunction.needs_arglist.return.False": {"doc_hash": "0d826edd4c148da330463fc7fc3367ebc842babf45b8473b5bf503f44b91ea37"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyVariable_PyVariable.get_index_text.if_modname_.else_.return.__s_built_in_variable_": {"doc_hash": "465a37eefae7225fa959aeec3da3978059c3c14575e9117e31cc6cd85a5975ed"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyClasslike_PyClasslike.get_index_text.if_self_objtype_class.else_.return._": {"doc_hash": "208c41276148da513b637f02becef8873a84533323da84bd6f6773c655db0ae7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyMethod.get_index_text_PyMethod.get_index_text.if_classmethod_in_self_.else_.return.__s_s_method_": {"doc_hash": "8af59a4c3b8e06e5acf1248073543fddc858955552bdbc1c83ca2b6f0eda7678"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyClassMethod_PyDecoratorMethod.needs_arglist.return.False": {"doc_hash": "ca7af40095cd1241222680b40e4d95a5190458d7260acce1de779995afed2bc0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyAttribute_PyAttribute.handle_signature.return.fullname_prefix": {"doc_hash": "8067f3609e2b5a17ce20a44de286cb4a827c1ba2eefb6fa11ee4b0a8da37b570"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyAttribute.get_index_text_PyAttribute.get_index_text.return.__s_s_attribute_": {"doc_hash": "8cd65a117ea88ceeb973f35e2c9338a51f01bd7329b709a0e494f5a2680d9b7a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyModule_PyModule.make_old_id.return._module_s_name": {"doc_hash": "9c258b49df17a52789e1c76903565661c73778ca14a5224af575f4c6809cfaf9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyCurrentModule_PyCurrentModule.run.return._": {"doc_hash": "048090d13953f73b429a9172b9056143b711b7f5b0bf1fb2648c7c8132b1eaad"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyXRefRole_PyXRefRole.process_link.return.title_target": {"doc_hash": "c2da7589eaaf0e3dcc8c28b6a72f5c04f26bca16ba49b10ac26ff38678e3ef3a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_filter_meta_fields_filter_meta_fields.for_node_in_content_.if_isinstance_node_nodes.for_field_in_fields_.if_field_name_meta_o.break": {"doc_hash": "6958ce3bc14e0b86ae14e56c698c756a44ba560ae728de8549966d57d9eaf476"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonModuleIndex_PythonModuleIndex.generate.return.sorted_content_collapse": {"doc_hash": "3e7826bf0dd4e7ebd8a94cde313667bd238f18f19684fd02c45fb1ff60faa223"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain_PythonDomain.objects._fullname_ObjectEntry": {"doc_hash": "6d449ada033fb9b13441e9b7901e683a88b70f68148634301f74a51b6ede3ab3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.note_object_PythonDomain.note_object.self_objects_name_Obje": {"doc_hash": "5ace834538ef03ae6f8e83c2716663a66a54d954f47cc1301aa29f6c9b097dc0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.modules_PythonDomain.merge_domaindata.for_modname_mod_in_other.if_mod_docname_in_docname.self_modules_modname_m": {"doc_hash": "f0653b2200a65a3d1db7cbea1328dffa5508b2ac56111b322d8780675066ba4d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.find_obj_PythonDomain.find_obj.return.matches": {"doc_hash": "75bb75e8182bc946e1a29511cd94dfdb865d44bb842a42e63e593472abfd18e1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.resolve_xref_PythonDomain.resolve_xref.if_obj_2_module_.else_.return.make_refnode_builder_fro": {"doc_hash": "5fcabe024cf1e5c3f62373bf836dbe84825c800fdd24ad9f3f8c1a5b72c8937a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.resolve_any_xref_PythonDomain.resolve_any_xref.return.results": {"doc_hash": "26092e9b4dee6ac767b4b43ad7c5483d51d3d91745419a22b90591490f942c73"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain._make_module_refnode_PythonDomain._make_module_refnode.return.make_refnode_builder_fro": {"doc_hash": "dee2898f575b628b8b6852f89897ebebbc7f3d37f5a062229597f769077856f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.get_objects_PythonDomain.get_full_qualified_name.if_target_is_None_.else_.return._join_filter_None_mo": {"doc_hash": "5d1f4534ed657adab5f774808ef1ac6889d077e0a8fc861997135653c76942d9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTMarkup_ReSTMarkup.make_old_id.return.self_objtype_name": {"doc_hash": "97cd0d1f949112413f34dc0cee3799e2c4d023ec21a0235a57ba43503830bbf3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_parse_directive_parse_directive.if_parsed_args_strip_.else_.return._parsed_dir_strip_": {"doc_hash": "18ed1832958d0c3f9c802e2ee26d733a250cd6480b82cbf0bbb3b358cf7133dd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirective_ReSTDirective.after_content.if_directives_.directives_pop_": {"doc_hash": "79f9d8557ea0364c65e5a2f869ebcc104bba026bae799e97ceeef9e6bedb30b6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirectiveOption_ReSTDirectiveOption.handle_signature.return.name": {"doc_hash": "9132b422ded50c160033150d74ec13e0f1a03c694950799ffe62f1baaff247a0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirectiveOption.add_target_and_index_ReSTDirectiveOption.add_target_and_index.None_2.else_.self_indexnode_entries_": {"doc_hash": "30b85b3ce76f8af83ff33987f65544f8d3473aa165082afb8ff704ad78d9c4d6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirectiveOption.current_directive_ReSTRole.get_index_text.return.__s_role_name": {"doc_hash": "de61a5690d7dd1c128e693122495dc5d404495a0517038c362168db61135f2a5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain_ReSTDomain.objects._objtype_fullname_": {"doc_hash": "fadf9e0be42cbe0b08f749bf010f0059b0ba5f22c704d1c839cb3467ffddf78e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.note_object_ReSTDomain.note_object.self_objects_objtype_nam": {"doc_hash": "ed9419c94a77e1328f634d720089a4383d6dd342fc1d90cc66e7d7354829b4ae"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.clear_doc_ReSTDomain.merge_domaindata.for_typ_name_doc_no.if_doc_in_docnames_.self_objects_typ_name_": {"doc_hash": "36e687a6f13a355276194b070c44d22c53f3055afb5804d3b07a54833d901606"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.resolve_xref_ReSTDomain.resolve_xref.return.None": {"doc_hash": "fd100bc65fd7cdcba4171ce8965f7b720d869d5cc6ce3a9e1d5cd3e98b5e8025"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.resolve_any_xref_": {"doc_hash": "908bfa1d57f68d8f0c55820e7d11610539652b06079fe913289c9def73d4467c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_GenericObject_GenericObject.handle_signature.return.name": {"doc_hash": "9dfb61bf389e884909eb10e8e90e2296ff90a171f5fdd1a327e4a45b0ff7a532"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_GenericObject.add_target_and_index_GenericObject.make_old_id.return.self_objtype_name": {"doc_hash": "37269a03c8b04fb0e6b0080d597efa0260d7c319e167b6d2ee87b2a46ec3e6f4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_EnvVar_EnvVarXRefRole.result_nodes.return._indexnode_targetnode_n": {"doc_hash": "24e005fa8fd21412a6e9f8a59839d5749528efeaf0ae4754ea90e725a4d51f8b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Target_Target.make_old_id.return.self_name_name": {"doc_hash": "928de38b6c09f8e6fd4537e3cc880ba9df3a326e0b741cd226fb1beaa5ff8b3e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Cmdoption_Cmdoption.handle_signature.return.firstname": {"doc_hash": "aebe99ec6e08eba83f7e516fe64e6946a5caa1e1671e29ee85a0b1329810d6e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Program_Program.run.return._": {"doc_hash": "30a1c014a1fbcf81e8d29ebd132696deba045830cfc022229eb792864d7095de"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_OptionXRefRole_split_term_classifiers.return.parts": {"doc_hash": "3f0b00ce46e0c75d7ba084be91bbcc93de372c46338b43736866097f8d6c750c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_make_glossary_term_make_glossary_term.return.term": {"doc_hash": "d5af6c01f990bb34e53a1e25e69f6cb21ee2bb535d9065bab5119b07895b706d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Glossary_Glossary.run.return.messages_node_": {"doc_hash": "225a3c06c7c4b32ce43d438ba7f3f4012b5e35e6ca780b590b5d114c0480f8b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_token_xrefs_token_xrefs.return.retnodes": {"doc_hash": "7f9d47d3f8a45ab06e112788ce22e1d930b473cf69117a7757fba1e5639a24ca"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_ProductionList_TokenXRefRole.process_link.return.title_target": {"doc_hash": "64a24382b3fcedec9b8d84079693c18f37d07cd6e8299e9de820bfe30aa4cbce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.objects_StandardDomain.note_object.self_objects_objtype_nam": {"doc_hash": "429efa8b0926fe48a320a5583f4b7e33622250f3fcf4341987e7f738c20e2e73"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.process_doc_StandardDomain.process_doc.for_name_explicit_in_doc.self_labels_name_docna": {"doc_hash": "e059a4408e272630957e1ae90b4d691dae0324ba7f5f0352e4deb8d4f9862998"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.add_program_option_StandardDomain.build_reference_node.return.newnode": {"doc_hash": "8e1a947d4ab03bf82df90e7b42a135fc28895436760306498b51b31e9006b5b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.resolve_xref_StandardDomain.resolve_xref.return.resolver_env_fromdocname": {"doc_hash": "bdb4e90bb47a5f5c83cddbed002f7fda8f799d8fb5d64234fb0b4d7e0f948072"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_ref_xref_StandardDomain._resolve_ref_xref.return.self_build_reference_node": {"doc_hash": "e04c4edaeafa4416a98efb04a4e36130141fd0edf4bb6531681ef31c9f3e45a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_numref_xref_StandardDomain._resolve_numref_xref.return.self_build_reference_node": {"doc_hash": "79f9dcbc46e8c4fdc19b4be56082e1570a972f9e3c1af3e8ed84596af72e018f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_keyword_xref_StandardDomain._resolve_keyword_xref.return.make_refnode_builder_fro": {"doc_hash": "05890a575aea58df0a83e022c48b53e74ef28f8a75cabd40749b83975b1c4ded"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_doc_xref_StandardDomain._resolve_doc_xref.if_docname_not_in_env_all.else_.return.make_refnode_builder_fro": {"doc_hash": "c2a9562aebebbec36a538c297601273e994ae5a545549cb05bbdb1de33dc25e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_option_xref_StandardDomain._resolve_option_xref.return.make_refnode_builder_fro": {"doc_hash": "bc04a0999e45c99366e1b5903b3ed2821341038508b6e39c71f97ff9bbd98207"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_obj_xref_StandardDomain._resolve_obj_xref.return.make_refnode_builder_fro": {"doc_hash": "cba132a66ed09c16078abec74e68375b27e98d70d893e4d6fab7a36fc2f3268e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.resolve_any_xref_StandardDomain.resolve_any_xref.return.results": {"doc_hash": "8f664eba91589771a2020a5557a0963bc359e3bd46e6a70680a086f8847f5fe0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_objects_StandardDomain.get_objects.None_4.if_name_not_in_non_anon_l.yield_name_name_label": {"doc_hash": "61eff7bca59249f49fca852a34388b5658543b39079df6b03add378a558a5ad1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_type_name_StandardDomain.get_numfig_title.return.None": {"doc_hash": "ea4928b2e154f79067373a78974ee684a269acfb7b20af03ef187b148f0ee485"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_enumerable_node_type_StandardDomain.get_enumerable_node_type.if_isinstance_node_nodes.else_.return.figtype": {"doc_hash": "237d3990353cab07176aa80608426eb710ade312e2a795abcfc72210ba838691"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.__getstate___BuildEnvironment.setup.self__update_settings_app": {"doc_hash": "8097a156f4c7d2ecfdf8e1f0925a3a9321b956df998e2d1ac029c8514f4696f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment._update_config_BuildEnvironment._update_settings.self_settings_setdefault_": {"doc_hash": "60f65457b66be99124e21aa2e8a804d0f71206b61f1e005778d0efe3dc963cd3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.set_versioning_method_BuildEnvironment.set_versioning_method.self.versioning_compare.compare": {"doc_hash": "e62de22f0c6ba74e8cc8432e17c5f495911510923cd3b23a0a47a2ed448b0222"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.clear_doc_BuildEnvironment.merge_info_from.self_events_emit_env_mer": {"doc_hash": "1c698303de12fe6f955cb3a79764fbe05efc85b065c7224f82590a6d246fcfb1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.relfn2path_BuildEnvironment.found_docs.return.self_project_docnames": {"doc_hash": "5a93afde6cd6efb7a4eaf1e8a8e598e1260611c777eece61b127bf79da8fd6d4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.find_files_BuildEnvironment.find_files.try_.except_OSError_as_exc_.raise_DocumentError____F": {"doc_hash": "e581587474c92ff8982df1268a144594aa1ae23b037903b4a6f33ff7dcfb3537"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.get_outdated_files_BuildEnvironment.get_outdated_files.return.added_changed_removed": {"doc_hash": "94cfc7df390285665aedcbf02575ee477e03f0821f4407f73e76a01456ee5dbc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.check_dependents_BuildEnvironment.get_doctree.return.doctree": {"doc_hash": "6e848789a1e0772d897c1239ea8a35f075574b16b2e616db6d41cc0611359493"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.get_and_resolve_doctree_BuildEnvironment.get_and_resolve_doctree.return.doctree": {"doc_hash": "14d27f9ae916dd9d80e54a560dde9507913a22fafb4aed0503099145503d7806"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.resolve_toctree_BuildEnvironment.resolve_toctree.return.TocTree_self_resolve_doc": {"doc_hash": "9b41be021a1a46fc2abc584d0ce32029a277c10601e8d33014081d48c7f5ef08"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.resolve_references_BuildEnvironment.apply_post_transforms.self_events_emit_doctree": {"doc_hash": "53493c48f5419ea5f52a69095aceb925f29326f0f91d6d330af747e13c08eb1e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.collect_relations_BuildEnvironment.collect_relations.return.relations": {"doc_hash": "faca05345517ff70d3ae2a2d76b335a4f436616a1f0b630041db1c08f7414b8e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/__init__.py__": {"doc_hash": "ea1fe091334d9239b72afdcc1f279d0afbcdb9e4195d1fea665fd984a07eb9cf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.newlist_IndexEntries.create_index._group_the_entries_by_le": {"doc_hash": "3f0d69e30ecb60c521ef157b2edc122577822339c76a72bd1ccb80539bc60b17"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.keyfunc3_": {"doc_hash": "49f78fa4d3b72ba75649ad06e0bdc2e19f84dfda0aa7301783e6b4f3e3388ca5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve_TocTree.resolve.excluded.Matcher_self_env_config_e": {"doc_hash": "236fa74ae2ca92982efd8337ce5dccd652bf5f19bd75656a2b40617aa4eaac6f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve._toctree_add_classes_TocTree.resolve._toctree_add_classes.for_subnode_in_node_child.if_isinstance_subnode_a.None_1.if_subnode_refuri_d.while_subnode_.subnode.subnode_parent": {"doc_hash": "fa63dbeb5e8f40a65ca74eca67e1cf3946e29eb9582cf1b60e241348a8441c7d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve._entries_from_toctree_TocTree.resolve._entries_from_toctree.return.entries": {"doc_hash": "294643db9eb76ad096a883be181e4167a48658bba13994d106d23a07cba50ddc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve.maxdepth_TocTree.resolve.return.newnode": {"doc_hash": "5d03da92287130d7a900199d09cba4dc5f94a5f6c5d9db244ba5a765a6231b90"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.get_toctree_ancestors_TocTree._toctree_prune.for_subnode_in_node_child.if_isinstance_subnode_a.elif_isinstance_subnode_.if_maxdepth_0_and_depth.else_.if_collapse_and_depth_.else_.self__toctree_prune_subno": {"doc_hash": "9b42b7d48b61ab7c62eac636f0f97422df7a1919eaaae26d9081828a05789ce5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.get_toc_for_TocTree.get_toc_for.return.toc": {"doc_hash": "d9c54534e6e45279c960786a84c3c817477d17ef2d3ce2a39a126adc157bfbc6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.get_toctree_for_": {"doc_hash": "57a120c9e8ef51126904cdd4f3b337d99b4d66922fd56f74e9fa11f284b8a66b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/__init__.py_EnvironmentCollector.disable_": {"doc_hash": "8d518a55248b493714ae03cf8661237819c183741c1d23658b5b40c7eaf61ee1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py_ImageCollector.collect_candidates_ImageCollector.collect_candidates.for_key_files_in_globbed._select_by_similarity": {"doc_hash": "08f80b651826ce399ae96b45edb4dba5e6983a81ecc0b34932700ff4cec0b15e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py_DownloadFileCollector_": {"doc_hash": "144276353e047f2958e971b2d12502ef5aa2935f40b59ecfe2eafc2083e56a3c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/title.py_TitleCollector.process_doc_": {"doc_hash": "1b5b811383d434456117e996e261e190628d6dd52cba0c0f2aceff4bf230069c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector_TocTreeCollector.clear_doc.for_subfn_fnset_in_list_.if_not_fnset_.del_env_files_to_rebuild_": {"doc_hash": "ffba6c5fd82652ecdecdc39d1838a47bdc97b53c05c62bbd52eb44f80e27b6bb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.merge_other_TocTreeCollector.merge_other.for_subfn_fnset_in_other.env_files_to_rebuild_setd": {"doc_hash": "e162aa0c508986ed5bf41c5e1a4cc79a36c829da201c5b6033dfb39aaed6fd88"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.process_doc_TocTreeCollector.process_doc.traverse_in_section.return.result": {"doc_hash": "d8f1e3b23e6ece75698b8c24051c626b58d52404b9e33ada15f6437aeedc03af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.process_doc.build_toc_TocTreeCollector.process_doc.app_env_toc_num_entries_d": {"doc_hash": "85c882ca133b51d8546975ad2a079635a15fab93b75d408ae329abcfa046ec59"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.get_updated_docs_TocTreeCollector.assign_section_numbers._walk_toc.for_subnode_in_node_child.if_isinstance_subnode_no.None_3._walk_toctree_subnode_de": {"doc_hash": "a9ed1ebd73c648461c91fbed598c506d4410be0b4b4d2291bffbad3a008f5fc6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_section_numbers._walk_toctree_TocTreeCollector.assign_section_numbers.return.rewrite_needed": {"doc_hash": "d14fe01f0847a6acb273afda2921e2bb0764c568cdeae2c6d024d0e0e7541ff2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_figure_numbers_TocTreeCollector.assign_figure_numbers.register_fignumber.fignumbers_figure_id_g": {"doc_hash": "aeb3a540e9530daed5473e760340d248a798fba8824091e9c24aeda21490bd66"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_figure_numbers._walk_doctree_TocTreeCollector.assign_figure_numbers._walk_doctree.for_subnode_in_doctree_ch.if_isinstance_subnode_no.None_1._walk_doctree_docname_su": {"doc_hash": "dc0bde219d6b3144ce43c5b396fb1382837cc8ca5d1d860ecb61576e8c2d7a38"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_figure_numbers._walk_doc_": {"doc_hash": "14ca05df4a026504332bae147a7a2ec4ddbd1f653654bb0751299a6d92665ec0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/errors.py_BuildEnvironmentError_": {"doc_hash": "2973394a96daacb3ac01582b9393aae73138040cd0c5d1ab8ad5c0341d184fa3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/events.py_EventManager_EventManager.disconnect.for_listeners_in_self_lis.for_listener_in_listeners.if_listener_id_listene.listeners_remove_listener": {"doc_hash": "d1f3594f838948117986cb0caa7d1420e1de8f34f5eac2bb1fc2f7ad1fe6922b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/events.py_EventManager.emit_": {"doc_hash": "05224659c9853bd09771e84da211cdfaf9c0d30db5b8b950fa8426f3364b5bb6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/__init__.py__": {"doc_hash": "13ed8dd2a847929c1a16fdbb6fecd091e4dc5b6667c3b1326bc3985681b9be85"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_argparse_is_packagedir.return.any_f_for_f_in_files_if_i": {"doc_hash": "fef361234ffd98d643fb49555fa052ba30120cfd43225e952e25320eae186501"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_write_file_write_file.if_not_opts_force_and_pat.else_.with_FileAvoidWrite_fname.f_write_text_": {"doc_hash": "ae2628f512fbb6567379887e024de71eed8a25161badbc3eca00a986a8e378b3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_create_module_file_create_module_file.write_file_qualname_text": {"doc_hash": "73f55e5bdf5ea045279b28de9e4c89d2a4ae1d559f3498942a2b360702fc5772"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_create_package_file_create_package_file.if_submodules_and_opts_se.for_submodule_in_submodul.create_module_file_None_": {"doc_hash": "3c196a1544f96f5ca350fc66279a2c91b2e4ce3896b60b849d2a47cf99554367"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_create_modules_toc_file_create_modules_toc_file.write_file_name_text_op": {"doc_hash": "5d6c379ce2983b431cb86837e74427eaa1c98620da7a755d2a2c50583089ddb5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_is_skipped_package_is_skipped_module.if_not_path_exists_filena.else_.return.False": {"doc_hash": "c97a1f27e16da3752970c7c48a0ce43b3b023e8a38705f65e453d76612c365c7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_recurse_tree_is_excluded.return.False": {"doc_hash": "78f67ff3991e48190feedd9de7b8592a8cdc0c4d6711dac828308b4977fb6051"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_get_parser_get_parser.parser_add_argument_s_": {"doc_hash": "35b827eb42d112631611092c27461ab344fc220eac534d5e09c368613043c466"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_get_parser.parser_add_argument_F__get_parser.return.parser": {"doc_hash": "fcb174c90efda2ff54177cf763d3b2efd424c401f919740201a5a2411a5d9ca9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_main_": {"doc_hash": "0263b4a71d0df6c99ec91ec0bc6202d9d8b4466776ca55f24446d4ae0fd9d3e9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter_Documenter.add_line.if_line_strip_not_a.else_.self_directive_result_app": {"doc_hash": "68c368eb3aee15af4dace4f16cb76b435ee7b34cdfd775b9aa5cc628b9eb25ad"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.resolve_name_Documenter.resolve_name.raise_NotImplementedError": {"doc_hash": "f75ba09a8e00ff266ff9345312a3ab0051d6516e779d76796e724e6bdbc3f0dd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.parse_name_Documenter.parse_name.return.True": {"doc_hash": "bc403b562b404b516735fa00b2f742c7d73ef75df19282470641cf09b269c0d4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.format_signature_Documenter.format_signature.if_args_is_not_None_.else_.return._": {"doc_hash": "5e41395a6461a52cf4e7804d30b0b68f840e8e1b94eb3fd4ed81d767b7db0088"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.add_directive_header_Documenter.add_directive_header.if_self_objpath_.self_add_line_module": {"doc_hash": "3f90a4f50d50166407a24ee7bd13ecf0883480beb830c5f83d5da071380e82af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_doc_Documenter.get_doc.return._": {"doc_hash": "bf8dbfd4c79c795e041fa4dcfcd952a972d9c39fa30172c8c58863730ef6788e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.add_content_Documenter.add_content.if_more_content_.for_line_src_in_zip_more.self_add_line_line_src_0": {"doc_hash": "5544b19d3493bae9a25b68225657ff76facc36413961204bcb6382a6b600d164"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.filter_members_Documenter.filter_members._process_members_and_det": {"doc_hash": "cabdc9d96eaaf45b0a8af6a3092e8192790daf965aca5c4a1cf8a35a6611cd41"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.document_members_Documenter.document_members.None_3": {"doc_hash": "89787d9e0247efcf8e252c4a46df8f7477e28a60faa2409207da6855ebb783a4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.generate_Documenter.generate.self_document_members_all": {"doc_hash": "26959d4aa6bfbc4e5bec4ce8ec17e46c0a8ae4a800fb6b6bd3a70f3702001e16"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter_ModuleDocumenter.parse_name.return.ret": {"doc_hash": "e668f26a37c41947ec13dc704dfba324e6914e9801ee8962178db1007b16aee5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.add_directive_header_ModuleDocumenter.add_directive_header.if_self_options_deprecate.self_add_line_deprec": {"doc_hash": "8f91f57aa532ebcb6cecdf6346e0ef622cf29df5d79df6cde3518ee832f66e67"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleLevelDocumenter_ModuleLevelDocumenter.resolve_name.return.modname_parents_base_": {"doc_hash": "1995709fa6e5240a9c49992f84ed032a30b21a09fdf08d0fcbb37085ddd085a4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassLevelDocumenter_ClassLevelDocumenter.resolve_name.return.modname_parents_base_": {"doc_hash": "c7fd8e526e19560cb058aaa8037862ce0aec378e3ed8c0805664916e8b7bdfc7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DocstringSignatureMixin_DocstringSignatureMixin._find_signature.return.result": {"doc_hash": "5121524738f03ddae877bc482e8a45629b3a8ac4f3d64a4af763e6959bcdd2e2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DocstringStripSignatureMixin_DocstringStripSignatureMixin.format_signature.return.super_format_signature_": {"doc_hash": "75176e20a24bf8ec615b4bc70b4c06b012778fe32df9bfe84cdfed928c226d37"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter_FunctionDocumenter.can_document_member.return._inspect_isfunction_membe": {"doc_hash": "950542aa34d7d38eee74662fdf3b9bfe6c6dc03dcc9618c2f92bd5cc4d70f5c8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter.format_args_FunctionDocumenter.add_directive_header.if_inspect_iscoroutinefun.self_add_line_async_": {"doc_hash": "7525009ee171a958a4a43d04e82970da1e81ddc9ae5ecbfed28e1e36b0aa9d62"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter_ClassDocumenter.import_object.return.ret": {"doc_hash": "f6fd62037ae485dfc94c7a49c79dba94befe9bdf87294f8870d675a701ad6700"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_doc_ClassDocumenter.get_doc.return._prepare_docstring_docstr": {"doc_hash": "296628df6d95c724763e4796eeb494b9178672632885fc9d5fa8a27625347d9a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.format_args_MethodDocumenter.format_args.return.args": {"doc_hash": "cc41cb8abe2bb4ce75423c7489ec9f7f7120b6a6d544e201e7ee01f6380eb3f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.add_directive_header_MethodDocumenter.document_members.pass": {"doc_hash": "b2c6133691aed8b1f8de6303320684b1bf38c9efcdf0fe488cb124b290dc0314"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_warnings_DummyOptionSpec.__getitem__.return.lambda_x_x": {"doc_hash": "1fa7b60b4f21701312614e9745417e78cf7f8afb1f551f943067551c983f1e4d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_process_documenter_options_process_documenter_options.return.Options_assemble_option_d": {"doc_hash": "9c628ba28e4e50714c21c43f0a415aec12027f217ac100bc535acbc3dc28c6f2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_parse_generated_content_parse_generated_content.with_switch_source_input_.return.node_children": {"doc_hash": "dde49ab9d2de56f08440b44ea4cbc50f5b7cb6c2119f0d0d2f0ab66ed56f8387"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_AutodocDirective_": {"doc_hash": "3188201e33046eadd776e6571d97089b316bae62b70e1d6a0e92a38a9561887f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_import_object_import_object.try_.except_AttributeError_I.raise_ImportError_errmsg_": {"doc_hash": "8f549b5dc05ed54ce418e0ff480c877b509803add5137953cc18e529905b5ba0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py__make_subclass__MockModule.__repr__.return.self___name__": {"doc_hash": "d8e5a5ab07b9c2992f26de599a085808492fc2f3089a4c857b84c3e7a34ecf3f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_MockLoader_MockLoader.exec_module._nothing_to_do": {"doc_hash": "359b2e7e35bd5f30531f90cc7e4913f613baad15a3ab5a504c918d1ade3ae9a1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py_signature_from_ast_signature_from_ast.if_node_returns_.else_.return.Signature_params_": {"doc_hash": "050fe311606b746577039f95a62a24c1114993422a5eeaecddc26fabd3adf4d1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py_get_type_comment_get_type_comment.try_.except_SyntaxError_fa.return.None": {"doc_hash": "1458753e58f7137b7694d640453298d73607af4bd55f1a862f854da82a2d82ed"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py_update_annotations_using_type_comments_": {"doc_hash": "469f29ac17767967eeab4220a2244ac6fa01b978847a2d7a34352e114c30dfdb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py_merge_typehints_insert_field_list.return.field_list": {"doc_hash": "d01c7a618ddc167696b4080a9e53a6ea3e17407b2a4dd1f1e64f098f65be8dde"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder_CoverageBuilder.init.self.py_ignorexps.compile_regex_list_cover": {"doc_hash": "eaac466cedafe79bd9c885070002f9fa3eb3b15b1b70b5ae2d9822473ead3b3a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.get_outdated_docs_CoverageBuilder.build_c_coverage.for_filename_in_self_c_so.if_undoc_.self_c_undoc_filename_": {"doc_hash": "259fcebf02826b31e5704ca2180fa1e43045d45f6429adea1c3d07a0c14c19c8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.write_c_coverage_CoverageBuilder.ignore_pyobj.return.False": {"doc_hash": "133e2799d264a5da098b7c3a12c05d040fa3ac24c6259200c9e515c9ce411667"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.build_py_coverage_CoverageBuilder.build_py_coverage.for_mod_name_in_modules_.self_py_undoc_mod_name_": {"doc_hash": "719ab97fa7f6ca050ab86c92a667f02bc4a90a33d6983557a7e97675ad845d55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.write_py_coverage_CoverageBuilder.finish.with_open_picklepath_wb.pickle_dump_self_py_undo": {"doc_hash": "e50618bbcb8f72f030045e71738a598f427a341982b8d66e49f32c19b71dcff3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_setup_": {"doc_hash": "8fc7ffed4595fe8987dcd3b4fe56d1137823333bcf10351f1f85cfd37a4b21a0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_is_allowed_version_is_allowed_version.return.Version_version_in_Speci": {"doc_hash": "0e418527d74ec066e7d908060da2d06fb565cdb7145560e85bd2d677f950f578"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__set_up_the_necessary_di_TestDirective.run.return._node_": {"doc_hash": "90492751acd80046867878774b032b6640eb43af7348c83e304b67a2c8f58fd5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_TestsetupDirective_parser.doctest_DocTestParser_": {"doc_hash": "739d29db14ae485b73cc4ecf04d64e153e1f48e353d0977fca9b80ab71e5bb17"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__helper_classes_TestGroup.__repr__.return._TestGroup_name_r_setup": {"doc_hash": "72186a42a7f990a4ce3229d39df7c5bb4109d7614cda8006a00648f4a766bfa9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_TestCode_TestCode.__repr__.return._TestCode_r_r_filenam": {"doc_hash": "7fc3ed7d8d966b1f3cb22d3dd7a7c6dbcb16452e01b52595dd3984104a9cf72c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_SphinxDocTestRunner_SphinxDocTestRunner._DocTestRunner__patched_linecache_getlines.None_2": {"doc_hash": "2b9968ccfca69be4683ae35594c1e721551eadbb2cd86d66c3db274961fed3b0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__the_new_builder_use__DocTestBuilder.init.self_outfile_write_Resu": {"doc_hash": "f983961a6d46548232061ba97b07fa0f604867aab88a8abf915d2ae33245a1dd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder._out_DocTestBuilder.get_outdated_docs.return.self_env_found_docs": {"doc_hash": "97a22717081f8d7f648b541cfb86907332462c733d7c558692d19f2c83ebe5f5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.finish_DocTestBuilder.finish.if_self_total_failures_or.self.app.statuscode.1": {"doc_hash": "b33060b21e3ad3bb86a69bfd986e35713222feec7c0c285c734304b1d035701c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.write_DocTestBuilder.get_filename_for_node.return.filename": {"doc_hash": "83ac409207c2e903964e623326e0092129bf0158deca6b388ce3d129f8838481"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.get_line_number_DocTestBuilder.skipped.if_skipif_not_in_node_.else_.return.should_skip": {"doc_hash": "e1509b66bdc04129eba7f1225db42e20ad6a49ec0ba852f9a749f8a69c23d5c1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.test_doc_DocTestBuilder.test_doc.if_self_cleanup_runner_tr.self_cleanup_tries_res": {"doc_hash": "93187a1eb3ba9d1e546c7cb3b72df211caffda579b20d68dd9b4aa944bb1749c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.compile_DocTestBuilder.test_group.run_setup_cleanup.return.True": {"doc_hash": "4c360040589f652cf3c99e91183b3f1bf79fd6431983b0e1888b440cf9be4265"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.test_group._run_the_setup_code_DocTestBuilder.test_group.run_setup_cleanup_self_cl": {"doc_hash": "7b014d917cd01bffeb402326249ecc6aa010747cfc23616668ecd2f4e1b781ff"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_setup_": {"doc_hash": "a14a6924fb28a2c68f0b360a3e80fd9e3b9b1857f34d85cb2485860396d9cb85"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/duration.py_on_builder_inited_on_doctree_read.domain_note_reading_durat": {"doc_hash": "dfef456187cc3fec48643249186ce01c505967e5ea06874b9082a5a87bae8eec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/duration.py_on_build_finished_": {"doc_hash": "7b5f36dd8c924401527ec63297779817501a0a724701b1edc7f6ce4e66347d5b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/ifconfig.py_process_ifconfig_nodes_": {"doc_hash": "58bad75f0111194dfee8cfbeb3e5117a210fab4f5b836308ef5735196a8c2579"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgconverter.py_ImagemagickConverter.convert_ImagemagickConverter.convert.try_.except_CalledProcessError.raise_ExtensionError____": {"doc_hash": "4b6566cfffaac16b68ac46d38033a8ef82b4d45df253a18f674ccd9d4025b7ee"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgconverter.py_setup_": {"doc_hash": "3da9c69ab58c39dcc9fefda076b153745d9c06767e88ff713bdd22648c8dbee7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_generate_latex_macro_generate_latex_macro.return.LaTeXRenderer_templates_p": {"doc_hash": "360e0d22f59d01670f23f87eff8d99301a8e59fe9d835977d283c1c76facb0f7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_ensure_tempdir_ensure_tempdir._type_ignore": {"doc_hash": "d653179cd424e14b53c1ea4441b124e83e78ac589af2e80b8c4a8d919c41d2a8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_compile_math_compile_math.try_.except_CalledProcessError.raise_MathExtError_latex": {"doc_hash": "30de9dfc84dd9b734677500b17d5f000a972efcb91b43411324bf31ac87da47f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_convert_dvi_to_image_convert_dvi_to_image.try_.except_CalledProcessError.raise_MathExtError_s_ex": {"doc_hash": "9f6c986a8c0d5601f795af316b25023732afff32f7ae08622563083db30c1697"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_convert_dvi_to_png_convert_dvi_to_png.return.filename_depth": {"doc_hash": "7950d69c1905b635700e3e38ae8371eca8df53051b72ab2a463c239798b931f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_convert_dvi_to_svg_convert_dvi_to_svg.return.filename_depth": {"doc_hash": "c633adef5aa884693d33d9e5c9143edd580fe0d9844755f251ad4e89950466c6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_render_math_render_math.return.relfn_depth": {"doc_hash": "5f167885483add1160a72470f4ed95fe82d6c6a1b2afe049c84407795e78238e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_cleanup_tempdir_html_visit_math.raise_nodes_SkipNode": {"doc_hash": "bcde53dab0aefc3e288fe1719c4d5031bea98babe8c8ee0405f8b9f99ff9d266"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_try_import_try_import.try_.except_ImportError_.try_.except_ImportError_.return.None": {"doc_hash": "2efe7e67b93b293fec5a83629ace87f7427d32eb3b3a6f36a00acb384b4f0260"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_import_classes_InheritanceException.pass": {"doc_hash": "d96717052861a57f66e57bc3433d4fcf3e2afa21c9f358deb45063aa78cb8862"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph_InheritanceGraph._import_classes.return.classes": {"doc_hash": "3d8e6e3359ae06fea6355a1e17cbfab964fab0495195b7f456550ea3568df91d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph._class_info.recurse_InheritanceGraph._class_info.return.list_all_classes_values_": {"doc_hash": "25907c001ecdeb2396289c2dd998966046711277c1fe8a695732af28d595b097"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph.class_name_InheritanceGraph.class_name.return.result": {"doc_hash": "ba933a4a88b90299529f85b183cfe66bd22e159ac5a5968da3fc87b6d5d4d93a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph.get_all_class_names_InheritanceGraph._format_graph_attrs.return._join_s_s_n_x_f": {"doc_hash": "f896bbb576024fdb827b7259826ce59951ec55904f1bd1c71f684ff283e3c969"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph.generate_dot_inheritance_diagram.pass": {"doc_hash": "0ae3d1efd757741ca300b55ce2c497724a770f4e981850b25e9ccb325ff2f7b9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceDiagram_InheritanceDiagram.run.if_caption_not_in_self_.else_.return._figure_": {"doc_hash": "e714f90ce0f23c0b0a5a882a9bbc60b182d1cbd83cecf4cef8bc1b29d2c6462c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_get_graph_hash_html_visit_inheritance_diagram.raise_nodes_SkipNode": {"doc_hash": "f022cb3be37c9e147f2f2b50718c75b37ce3bdf58226098db8c8ff19414e5acd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_latex_visit_inheritance_diagram_latex_visit_inheritance_diagram.raise_nodes_SkipNode": {"doc_hash": "b197c944d0478fb8fe090e6acd58a8084db95d3318395890825b9ba7cf5fe791"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_texinfo_visit_inheritance_diagram_skip.raise_nodes_SkipNode": {"doc_hash": "97b3b815d9f19333efbc04ddbb61a3d0a6d8c60c170740ba4bc723af6ae749f7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_setup_": {"doc_hash": "4220e34060a45766956b4ea63185f55312aae9b2b8f39e5752e848a37839d1cd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_InventoryAdapter_InventoryAdapter.clear.None_1": {"doc_hash": "e4e497facca94a62dcb10de350a3cef42e5390f08c494a8f4090ef36bcc285fd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__strip_basic_auth__strip_basic_auth.return.urlunsplit_frags_": {"doc_hash": "bacd8dafe213ce5fadb9a7eed30d7f355f59798d0c515b9cd67881a4854bbd78"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__read_from_url__read_from_url.return.r_raw": {"doc_hash": "52b199192a3160233fc94ad45d86463d6ffc5e985704a24358eace432174e7a0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__get_safe_url__get_safe_url.if_parts_username_is_None.else_.return.urlunsplit_frags_": {"doc_hash": "1a1677e29c996612565d4672763345c58d6e9f85ff1b85c86c5d881974170830"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_fetch_inventory_fetch_inventory.None_1.else_.return.invdata": {"doc_hash": "e7d7f16a1ea35a4e73c75e8394e7384a78053fe8d67b8725b28448777cfc0007"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_fetch_inventory_group_fetch_inventory_group.try_.finally_.if_failures_.else_.logger_warning____failed": {"doc_hash": "b5079f975a5819b536ba3a171de37b064ddbbd70227c0efb991a97332a3cdc8a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_load_mappings_load_mappings.if_any_updated_.for_name__x_invdata_in_.for_type_objects_in_invd.inventories_main_inventor": {"doc_hash": "8cbb09d8f1f517a0e4da3a4ade623c48bbe2c73dba8e379492a92bbdeabe4917"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_setup_setup.return._": {"doc_hash": "461a5bde74b47f8bbe73d65c78399df8e27bb4ef2c011651d6ea3bdbb41984a3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_inspect_main_": {"doc_hash": "acee43bc23891f12095e3a450c5e619b03d92a9ec2873324f4879f5cfe30ee47"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py_html_visit_displaymath_html_visit_displaymath.raise_nodes_SkipNode": {"doc_hash": "85a8b03b044b60f5db427970061a382610549b3facd60408ce923233ed73b1dd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py_setup_": {"doc_hash": "04978c4fe151af2d90f66d7f0e8445b79b4e06841aac08b9a68095188d416ec0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py_Config._Sphinx_napoleon_extens_Config._Sphinx_napoleon_extens": {"doc_hash": "c8ec5f20176008482edaffda5a6d3e81eeb1c3ba551f17e3b766393e58224ce4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py_Config._config_values_Config.__init__.for_name_value_in_settin.setattr_self_name_value": {"doc_hash": "1cabe24a781c58b3710388bd4f40a67f4a2978919dbd8633d51bad1777e2c864"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py_setup_setup.return._version___version___": {"doc_hash": "a9b64a13980faf634318e486a20512a7c8ed383fc62c1f1f1408d630ea3c8438"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__patch_python_domain__patch_python_domain.try_.else_.sphinx_domains_python_PyO": {"doc_hash": "5c53361a71e923f150eb019e659f664010712ea7c0ed0681a78e5e565a091e7c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__process_docstring__process_docstring.lines_result_lines_": {"doc_hash": "b48a82c742e05a82e232902e04126a54932bfacd9089067e0def856af9a8f2cd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__skip_member_": {"doc_hash": "ff6ce20f1870d459df33c535369996f12dd4c40f49bc1711726766a6fe81857d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring_GoogleDocstring._name_rgx.re_compile_r_s_P": {"doc_hash": "e0b608712442e4767fc59d83b079c4829ba62ad61a87e1294c8c20e4f09dbc0e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_field_GoogleDocstring._consume_field.return._name__type__descs": {"doc_hash": "c433ff358f7a2eec29e49e95ebfb708eef11821fceec0498fe35f84cea3495a9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_returns_section_GoogleDocstring._consume_returns_section.if_lines_.else_.return._": {"doc_hash": "49ba03b29c5e345b3d70b141b36a0a9db2520cd11f0fe0a4d51e2a72233f61a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_usage_section_GoogleDocstring._escape_args_and_kwargs.if_name_2_.else_.return.name": {"doc_hash": "b41cc7abdb5b629f12c8d92dd2837c18380ff305d358e5e8eea8a2a68efade95"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._fix_field_desc_GoogleDocstring._fix_field_desc.return.desc": {"doc_hash": "3f6230dc99b425476cf214245a9b9555b7cca1d9a0f88ac6cf4550f5edb90ece"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_admonition_GoogleDocstring._format_block.if_lines_.else_.return._prefix_": {"doc_hash": "f31021af24692af36feb37067213637c2b1c4b2ef77bafe6c63fa6e05528f14a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_docutils_params_GoogleDocstring._format_docutils_params.return.lines_": {"doc_hash": "f57b1a87b4354f186d3cc14a2f83f08f2ddbb5d8b73203fd49c0fd6aee1d39e3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_field_GoogleDocstring._format_field.if_has_desc_.else_.return._field_": {"doc_hash": "5e453b402774a6cf9ad07bd4b9e73ae71c446c8a87aa192b4f395b9baf9b0556"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_fields_GoogleDocstring._format_fields.return.lines": {"doc_hash": "0218fd994031abe682d32c738e1263efd44141827cf660abbe5c07e49c976472"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._get_current_indent_GoogleDocstring._is_indented.return.False": {"doc_hash": "7f552fc5c2b15006227a24fab6d1c18fb14cc997baaf813dba579274c578f765"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._is_list_GoogleDocstring._is_list.return.next_indent_indent": {"doc_hash": "559ff847d79d88418775cf5786641301249fa479f38ab0dc08082ef1b3cfc3bc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._is_section_header_GoogleDocstring._is_section_break.return._not_self__line_iter_has_": {"doc_hash": "e6a2b7bcdd90fba10e7649369ea0dcc15993b2ea6c542b776a24a969f2262497"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_GoogleDocstring._parse.while_self__line_iter_has.self__parsed_lines_extend": {"doc_hash": "9bf6fd2771b6a0afef9f603f553a2132a61f012b00a4a9fc7a426b28068e8922"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_admonition_GoogleDocstring._parse_attribute_docstring.return.lines": {"doc_hash": "4142887b9a5ad9c647ff154699512bf8c69a05575ae2724368dc34aced7bca31"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_attributes_section_GoogleDocstring._parse_attributes_section.return.lines": {"doc_hash": "c76cc9e570b1c44f7f451a4143e81272c91814e0669f13023ff8e911ae4b7742"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_examples_section_GoogleDocstring._parse_usage_section.return.header_block_lines_": {"doc_hash": "1edb4e39da57d535008ea697143bfb4b6dae38092b1278a0d4d6a5b9e29ee0bd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_generic_section_GoogleDocstring._parse_generic_section.if_lines_.else_.return._header_": {"doc_hash": "c6e9f3117ccd4982f730f3fab3fcf7dc44a1c5962d65a3a3f35e8dfd2787863c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_returns_section_GoogleDocstring._parse_returns_section.return.lines": {"doc_hash": "7c84504dceb2f6687043659dc7f6b0ad39737d3c3458084dbf792f7e1c9e077d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_see_also_section_GoogleDocstring._partition_field_on_colon.return._join_before_colon_st": {"doc_hash": "07dd1aba987cf3de05005dc1787a84f39e68b3316ab0ae1244ddbb40166a39fc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._qualify_name_GoogleDocstring._strip_empty.return.lines": {"doc_hash": "27315829974dc500d70f900035d6dde6623311d3955a9661615b2d09c6ab6767"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring_NumpyDocstring.__init__.super___init___docstrin": {"doc_hash": "5e0a90898013d9edcbecb2433e16819b25b4fd161f3d329b1b40ded58c99a9ec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._consume_field_NumpyDocstring._consume_field.return._name__type__desc": {"doc_hash": "f4c68adcf47cfa370cf6c81a7eadd935956539133b40d52f41d0b61e548f8c6e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._consume_returns_section_NumpyDocstring._parse_see_also_section.try_.except_ValueError_.return.self__format_admonition_": {"doc_hash": "5484518be03dff3163a7f58365ce6ddb156636f41dc93216922164a217675475"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._parse_numpydoc_see_also_section_": {"doc_hash": "1fcfec0d91ca127bf3a2a83cf56ed9cf9ba772c082fd97c328c69fa63f8d19d4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_peek_iter.next_peek_iter.next.return.result": {"doc_hash": "b41dea60fb34fd97f57f16c887c4bd4bde782be33a479dafd24fb4a44093a1f9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_peek_iter.peek_peek_iter.peek.return.result": {"doc_hash": "4b9f85ecbb7cd4ff9b6ab9e00bc22413caf3afa5e3764e2cceb06d91e2f527cb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_modify_iter_modify_iter.__init__.super___init___args_": {"doc_hash": "6ad7dc7aeeb7f8b691000bb42b9fb53c69afc476aebf0808745f8b2d2fc38bdf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_modify_iter._fillcache_": {"doc_hash": "6a8ca5f9f9881c8e0f92f9d672659f2afb3e625d0e1ae98b94f7a1be533be508"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_Todo_Todo.run.if_isinstance_todo_nodes.else_._never_reached_here": {"doc_hash": "f0b11885f146ac9a0e96bae58fb85d6e107b6116e1d1ca3b40b38d6aea0b13a7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_setup_": {"doc_hash": "8aef76b904dd3ea81acfdf9d0fd41be182ff312aeba522200e7b75534a896de4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_doctree_read_doctree_read.has_tag.return.False": {"doc_hash": "cbc90cccb4aa5d18f27e2111997b444f3ce22215e0fc0eb90641531ec7121792"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_setup_": {"doc_hash": "72126845a1001e8e73b2631db083c5c3c7577cfbf46b72122d1c95e4c1514427"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/extension.py_verify_needs_extensions_": {"doc_hash": "a8570f3fe45c4af6148401f071ed4fce6823a6f72ceb68a3a03052818d613d39"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py_PygmentsBridge_PygmentsBridge.get_formatter.return.self_formatter_kwargs_": {"doc_hash": "b90de2ac1819eb7f549642b9eaf32fd891da04ffeeb90581d057494b9b3e41b3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py_PygmentsBridge.get_lexer_PygmentsBridge.get_lexer.return.lexer": {"doc_hash": "d33a157c1d3ba4bbd57aa6a0a999ffff7da35f799ee3cbc2c70164e95993c070"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py_PygmentsBridge.highlight_block_": {"doc_hash": "b7b084de29ca1e86b57824bfff5715a1716be4aaf0e8f04d7745a0ccbd4a35b3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxBaseReader_SphinxBaseReader.new_document.return.document": {"doc_hash": "9a06750b23de1eb84802dee2c8cfda435a45857d7d061375626acde76a28382d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxStandaloneReader_SphinxStandaloneReader.read_source.return.arg_0_": {"doc_hash": "65f3f05243e6bc8bbbef1546c881eba3c8da903be5158c2b68fbfe915951a7fa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxI18nReader_SphinxI18nReader.setup.for_transform_in_unused_.if_transform_in_self_tran.self_transforms_remove_tr": {"doc_hash": "0014a06ea3d84ceb8b31f49a113d6b07c054e51e7fb549bfa7870f62bb9a8e01"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxDummyWriter_SphinxFileInput.__init__.super___init___args_": {"doc_hash": "f3fcc722f6e901872033b348d04c90b6ebddb4ce5de1bff6aa0939ae6c4914b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_read_doc_": {"doc_hash": "d0eb15c7fcef26d7ca3a8fb36519afa88922bc13353e1cfe4f7c2866b9fccb60"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py__todim__todim._type_ignore": {"doc_hash": "720a19b56f162eb5d0cc6d3041161a5ec19d5dff99806ec6fd4a73481bb5c310"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py__slice_index__slice_index.for_slice_number_in_range.yield_seq_start_offset_": {"doc_hash": "1e6766724aa72997b4c1b8d8724ee1f29ff97b5b17df9bbda14dba777ea8cb95"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_accesskey_warning._return_empty_string_not": {"doc_hash": "99a3de4eee52cbd0872947eb507148396691d7d071d1d52c1b7b183b0675c04a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_SphinxFileSystemLoader_SphinxFileSystemLoader.get_source.raise_TemplateNotFound_te": {"doc_hash": "1762f4e16dbf1faa60b267f141fdc1dbfb5bb8afb0932328f34dbc9bf45f2848"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_BuiltinTemplateLoader.render_": {"doc_hash": "7bcb48e3e78d5f16365df818307fb9d2469f28fb16a42de230a6df879df7bc88"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_translators_init.return.translator_has_translati": {"doc_hash": "9b52b463db770db4e3c7d27e3a1f58374db6f6452bde763c3dff6b5378bc361d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_setlocale_setlocale.try_.except_locale_Error_.pass": {"doc_hash": "33e7029f178174ab59d1489fc828f4579166d1849494f75c9950a91533d7a09e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_init_console_init_console.return.init_locale_dir_langua": {"doc_hash": "2bfe8b7b0d4751b4273c37e3195e50950558add33fb43019ce6f5b21b9d376d2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_get_translator__lazy_translate.return.translator_gettext_messag": {"doc_hash": "805408c205dc5f97ba92db069b35cb5369aed4ec0ff2cfa0dfd61e6683e0c3ee"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_get_translation_get_translation.return.gettext": {"doc_hash": "cf28c0d1c34c89afe27b62bc1603ac77e7cdecc77a4dc9fbe940652d5257f61c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py__A_shortcut_for_sphinx_c_": {"doc_hash": "01af7608b2a86b1dcdeaf185d61b2ca862fd210dcf58dba7be97726a9a2b1701"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/parsers.py_Parser_Parser.app.return.self__app": {"doc_hash": "e98efecebaf29263e03742951a35669ba08ba35b2d015324305448840e4c3d70"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/parsers.py_RSTParser_": {"doc_hash": "a3c1b63bcd3a5a69ebe7b202e4b4b71241f40334abc382277a69be70ba5232cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/project.py_Project.discover_Project.discover.return.self_docnames": {"doc_hash": "adb59744a3689cc8062f03d16b7eeb3da5586a4af3ea626c486d10e7bb281c11"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/project.py_Project.path2doc_": {"doc_hash": "d077bc532c4b13c9a211bc837fa351ad519ddbe8f9445c547dd8ddb7e082a3ff"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.for_string_ModuleAnalyzer.for_file.return.obj": {"doc_hash": "2c10eaf364d64014dd0b97b9fd31a33b1d1c528ef46af69e819db24e3021e342"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.for_egg_ModuleAnalyzer.for_egg.try_.except_Exception_as_exc_.raise_PycodeError_error_": {"doc_hash": "4ff906bea3ee6e5567d78f99b4f211315ab5d6bd1bd6336ecbd82326a6d6c221"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.for_module_ModuleAnalyzer.for_module.return.obj": {"doc_hash": "b8885db5c4250e1a5298c8e9a3096983c1966e12edf76936aeb0c0ed551e7d93"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__a_greatly_cut_down_vers__UnparseVisitor._visit_arg_with_default.return.name": {"doc_hash": "9356a15a1ca2abce2401ef4b9e21e830a45a017c31e62bb448911cd39845182c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_arguments__UnparseVisitor.visit_arguments.return._join_args_": {"doc_hash": "118e981a9032fa241fd853c15b466e1d8ee9e4ab9c06c2377084e7e3642c3c63"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_get_lvar_names_get_lvar_names.if_node_name_in_Index_.else_.raise_NotImplementedError": {"doc_hash": "013b33f45e45c5408a82e9ce1030c196f1ca5e1fa1b5eb199592589d024a24c4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_dedent_docstring_Token.__repr__.return._Token_kind_r_value_r_": {"doc_hash": "a8a2f5bf5133bd099751931c6bd88e24fc24538ee6493ff216c3b0927ebf0c1f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_TokenProcessor_TokenProcessor.fetch_token.return.self_current": {"doc_hash": "ca93ac128f2269587cc9ef5a10d7a51dde2feebdef6896a7ceac3f7f226a9eb2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_TokenProcessor.fetch_until_TokenProcessor.fetch_until.return.tokens": {"doc_hash": "f413610ba2ee101567da6ebd1226ff0d745098ed77bae075155f925311565fd6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_AfterCommentParser_AfterCommentParser.parse.if_self_current_COMMEN.self.comment.self_current_value": {"doc_hash": "694ba1bc398483355abe97f2eaa6cbdc695d0caacd09119e4411f718ec684671"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_AnnAssign_VariableCommentPicker.visit_Expr.if_isinstance_self_previ.try_.except_TypeError_._this_assignment_is_not_": {"doc_hash": "0898a53d64309e7380622b1780fca3a7fa94cc430aef4f09c91b41499fce63ac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_DefinitionFinder_DefinitionFinder.add_definition.if_self_indents_and_self_.else_.self_definitions_name_": {"doc_hash": "e3ed0ebb910952fc04e56150e5e7dd4f7952979f459d3d0afaa5f7cb21c0e398"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_DefinitionFinder.parse_DefinitionFinder.parse.while_True_.if_token_is_None_.elif_token_DEDENT_.self_finalize_block_": {"doc_hash": "2ff2685ae88a2a7d246c72b4cfa9817fec991532e9e65a477d94dfa3c3142464"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_DefinitionFinder.parse_definition_DefinitionFinder.finalize_block.if_definition_0_othe.self_context_pop_": {"doc_hash": "3d50ebe2ce6ff19fdd4a716ed07f28578c58893b92dbb70a11cf9a3a4ab18f76"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_Parser_": {"doc_hash": "1f160d0c3b4e603a9a2524568e4d9b25cdbc9c2bb691d37a41518f6361363992"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pygments_styles.py_PyramidStyle_": {"doc_hash": "f88047e85ed3e8e26ca647780cb2848f44afbd34264c59102b58615a94db28f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_builder_SphinxComponentRegistry.add_builder.self_builders_builder_nam": {"doc_hash": "db0ce2c3cbfc5e4564124b9bfbce1f35ebc81e97857e175fd6357403dfd13eca"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.preload_builder_SphinxComponentRegistry.has_domain.return.domain_in_self_domains": {"doc_hash": "502fb4eec1a084fb85b5b2e8c9b864f93187f9045e34fdedbd8a765bf3897305"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.create_domains_SphinxComponentRegistry.create_domains.for_DomainClass_in_self_d.yield_domain": {"doc_hash": "2613f18d5a96ea563577940683dbc9a9148069072fb2c0a7b9709cd035e3a0bc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_directive_to_domain_SphinxComponentRegistry.add_directive_to_domain.directives_name_cls": {"doc_hash": "e084a73a997b4d8b02fb6bb8fa5247ef3336974445741272a5de784d3f3abe38"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_role_to_domain_SphinxComponentRegistry.add_role_to_domain.roles_name_role": {"doc_hash": "1d98d183bbafb9f8c7ec759afe19b2baaba7b67f7a42c4e83725607545e20bd7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_index_to_domain_SphinxComponentRegistry.add_index_to_domain.indices_append_index_": {"doc_hash": "57ba5d4179d686ac5c73f9f887cc96dac1da8ce295751e4874860cc74f8260cf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_object_type_SphinxComponentRegistry.add_object_type.object_types_directivenam": {"doc_hash": "a293b6169752b255a183d9780c84ee728554fd8cd414b58f4bcaa23da07974c4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_crossref_type_SphinxComponentRegistry.add_crossref_type.object_types_directivenam": {"doc_hash": "416b83e3e36a59ce9c80f9cc27e235b0f8b2ba535fccc2c745dc240720639894"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_source_suffix_SphinxComponentRegistry.add_translator.self_translators_name_": {"doc_hash": "40604535ae0131a626e41a552373cddb358e45a78476f09b0019273c762a1aac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_translation_handlers_SphinxComponentRegistry.get_translator_class.return.self_translators_get_buil": {"doc_hash": "cb6201aa4e794956e0745f3406d9a61f0491653d9f00a006b8511d88acc5be64"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.create_translator_SphinxComponentRegistry.create_translator.return.translator": {"doc_hash": "9cfd68ced7ac5ce0ec1814abcf470a9f06febb8cacdcad6815a6a10f730936e1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_enumerable_node_SphinxComponentRegistry.add_enumerable_node.self_enumerable_nodes_nod": {"doc_hash": "cf0e9c82c28ca895e680a20edcd1d0c4a785c32d435ecca45526d5013ee476ce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.load_extension_SphinxComponentRegistry.get_envversion.return.envversion": {"doc_hash": "bf20a4744ef347524f9b5e78a26d89a950a9828194c42c80fae512dddd054040"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_merge_source_suffix_": {"doc_hash": "c882582344cac762a0fd547d8ca3188003ef0e0f470cbc4d8723ab9b78ae4b29"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole.create_xref_node_XRefRole.create_xref_node.return.self_result_nodes_self_in": {"doc_hash": "136d92de9d49fff4177e79aa62b48dbb3f76061e528723ae116e9b16caf25266"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole._methods_that_can_be_ove_XRefRole.process_link.return.title_ws_re_sub_tar": {"doc_hash": "66daba309bdb5e8af46c9b851fb5c4d3b99ffa03e2b115acc4cf1e23590f4b61"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole.result_nodes_AnyXRefRole.process_link.return.result": {"doc_hash": "bd8019e261c9fc7d6f5386a53a6c6058cc6de60d8dc16286ca6748924835f90c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_RFC_RFC.build_uri.if_len_ret_2_.else_.return.base_url_self_inliner_r": {"doc_hash": "679d4b53f7d9918bde4a7832048cca56fd5f829799a382812bfc8a9859dcc46d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_EmphasizedLiteral_EmphasizedLiteral.parse.return.result": {"doc_hash": "c43a43b16053fde8363e2042d3768157cc939a50983ecc7a43aed1c38e6a9440"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py__SearchEnglish_imported__languages._": {"doc_hash": "a021e6ba852eaaf620da84b54e7ec79ca30068fba941c476f3e37e4ca61a79b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.load_IndexBuilder.dump.format_dump_self_freeze_": {"doc_hash": "24c3ba7fd2db3f431caa31cf8a0700e63748e40502e651c50e204f3334290252"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_objects_IndexBuilder.get_objects.return.rv": {"doc_hash": "53a77125fcf43f77a867380d672a5c3bd52c5dd5fc6ab8fe62c16956be2f203c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_terms_IndexBuilder.get_terms.return.rvs": {"doc_hash": "b866136734fdcb9a4609cf6f90c72f60007e5e19754bea1da081ad3694261b28"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.freeze_IndexBuilder.freeze.return.dict_docnames_docnames_f": {"doc_hash": "91e6f05ceb2d61d1f71dca0e9f47a7a3b474801bf737fdf9f73192f0e6db838d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.label_IndexBuilder.prune.for_wordnames_in_self__ti.wordnames_intersection_up": {"doc_hash": "257f20ea90e6fbc76f2cd03745c5e3773ba809ee33468e1287785c3e0cb29d37"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.feed_IndexBuilder.feed.None_1.if__filter_stemmed_word_.self__mapping_setdefault_": {"doc_hash": "21cef3a611277a0607c483fe509d1b92cf683d5278bdae95dab8ede57f1e574e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/it.py_italian_stopwords.parse_stop_word__": {"doc_hash": "a22e5aadf0b227d9eeb3607acc9c888ba9298966eb511a9e19ed507f3e7dfe1b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_MecabSplitter_MecabSplitter.init_native.self.native.MeCab_Tagger_param_": {"doc_hash": "cc5fd3c7594ea6ff58db28045770c7028e5a9fd8bd655013a370981751af548b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_MecabSplitter.init_ctypes_MecabSplitter.__del__.if_self_ctypes_libmecab_.self_ctypes_libmecab_meca": {"doc_hash": "78b380e970cbee0f8fa30b3086b05b1bf63e8e3bfa4f07cbd27f55efa8e3bd3c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_MeCabBinder_JanomeSplitter.split.return.result_split_": {"doc_hash": "d2be61a0e148d04eae1d3338ff1f0562de2faf197e9a3e886515f6f5a576fbea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter_DefaultSplitter.BQ3__._BHH_792_BHI_2664": {"doc_hash": "ef7f5b8edb46e55d85e541ac2e4d0345273265e69d0e9bb46d1b92e539b21c6e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.BQ4___DefaultSplitter.BW1__._\u3068_660_\u540c_727_B": {"doc_hash": "97b45a9c073a4b5e05eb120efcaec87e5a39d62299e74fde6f58173f6365fca3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.BW2___DefaultSplitter.BW2__._11822_11_669": {"doc_hash": "2a267f67e27b4385823c51ae9e56470e87cdee79d32a5041cdeed5bb7379ebce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.BW3___DefaultSplitter.BW3__._\u3042\u305f_2194_\u3042\u308a_719_": {"doc_hash": "20d1f8bc9c4feb3241f91a81a2c14150f1f7e24974d0d2efa7276d8d272cbc92"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.TC1___DefaultSplitter.TQ2__._BIHH_1401_BIII_": {"doc_hash": "811eb486b0ae4928f0a9d3d7538a7c17fbb40cc851be9dc378b03f164f1c443c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.TQ3___DefaultSplitter.UC1__._A_484_K_93_M_": {"doc_hash": "b3de33d8e82c3f7107371d9db70960aa4f50fcd1333c5ce38a89c1858de44034"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UC2___DefaultSplitter.UW1__._156_156_": {"doc_hash": "7277fa4b64248ada0e71cd4b43d53abad5040cf5ec944bbc4005773041ee6ed0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UW2___DefaultSplitter.UW4__": {"doc_hash": "c38c9547f6e49f8ffe03aea0662ca8697b6e02f068e0a658de6abd72fb45afbb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UW5___DefaultSplitter.UW5__._465_299_1_": {"doc_hash": "039ecef9134ee49aa06d4a9ac9d0976b249766d99195d0ca0f2c487dcc63f42d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UW6___DefaultSplitter._segment": {"doc_hash": "80aa82eba1f82290f1816148638d94ae05ca896b6eee02260d7ce65633ce224e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.split_DefaultSplitter.split.p3._U_": {"doc_hash": "cd2f6140307f64d4e0bd1ea539b21d21a108fe70df3fbba963a918b8e377555e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.split.for_i_in_range_4_len_seg_DefaultSplitter.split.return.result": {"doc_hash": "337b2594865fd457095ac9ab4433b4723c4d36e834583ee8fba39563bfa0bd6b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_TinySegmenter_": {"doc_hash": "5b655508cd46955c6cb41ad8e5edd804890a15062c803c7cec6cab5efbc9c660"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py_js_porter_stemmer_js_porter_stemmer._": {"doc_hash": "976242eeef053fbb65a834d8dc48d0df2cc407d47cacebe918a8fc5a870ce572"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py_SearchChinese_SearchChinese.word_filter.return.len_stemmed_word_1": {"doc_hash": "9aa1d9529b718033aa9ec12ee301c64eac8f76fdd178ae73421871fa4a77d102"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py_SearchChinese.stem_": {"doc_hash": "32dba153ce085ec1b760fa3a62c4f9d02a598f4c30c5a8f50904fa335aaaddd9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_os_BuildDoc.boolean_options._fresh_env_all_files_": {"doc_hash": "1d68e2666a9e4e69d009303a2f69ff91aea9340ad46ead646797b1bccd4779ab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_BuildDoc.finalize_options_BuildDoc.finalize_options.self.builder_target_dirs._": {"doc_hash": "2602c0022a1411c958b7b97b9d8c718513e60a654b3e83f5ec22ccb064d2ca6f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_BuildDoc.run_": {"doc_hash": "269a31348028ff4b09c95f6dcc840ecafdb1a1b4df5331291d92bb5266eb29c3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/__init__.py__": {"doc_hash": "61f6f1c1c9755900f38b6e0c1a48689869ae6829e6bc5d996f59d241724c5ddf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/comparer.py_PathComparer.diff_PathComparer.rdiff.return.self__diff_": {"doc_hash": "f33ba84aef0a5c665f4b6e55caf4513e68ff5b84f3747af905ceb44f73bfafa6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/comparer.py_PathComparer._diff_": {"doc_hash": "8eef7bbcc1a1e9d1f1506e8a45ad773dbdc0683ff91b0f5688dfd5ab8b637258"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_app_params_app_params._type_ignore": {"doc_hash": "e526483020bdcad22694ec6ecf20a9e46891c50b2d6a68e3441dac3d9fdace66"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_test_params_test_params.return.result": {"doc_hash": "50a0ff92ec072b986c280b08a725ae1d0eb3cd4a7eec48cb103472ec2834b1ab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_app_warning.return.app__warning": {"doc_hash": "779c9b2d3361abb65bcc70d0ae67bd0cda8ff7b45e182ace9b3aabcf5818cf6c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_make_app_make_app.for_app__in_reversed_apps.app__cleanup_": {"doc_hash": "f810c21e6bb83b16d957d814995dffb1a098fa14e621191a02c3473ea60a2e71"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_shared_result_if_graphviz_found.pytest_skip_graphviz_do": {"doc_hash": "d780dbd12f69ac49a4aa1a475f5178a73f1ab99538c404132ce4688d4f119ed3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_sphinx_test_tempdir_": {"doc_hash": "5d8d10b7446f5037eb95c6c87351633eb95876868734715802dd271869762f89"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path.rmtree_path.rmtree.shutil_rmtree_self_ignor": {"doc_hash": "fd823614a2f05b5513e70663be2bcbb88c1e2989e6fc36924e2d76b26b940459"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path.movetree_": {"doc_hash": "e1545060ee96d2663b886dad140df9199db94968ff799980356029865cad0159"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/restructuredtext.py_from_os_import_path_": {"doc_hash": "04abe05e1135cd21b6b69a01c1fa934567f08054b3c97a1bd8105d21e6e7a6d5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_assert_node_assert_node.if_kwargs_.for_key_value_in_kwargs_.assert_node_key_value": {"doc_hash": "4b774c6c9111687b06b7cd5e0b3c322c8aada3f0c358e91ec6bc94fd97e4bf00"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_etree_parse_SphinxTestApp.__init__.try_.except_Exception_.raise": {"doc_hash": "48abb3254fb780fe3aa10f696f1d9c267a9d700881d86905c1f1ab251e5eebd3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_SphinxTestApp.cleanup_SphinxTestApp.__repr__.return._s_buildername_r_": {"doc_hash": "0b9b8c7f5d96eed0c2855551eb1765cc778f72e3cbf65e50b622ef28060d0555"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_SphinxTestAppWrapperForSkipBuilding_SphinxTestAppWrapperForSkipBuilding.build.if_not_self_app_outdir_li._otherwise_we_can_use_b": {"doc_hash": "3da0327d984077b799020bfc6cfd0361e62b0781be3f700728169f142de67232"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py__unicode_literals_re_": {"doc_hash": "bc31a6997bc438ab3d83d9462263f360e1f866e5ac61468059953dc2ddff71f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_Theme_Theme.get_theme_dirs.if_self_base_is_None_.else_.return._self_themedir_self_ba": {"doc_hash": "55068c0d44219371cf9796f350c569e859739fa842f634ff490b01eec8ebc171"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_Theme.get_config_Theme.get_config.try_.except_configparser_NoOp.if_default_is_NODEFAULT_.else_.return.default": {"doc_hash": "ca500317924e3c771635648e67b4baf1203fd74af1b0b585fdf4339db271ebde"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_Theme.get_options_is_archived_theme.try_.except_Exception_.return.False": {"doc_hash": "114e432425d4acaebda15f9a03280d3bfc4cf2b122c09d12cb60b5ba3b550ba1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_HTMLThemeFactory.find_themes_HTMLThemeFactory.find_themes.return.themes": {"doc_hash": "e3dc20a619fd208d983860f66efcbc00fb728bb78143133af69b5d93f69a51c9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_HTMLThemeFactory.create_": {"doc_hash": "68362d4abfcb00bef7a66ae6f7be6009628a3ace902bb789371069cf14696189"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxTransform_SphinxTransform.config.return.self_env_config": {"doc_hash": "1c3b726209dcec67f13f273eb47985674a7adeba765b57a9cc2df0c37a58542b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxTransformer_SphinxTransformer.apply_transforms.if_isinstance_self_docume.else_.try_.finally_.self.document.self_document_0_": {"doc_hash": "041b7162394939131da6193c7c4fe7d4f16c0c251e40eb1f817a3de4c98847ce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_DefaultSubstitutions_DefaultSubstitutions.apply.for_ref_in_self_document_.if_refname_in_to_handle_.ref_replace_self_nodes_Te": {"doc_hash": "d07009487dcb115b143852c4c3da6f164baa3da90db68f3c9629f255c3e1c422"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_HandleCodeBlocks_HandleCodeBlocks.apply._del_node_parent_": {"doc_hash": "daf08b8762cdf14ac6cc970cba640ce9e186112f04cc4a4a20156b6c767d0efd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_AutoNumbering_AutoNumbering.apply.for_node_in_self_document.if_domain_is_enumerable_.self_document_note_implic": {"doc_hash": "5a97c84a50e22655f044d83be689bb9a51df8d7656c85cd3a1b70d24bce9c9d6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SortIds_ApplySourceWorkaround.apply.for_node_in_self_document.if_isinstance_node_node.apply_source_workaround_n": {"doc_hash": "e420e907eb1e35595fbe9127085331942bbb1a7ffcc4ebb7dd20e604db6fd7d8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_AutoIndexUpgrader_AutoIndexUpgrader.apply.for_node_in_self_document.if_entries_in_node_and_.for_i_entry_in_enumerate.if_len_entry_4_.node_entries_i_entr": {"doc_hash": "402f9a539b63f56a100b72271e92a0d74233b2ad46bdd91b14246c5891883f33"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_ExtraTranslatableNodes_ExtraTranslatableNodes.apply.for_node_in_self_document.node_translatable_Tr": {"doc_hash": "74cb388fcab9a0ba4af392344d61d1021d9c26979333d0a01a5c891ae95de486"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_UnreferencedFootnotesDetector_UnreferencedFootnotesDetector.apply.None_1.if_not_any_ref_auto_.logger_warning____Footno": {"doc_hash": "dc530365e599633fad0ed6e4d2b215455746d63bfbcbc36cec7a7ca800448205"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxSmartQuotes_SphinxSmartQuotes.is_available.for_tag_in_normalize_lang.else_.return.False": {"doc_hash": "2a31807019f7fad7a254bea453d6ef11ccdf48cbc8c139c681f5f701d4031ebf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxSmartQuotes.get_tokens_SphinxSmartQuotes.get_tokens.for_txtnode_in_txtnodes_.if_is_smartquotable_txtno.else_.yield_literal_txtnode": {"doc_hash": "740119d45d16d02aa499728d5e80ad0d6ba3bdab75d95b97263b540ce5f76834"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_DoctreeReadEvent_ManpageLink.apply.for_node_in_self_document.node_attributes_update_in": {"doc_hash": "2616404d88ae393f005f286655eebd5e45df4115ac5e06e28fc12fcf0a541f6c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/compact_bullet_list.py_RefOnlyBulletListTransform_": {"doc_hash": "d05719769ac90f0ddb67d3ca1b147460557c59e5637f0d4bbf1f8f69b8d143f1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_publish_msgstr_publish_msgstr.try_.finally_._type_ignore": {"doc_hash": "e3ddd29a6d9a98a680cbdfd5296cfe3e62aea5ac8e32453fd6c63209676a10ff"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.if_index_in_self_config_Locale.apply.for_translated_in_self_do.translated_delattr_trans": {"doc_hash": "ad302b23985d4547561a6e27cd0c246ecf3b8e62b309ba5f6e400eefda9f539d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_RemoveTranslatableInline_": {"doc_hash": "649f584bb9bb9d8a437723e79678ce037630c6e5b3a4823e951c33a921f55f77"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_SphinxPostTransform_SphinxPostTransform.run.raise_NotImplementedError": {"doc_hash": "9485e3c57c19722875c6c15c78f75034addd788df8fe94d51fad5ee39960d94d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_ReferencesResolver_ReferencesResolver.run.for_node_in_self_document.node_replace_self_newnode": {"doc_hash": "c65e1dcc48d8cd7d8d71bd084167bcc8496b2bdc7a9ae690711cb65356371de8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_ReferencesResolver.resolve_anyref_ReferencesResolver.resolve_anyref.return.newnode": {"doc_hash": "cc6165efbfca3202ab5eda9f292f106f2257173ce8fd64eb1cfd91de504279e8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_OnlyNodeTransform_OnlyNodeTransform.run.process_only_nodes_self_d": {"doc_hash": "04878fabca4bfafc27670ca031ce3530d2b43ad0fc6927d2f5e4b8f28eccbdfe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py_HighlightLanguageVisitor_HighlightLanguageVisitor.visit_literal_block.if_linenos_not_in_node_.node_linenos_lines_": {"doc_hash": "22aa3d9d2c8f2a046afab9173281866fe8e041129a8bc9e26d4b91aa3d97cb52"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py_TrimDoctestFlagsTransform_TrimDoctestFlagsTransform.strip_doctest_flags.node_nodes_Text_sou": {"doc_hash": "5ffe3c38daa69c92ad059fa3a24ffe84a9711adcf22c2fc77b9f3fcb03a93be5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py_TrimDoctestFlagsTransform.is_pyconsole_": {"doc_hash": "6c685de6e5a42577c5191adb602daf05a84b3b4a7e13d78d8d74486af126b064"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageDownloader_ImageDownloader.handle.try_.except_Exception_as_exc_.logger_warning____Could_": {"doc_hash": "48646236e979f6d57185f31a4c79b544ab118a33c82e78a2e9c8c74d280fdca8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_DataURIExtractor_get_filename_for.return.os_path_splitext_basename": {"doc_hash": "f6b0059ead1d47acd68bf739d4f00b63ed1c5d80e08cbc0a2f4417a79793e832"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter.handle_": {"doc_hash": "f70ac2fb5edda057b22c619ac8b530da4daeee96b429d3716660021383266b6f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_FilenameUniqDict.purge_doc_FilenameUniqDict.__setstate__.self._existing.state": {"doc_hash": "37b20e941cd10ef76f953f0bc23923d7de397576c83491611ab6902735154ca5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_md5_sha1.try_.except_ValueError_._type_ignore": {"doc_hash": "b4f78e3ef57007e8102a09e30da6fcc8a78caa36f98427e929f28a9e33b531de"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_DownloadFiles__DEBUG_HEADER._": {"doc_hash": "ed6d4a56c0b93891ac9cb6bee36cdd2b1a4c08e56d808b38a876c7fa4f988a06"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_save_traceback_save_traceback.return.path": {"doc_hash": "96c60cf29c59aa1965e22414e37b0998eb4b156cb9bf3a8d0a0dc1c455049405"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_get_full_modname__coding_re.re_compile_r_coding_s": {"doc_hash": "f78d5900d3e06c3d7d4deb3e2f93e964059dfcf375ffb6b412cb346e00e7f3a0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_UnicodeDecodeErrorHandler_UnicodeDecodeErrorHandler.__call__.return._error_end_": {"doc_hash": "745cc219fa593cb1f520ecbd0c71b0d5fdd05cfae9f2067b48078dd28901680a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py__Low_level_utility_funct_Tee.flush.if_hasattr_self_stream2_.self_stream2_flush_": {"doc_hash": "0304f4a88a100b15b2597bd6237c2eed24850c699bdc27c37cadf9ff896b69eb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_parselinenos_parselinenos.return.items": {"doc_hash": "db00fd1115f71a260e53875e3435d9163958e7e711be71aec0d915a3bf5052e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_split_full_qualified_name_split_full_qualified_name.return.name_": {"doc_hash": "36d4d85cb205af25b7495c9bebbcf07fbf9a114f89c862f281905717f7cdaf28"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_encode_uri_old_status_iterator.if_l_1_.logger_info_": {"doc_hash": "73f16fdb531093a7c0609152d84c9a003c920849c4249b2394c90d479394868c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py__new_version_with_progre_SkipProgressMessage.pass": {"doc_hash": "b0d4381a668271e53e0ddda758b9a868b5101efceb6f680969b4ae68acece588"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_progress_message_progress_message.__call__.return.wrapper": {"doc_hash": "90aebbdfd6d3f2d89b912dcb962c113b961097ceac4ad3be7b17f56c3c939716"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_epoch_to_rfc1123_rfc1123_to_epoch.return.mktime_strptime_rfc1123_": {"doc_hash": "fb38a52eee9a0ebd70d4408b07b212f47fa6ea87c632f7c1a7ff8990c61128c1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_xmlname_checker_": {"doc_hash": "89808ca8d58cb0b1971c8180ff7b4cfaf6f55bae722059996b51b1f6d0b966bd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/build_phase.py__": {"doc_hash": "b8dd6f82f07126cb1b4c18bed1eec338cc5a5c598f58296c4dfc674750a01e18"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser_BaseParser.__init__.self.allowFallbackExpressionParsing.True": {"doc_hash": "6a1ef5dee319114666b5b6361edd3d263635c90c7d3987fca829c5d1a0fea3a5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser._make_multi_error_BaseParser._make_multi_error.return.DefinitionError_join_r": {"doc_hash": "f80bc1025641acb4b5e045252cd904842a4ca2b13e18c2a66a91a983dfef3c43"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser.language_BaseParser.fail.raise_self__make_multi_er": {"doc_hash": "5cc1089dbffbcb56c780168f0fae54b01a31871705ab3e5c649a2f1da4886d9e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser.warn_BaseParser.paren_attributes.raise_NotImplementedError": {"doc_hash": "41fffb964aec2e0eebcfbdaead598ec47fa0670ca2caf26c0449ae2be8620303"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser._parse_balanced_token_seq_BaseParser._parse_balanced_token_seq.return.self_definition_startPos_": {"doc_hash": "9e3d3d91750b05ba308cad7d5db0b8de67fb7a64dd6bf3200a9199829c3f9083"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser._parse_attribute_": {"doc_hash": "7cda6c5c534dfe02c106383dc11d18d02c09a5ceba659f004decbb601779f8d2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_colorize_colorize.return.escseq_name_text_esc": {"doc_hash": "15729274e0607178a4b96f45055c75abdac83b24f932cbc82d2594f535008ae2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_strip_colors_": {"doc_hash": "c0a7fe0f8ef03a9f9581cae92bd790654e4fdc7bc2ae33283dc1173d5b4b72b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field_Field.__init__.self.bodyrolename.bodyrolename": {"doc_hash": "52ab66c9a78318dfd1fd1446303edc3b1bfc3279447dcddee0d687c92400e232"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field.make_xrefs_Field.make_entry.return._fieldarg_content_": {"doc_hash": "cc31e4acf7ae34ace19209e24f0335152ba07f23d9d26d393d8a756a526916bc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field.make_field_Field.make_field.return.nodes_field_fieldname": {"doc_hash": "22edc29a89d9192d3e7559fa96082ecff46ffbc5cde9364cf393155d37efc7c7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_GroupedField_GroupedField.__init__.self.can_collapse.can_collapse": {"doc_hash": "85610b3ca1617568ad1da53330d3bd51ed76bd523e9607b8e7a54ece1305d3d4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_GroupedField.make_field_GroupedField.make_field.return.nodes_field_fieldname": {"doc_hash": "5de4eb4677968b6b6cc2d92bdcd8b3fb4219b4c37b430033c1464b0b4f1b4ad3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_TypedField_TypedField.__init__.self.typerolename.typerolename": {"doc_hash": "8245a8de84b0305e7835e4be9ec937493f5ff84dbd6216d9a5f9fe96cddb8665"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_TypedField.make_field_TypedField.make_field.return.nodes_field_fieldname": {"doc_hash": "76caa8c248bfa9b2feaa2c864af980f19b4750d8c181fa97ea196acb7104a056"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docstrings.py_prepare_docstring_prepare_docstring.return.lines": {"doc_hash": "8d3903ed416a5c5b0e355da261094d82bd71a9fc652a396c6f42ff92ee906c96"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docstrings.py_prepare_commentdoc_": {"doc_hash": "c483d87f73dd88415160c763774cc5f45877ea10062dd17956160d954fd3ec63"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_unregister_node_unregister_node.if_hasattr_nodes_GenericN.None_3": {"doc_hash": "68cd33def0dc2385cd0b77f4062a3c86b8c37a4d6a4cb76c4ad5f968a26873e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_patched_get_language_patched_get_language.try_.finally_.docutils.languages.get_language.get_language": {"doc_hash": "9c94db64d5025d93c668d0b51c46129d31bf49c010333c4a52718438f7054747"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_NullReporter_switch_source_input.try_.finally_._type_ignore": {"doc_hash": "65aa41841e9fb9183675c22fc24b0547b7155b733b0712aeda8e96179c11411e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxFileOutput_SphinxFileOutput.write.return.super_write_data_": {"doc_hash": "7da2006167ea6c9137201aefbfa905f1819fe6a19e9db3df8d8d82d9d155596f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxRole_SphinxRole.None_9": {"doc_hash": "ea807d9e2f4bc26870b4253622ac5be35826ed423da25825640fd956e9669551"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxRole.__call___SphinxRole.__call__.return.self_run_": {"doc_hash": "5b3a38ed96f14b011e2bf54235e53759dae065810c20a43112f6970871811252"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_ReferenceRole_ReferenceRole.explicit_title_re.re_compile_r_s_": {"doc_hash": "6ab8e265c0356ff549933afc6d8e5a6fe6bc447a711f2f3adab5e1cd371b57a0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_ReferenceRole.__call___ReferenceRole.__call__.return.super___call___name_ra": {"doc_hash": "7498a93e37766d1bc27705edb1bd303b75ae9734e5b1044aafe2e6f40ed9d217"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxTranslator_SphinxTranslator.__init__.self.settings.document_settings": {"doc_hash": "8fa642cdce7596347ef73ffe83430ab388f9df61b9618a9dc0a3c797e864e44f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxTranslator.dispatch_visit_SphinxTranslator.dispatch_visit.for_node_class_in_node___.else_.super_dispatch_visit_no": {"doc_hash": "719d483cd92eb0e7d8bc9de53609d90db5f04fed9a17c315028ef4b4acf12728"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/fileutil.py_copy_asset_": {"doc_hash": "43eff2900768a451d8dbebcce9d6f87dfd1ea6988864ebee9d99e9adc40031d9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogInfo_CatalogInfo.is_outdated.return._": {"doc_hash": "e1fe82e6c35f996e741f37a204fd41bc68a1b8fd3f6c0bef8440e19c17ef8335"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogInfo.write_mo_CatalogInfo.write_mo.with_open_self_mo_path_.try_.except_Exception_as_exc_.logger_warning____writin": {"doc_hash": "cea32680b8df1f5ba8c17e56b112b102ffe179fdbbe74c51eb4aa9e674476a68"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_format_date_format_date.return._join_result_": {"doc_hash": "b221d665038b99183808797b534fc2df3395dcb65e35412cc9cf7f397ea2ac51"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_get_image_filename_for_language_": {"doc_hash": "cf2799a7af3b0da6401224d274c166b5a772d5cb044a77c26c280a0025bdf179"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isstaticmethod_isstaticmethod.return.False": {"doc_hash": "9ca6e338c745c6aee306b2340f8254d42023a1796859d9c9075dda59e3129c87"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isdescriptor_is_cython_function_or_method.try_.except_AttributeError_.return.False": {"doc_hash": "d8bbee44e4c44344bcadddc8e570998e48f596338c07e4f668d1cf7a9d6c1872"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isattributedescriptor_isattributedescriptor.if_inspect_isdatadescript.else_.return.False": {"doc_hash": "2cee969109445cc7880d68d278896e77cd809e43daee8444eb385c08dca81276"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_is_singledispatch_function_isroutine.return.inspect_isroutine_unwrap_": {"doc_hash": "2164a7c5f5e9e148fb9dfa4d9af9510387d0d90ba0180a4f29d27db037fe689c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_object_description_object_description.return.s_replace_n_": {"doc_hash": "08ce2ef1d90aeb796a89b515fae3b683fcd54e7ec86025ef64dd6d742c653808"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_signature_signature.return.inspect_Signature_paramet": {"doc_hash": "52dd2354909ad189933a4ee2dce2f23f9ae48a061b728cb389e4a16a7a8baba4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getdoc_": {"doc_hash": "28c863b5c99d89148d40633c53ca3402df20efffc5898a2c6d27f98e93bf5159"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py_InventoryFile_InventoryFile.load_v1.return.invdata": {"doc_hash": "f12763b2710fb2b475d403b2864be51cf27a4f35ecef5660eac6996cb0c28de2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py_InventoryFile.load_v2_InventoryFile.load_v2.return.invdata": {"doc_hash": "b4b0466e01ba70c6d410fdc65463a6ad554dabdb6928a178b8c3f7f572421b7a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py_InventoryFile.dump_": {"doc_hash": "94a37550747e0ef15470f81f7bd0138868db0dc72fd03314b7ceda3d235dbdc5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_encode_string_encode_string.return._str_ESCAPE_ASCII_su": {"doc_hash": "83c963aef5fd7d7e16e1cba774c61d71781cbbf31cd1352ec11e9798f7bb5cfb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_decode_string_reswords.set_": {"doc_hash": "15b9a32d2d53b5ec6efe7cb41119233ef3529fb7c9cfa97d07ce58714fc4d105"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_dumps_dump.f_write_dumps_obj_": {"doc_hash": "1ec98c4f0855a17176cdb760548b90010b439990798522457b5fbf9c4cd2dec7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_loads_": {"doc_hash": "bd8cc3c6b969dac4f4b2ee0634ec48e7fa6bc2056ba9107255c3a7aaa0f1f85c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_getLogger_getLogger.return.SphinxLoggerAdapter_logge": {"doc_hash": "71a36c2e1e2a76a98185cf0bae51fa4a869b244cd6b9528b297ed432ca923d1b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_SphinxLoggerAdapter_SphinxLoggerAdapter.handle.self_logger_handle_record": {"doc_hash": "1aa380b1769aed056a4f416aadb663e7d15b1879e96ba1d3c8687ceaaaf96916"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_WarningStreamHandler_MemoryHandler.clear.return.buffer": {"doc_hash": "a90d1c898973e77b7797982fbc19f7cd880dfbdbedea44c8a4d0933a7bc88576"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_pending_warnings_pending_warnings.try_.finally_.memhandler_flushTo_logger": {"doc_hash": "c6e6686bc46306ad0772dcca9711deca2f91b9d4a097d59c3a88c0d8d7bd13d5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_suppress_logging_suppress_logging.try_.finally_.for_handler_in_handlers_.logger_addHandler_handler": {"doc_hash": "c630a4f753759c39588c67d4812f07ae1c41c61fc48654f0f69d00e06157fa21"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_pending_logging_pending_logging.try_.finally_.memhandler_flushTo_logger": {"doc_hash": "265ed817978929ff7e5537ff2cb75acc18600becc1f16011d590e5c73378e0c3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_skip_warningiserror_skip_warningiserror.if_skip_is_False_.else_.try_.finally_.for_handler_in_logger_han.handler_removeFilter_disa": {"doc_hash": "32d97a5c7f644a908f600eed9112afb8d4a293670b7abd13453911cf3df2e0fd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_prefixed_warnings_prefixed_warnings.if_prefix_filter_.else_.try_.finally_.warning_handler_removeFil": {"doc_hash": "9c54b989bd70b44c41299be8a1a9758ddf50b612f31cd4fb8c83b5aec946b0a5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_WarningSuppressor_WarningSuppressor.filter.if_is_suppressed_warning_.else_.return.True": {"doc_hash": "e6850e1b608234a53b2c6a8f9954033455ea93b1fe499912f97ef3ed2f8b718c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_WarningIsErrorFilter_WarningIsErrorFilter.filter.if_getattr_record_skip_.else_.return.True": {"doc_hash": "67c66a59366f5dc7fcaaf112d25f149a533ee3d4d7b321b62001b873487b3df5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_DisableWarningIsErrorFilter_OnceFilter.filter.if_not_once_.else_.return.True": {"doc_hash": "76b2a4833d5f7aca17a965ae065b6810997cd0d9d36273dc87735eb5b4d817e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_SphinxLogRecordTranslator_SphinxLogRecordTranslator.filter.return.True": {"doc_hash": "1f012704b8a924243acbdd2d6894fb19ecca9726540410197712652c0ba2d0bb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_InfoLogRecordTranslator_ColorizeFormatter.format.if_color_.else_.return.message": {"doc_hash": "682ec4cbb84b1f0ba6d85a358f45f89b0152781e7b9e84bbc231d1001e8f649d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_SafeEncodingWriter_LastMessagesWriter.write.self_app_messagelog_appen": {"doc_hash": "d86c02f99b962e2a1412ff3b7ba2cae32a1a27b2325e03bebb1e6ec0555f359b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_setup_": {"doc_hash": "b9cbafdf7ae7391ccb7fbaa45b7fe1d5a93bfe837d378b4216f5d26f9862c8ee"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/matching.py_compile_matchers_Matcher.match.return.any_pat_string_for_pat_i": {"doc_hash": "7bfa8a37d735e72394f150dbb3bbb4a3ff305ce77de4dc1a2576718854ba9256"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/matching.py_DOTFILES_": {"doc_hash": "942ce469a3b33085fa5bad6aa9a0e2e8219e7da50cfef44b7e42cf929fa74109"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/math.py_wrap_displaymath_": {"doc_hash": "48ffa52c707a2e05e0ecb2b08b000c67a8e07f0d6723bdf9808bff2a6c8ca76f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__b_w_compat_alias_NodeMatcher.__call__.return.self_match_node_": {"doc_hash": "adc72fa17bb278874c28731b7c28460c042c2e4543e1b192051be928a834ce24"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_get_full_module_name_repr_domxml.return.text": {"doc_hash": "0206a5e257be45d2efce239e34368aeb56079f6aef2106b50a40de32642597fd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_apply_source_workaround_apply_source_workaround.if_isinstance_node_.return": {"doc_hash": "86420d9fb12e750e3820d3acda1070962c233c9bd86e8e2a54d78732f3ccc6ed"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_IGNORED_NODES_is_translatable.return.False": {"doc_hash": "36acf420977d306a20549e85e16e162eb555a338771dccdf531eb92d1074b800"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_nested_parse_with_titles_nested_parse_with_titles.try_.finally_.state.memo.section_level.surrounding_section_level": {"doc_hash": "a98d74ae68248df07873506740637730e240a67e6e24b8f7ace3e0f2e7931455"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_clean_astext_indextypes._": {"doc_hash": "eb972eec1152cb8b829a018dc4e54113343615b657a0558e35bdebd4273f6b9d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_process_index_entry_process_index_entry.return.indexentries": {"doc_hash": "f6760af5718498ea2610e8a0e2c053eb711d82e09036bd23a70c06861c264d02"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_inline_all_toctrees_inline_all_toctrees.return.tree": {"doc_hash": "b8f92df4e07782309ab9384b67676cb73ecb2f80440133349f0587819d57c93e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__make_id__make_id.return.str_id_": {"doc_hash": "34de8c6ebd35e69089d71ffaf4c82fb12507a73d11131a42e826ab0b595be72b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__non_id_chars__non_id_translate_digraphs._": {"doc_hash": "882e15ec944e4b73c6991ab0bded9f577a8c867073c178d6ce868d831c3cf897"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_make_id_make_id.return.node_id": {"doc_hash": "ba2846fab67695c7f5f1cfc2ca0515bf40a8196e5698fd0c234a8e1fcb56afef"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_relative_uri_relative_uri.return._SEP_len_b2_": {"doc_hash": "ccfd1000fc8f2a9f8ffebb9aee8c4ee6566f7cc779d3c9a7ee750e179b33d3f2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks_ParallelTasks.__init__.self._taskid.0": {"doc_hash": "5e3ccbd2daa81578ed5ad17d648a00db24e80fad1e15850fe27efd1ec7d49306"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks._process_ParallelTasks._process.pipe_send_failed_collec": {"doc_hash": "717b412fe5d660f1d70449086c30396dd52472525ebe527e2069319c7b1f8dd1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_make_chunks_": {"doc_hash": "5e339da8c7f20463a1fd180d6fc793d2d6103ec6398e9a70412609dbca557396"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/png.py_write_png_depth_": {"doc_hash": "837890958cdfce38934828b73390f7760998a99b566a857cdfcbf9dc34f29dff"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py__get_tls_cacert__get_tls_cacert.if_not_certs_.else_.return.certs_get_hostname_True_": {"doc_hash": "90296ac1674f931f07eb6830d6ac6d91e1fdb42da9f82bedbfcb447233c04258"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py__get_user_agent_get.with_ignore_insecure_warn.return.requests_get_url_kwarg": {"doc_hash": "8ddfcdff6370348cb3943a6cc25297ff458a3aaca03ba7ca66748f54cb6f7afe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py_head_": {"doc_hash": "33b741820fbca3f955a845125d36f546736d5aad1247a5e51d74a9aa302828c6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/rst.py_prepend_prolog_": {"doc_hash": "476db7877372e13ef6ef258e6387ed6ed4e650987ca83cc5a866936aa773fdb6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_re_langquotes._af_": {"doc_hash": "5174180a7a02ee28383306fc0fe7021ca5f3ed8590320d297f9bd8a1d0c0bd1c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educateQuotes_educateQuotes.closing_single_quotes_regex_12.re_compile_r_": {"doc_hash": "7c4613974e7f0a3f0a8811edc0e0e6054536fd5931cda969c3ac905c914928a8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educateQuotes.text_13_educateQuotes.return.text": {"doc_hash": "382cd31267997c2b74b1cee57f89a8d64f59436974d0fa61c0a7e3ef3692372a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educate_tokens_educate_tokens._context_to_curl_leading": {"doc_hash": "095dba07d2b5f15ef0a024b5c1f2c8a52f85681dd45ba7298e9093c094e61209"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educate_tokens.for_ttype_text_in_text_educate_tokens.for_ttype_text_in_text.yield_text": {"doc_hash": "7505e1952cc3b091eb878bd72923d18f3324940d2b9f6e502bc99fa8e84fd7de"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_if_docutils_version_0__": {"doc_hash": "e796071d2d2e57324b2202a4799b74d256fb9ffd2d632a0e5cbb8f183fa583cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer_PorterStemmer.__init__._j_is_a_general_offset_i": {"doc_hash": "10e14cdc624f72bf3d4ed7dfbd399607f267895c357ef8ce55bbae904e4c5b14"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.cons_PorterStemmer.cons.return.1": {"doc_hash": "87943e995543313729a185520b33fe734d110c90b26ce424eff9549ab70c68f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.m_PorterStemmer.m.None_1.i_2.i_1": {"doc_hash": "376523ad52c136b6cbe8422556b5cdf141c328ff889f6614cd264c567ee6ec7a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.vowelinstem_PorterStemmer.doublec.return.self_cons_j_": {"doc_hash": "a90f0217bcaf1e647aea2c05aeddc5fb7185206908af44ab369a5b4393b0ab62"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.cvc_PorterStemmer.cvc.return.1": {"doc_hash": "663649f55efe62647c04caedd688f7d6dcc814ca378bcd46f225c6f9433f0883"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.ends_PorterStemmer.r.if_self_m_0_.self_setto_s_": {"doc_hash": "03f217e689f5f124dcf16953684cef12f475d2d2d69d994121994f8727163edc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step1ab_PorterStemmer.step1c.if_self_ends_y_and_se.self.b.self_b_self_k_i_s": {"doc_hash": "4bcb047d8d1687737c855cbf5db585dce07431fed019e1bf6a08dfc51f1da150"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step2_PorterStemmer.step2._To_match_the_published_": {"doc_hash": "b45cda3637fec6134ace0c2a543fca3c3048560804af686f0db0764e8e9d5110"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step3_PorterStemmer.step3.if_self_b_self_k_e_.elif_self_b_self_k_s.if_self_ends_ness_.self_r_": {"doc_hash": "e53fa647ad257bf1737752e6b3618012b5f74ca416a6068bc5d7b91a1ef8a0a5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step4_PorterStemmer.step4.if_self_m_1_.self.k.self_j": {"doc_hash": "df37a8e173936791bb29200f5fe2ec6199c21db5c86f74dd4b00b17932666ed1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step5_PorterStemmer.step5.if_self_b_self_k_l_.self.k.self_k_1": {"doc_hash": "8492a53146d8a7cabed0c4c64ebd7825d0365bcc5fe3886021070ff07da92138"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.stem_": {"doc_hash": "e2dcab2c480c8451368343b9b66c834e611ba00fbe7e7178b2b63de6d1cbba10"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/tags.py_from_typing_import_Iterat_BooleanParser.parse_compare.return.node": {"doc_hash": "5360bc39bf15d2a3f388ff928ef34e831711a451525be255c8fbbb32c6281f01"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/tags.py_Tags_": {"doc_hash": "70b603724a10bd77844d3fe775c11d894fb0f070d3341779f3025e825b4c0b8d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py_FileRenderer_SphinxRenderer.render_from_file.return.FileRenderer_render_from_": {"doc_hash": "4bdbfe8e9bed257e0fec14991eda5e9648e4db222e50878d095980d6c9b0455f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py_LaTeXRenderer_ReSTRenderer.__init__.self_env_filters_heading": {"doc_hash": "7fe84cdeb6ca4869e209eda9c5a9b1d6d57bdf51c1b99204d22d04f319b9c4d4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py_SphinxTemplateLoader_": {"doc_hash": "f8d1fa8f5a4764997bdfbfc2bd6a39837bb93f88c81cce8142eaabc0b6ac74a1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py_stringify_stringify.if_sys_version_info_3.else_.return._stringify_py36_annotatio": {"doc_hash": "e57329e8f916f5b1e68985d32b60c78f3c2c77697d76579fb5023a3c58fb910e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_merge_doctrees_merge_doctrees.for_new_node_in_set_new_n.yield_new_node": {"doc_hash": "0d43c17f37da81608179f5e6af88fbd68117417e1ce869cc7c983e110f04662c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_get_ratio_get_ratio.if_IS_SPEEDUP_.else_.return.levenshtein_distance_old_": {"doc_hash": "e561fdea9b8338192099eb0f54f93ad4d85cb6dbb6b5ad82189ea1496cd74915"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_levenshtein_distance_levenshtein_distance.return.previous_row_1_": {"doc_hash": "695cf22d50418bb15b153e35613bfd71a16b7e158eba5ca36d449b66468e991e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_UIDTransform_": {"doc_hash": "8618400204cc9c25ca29fa8640763f2cbfda4749765d21413f93d3e3233805e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/__init__.py__": {"doc_hash": "70e9d34e725c5544da2f2b21eb797d1128adcdd1c19eeeb993509424bceb4094"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLWriter_HTMLWriter.translate.self.clean_meta._join_self_visitor_meta": {"doc_hash": "7ea873be52f8dde1e4313afa10814dee134c00c683efd0d105ace4c038e414d4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_reference_HTMLTranslator.visit_reference.if_node_get_secnumber_.self_body_append_s_": {"doc_hash": "b5f13e9b275d10e7b9fea51e3543fb35c96a08bcfaebb27b80ec305cf0aeb30c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_number_reference_HTMLTranslator.depart_seealso.self_depart_admonition_no": {"doc_hash": "d46937dfc382b53a5fd4836f40a3aaee8e67deef31427e2234a22b89286b97fc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.get_secnumber_HTMLTranslator.add_secnumber.if_secnumber_.self_body_append_span_c": {"doc_hash": "7602e7154a6e8588144eaf846a20e837427f89bd17082dcffe7445487216d3b5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.add_fignumber_HTMLTranslator.add_fignumber.if_figtype_.if_len_node_ids_0_.else_.append_fignumber_figtype_": {"doc_hash": "6ec18b4c324118d5d4d7dd9174c12c45d626a5111747567418537c5bf4129375"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.add_permalink_ref_HTMLTranslator.generate_targets_for_listing.for_id_in_node_ids_1_.node_ids_remove_id_": {"doc_hash": "ccd05ed9623f1778e9d21e3e3cdfd6e27c720d74161251a0a2fc5a83de3bfa47"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_literal_block_HTMLTranslator.visit_literal_block.raise_nodes_SkipNode": {"doc_hash": "e1bee99487d7fe83235acb1dd9c37dc8bae5db6620f6da20a3727eae9b054147"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_caption_HTMLTranslator.depart_caption.None_1.else_.super_depart_caption_no": {"doc_hash": "de907d04c8ce6841e088778f68b1123cbcb4cabdf0ebc33b23014e5f8a67089a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_doctest_block_HTMLTranslator.depart_literal.if_kbd_in_node_classes.else_.self_body_append_code_": {"doc_hash": "67bfabd15c63e37cf318f1b7a81c51025adca03ebbd6e74aec28a86ce90509ec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_productionlist_HTMLTranslator.visit_productionlist.raise_nodes_SkipNode": {"doc_hash": "07b74884a8287bf2aba86c6c042655b150c3a52a40ac12c1379e78cadca5b89d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.depart_productionlist_HTMLTranslator.depart_compact_paragraph.pass": {"doc_hash": "65249029adfd5f784974ebaef4b7dbc86a3406434d6a181488966485e350f529"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_image_HTMLTranslator.visit_image.super_visit_image_node_": {"doc_hash": "9c3b0123faeac15128f7d24953c0963f24ac76aabbb6a0151ebfce17e4ddd353"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_Text_HTMLTranslator.visit_Text.if_self_protect_literal_t.else_.self_body_append_encoded_": {"doc_hash": "6fb5516b90a88cf0e988d60d83c0b6e91538a96129c6a7390135a7f30e27750e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_reference_HTML5Translator.visit_reference.if_node_get_secnumber_.self_body_append_s_": {"doc_hash": "7f9314052348c0be7cecb4aabc729b2f2f52a965fc2b9099e3db86c1edcd8b22"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_number_reference_HTML5Translator.depart_seealso.self_depart_admonition_no": {"doc_hash": "0cf014ce2d2d284762fdc0192a25a50220c04d7ea8957e0b902734c1dfec7212"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.get_secnumber_HTML5Translator.add_secnumber.if_secnumber_.self_body_append_span_c": {"doc_hash": "a67060b5feeb674b4bffde888b482df93bb4352d094d1b2e1bb1e4abde4395e1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.add_fignumber_HTML5Translator.add_fignumber.if_figtype_.if_len_node_ids_0_.else_.append_fignumber_figtype_": {"doc_hash": "b783d1591c6b1d9a08bfde0ae545702f523e028fd08abe5c8d2aa97044ce26c5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_literal_block_HTML5Translator.visit_literal_block.raise_nodes_SkipNode": {"doc_hash": "246a7c1e434b8be4e6ed0c74752651e8d9f796558737a091e13d1d85b4f6fd4f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_caption_HTML5Translator.depart_caption.None_1.else_.super_depart_caption_no": {"doc_hash": "e746b3506f06a447cf3a5456c00f070c253ff7a719c54d9b09b103e7511fc552"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_doctest_block_HTML5Translator.depart_literal.if_kbd_in_node_classes.else_.self_body_append_code_": {"doc_hash": "7c092e63df5f5991bd1265bf812c78d04cedc176a62d4f6633218ff07c009687"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_productionlist_HTML5Translator.visit_productionlist.raise_nodes_SkipNode": {"doc_hash": "935b4925b05c7c902ad793f22cab84c120adb178354e9415d1dd51502f83e66e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_productionlist_HTML5Translator.depart_compact_paragraph.pass": {"doc_hash": "4ca047000227eddf56dedc69f99975fcfb27a3ed112877bb05f4ab53b4c176e0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_image_HTML5Translator.visit_image.super_visit_image_node_": {"doc_hash": "1d8d1ce51cb8131a6928a3032463b76d0fb6e101df5b03bd1ed52fe323e5ff09"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_Text_HTML5Translator.visit_Text.if_self_protect_literal_t.else_.self_body_append_encoded_": {"doc_hash": "fd914d6a5181a3b68bf14e392a523b0cd822826c910ac5a585cb908995ccca19"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_note_HTML5Translator._overwritten_to_add_even": {"doc_hash": "89d2cd4631df32ea92be8e905ec279feb73d408dc8c6a75cfb7e8e0dbfa2d2e0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_table_HTML5Translator.visit_table.self_body_append_tag_": {"doc_hash": "c2631704c22c41099c47d0753890971cfd925f46d39fcdbddb8b3943689843c0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXWriter_LaTeXWriter.translate.self.output.cast_LaTeXTranslator_vis": {"doc_hash": "b9366187909ebbd01e3e1f056435fe431a0a3b9dce9741e66335176b68771968"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py__Helper_classes_Table.is_longtable.return.self_row_30_or_longtab": {"doc_hash": "a24cbabe657af5fd1bb32b056646a1876e57bc34128aac7b617d41a0b672919f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_Table.get_table_type_Table.get_table_type.if_self_is_longtable_.else_.return._tabulary_": {"doc_hash": "ad7fe962ada404c6e3e123d21b132c8114b6aafbe77e7e0a234fe89cb548645c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_Table.get_colspec_Table.get_colspec.if_self_colspec_.else_.return._l_self_colco": {"doc_hash": "dc15c52f73b1f281a1a6f755a192bd835f91324899497497f12c0fdc74ef2c6b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_Table.add_cell_Table.cell.try_.except_IndexError_.return.None": {"doc_hash": "70b8a756f0d77e1b6ee9f83fe445b35a9c3f29df7c19d8ed44cbe569c526a9c7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_TableCell_escape_abbr.return.re_sub_r_s_r_": {"doc_hash": "097bb1eb931a54fe1e3b1bcc232e7afddfccd2a2782b8edbeaf04c350ecdfaf9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_rstdim_to_latexdim_rstdim_to_latexdim.return.res": {"doc_hash": "129438aa4fc8794ae7be06827cf8a8cc798fbadc34d84e2cc977f52584b4c610"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.generate_indices.ret_LaTeXTranslator.generate_indices.return._join_ret_": {"doc_hash": "d2ad3474f82218c7b221974c0cb1464a5518f1efc72644b8167a9f021a61ac32"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.render_LaTeXTranslator.table.if_self_tables_.else_.return.None": {"doc_hash": "a83cb7f863be50fa881cd19faa09c72173c773e703a6fceedd1fa7b0964b751a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_document_LaTeXTranslator.visit_document.self.sectionlevel.self_top_sectionlevel_1": {"doc_hash": "213a084dd70d511d15a8c17039de0e82247edad93c8e3807908a92ad05540b66"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_document_LaTeXTranslator.depart_transition.pass": {"doc_hash": "22f199c70bf92fc3c441eef24627cff62f11e75c2b132ea16cc6759b7e3519e3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_title_LaTeXTranslator.visit_title.self.in_title.1": {"doc_hash": "2b0d11a5a4de190291970d9672f24d7c2f9f7af0e7c59740697a5699a6646fe1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_table_LaTeXTranslator.visit_table.self.next_table_colspec.None": {"doc_hash": "f32bcd3cca743541cbd3abeda86f0a87000cb3434073cc11f027229296c7c149"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_table_LaTeXTranslator.depart_tbody.self_popbody_": {"doc_hash": "a417e180c75fcea07c81bda5f5341c0d42c5ae778d69f7621b823556cf79431b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_row_LaTeXTranslator.depart_row.self_table_row_1": {"doc_hash": "e707124385453070d40af55adf32eb7e4a9388a18f8ea08d93456d3aa9eca480"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_entry_LaTeXTranslator.visit_entry.self_context_append_conte": {"doc_hash": "1d5e2cbb128238cade5b63a5348b6ab6d1ac6b991a891dba416523afb782b556"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_enumerated_list_LaTeXTranslator.visit_enumerated_list.if_self_table_.self.table.has_problematic.True": {"doc_hash": "4fd165fbd61a7c77b410619356c1549082a4be8a0e8dc4df0bed691c47537cab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_enumerated_list_LaTeXTranslator.depart_field_body.depart_definition": {"doc_hash": "7ee4527ca968ae4b76289ed35947bd57ef9a5bdaf09c810ba99b88c198781b66"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_figure_LaTeXTranslator.depart_versionmodified.pass": {"doc_hash": "65b45e2243fcb3b5019c3f50176746929cb37dfc38090337aa3141743f013a33"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_target_LaTeXTranslator.visit_target.add_target.self_body_append_self_hyp": {"doc_hash": "9d1f584dd9c4167d4921f7e053d1c13e69fcfb43d9f0b76611e4a8c93e17383e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_index_LaTeXTranslator.visit_index.entries.node_entries_": {"doc_hash": "64dcd330094eea93ad8dccf090df6f65877a24162fa21ced4bcf775d951b2d31"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_raw_LaTeXTranslator.visit_reference.if_self_in_title_or_not_u.else_.if_len_node_1_and_uri.else_.self_context_append_": {"doc_hash": "1b223c261d63503475385916832e068df605005a469e72f24b4bd63890e9e035"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_reference_LaTeXTranslator.visit_number_reference.raise_nodes_SkipNode": {"doc_hash": "6a814e4cd9aebed0a13b46a4cced7ad8cf9e0c30a1ae884527c68265e6383108"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_download_reference_LaTeXTranslator.depart_title_reference.self_body_append_": {"doc_hash": "b2123e9521a6b8e7818b3bd5c76df6b56c3d7ba5678fb833da9b3c0e80cdbf97"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_thebibliography_LaTeXTranslator.depart_captioned_literal_block.pass": {"doc_hash": "3001e4732ee86903cc251521de4d1e30eec959b1b5b85c06759b5ad03c2d4cd0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_literal_block_LaTeXTranslator.visit_literal_block.if_node_rawsource_node.else_.raise_nodes_SkipNode": {"doc_hash": "bb45b3c7f57e3d3f4181ea961e6bd0f83bb647ec04fe9a9f977e94d34dafdf05"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_block_quote_LaTeXTranslator.visit_block_quote.if_not_done_.if_self_table_.self.table.has_problematic.True": {"doc_hash": "74040215cb04293ab1b8abcce7c1689a03df2d6fc741f4336491b96808576a8e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_block_quote_LaTeXTranslator.depart_subscript.self_body_append_": {"doc_hash": "7af43e2920a4180a773a91d87e5907d5a663d84e78f220a21fe1be194b025378"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_inline_LaTeXTranslator.visit_inline.if_classes_in_menusele.else_.self_context_append_": {"doc_hash": "60504c6293ad4474cc681d79247d153a74776ff6b41956208d1dbfbec23dc290"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_math_block_LaTeXTranslator.visit_math_block.raise_nodes_SkipNode": {"doc_hash": "1468d26d685deb0beb29d2c26802704c7ccdf573f61e43e5ef605d094b495fad"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_productionlist_ManualPageTranslator.visit_productionlist.raise_nodes_SkipNode": {"doc_hash": "3dab4c50b64a9401b6091c75f09330dba6d28b430040d0880423ee1e04f42d4b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_production_ManualPageTranslator._overwritten_don_t_vi": {"doc_hash": "1f0617760d57de09599c19919be8e4c1aee6f1dda5a2a771a254d93bbd81dbd7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_reference_ManualPageTranslator.visit_reference.raise_nodes_SkipNode": {"doc_hash": "4f013ee21eaf05e92a56fede532f59b8ad2f809a00995ce99701444204dad2b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_title_": {"doc_hash": "a5dae4de82c1dc2ad1feb9393eae77268a39d6b2321bd3fc171301f5019db0a3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoWriter_TexinfoWriter.translate.for_attr_in_self_visitor_.setattr_self_attr_getat": {"doc_hash": "3ee65518443990f33343b49baf09e537182205185331f3fa8b00c84a71429d62"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.finish_TexinfoTranslator._Helper_routines": {"doc_hash": "e665f1cdcc98e68072c7084d328c2d6c65dcee5c72df47e13f2a3463c5a33c0c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.init_settings_TexinfoTranslator.init_settings.elements_update_self_sett": {"doc_hash": "bb0fd4fe4d89071228f709fee22603058d4454131fdd07b68bb7a2502006a1f1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_node_names_TexinfoTranslator.collect_node_names.for_section_in_self_docum.section_node_name_ad": {"doc_hash": "efb955bc8e6fca731903070989143d68efede3716286bee2c637db48835e5941"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_rellinks_TexinfoTranslator.collect_rellinks.try_.else_.rellinks_first_1_Top": {"doc_hash": "b7173c5c86ced6b8b05be3a859c075966262af0479fce454c4f93cf6ac9580b9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator._Escaping_TexinfoTranslator.ensure_eol.if_self_body_and_self_bod.self_body_append_n_": {"doc_hash": "a3af3071e0a5c26536a00884b40f6f94c5bebea3e25c472bf402feb840e69279"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.format_menu_entry_TexinfoTranslator.format_menu_entry.return.s_wdesc_strip_n_": {"doc_hash": "97d0f6d45a75b21f0d8f0fc862a607c69f9fe2503b5ef0412bfc68846bd59c06"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.add_menu_entries_TexinfoTranslator.add_menu_entries.for_entry_in_entries_.self_body_append_self_for": {"doc_hash": "e32dcd02314f9bbd64655ecd31e3f9212238bd8ab697f3ccafc953e957c2f5e6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.add_menu_TexinfoTranslator.add_menu.self_body_append_n_end_": {"doc_hash": "8553aac08cd0175c06a000b92de8a88ca46737cbe6856426c964d7da24386da2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.tex_image_length_TexinfoTranslator.tex_image_length.return.res": {"doc_hash": "a94d9d60ace9063abde04974b4eeea00778b8735ea5ba2c65196f5f41ca34d18"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_indices_TexinfoTranslator.collect_indices.generate.return._join_ret_": {"doc_hash": "8e02110d1e8fe479dece93bc3c1c749ea56bc7d694ea2096e322c30091823c04"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_indices.indices_config_TexinfoTranslator.collect_indices.for_docname_in_self_build.if_domain_entries_docname.break": {"doc_hash": "7e6a43c1474b7ec8a9fd2a2ad69070168265f4d4caa508d3a1b702625d616b2a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator._this_is_copied_from_the_TexinfoTranslator.collect_footnotes.return.fnotes": {"doc_hash": "785a735534c5bd0ee04fe837b278e4202938e8dc86bab46000f62505bda4fa57"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator._xref_handling_TexinfoTranslator.depart_Text.pass": {"doc_hash": "0a59f5b58bea443e2d32c592ff1ff9acde4c0db81cbc90f293f4e697889057b5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_section_TexinfoTranslator.rubrics._": {"doc_hash": "29a35ae034a908311435e933f206b2c93ed349fecf41f4baf7dd52a9960dba38"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_title_TexinfoTranslator.visit_title.if_isinstance_parent_no.else_.self_body_append_n_s_": {"doc_hash": "c8b53d7203cfea6344c6ca1017d4010e99d868e4a7424e3c47cf0da593a453b3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_title_TexinfoTranslator._References": {"doc_hash": "a3740850314c1080709f0737d46fbdca37f59fbba90ac1529a64160e4de87317"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_target_TexinfoTranslator.depart_target.pass": {"doc_hash": "9c3b1b36c5d38cc5d5b3eede8de66fc99212a11854eb0a8954b5614baddfd9f4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_reference_TexinfoTranslator.visit_reference.raise_nodes_SkipNode": {"doc_hash": "f73dc99e317c125494a6c3361ae06baf30343ab589cda2603ab6d5965dc4a8f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_image_TexinfoTranslator._Sphinx_specific": {"doc_hash": "9c5484127df346179d8a1551cd20f676ba4aaa881ef91c4b2bc4462ed9b9e80a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_productionlist_TexinfoTranslator.visit_productionlist.raise_nodes_SkipNode": {"doc_hash": "a0666ca81d51cc9f28091e586b0198018a098dae5e35e27b656bcf44ee711d10"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_production_TexinfoTranslator.depart_desc.self_body_append_end_de": {"doc_hash": "627743aa4bf640446ff54de3c36beaba42fbc33686daf1d25cd64276a1d80bbf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_desc_signature_TexinfoTranslator.visit_desc_signature.self.desc_type_name.name": {"doc_hash": "75ee30fbdc134e0f2dc457ae44cda77355a35c64abddf207e7f7f3a0362ae602"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_desc_signature_TexinfoTranslator.depart_desc_optional.self_body_append_": {"doc_hash": "9d9b285d336490a66442ea76288127412810e5d4f83d5ccc7554ecd9a4a34138"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_desc_annotation_": {"doc_hash": "d5d44f5322fe60221f42297ce88d191805f2bc69e6ac09e199dd480159efd1d0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Cell_Cell.wrap.self.wrapped.my_wrap_self_text_width_": {"doc_hash": "2cc1902d90df7d054891d6f521feed390130d03ed9696f5cf715a10be273d790"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table_Table.set_separator.self.separator.len_self_lines_": {"doc_hash": "041816000fa1d4b4cca51e1356e9315f0989d3e894714ed35d57757d26b29365"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.add_cell_Table.add_cell.self_current_col_cell_": {"doc_hash": "124c67406b3097494137eba3ac8f74ccdbedb3a4132744ae6638d5374f9cd43c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.rewrap_Table.physical_lines_for_line.return.physical_lines": {"doc_hash": "8ac66f76af3e96cd7e6f4f1a7cae173e27fa96e62352df217d865d6f3999616f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.__str__.for_lineno_line_in_enume_Table.__str__.return._n_join_out_": {"doc_hash": "b0ae2cc96dc9b28509966f0619d1f1ba1e02d8e45e1967d4be0a1a1be86c8384"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper_TextWrapper._em_dash": {"doc_hash": "470a202458018f20fb79339b88de7d9e41a4cbc6fe499b0f9c0b4fc6cfd650f2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper._wrap_chunks_TextWrapper._wrap_chunks.return.lines": {"doc_hash": "aa181f4776d011e30b05c746d831b1960bdf2ae40183d002613ca35ffb0b4719"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper._break_word_TextWrapper._split.return.chunks": {"doc_hash": "50c0c4f14b148be6c4d5a7b780d7c06cb28deee23ce6c220785c4ec0ad1c2b2c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper._handle_long_word_TextWrapper._handle_long_word.if_self_break_long_words_.elif_not_cur_line_.cur_line_append_reversed_": {"doc_hash": "8b32159988b85081f38c93aa86b07a58ce3367c10aeadc9d75e4c2573fb85b6c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_MAXWIDTH_TextWriter.translate.self.output.cast_TextTranslator_visi": {"doc_hash": "adede8c9a0f4b281aed0c1bfdc43b0aa77d05ec3e61784289caf65eab2ab8aad"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator_TextTranslator.new_state.self_stateindent_append_i": {"doc_hash": "c4db1eb396d9ab4c57fa544d1d9ef084f60ee78614e4449bb64ef784c009534e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.end_state_TextTranslator.end_state.self_states_1_extend_re": {"doc_hash": "9018ef5f472b1bf1093837296377e92a2227984e014284238ab3669965a797db"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_document_TextTranslator.get_section_number_string.return._": {"doc_hash": "9ae3446749724364bc992f843a417902424f215c726993fd862f7e20eef11c5a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.depart_title_TextTranslator.depart_title.self_states_1_append_0": {"doc_hash": "3c51008ec0dcb290abfb4fb34a0ab9677b985e9dbb4202605e470460684284ff"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_subtitle_TextTranslator.depart_caption.pass": {"doc_hash": "0e1c8e102142e9369058a9147b0e2de12ac2a15dda4d0eac4305c89d0115cca9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_productionlist_TextTranslator.visit_productionlist.raise_nodes_SkipNode": {"doc_hash": "9d4001eaba04ce5ae9b0bca5c7f4b411d05d95ca02b2d9a7b28609c619b2e94c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_footnote_TextTranslator.depart_entry.self.entry.None": {"doc_hash": "e6845c0e1d322ef57f90575ef04ff28319c039d301b57112c5b0d436febe68e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_table_TextTranslator.depart_field.pass": {"doc_hash": "7ddd1bb30111272b0dfb462ba5ce4ddfce8942a54e69b0ce4b81c30fed5e039c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_field_name_TextTranslator._visit_admonition.self_new_state_2_": {"doc_hash": "cf2bcba21d8468843295278f92ccbd5b7b96743f7becf80effc540aa3e96472b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator._depart_admonition_TextTranslator._depart_admonition.if_len_self_states_1_.else_.self_end_state_first_labe": {"doc_hash": "feab08015ee14364eeb98436aed2aa4b599efa8dfef33c583d476b1adc9d4407"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_raw_": {"doc_hash": "c24b883170642cdcc0ae1b31f9300ec6d3080880db301083a177d53b040caf7c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/xml.py_PseudoXMLWriter_": {"doc_hash": "33b2abf6aa45fcaa49e2a9a218146a6cb8541e8ff635a3eaab43b202e23d3a47"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/conftest.py_os_": {"doc_hash": "6e0889b58ddafe789ad13c22d3d91ae4431e00ea60f5484c96e5e19f3fb28402"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_enumerable_node/conf.py__": {"doc_hash": "27a2604914effb25ba0f0337af5b25fafdf8b367b6d18590fe3e02fccb35eee3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_enumerable_node/enumerable_node.py_from_docutils_import_node_": {"doc_hash": "53f5a5bdd34eb9e421f3db7ee956a7762a22e2192e57218938446241957d32f2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser/conf.py__": {"doc_hash": "f5d317186e7a4a434ff2537ceab6c9214e2674a76926a02ff040abd685fadd29"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser/source_parser.py__": {"doc_hash": "4a7bdea79c0a2c348198658458bb816e389fb49782ececdc1166daebe9ac7322"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser-conflicts-with-users-setting/conf.py__": {"doc_hash": "a26a3bc818d1b0d09c3f2f2d69eddd718830f069ab5896e06006c8753d6282d8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser-conflicts-with-users-setting/source_parser.py__": {"doc_hash": "ebe3dd5f7dd25e108ec0d4835db2058688ee7eb648ef306f0ae0c99ada67b457"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/conf.py__set_this_by_test_ConfPseudoXMLTranslator.pass": {"doc_hash": "64c107b173418df017b5a54b05b112a760da708f40d374c6a5aa1a7efca69ef5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/conf.py_setup_": {"doc_hash": "4f3a64ef8b0a450db78f805f72feec08ff0eab524f8a6c872cd54752653abd8a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/nonext/conf.py__": {"doc_hash": "553d3c58caf42c70c558447d6eb1fd57fddd9bffd84e34583e5f97b3955b28d2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/translator.py__": {"doc_hash": "0a5e150e72318d3e6afe4ded2b84ccf9d6ab94245ac0f0dce92b7c78f37ebae7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/c/__init__.py__": {"doc_hash": "70dcd359b470e398028e18de8918e97744bec89a085ab06117b7e4886da98b79"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/c/d.py__": {"doc_hash": "e17235b4a3f08bc4a447fcc524b6c71d96975d19c7a8ca894278bb3a12095936"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/e/f.py__": {"doc_hash": "f42d49b803eff00e683bd619a1b575cc52fd17011745bfa595063a1c5a9e8507"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/x/y.py__": {"doc_hash": "1fc94325e6ae5ab23145e04b40db41005a0a095137ad795ee7f50957ba7fb882"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-subpackage-in-toc/parent/child/foo.py__": {"doc_hash": "03d80b14190c276828d50bbc6069b3a9ff0a4aaf1098fa737f7b717d52d56a86"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-toc/mypackage/main.py__": {"doc_hash": "41a6714d26a959088835d9d36ddb2a215a7d54b412a06700e63c3367195a595f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-toc/mypackage/no_init/foo.py__": {"doc_hash": "7e4894bbac2e637d3affeabbaf75a25bf7a39e0420291eda6b5918f5fb1184e0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-toc/mypackage/something/__init__.py__": {"doc_hash": "5c2f82b68fa1e7939771414253392f3e6b4115e19b57e4b0ed376f3ee88e7a28"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-trailing-underscore/package_/__init__.py__": {"doc_hash": "4816f177df0d2319796b646b5528c99147964b8a1eebb667149a9ea2a3ae207d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-trailing-underscore/package_/module_.py__": {"doc_hash": "5e9ae22dd6e649f30d6eb0a873abbc20c4065841bad6fe7f8da206d0a05f54cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/conf.py__": {"doc_hash": "6a89501314d27a238c0c6b1bf0c4ecb6ef9106db299bf39932045c21e7845f19"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/dummy_module.py___module_attr.1": {"doc_hash": "2207d5a3ef049de0dcd66271efaa3dff82b76f89ffde7695691fed7e27ac6a20"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/dummy_module.py_C_": {"doc_hash": "64173c91e289c1764f60ebff3211c027c44a1b24025d9f286654573f72203380"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/underscore_module_.py__": {"doc_hash": "be1d88486208030959597fcb0ee3486b191ed9a4716d4608c9030d378856797c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-basic/conf.py__": {"doc_hash": "5e6383a6ddb200898b3211ae0c8c4604352d50045728916f7d30210548745860"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-build-html-translator/conf.py__": {"doc_hash": "de4d3a729c5d34de4a094d113dd1555401a13063c8bf41d17a2717b5661f1c26"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-build-text/conf.py__": {"doc_hash": "2cdb04ae58cc6fb03817933b49583e195e7f4f25b4fec0386f7e6d28c3aab8f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-builder-gettext-dont-rebuild-mo/conf.py__": {"doc_hash": "d0359b56ff14044a5373d4001ef6b6d2065686e4aaef1495ee8e8fb7af4cd57c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-changes/conf.py__": {"doc_hash": "8d93b1740cbb7db425274f2f898ad44d85752f39ff08ce750d36a053a61d7f79"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-config/conf.py__": {"doc_hash": "2f7f49a38cf1834e9badd81a0a0d25b2873f7e50803bd8cd2f450c08641d9381"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-correct-year/conf.py__": {"doc_hash": "8cf7189601fe4ab45ba9cd4d41ef4b417f2e6d8b79d60ef097df53b567513e8e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-directive-code/conf.py__": {"doc_hash": "0263d745f9821915929f7c873f8467a942a62eaf7bc39b1fee5d38030f6d3df7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-directive-only/conf.py__": {"doc_hash": "421c506750442659db58b9ca5fdf75f9dd144970f65478f1124c449a33ea1e12"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-c/conf.py__": {"doc_hash": "fb94dd7e2580eb4067c727850142d7b9812993e7dcf4326258fa776f268c1875"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-cpp/conf.py__": {"doc_hash": "b36e303c9e92be193fed5006bf7d6b711eda6ed958c772769e308eaa8397adf3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-js/conf.py__": {"doc_hash": "442ebe5ebaa3569f42362284a8acfa5f6b32bd82ab32675ea01355d2ca8ca8a4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-py/conf.py__": {"doc_hash": "bb6c51d41a23fca6c02ba13ab1ce8cff60b8bc7d1df193f9f6e434df0c14e6b2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-double-inheriting-theme/conf.py__": {"doc_hash": "7ffd3c3ba65ac71b372f88d52f0828b002dabcc12bac2e59c04ec291a5b997ac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-epub-anchor-id/conf.py__": {"doc_hash": "e10426be6e0328f3b94f391e97a423e5f359887385135463be1aaf18bb628b34"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/autodoc_dummy_bar.py__": {"doc_hash": "ebbda6939ee771cc1dc8d2b0127da01a2f1228a116af5adfa590faff21c2a78a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/autodoc_dummy_module.py__": {"doc_hash": "be29e8e729f0b5cf576525608eb477928fb702e5a6bd2ecffcadce2abf7b526f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/bug2437/autodoc_dummy_foo.py__": {"doc_hash": "d629a3be28b3c5983196d70cf8907948765282d70e395697539a877d3a985332"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/conf.py__": {"doc_hash": "ed48e90eabfc009653ef60aa8ca8108ef4bc8958df92fbd02c4b16bb38219762"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_enum__funky_classmethod.return.classmethod_function_": {"doc_hash": "130fbbbb400c1b887b071ab3ce42be7a756602f39682aaaf897bdd592057c358"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_Class_Class.__special2__.pass": {"doc_hash": "47f733487426c2459ba922171994d6fad107ecbaa9a979e9577f950dd641b560"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/abstractmethods.py__": {"doc_hash": "09b394019021f9dc054b5f9a050eb08b280f0ebea00d0d0c278f9b8bc3f7e107"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/annotated.py__": {"doc_hash": "663d7df590d42aa7f02098101ce1247dbc7f1f0627d10e18afa0d2716754f196"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/autoclass_content.py_A_": {"doc_hash": "d2cae9385258480b55ac444cf79e52db6df98c8b18fc15e245fce55a21e048b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/bound_method.py__": {"doc_hash": "6d04aff02a39b91ac46278fed6967b8b66834ea7877986048917208f2fc056b5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/callable.py__": {"doc_hash": "ead392189d30b5da18a275ac63eb89bb13afb9336d37d137bc075bd28cf21df4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/coroutine.py_asyncio_": {"doc_hash": "c36f4000219eb3cf0583ffe4517c49b8251aa6b7cce708729b62697854f093b5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/descriptor.py_CustomDataDescriptor_": {"doc_hash": "d320152a18bf39b3630ec07b08c8dbb462080cbf0507a8f983ba534489daa170"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/final.py__": {"doc_hash": "32524c561a2789bdc24685b76cb028b677f1ee728f24e577358b0f0f3e1370f5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/functions.py__": {"doc_hash": "5db92fa1a99bb611b3600d6fe3e14d17234373633263ab7ba4884f95ff4d6b91"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/imported_members.py__": {"doc_hash": "e079e6c8d0067ec69f57bc7181941ef474bb37d3a7f6e50bcb7b72c1b7ffeacb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/inheritance.py__": {"doc_hash": "a50c11d67a296f79ed4434b88440031c03f454129a9c5d531002d151deb71464"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/methods.py__": {"doc_hash": "c40b18cab39ac98f82123265b2d8bfb797207faa655d28d3badf66c41d05aeb4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/need_mocks.py_missing_module_": {"doc_hash": "946df9deba973c0b0573915ec2802ba4fa5baa1c6d922c9d1779dbb8eb60555c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/partialfunction.py__": {"doc_hash": "264b48f39eff5ff357e82d559396725a3b66c1568145adba79ac05217d791de5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/partialmethod.py__": {"doc_hash": "73d3e4b5aa1cc71795de5e94f4c0a475d4e5549cd21065a0d98d261744421624"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/pep570.py__": {"doc_hash": "4d8e21f762e0d36a6e41d287a533405b870c64d8249e6be1150e391f082b93cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/private.py__": {"doc_hash": "7341e743fab222f9d69a6295a0a273b78e22d5c15bb00eb6e638a99c1edac6e0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/process_docstring.py__": {"doc_hash": "78b3a4ed3f13c87acf6b3dbef4bd067400525ff49a9e1a2ab8cad22585472a0b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/singledispatchmethod.py__": {"doc_hash": "7fb2da830d9d78612c51e8c17ac04b9babd99ecebf346cb4cdb1922cadc2ad25"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/slots.py__": {"doc_hash": "d4ee8bf528c167f74da7e646a4ec9155a41765c33a82a250789779f753b42ff1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typed_vars.py__attr1_": {"doc_hash": "11388908bc7dba1786e92b21fb2f4640ea64c53ade8689043fbf112130e1204e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typehints.py_tuple_args_": {"doc_hash": "2f6408183fe5d6a95d99466dc41860f2175b0382c78fef2f32413e6f712fba5c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/wrappedfunction.py__": {"doc_hash": "4c8cf1586dda71ac17e24b91c4e5c04e9348c4022c0ff3faf5dc29ce4a392300"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosectionlabel/conf.py__": {"doc_hash": "69cb4920f6bc6163ef376c5fda9e18f10dd66f011fa9afe1c8f6565cd342dc1b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosectionlabel-prefix-document/conf.py__": {"doc_hash": "c971ebd9c5d973166fa98db42111ea3c46a52e049f56ab94cb1e2aceb182b5d1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary/autosummary_importfail.py__": {"doc_hash": "d72d028c2962e2e6ab2afe69fc4a9c31eaa6544c19a80a56bf083c5a26a4fa9f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary/conf.py__": {"doc_hash": "ce193c895c63f1956eb4fc3b66c7658a9c8eea69eb73fbdd0c8e646b834ab622"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-imported_members/autosummary_dummy_package/__init__.py__": {"doc_hash": "f72fc1f9bbb688eff445a8259a03a7b0d34dadfc1ce8f9ed83ad75da6aaa3ab0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-imported_members/autosummary_dummy_package/autosummary_dummy_module.py__": {"doc_hash": "e8cef3179de3211a48a067c169ef1eb688a2d093b142e615401427614c6e7f77"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-imported_members/conf.py__": {"doc_hash": "532dfcff4a126947ea1861fa3d2365e46bb608e084b51074e36d796f22a75229"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-mock_imports/conf.py__": {"doc_hash": "acb3335d84bb54f74c0159a3475304e9df360e9e14f0ecea4e885fc82831a442"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-mock_imports/foo.py__": {"doc_hash": "21c112d3938008c2ac1f9ce090afc3ac87998fd84f9e82904001ddf13fa317f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/conf.py__": {"doc_hash": "375d99389418a4cc7b5016b53bdd853b121a905ff80a444c5c3c84d581d0378f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package/module.py__": {"doc_hash": "a3583addee4ffacf4ee88317e30337738deee6f29272b4060c68738a543ce229"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package/module_importfail.py__": {"doc_hash": "be54fdd6b6e2fbf1eea4afcde7c75ce02d09d376743053d69d541bde566568b1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package/package/module.py__": {"doc_hash": "a027bba8625ace9732cadccf84e246430fb966c848aa1b7f8a3f6859a2b2d4fd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package2/module.py__": {"doc_hash": "e7e2e7565762f8182afb43cef6d0a8af90e6d46c8c21f02fceb9a130be4af539"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-skip-member/conf.py__": {"doc_hash": "464c1dd8ad17b2756dca06d22ba9bc5a9c9df7b9330e7dd35073b381c957aaec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-skip-member/target.py__": {"doc_hash": "a72d794b740ab2276aceebc9b7207ad80a4ab73cdd1385a4db31a89c2ea1ed98"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-template/conf.py__": {"doc_hash": "0547a3eb711c0e59c4e7a759a19e99b96a8fa045cc5e4588f99406a6b4b5c4fa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-template/target.py__": {"doc_hash": "84c7156bbfd46ebffc5602d638547312022775a1f9f5b9b39c1233ebc5302657"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-coverage/conf.py__": {"doc_hash": "ed10d98c25f8ad74703072de79445dc7ac73c39169460fbcc2205869d26cc7f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-coverage/coverage_ignored.py__": {"doc_hash": "0950bfde44374d5f0d0446d9066d28f02ba364a564f0fb9641831a21afd5c9c8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-coverage/coverage_not_ignored.py__": {"doc_hash": "28b6aa19ccb05425c299b36d6e45d21b04779325d9e9a1fe769844a4884720f9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest/conf.py__": {"doc_hash": "ed3a39ebaa2684227dfce8ad7bccef7ae90adaf9ab2fbf24a0d8cf737d2dc197"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-skipif/conf.py__": {"doc_hash": "de38dc7add767faf28a36ba6d9e9e0f498185402e45f4df6de8642db5c8a6851"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-with-autodoc/conf.py__": {"doc_hash": "b503549a48970bffbedd77112db535b585d5c0fef68f34bceca27c51072559a7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-with-autodoc/dir/bar.py__": {"doc_hash": "977b29cb4e8d6679481832d0b184d8848084511efa690610830b12ed9fa90beb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-with-autodoc/foo.py__": {"doc_hash": "f5744585be8b4b76b12bfb9c79cb65c4bc9c92e76ffe7ab2c825ee0b8eb5134d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-githubpages/conf.py__": {"doc_hash": "dc68876086303cfbe3a82af4780d8caba4f8ec7b4dfcfb1db28520bd15651b57"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-graphviz/conf.py__": {"doc_hash": "2632af66e7ef190ae6ae5fd4bdc14fe924caf67ef29529e1255002ef412ddf68"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-ifconfig/conf.py__": {"doc_hash": "13ab94e8a109d7eedb3fd824d98f11f46828d3e29efd77643debdde4ed4d6fc5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-imgconverter/conf.py__": {"doc_hash": "460e2e4f01f9ed83476f38020f3d577c4e0841e8649b578e136f7d8c502b0325"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/conf.py__": {"doc_hash": "355dc9e2cca9123c92db8bb32ac874ee1c250ee6655320b68a0e69be9f69bb23"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/example/__init__.py__": {"doc_hash": "0ecf43d7b14f89972319bcc62ca96f6fd7e105636a5650d04eabb4aa8bd67c14"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/example/sphinx.py__": {"doc_hash": "87e08000bd90fd54fc070f598e2f93b5afdbaf946683a1b17450534831b77406"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/test.py__": {"doc_hash": "0ad8bc7e3a1a35667300f3c674c6f6b17c164a05ef00c43af648a995443a87ea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-intersphinx-cppdomain/conf.py__": {"doc_hash": "30213a37b5da59ce5c34e07cd97a68f7cf595d046e5a6047c86a6b92a36ac1e2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-math-compat/conf.py_from_docutils_import_node_": {"doc_hash": "b2f40bfcd877e5a821a9243f17e4ae0ade908ffd1e94e439024c41e7ce271a93"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-todo/conf.py__": {"doc_hash": "efcda14b027ab48703afc5c393fdcff08372850033be7894ee45c16e07de8652"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/conf.py_os_": {"doc_hash": "9e5d39e81bbc450686c054765facc8818c8eb832756c6c9a4f1f39d6a0c5ae32"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/__init__.py__": {"doc_hash": "aa018642173eabb07b1e8ee500cc279c46185424e6390ed395f348554f8447e3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/mod1.py__": {"doc_hash": "428db6b6ca281ffe5b28bb7d56305a4a0af6f1a0b9574406252fb2cd601890cf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/mod2.py__": {"doc_hash": "0f390eeb70e27f2a5894ba8f22be3de1ca8ecff4ca8dcad77c38f35d9ea8c1ef"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/mod3.py__": {"doc_hash": "e351d47580c0ab7d08e9cd9b5a1ad77adec1e3b1ba5d35aa9bcc60c50811fe1c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode-find/conf.py__": {"doc_hash": "3ee2376469cf9f7147252f7cd53b3d758fcc7eb573f3b09546ad449e1356f082"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode-find/not_a_package/__init__.py__": {"doc_hash": "b742eb07bef188b97f20d6f90ee4d801af873b7efd9697a030e88a82a3ccfe48"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode-find/not_a_package/submodule.py__": {"doc_hash": "5199934fbb8a46fa568035515d38802a450fbf4d98a99dd4330472a8360bb4da"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/conf.py__": {"doc_hash": "38b215cade07eaa168dd548db97d2b5d3a9c3e640691e9c9a6a030508ce3302b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/read_parallel.py__": {"doc_hash": "54a3f2f16b0d064687c3ca3ec83112e7550fc31798a363e264301df3b6accaab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/read_serial.py__": {"doc_hash": "d9e401b564d11de37fa5886c8913f501c655681efb602eb4b0598241816c065b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/write_parallel.py__": {"doc_hash": "59a236b4bbf071c441325b82ce803cdc3045e8bbc5c1d07b3869a4f44556c364"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/write_serial.py__": {"doc_hash": "a42f99ac6fb4fa693c33bedfe23c3866d24288b8f67084d50d9e86993ef8f3ea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-footnotes/conf.py__": {"doc_hash": "9b6dc50a4824d2188f5baf0ea56365829a4887902f07f2476158a2ee9c3d0148"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-gettext-template/conf.py__": {"doc_hash": "56ff3a4a8e9e8770ede66a839b6ccad7b62e83f0521f73d505a59dcf3a2e3ee1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_assets/conf.py_project_": {"doc_hash": "f5df521af28c1316f7b7544d32475e004670f487747bda8265638b9f4d0411fa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_entity/conf.py__": {"doc_hash": "4f5ad288221b887541158417f7bf0426e59a1dfaa69100bcad1272a94dc06f79"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_style/conf.py__": {"doc_hash": "078ffb047c4e8d1776131e67663138bca06f101a18b616be9c3eb4cda07d21e3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-image-in-parsed-literal/conf.py__": {"doc_hash": "7a4a4141ff743951b4671bc8cc05bb05b38a7b6936ffa49f30be50be0adae78b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-image-in-section/conf.py__": {"doc_hash": "57530caa816e98600e0d9cea97f357bd63abff5208fd09bd67cb5b016b4e97b0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-inheritance/conf.py__": {"doc_hash": "5a6fca4b04191c42f45b3c0b884e960da65f4ad8a2cf916c24f4f5e47f668e97"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-inheritance/dummy/test.py__": {"doc_hash": "90393a51e8366d323c60ffb64fb0874321f7787cf75798d6c1bcd0562aca1381"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-inheritance/dummy/test_nested.py__": {"doc_hash": "24df922ffe426ac57490aad787fb471669fce1c3ee473383be658188146f2be6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-intl/conf.py__": {"doc_hash": "eeda64c7d024e852156a812661ca7be8eb5e307c7bbea3e8d5c2a824a24971e1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-keep_warnings/conf.py__": {"doc_hash": "56b8e659f87742306ddf99e00c2b9b4437d9a6873d63c38a20e482d31a1bd80f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-babel/conf.py__": {"doc_hash": "314ef14b432de2e2315409afe040706ede49177b8f131abddc67f7173f6b742a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-equations/conf.py__": {"doc_hash": "89436965b7d295dfc3fea86b2971ecbf05e4113a224383f8432717f661e90143"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-figure-in-admonition/conf.py__": {"doc_hash": "7b0503620a77b2558e7172f0bcde67b908528cd5382d8ec6c3c49eac92c5c387"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-numfig/conf.py__": {"doc_hash": "d30481529c7d3b6ec01c60b8a58e6d1c3fdcf719f1cb43130d394daf6ac9f048"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-theme/conf.py__": {"doc_hash": "5f040f55df4e53cdc085f3d62b85b96d5c306cb82d5cbbecb9f9549742f2f881"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-title/conf.py__": {"doc_hash": "5147a290a2621f760fa0199928e8cbf1d022df40f7725bb95704ff06a1311c5e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck/conf.py__": {"doc_hash": "1fcf1fda4914108c4b7eb00a736f18b4c71c22daa74292a04b0cc7978175098e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-manpage_url/conf.py__": {"doc_hash": "229c989e9466564dd8a27e46773590af1c61e80cbdf12ec723ba30d1ead24380"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-markup-citation/conf.py__": {"doc_hash": "8833f587c4889b8a7fb775f6af113d997d47e2c8bb6e3089263ec830ec18e47f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-markup-rubric/conf.py__": {"doc_hash": "3836fc003d74c3fbb019b6572f3d669d6faf434f12e5111035955e19fa51b9ac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-maxlistdepth/conf.py__": {"doc_hash": "83c369c570b20b29b6597a89355f0be13720c26da89abbe69fdbaa7e3d54575f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-need-escaped/conf.py__": {"doc_hash": "f8b94a75e5cf2f0634e58e7b06817f3a0f5f9fc03eaa8336d3e90834eb87a968"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-numfig/conf.py__": {"doc_hash": "02194c509d111db69ca037597e6ea67c64f09e7b2552b6184138466139d65e77"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-productionlist/conf.py__": {"doc_hash": "d4b9badcb2ba6a450dd417f2a7e0de239e8d5668edc82330423b4958bb21fc3c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-prolog/conf.py__": {"doc_hash": "3b4da337a6bf7d8d630cc2dbcd35fb88b5dadba9263518567b850ec93033d6fa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-prolog/prolog_markdown_parser.py__": {"doc_hash": "3c6f750d2d72d36e67ed91fd960c058e394423e178238f5d695672c322d80bd6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-pycode-egg/conf.py__": {"doc_hash": "d1a14fa198cd1cb8fe13332ee52c6c636f068d1b0cf4f7d58bec73232a39139f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-pycode-egg/src/sample.py__": {"doc_hash": "6698d07c49b6e978ea97deb4f7eb2912513bb3d6ab4030427991e193ccecb38e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-pycode-egg/src/setup.py__": {"doc_hash": "1b6793fe19e68aec3cc76bebb31874b73e362892f842aa2eb49153c9fb436181"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-refonly_bullet_list/conf.py__": {"doc_hash": "3e2db16231541ec58f37f9e24a3b0445666cb07fa99ce8bd7d04c39eccf13da7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-roles-download/conf.py__": {"doc_hash": "09cb2025dfb87fc75c2bd3a583a0d5bcc3a8079d50c84e414cc5181a0e2a4902"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_enum_CustomDataDescriptor2.__metaclass__.CustomDataDescriptorMeta": {"doc_hash": "36c00b7ac6cca4572f727c27ceba6ff4e34abeded56a308bd53fcdcf6cda1836"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py__funky_classmethod_Derived.inheritedmeth.pass": {"doc_hash": "ab47d91c28ce238567f294ff20e56063345afab92813e73721b8a45c834238f4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_Class_Class.__special2__.pass": {"doc_hash": "86b02846618372d6dcba99b5070445bdeedfb18d56316cfc90ce5e2b88b2f822"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_CustomDict_DocstringSig.prop2.return.456": {"doc_hash": "5d37347ed532f8cc482836b10e23c7d758b622dca17a686e78540fac03756338"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_StrRepr_": {"doc_hash": "608e7681db54c4a70bf0771c7c4444d88eca9945e46eff1b14afcc55cf6e33cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/conf.py_os_": {"doc_hash": "5ab9b343811e43b4eb6bebe799ea874d3c9dc2bb7b35c3c224f58651162bd9f1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/parsermod.py__": {"doc_hash": "2f19cc242921eaa428e1bd9c2bcc7a96d12db4bf985f276a4c8788ca90abe9bf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/special/code.py__": {"doc_hash": "fee46491edf89c2fb52d7ed1d2a313995c500af8c0c6513b333dbb892b85ce03"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-search/conf.py__": {"doc_hash": "b88aaedaef588808a9b1c5c8d302a2c743fda0399229015e8bbb523adae25fab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-setup/doc/conf.py__": {"doc_hash": "a4b3120fa915c62db3f11b1bdaa527056de36f42f5bd29873b05cce0eef0a13f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-setup/setup.py__": {"doc_hash": "6a032f5b7d260f2dfa59427b62f9da65215ff4165fd61cae5dc3bac2ce91e789"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-stylesheets/conf.py__": {"doc_hash": "6517672ceb60fc67823591b7efd6bcd1bd6fa69242bb15dabed2e6a761cd5ef7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-templating/conf.py__": {"doc_hash": "81a06b5d84df4e5c7fcf86971f16e947c1ea0e68b4f4ca6a919ebb5ce21963e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-tocdepth/conf.py__": {"doc_hash": "1c5c0bef0cad2712477a971e0ff58b1e0eff92c003e0c6c17e945be03c226719"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-toctree-empty/conf.py__": {"doc_hash": "0d98c8efc8560bcb06a625d13fe8c9f44bb3685b5a787e17b84d62d9c177aa6a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-toctree-glob/conf.py__": {"doc_hash": "21b99df093a06a4b20bab31e0f7ff58e579f8edc9836e382506340c35bd2fbf0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-toctree-maxdepth/conf.py__": {"doc_hash": "bd77554b0a7825d274033298de4732f997ecae730254562f8f4d719fd36d1ab1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-trim_doctest_flags/conf.py__": {"doc_hash": "b1a001e968f93c5eb3dbc3100e4af1088ac6be8dc4dfa844d66434ff65586e9c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-versioning/conf.py__": {"doc_hash": "4f90ef42a19ed227bd8d2e9fab624fbd878a1fbb3dca3d067056f53303094b87"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-warnings/autodoc_fodder.py__": {"doc_hash": "c141057c4ad8b002d912c29b3cb1d5f9c6c98b4e17a5e5dba6c2b12deb55cf27"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-warnings/conf.py__": {"doc_hash": "aea5dc4d793f3a8c5e2a62c0b9d2c7d2d62653224fcafd1e5366e02f9ed601a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_emit_with_nonascii_name_node_test_extension_in_blacklist.assert_msg_startswith_WA": {"doc_hash": "90302083894b3d7077a20eadc11d583895a651aaafb4444878c955ceafd5e6ea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_add_source_parser_test_add_source_parser.assert_app_registry_get_s": {"doc_hash": "6037ac334d34535e65f475bc49f81fb1648106fae43379d49dd0eae1b88d8b3c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_add_is_parallel_allowed_test_add_is_parallel_allowed.None_2": {"doc_hash": "da7f830344cbd39a0f70cb91631ec134469a608201fa88986639fd399f50b99c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_build_specific_": {"doc_hash": "0b5a46f2309120429e79662d2d8416d657910df79e6c627632c9ec3a2a62d531"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py__note_this_test_skips_b_test_build_all.app_build_": {"doc_hash": "c5057a9f660c8fd29c75a07e20084c88ba19448a249bef884b976794749efaa1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py_test_image_glob_": {"doc_hash": "7b91759e222e9e0d95f171fa9d8b77ebb9c0f9e93f6098fcff0956843275d838"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_build_epub_test_build_epub.for_i_item_in_enumerate_.assert_item_get_id_": {"doc_hash": "c681d01740492c76763582c141002fadec59aaf81738af875b0598dd4001f748"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_build_epub._content_opf_spine_test_build_epub.None_38": {"doc_hash": "37686be38496db5fb63c284f9268712c3937efccd1ae1f820b86cec62c8f77e8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_cover_test_epub_cover.assert_cover_get_content": {"doc_hash": "5b92ddbcfc7df1f18cb4ad88b2437bfc84467be94edacc85b69af0c6a15bcc2d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_nested_toc_test_nested_toc.assert_navinfo_grandchild": {"doc_hash": "8d32db355c2d4ece351859f773105025c04defd2ff5ad2107c933ba13acc57fb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_escaped_toc_test_escaped_toc.assert_navinfo_grandchild": {"doc_hash": "357038c9b1b2db0f9342cad61e279315b7a9334a3e2829f1764997240cf700ef"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_writing_mode_test_epub_writing_mode.assert_writing_mode_ver": {"doc_hash": "051193f760ae076970acc8d446d2ddac2336fbe023c35bf6b6c2a735b5a48389"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_anchor_id_test_epub_anchor_id.assert_see_a_class_ref": {"doc_hash": "30d098d76e3b8bf8cca1c0d27fad024d007ed1bf0899a8576b89410c6d8b6624"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_assets_test_epub_assets.assert_link_media_pri": {"doc_hash": "6e25cd6937aaacc22c508fe2132dd20d9489e71565bf2f35838c611f7c01d614"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_css_files_test_epub_css_files.assert_link_media_pri": {"doc_hash": "ee043cf22f2e2932555dbfa747e035dcfc60dd2c02cbd3e98ff538588bb640e0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_html_download_role_test_html_download_role.None_3": {"doc_hash": "a44d844f1f28fd6681773b2b9101851da50fd7811c0b662bf06830f5e85124e5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_duplicated_toctree_entry_": {"doc_hash": "092e5055570ff299658705a616ae66dea7e3ee12474db50bb89ea8aebd55f44e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_msgfmt_test_msgfmt.assert___Testing_various": {"doc_hash": "3e745224cc45f31e467e5230521d58f412fefd93937bde89e9fb5ba2b192491c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_gettext_index_entries_test_gettext_index_entries.assert_msgids_": {"doc_hash": "e8bb69542dbc11acac3fa9a0faf861d2c2ae5eb5d367fc798aeda00c182619cf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_gettext_disable_index_entries_test_gettext_disable_index_entries.assert_msgids_": {"doc_hash": "088b555f4086e4e132ff605a109be3d00e20a263160df603ea00a21a7cd80cd0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_download_role_test_html_translator.assert_app_builder_docwri": {"doc_hash": "a8d1da41963b8d0d8999f45480c2ab07ee7835e12d97048051a3c17b1f1e67fc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_tocdepth_test_tocdepth.check_xpath_cached_etree_": {"doc_hash": "99d75ed632e72371d7fa3e0ee969d29d0db2e12d5ab5a26cddaae491dc011b53"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_tocdepth_singlehtml_test_tocdepth_singlehtml.check_xpath_cached_etree_": {"doc_hash": "e2136f9e2d520382c5aad81015827e92d36c7c5761f7c1d1826647b3003b5ecf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_disabled_warn_test_numfig_disabled_warn.assert_index_rst_57_WAR": {"doc_hash": "72c4552a1b880ba1615a20b4f9706d5d78ea8bc77c013c736b8e8f7f8597c878"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_disabled_test_numfig_disabled.check_xpath_cached_etree_": {"doc_hash": "961edcc22eddc45898f95f6c4f92581f3c06f52594f7fcf8adedcc150cb4ddc3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_without_numbered_toctree_warn_test_numfig_without_numbered_toctree_warn.assert_index_rst_57_WAR": {"doc_hash": "360b9abc7abe7dc2153e0cbd5778b6d28bc50d23dd76012ebc772c51dd38e08d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_without_numbered_toctree_test_numfig_without_numbered_toctree.check_xpath_cached_etree_": {"doc_hash": "941b1ea3102ab9a6344002b519bf52c44225ba8558c89ea30ac7f49b4ab14fdb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_numbered_toctree_warn_test_numfig_with_numbered_toctree_warn.assert_index_rst_57_WAR": {"doc_hash": "ab7f4b0599e7bc8f13e4c032663fe5a07fcb1e9b66a2737aaaef2fb213492c2d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_numbered_toctree_test_numfig_with_numbered_toctree.check_xpath_cached_etree_": {"doc_hash": "ee49516637f5d04e02df0cdb0fae63387a91c79feece1c2c98fc625899cac43a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_prefix_warn_test_numfig_with_prefix_warn.assert_index_rst_57_WAR": {"doc_hash": "4f314dae7b0a90c7017746a89902b864a3dc21628c0bae7eda4c53b13ba4a10d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_prefix_test_numfig_with_prefix.check_xpath_cached_etree_": {"doc_hash": "66f7daf32437385341e32b5b321df49e97d986eaa81203a4410394f94cc4e3f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_secnum_depth_warn_test_numfig_with_secnum_depth_warn.assert_index_rst_57_WAR": {"doc_hash": "068644e209625d3c1d97fe9b1e1248dd098013fda198b8509206b6f1f3686857"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_secnum_depth_test_numfig_with_secnum_depth.check_xpath_cached_etree_": {"doc_hash": "54d81e55b364e2ec3700a7bc3f8b571c89af68a0b7fd624fe0c61f6cb99aeac5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_singlehtml_test_numfig_with_singlehtml.check_xpath_cached_etree_": {"doc_hash": "99e1e1ae33006bf76e57db2d656a3eebbc3c0c164b3ff97e402c6dcfe1ba388e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_enumerable_node_test_enumerable_node.check_xpath_cached_etree_": {"doc_hash": "e864e8260c1fef4339aea505df546c186f6070a4640558e1a287bffceaf6ec76"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_assets_test_html_assets.assert_script_async_a": {"doc_hash": "8660c847c3a10563ae35cc6db682f936dc1c9512f1bf2ca6194f20cea3ceb0d5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_copy_source_test_html_entity.for_entity_in_re_findall_.assert_entity_not_in_vali": {"doc_hash": "26c2975bdfa6b8c25edd8c2dcba86935173395967adcc01b9fbb693a4c2a35a4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_inventory_test_html_inventory.assert_invdata_std_doc_": {"doc_hash": "aa84b8e3342cf6e55b7c58b5ef0810ec40612ff6166e1a5ad4aac63eb08e5bea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_raw_directive_test_html_raw_directive.assert_p_LaTeX_abc_gh": {"doc_hash": "2d8aa74b74481209570aa742a2bfafe6e4ea967f9608092e66f12e059233a5cd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_alternate_stylesheets_test_alternate_stylesheets.check_xpath_cached_etree_": {"doc_hash": "7e600515af167ceae8bfea429a2e320970da435873927d6a0b81b01f61fe9bc9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_style_test_html_remote_images.assert_not_app_outdir_": {"doc_hash": "f3cb0fde50b2c99ed511742a0c239499fb07200a7a918e93bb93efc799002283"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_sidebar_test_html_sidebar.None_17": {"doc_hash": "66c92340b00ecaa6dbb6370377d6fb61368b66ea91f687dab6a70bd8235a16a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_manpage_test_html_manpage.check_xpath_cached_etree_": {"doc_hash": "a2410c596427d48bf20cf2ab8e7fc49315fc9d18991885a945837303654366f7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_baseurl_test_html_baseurl.None_1": {"doc_hash": "47cf26e9aebe1b09411d15c26622719356a3c56c7f8fb56e7e6d421581e1e230"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_baseurl_and_html_file_suffix_test_html_baseurl_and_html_file_suffix.None_1": {"doc_hash": "7bfb29d6bf03a550791c0e67db553af97d8bb404750860e9f45ff5f79cabcc97"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_default_html_math_renderer_test_html_dark_pygments_style_default.assert_app_builder_dark_h": {"doc_hash": "40d67d360bf7ea07b65ee73b56e3b11479fd9fcd30b44eb5dea4c10bef0b939a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_validate_html_extra_path_test_validate_html_extra_path.assert_app_config_html_ex": {"doc_hash": "2038709612387527393bfded7dcb0a934b44b4cec163c1afec4565d88583dd62"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_validate_html_static_path_test_validate_html_static_path.assert_app_config_html_st": {"doc_hash": "0a2624fdc5a4a9cef0a29f5c4f39dbe77794f59253e78aaf57afe1aad718e02e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py__compile_latex_document__compile_latex_document.try_.except_CalledProcessError.assert_False_s_exited_": {"doc_hash": "78bcd4380f2a90c3c46f0ea1ab35edfadc5c7b164c3a4fe728454cf9e663eb40"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_skip_if_requested_skip_if_stylefiles_notfound.if_kpsetest_STYLEFILES_.else_.return.testfunc": {"doc_hash": "255c3425a5fc3ef3a28076101fc11403ec598d75e57b5a5124f0f82da63b89bb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_build_latex_doc_test_build_latex_doc.compile_latex_document_ap": {"doc_hash": "995a97897ed41b3118b86c24b3c785fd6b494dab2cc54311517e5961cb0861bc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_writer_test_writer.assert_Footnotes_not_in": {"doc_hash": "e1ce5663ac59e9a83bd1fc7511095ef1b337baf0123b05a88ffcebcbd7e9c6ac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_warnings_test_latex_warnings.assert_re_match_warnings_": {"doc_hash": "e2b5920bac16be0593870eeb2f81e5ad637956082b1378d62235fc73226bca73"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_test_latex_basic_manual.assert_r_documentclass_l": {"doc_hash": "6f5b6c2417f7ca4ea3d25c8cda8f6fc720987c74e462735f015620bc14bd2f31"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_howto_test_latex_basic_howto.assert_r_documentclass_l": {"doc_hash": "a425d96ad9a94670eb6a82bc21accb67d23b8a77171238f9e91fcaa7595cc729"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_manual_ja_test_latex_basic_manual_ja.assert_r_documentclass_l": {"doc_hash": "443cfc38ee868e7d95793367a2e8d90a882bb485c64cd6faff6f3fdcef88317e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_howto_ja_test_latex_basic_howto_ja.assert_r_documentclass_l": {"doc_hash": "090124b9cb81690898ce7d06bf2c4313d073c157104cfc71eef4ed8b21d293f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_theme_test_latex_theme_papersize.assert_r_documentclass_b": {"doc_hash": "5b010c70878806c377567d466389a49351c8f55dc81028838cb3c4977ae28fbc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_theme_options_test_latex_theme_options.assert_r_documentclass_b": {"doc_hash": "a0fa712575d474ac769abf75949870e2c0a51ecc848a08605198e560e26ba964"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_additional_settings_for_language_code_test_latex_additional_settings_for_greek.assert_newfontfamily_": {"doc_hash": "196762ec53fc87549d777e62f6fd38ba902ba38c00c4346ca6d74ee97a1e0251"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_title_after_admonitions_test_latex_release.assert_r_renewcommand_r": {"doc_hash": "ded9a9027e429d9f57d69cef7c621d1cf99ab9206045522ca19021d8209d804b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_test_numref.None_12": {"doc_hash": "4274cfcfce26b8e3dc27d90e518786c4af4025dbee833b34f748d5b1146c837f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_with_prefix1_test_numref_with_prefix1.None_18": {"doc_hash": "21b706017cd756cac83da737499143735466cf6b9afbb3689983bdf74eb6fee8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_with_prefix2_test_numref_with_prefix2.None_14": {"doc_hash": "380d6fc366d0bfe7ba5420d90e1fc24eecca43cbeef9dc40bc82d0edc4a39ea4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_with_language_ja_test_numref_with_language_ja.None_12": {"doc_hash": "0c0201d65632f17dac28ae30603ec4db78deb120dd6df9d89e1f17655f2d0d3b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_obey_numfig_is_false_test_latex_obey_numfig_secnum_depth_is_zero.None_1": {"doc_hash": "4e5a0b687b7be0d3e31399df78c680e9c86d008a569cc97e54088b660cc72ac3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_obey_numfig_secnum_depth_is_two_test_latex_obey_numfig_secnum_depth_is_two.None_1": {"doc_hash": "1221f3486357b483983ba614c03ca5eabbcc688c8e6901543ac41a3caaf41932"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_obey_numfig_but_math_numfig_false_test_latex_add_latex_package.assert_usepackage_baz_": {"doc_hash": "36b36a0238bfc9988fef685fd363509cf5b6e73c4347b91adb277e90c543df29"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_no_language_settings_test_babel_with_no_language_settings.None_8": {"doc_hash": "e5b1ea064f1d52cf700cb5d03e491c59b48ea49b27e05fa913fa2ae6fed93d37"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_de_test_babel_with_language_de.None_8": {"doc_hash": "20960eb0348805f84f6b303eddf40ec0acd9cc45042c34c7d85eab2495adb789"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_ru_test_babel_with_language_ru.None_8": {"doc_hash": "a83c4dcb78ee07a09d7bb13a690f059034ec6faa42a0dde2cd67d7c914d7784a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_tr_test_babel_with_language_tr.None_8": {"doc_hash": "5d9ed6c99315e651dbf8870121a1820fba7e37fc638cbaa3f2225dbe5c4bd1b9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_ja_test_babel_with_language_ja.None_8": {"doc_hash": "b61b33014185a13091b6063416008499c830968790b7ef6bdac29f30f5b640e5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_unknown_language_test_babel_with_unknown_language.None_9": {"doc_hash": "926b64124259b3eefe9a8b810845a23af2b728e6bb832dc8d71272d380663308"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_polyglossia_with_language_de_test_polyglossia_with_language_de.None_9": {"doc_hash": "efcd7ed5b35da6d75cf7dd9ab8b3efb919c71635a09150efa7f5cb54e79aed3b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_polyglossia_with_language_de_1901_test_polyglossia_with_language_de_1901.None_9": {"doc_hash": "4cfd4b0c5b48f6679fcd051f01fc66a32260b51468a47e5eda0689b554b9c5b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_footnote_test_footnote.assert_Information_abou": {"doc_hash": "d04914d037dac9c3ad49e0862e32bb5c597de6af1a79626e919f53e339b963af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_reference_in_caption_and_codeblock_in_footnote_test_reference_in_caption_and_codeblock_in_footnote.assert_begin_sphinxVer": {"doc_hash": "774e0b37de2d802209c047c9ad4865170977131e53a67d64e42286fdc7adb166"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_footnote_and_substitutions_test_latex_show_urls_footnote_and_substitutions.test_latex_show_urls_is_f": {"doc_hash": "2e0f9888d91f14a2e932c6bab694be72f5a048aa2fb238031b63dc389ae42964"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_image_in_section_test_image_in_section.assert_chapter_Anothe": {"doc_hash": "c233719e9775a4ce68c2463bfa6574a2f3901bdb0cec74954d9957169c1017a2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_logo_if_not_found_test_toctree_maxdepth_manual.assert_chapter_Foo_i": {"doc_hash": "338dfc8ba348f5d7117e1311179e836d7659ef9b1c3a25a5aaf545f87da9c340"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_toctree_maxdepth_howto_test_toctree_maxdepth_howto.assert_section_Foo_i": {"doc_hash": "d33a3bd539d6aa03beffba11d12f5997aeac3b0262ee67d150148a06acf29783"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_toctree_not_found_test_toctree_not_found.assert_chapter_Foo_A_": {"doc_hash": "d81b8c1456cd2f9d70bf15c7a1d005dd45a0cff14a23515ce4bedf40d4612d41"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_toctree_without_maxdepth_test_toctree_with_deeper_maxdepth.assert_setcounter_secn": {"doc_hash": "0c7b406b1149ee998ad88cd10c2c40b12c5e9ddd98ba0e67fd85a48b4f41fe68"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_None_test_latex_toplevel_sectioning_is_part.assert_chapter_Foo_B_": {"doc_hash": "522ae483f5eb7ee766cf4592c094967388894e25abf6941b7714f061d47747a1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_part_with_howto_test_latex_toplevel_sectioning_is_part_with_howto.assert_section_Foo_B_": {"doc_hash": "c61f889aa4c8d6c439d7340cd66511e113c26a518e70e83aa9cfc036dc783133"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_chapter_test_latex_toplevel_sectioning_is_chapter_with_howto.assert_section_Foo_i": {"doc_hash": "8836ed17b6933a34b74b6c88d3b19f52243bef9dc697073f2b660240012575a4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_section_test_maxlistdepth_at_ten.compile_latex_document_ap": {"doc_hash": "fc552a9bf17582ea7c8f3090b9bbc34c0d79fe36927c3c5462d88cdb1a3dc1fb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_tabulars_test_latex_table_tabulars.None_10": {"doc_hash": "f4cc42c134efe37cd7a3ff8aecb571ad948a86b1a39329bc55e57b1f23f90454"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_longtable_test_latex_table_longtable.None_8": {"doc_hash": "b92951db618b824b3da4d5fe71b4d1bfcad4fd1ee20f245d8fd2ab9c22df4be3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_complex_tables_test_latex_table_complex_tables.None_1": {"doc_hash": "ffa5bb8e5cb34dc2471a9b4551c099e796268a1216120d08d50aa711bf53be1e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_custom_template_caseA_test_latex_table_custom_template_caseC.assert_SALUT_LES_COPAINS": {"doc_hash": "a4ea719b9f10aa5cb1741c8c8a5310c5d898503bf1fb029ab87380dd8e923f62"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_raw_directive_test_latex_raw_directive.assert_LaTeX_abc_def_gh": {"doc_hash": "430a49113060a949479be797be0538e9abe3fc352ccb034ac5914628f6b83e78"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_images_test_latex_images.None_5": {"doc_hash": "0f7f3b2fb3fc61e1b0513ae3f2611cb8b939afabb4e41daf013a76644b502050"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_index_test_latex_index.assert_n_index_main_": {"doc_hash": "0411fa278a4e8bafe5fec15b5dec6725ce920669822c1eebc0ea3863158fd1c1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_equations_test_latex_image_in_parsed_literal.assert_sphinxunactiv": {"doc_hash": "d41f9e70fdc99af0006cf111ff2dda67f1fc843a20f69d7196fc217967ed3b5c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_nested_enumerated_list_test_latex_nested_enumerated_list.None_4": {"doc_hash": "a23c34dbfc70482492b27f0d4f9922952d0c9a0c439b78d45fd6362a52366561"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_thebibliography_test_latex_thebibliography.assert_sphinxcite_inde": {"doc_hash": "c8f262e0395f7df0023e27e5d83cc9d9c95040313c106a3f82e6a5e67d092efe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_labels_test_latex_labels.assert_result_count_r_la": {"doc_hash": "435698be4b7e578c8ec3735c08e611e98193fb21b4b04dddaae18e431c4988b1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_figure_in_admonition_test_default_latex_documents.assert_default_latex_docu": {"doc_hash": "81d6c825088e97757d85b3772bdc8de4e85289541889cd7f2eadc518aec86a58"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_includegraphics_oversized_test_index_on_title.assert_chapter_Test_f": {"doc_hash": "5ca62a41c4b0f0daf2524e2339ee63d17c42e9c8b3fbfc57355666be85b55492"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_texescape_for_non_unicode_supported_engine_test_texescape_for_non_unicode_supported_engine.assert_r_subscript_sb": {"doc_hash": "852a8a7b927c843c9ef15fbafdc76225f69a1bfef46f288ab154c15866c8bdbc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_texescape_for_unicode_supported_engine_test_texescape_for_unicode_supported_engine.assert_subscript_\u2080_\u2081_": {"doc_hash": "66c9ffb2823378c26d40fcc79b737388cc8079e9d2dce412550fa9ab8501cb7a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_elements_extrapackages_": {"doc_hash": "33061cdcf56d1e55f59cb31491a41fb1d11789a744688801b4be649e8accbf7e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_defaults_json_test_defaults_json.assert_Not_Found_for_url": {"doc_hash": "ebef098e0c5cce67f87423bd59aa1c8dcf11e8cbe889597bf950891909546262"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_anchors_ignored_test_anchors_ignored.assert_not_content": {"doc_hash": "cd88e439c4a341e36ba71abb24810082d374fdcf776b79f690279a85970ab454"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py_test_default_man_pages_": {"doc_hash": "458f6dd11dec9e71a751d8828d960e089b193abdb1c31d6e0cb1453e9c355bbe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_warnings_test_texinfo_warnings.assert_re_match_warnings_": {"doc_hash": "b19e2bac798a6bcf662137ffdd7843518f5587c76f8058ad60813067b0aa690d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_test_texinfo.try_.except_CalledProcessError.assert_False_makeinfo_e": {"doc_hash": "5681f4ccb865fb7766e8b7115da247dc18cd7fb5c87011bc9de87fe8a72711e1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_rubric_test_texinfo_citation.None_2": {"doc_hash": "3d4cb0131aabb818abba4e0b1211eff42e4145114a87091e1c984246cdd54a67"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_lineblock_test_table_builder.assert_repr_table_count_": {"doc_hash": "42b2adb597588accbaead35ad995b65e7bce5550affd3ecc1fe1f06b41a1d9b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_separator_test_table_separator.assert_repr_table_count_": {"doc_hash": "a378936293a917d8ee8d4a2f81437063a033aa275220154c2126c624f6b827d2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_cell_test_table_with_empty_cell.assert_lines_6_": {"doc_hash": "c8250a1336593bbd714b7512168eb4a7f0783262e3bf9fa7ec2e61fe6729eed7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_rowspan_test_table_with_rowspan.assert_lines_6_": {"doc_hash": "ae4a147c039fac063826affee13f3b09ae328f3592141fe4d481e1dffeb3ed3f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_colspan_test_table_with_colspan.assert_lines_6_": {"doc_hash": "302ee3aa271912c9e719551df966b6d8c0ae5833f13ab91f5eb67becbb53940d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_colspan_left_test_table_with_colspan_left.assert_lines_6_": {"doc_hash": "b00a436a5444e84ee2336f3cd5acfceed3963754d0863d7e7a4f304e3973260a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_colspan_and_rowspan_test_table_with_colspan_and_rowspan.assert_lines_6_": {"doc_hash": "0e0d37cc67722323e37fa35ff753cd995c7f0434e9de78dc1a74f1b18f55431e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_list_items_in_admonition_test_list_items_in_admonition.assert_lines_4_i": {"doc_hash": "e3172015ab5b09074316b5fda4765f993ddd4db00c568bd74062ba70e1ad36f2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_secnums_": {"doc_hash": "199b7ec849111fe4309c6b6fa9f14d06d006a02940f507f52882056e546fef89"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py_test_compile_all_catalogs_test_compile_all_catalogs.assert_actual_expect": {"doc_hash": "b47062ca95c6ceaac311d784d1685583bd6d9cd9fd2161b40ef16ea3cf640089"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py_test_compile_specific_catalogs_test_compile_specific_catalogs.assert_actual_admoni": {"doc_hash": "a5cfec7ea4ff860ccf16ff3cfa1ca1ef35774af03fbe813bd88f29aba7acdcfa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py_test_compile_update_catalogs_": {"doc_hash": "3a3a18d4e12748d6cdac182d2e82719281109865a6283eeed3ebdee65bf89379"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_overrides_test_overrides.assert_config_value8_": {"doc_hash": "c603a61073351226b4a1df5c047943c1370d4231279603615731e4f5ac6eb367"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_overrides_boolean_test_errors_warnings.assert_logger_called_is_F": {"doc_hash": "c8181de584da163cebff84b577a15072a50eeae892ccbdbba17f61a8ce0d6a0a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_errors_if_setup_is_not_callable_make_app_with_empty_project.return._make_app": {"doc_hash": "7005c0e607e18ca0b864cb0afdf5dffa8266d138d4aada006baf6efc5a6bede1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_needs_sphinx_test_needs_sphinx.None_2._NG_greater": {"doc_hash": "0b3939f9426edb3a8709dab8685a838bcbd51da7789ea61d2766427ead546b13"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_config_eol_test_builtin_conf.assert_primary_domain_n": {"doc_hash": "a793983eaef82bcf1e7236c2fe1150f8f3fcf08ed595ac0dc0a925996efc8a76"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py__example_classes_for_typ_test_check_enum_failed.assert_logger_warning_cal": {"doc_hash": "eb3f20b9dd1c28a78ab43cb6537f1abdb8be42b666bb9496f6f3b5f9aa08ae96"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_correct_year.py_pytest_": {"doc_hash": "be8401f9163dc76d8f2b50d999706b33262024e419bcbbad959ecc4bf5097d2c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_lines2_test_LiteralIncludeReader_lines2.assert_content_Lit": {"doc_hash": "c0c61e26cfd8a7b597f2571e001bf43c35baf8c62e51e17fac486b772303fd5d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_lines_and_lineno_match1_test_LiteralIncludeReader_lines_and_lineno_match1.assert_reader_lineno_star": {"doc_hash": "618e938bf018b9ff0a49e79637c12c3a0b6d5a7069a6a167a73fa380b647ee44"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_lines_and_lineno_match2_test_LiteralIncludeReader_lines_and_lineno_match3.with_pytest_raises_ValueE.content_lines_reader_r": {"doc_hash": "aa3c26375ad4476877e30ebd9a2e96dadc39bf1d7e680a1037cf0aa31cf2b4c4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_start_at_test_LiteralIncludeReader_start_after.assert_reader_lineno_star": {"doc_hash": "f659017601639d5305436471af193776b38437dbcd0e2bbf28c181036741bf89"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_start_after_and_lines_test_LiteralIncludeReader_start_after_and_lines.assert_reader_lineno_star": {"doc_hash": "3bf8042be4159e45db318f686e36783dd3deceaefdd99f8a5574eeb08c227df9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_start_at_and_lines_test_LiteralIncludeReader_start_at_and_lines.assert_reader_lineno_star": {"doc_hash": "eda891832463f0cf960634a6fe694f45235c378fdb8de4f7c942f2c7889040b3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_missing_start_and_end_test_LiteralIncludeReader_missing_start_and_end.None_3.content_lines_reader_r": {"doc_hash": "b00af26872958fe974008d250e33760580f8ceab12fd24cd1d954f7cd828956d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_end_before_test_LiteralIncludeReader_prepend.assert_content_Hello": {"doc_hash": "7b195b8e534ac8e85681cbb5eac0f430e9f91dbd49ce57078c45f3f822440948"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_tabwidth_test_LiteralIncludeReader_tabwidth_dedent.assert_content_def_q": {"doc_hash": "b938fd99ba2f2afadf331461ff50f5402794b678958ee89b1dd9cc668a0c8630"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_diff_test_LiteralIncludeReader_diff.assert_content_": {"doc_hash": "00226e58b37d426d6746d0ffe541a812e7f1209675250e5b30b8d54fa58dd0ea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_test_force_option.assert_force_rst_not_in": {"doc_hash": "c21b24581c975b2cf22b8eb2172c5b697fe65bca91fb81c81bc23d583fbb749e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_caption_html_test_code_block_caption_html.assert_caption_in_html": {"doc_hash": "a65e9ff71add6732b2bf0d4f3db4d5c95d8ed371c8cf709c3a9904c414278721"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_caption_latex_test_code_block_caption_latex.assert_link_in_latex": {"doc_hash": "ff0aa05d8e3826519ed47321a145695fd5101ed16cdb474dca6841b886efa51b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_namedlink_latex_test_code_block_namedlink_latex.assert_link2_in_latex": {"doc_hash": "314c4a34d7d59c92c1cf04b885eb6fe2da61efc503ce58284224809f6e0529ad"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_emphasize_latex_test_code_block_emphasize_latex.None_1": {"doc_hash": "1cd176410e7eabb230716020efe2541d2b26ccc53f1e7bb7f8dad0ac49ddd020"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literal_include_test_literal_include.assert_actual_literal_": {"doc_hash": "34ff6f3499434e631d7e573de99725b29a7e4a9ee8d310f830775656eed32a72"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literal_include_block_start_with_comment_or_brank_test_literal_include_block_start_with_comment_or_brank.None_2": {"doc_hash": "181b073ac0ea8f0dcb80edf46a7c4a3bd8d67ccf511cae0d17ceb2b9687df4d5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literal_include_linenos_test_literal_include_linenos.None_2": {"doc_hash": "5beccfb45fa9ff55d8794f7b6aee1fded2604a4bb57654543bb1c86752cb1695"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_file_whole_of_emptyline_test_literalinclude_file_whole_of_emptyline.assert_includes_in_latex": {"doc_hash": "8483c7cbbd0eb321c2d806fbea00274445e817ff97748003a53bc2966d6b3396"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_caption_html_test_literalinclude_caption_html.assert_caption_in_html": {"doc_hash": "2b83c08659b27a060566c1c85b8b93d4561ea281932c4d720033bd08ccec03e3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_caption_latex_test_literalinclude_caption_latex.assert_link_in_latex": {"doc_hash": "cb89985cd42b8b03ba7280dd0730bf701035721903ffb07b1d16fddc80c043c6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_namedlink_latex_test_literalinclude_namedlink_latex.assert_link2_in_latex": {"doc_hash": "dcbd3c457702634bc1f1c8409cb3090adf2a4730b0911837fd83ec58f2062567"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_classes_test_literalinclude_classes.assert_literal_include_": {"doc_hash": "14e02808a1bb659511828d2c45fff2b3abb7ca04df58a0e3520767263d0ec65a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_pydecorators_test_literalinclude_pydecorators.None_3": {"doc_hash": "9668561447af7fef402d0c2d73650749c68b81aec05ecad9f7ac09363c93ca14"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_highlighted_test_code_block_highlighted.assert_codeblocks_3_lan": {"doc_hash": "7021e944232e8138d02c92a80c57c5ac4c32305c06f9af5d39dbd375b579a251"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_only.py_test_sectioning.app_builder_build_only__": {"doc_hash": "053e31b37710ca752f1976c276ce99ed8332da1255503d4eb4f694956693dd74"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_relative_toctree_test_relative_toctree.assert_node_doctree_0_0_": {"doc_hash": "d3d21b7c068e5f88e448ab06caf407ac094a1c954b4797f9c308367a825804dd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_urls_and_titles_test_toctree_urls_and_titles.assert_node_doctree_0_0_": {"doc_hash": "5d6c6332fbc322f58e22b72906d6f5b99c5a768dee74ea35431430c467149258"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_glob_test_toctree_glob.None_8": {"doc_hash": "03a28c5be217cfca5e81898c4712ae3123836c549727bba3ced6322f673592cd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_glob_and_url_test_toctree_glob_and_url.assert_node_doctree_0_0_": {"doc_hash": "7e1eb0601ee04940cd64a7108038fb9ef3416f9bf51c7f1aeef6391306c7b5e1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_reversed_toctree_test_reversed_toctree.assert_node_doctree_0_0_": {"doc_hash": "20e05714153cf61b037a48adc09a848ea8b4f5012c15f9ed01ebfa020ce19b25"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_twice_": {"doc_hash": "8302849c8c30d9523f906d3364e50d330ce8ce1c3ea3204994d3151b776961f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_patch.py_test_math_directive_": {"doc_hash": "d8e8f06de8ee800d989eff88c87d728db402f651106b1fc9c3839847ac663cb9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_docutilsconf.py_test_html_with_docutilsconf_": {"doc_hash": "ea34b9cb11c9fbc564d5601be7435c074aa8c806d505d9a0c902c0791d348b3c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py__check__check.if_not_all_res_.raise_DefinitionError_": {"doc_hash": "868a243cc58eb24147def15b00d728cdd742d0fb49f4b7752815a161b29db893"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py__check__check.if_not_all_res_.raise_DefinitionError_": {"doc_hash": "d3d0af1429e04cca3fe977f1b18d809afee615b0c2e5561ed5694e894a573c0d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_domain_js_objects_test_domain_js_objects.None_18": {"doc_hash": "bf4e672d0a5a01d54128001ca63b1412e690c99942ef7df4036cd1c52ffe6411"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_domain_js_find_obj_test_domain_js_find_obj.None_8": {"doc_hash": "b529c54415db13f055143d9479ae0bccd08809e69199259ba698501efea26aa0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_get_full_qualified_name_test_get_full_qualified_name.None_4": {"doc_hash": "e9ff8f2b52be6b59ff8e2944d85be3aefb6ac50a194438ab5a77d8ea5ed38660"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_js_module_test_js_function.assert_node_doctree_1_a": {"doc_hash": "0c01441f7d19f39e08d5d3fb82b13b97b16c0cd13bec0e0b4a131f0daf15532d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_js_class_test_js_class.assert_node_doctree_1_a": {"doc_hash": "82501af78651f2cbec71092701336bdbdfce5ce1a72decab3b556d5041b13d03"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_function_signatures_test_function_signatures.None_5": {"doc_hash": "57ca96e8446f7e87a86dc505f67c079038be0562accf25841d5b7bcee37862c4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_xrefs_test_domain_py_xrefs.None_21": {"doc_hash": "9830d6562e77248a1a81c0dff409e94c4dd7050ee178f86e9b18fb903cf3c9bc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_xrefs.None_22_test_domain_py_xrefs.assert_len_refnodes_2": {"doc_hash": "ab8e81449c331ddd780b81aecf2f8e01d3bcd2bc3d062d1ac06c10949f3166a2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_objects_test_domain_py_objects.None_20": {"doc_hash": "96f3470f7f51c3cf77f57605976fd94e86ba75fbc182194615ab80b3a0047f55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_find_obj_test_domain_py_find_obj.None_6": {"doc_hash": "fab404a3f144edd915a23880bdca9ae362d14009b984e297f1d13c7ac1c26892"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_get_full_qualified_name_test_get_full_qualified_name.None_4": {"doc_hash": "d121a0c34300b0606ef568746cbe112b074f2ce6259ca955714ee3300b54020f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_signature_test_pyfunction_signature.assert_node_doctree_1_0_": {"doc_hash": "20c820d6cfff63446016c3f83103176c0277267196949e77611d04423801a7eb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_signature_full_test_pyfunction_signature_full.assert_node_doctree_1_0_": {"doc_hash": "99f6215aa7d91f6f68e62143f3c79941b6f1c64faf5405bb8b843c370dc6457d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_signature_full_py38_test_pyfunction_signature_full_py38.None_3": {"doc_hash": "883ebc2aaf25ac7c73ee0deccf31097d3e8f6cd2cd5ddec79ab7417bfc8c68a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_optional_pyfunction_signature_test_optional_pyfunction_signature.assert_node_doctree_1_0_": {"doc_hash": "6697ee054a0dd6e6f909488d399595a933d93a587a3ff30d9074ccec0eb456ab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyexception_signature_test_pyexception_signature.assert_node_doctree_1_d": {"doc_hash": "707c6b396df4e9fb55607dd5f9f4cdf669bc8741948c74208571ef9e609a2be8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_signature_test_pydata_signature.assert_node_doctree_1_a": {"doc_hash": "42d678a994d0a79b6a0610b50c42fcfba2a795935c3c9498fbce7a284105d975"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_signature_old_test_pydata_signature_old.assert_node_doctree_1_a": {"doc_hash": "06bf51599443f4e036e0cef1723d067536368b0ae86b898e6909f63d1f48dc56"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_test_pyfunction.assert_domain_objects_ex": {"doc_hash": "5bd1286518e7de56124bb29ae51c50d5a0cdf78044d4390dd44f2f0c37eab0a1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyclass_options_test_pyclass_options.None_3": {"doc_hash": "b65ad3ac34a109e55f7e0f5d44f510a6af9172407ac1d1f8b5e74dbce8db2d1e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyclassmethod_test_pyclassmethod.assert_domain_objects_Cl": {"doc_hash": "1bad67f767ec24c568d52680a32afc164ed5a2a6e4513de5e2ace5243fac3291"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pystaticmethod_test_pystaticmethod.assert_domain_objects_Cl": {"doc_hash": "d4d7abc2a2c4dc86d202e0a3cf2b8c63c480bcb4c270bd770346b011f7748a4d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyattribute_test_pyattribute.assert_domain_objects_Cl": {"doc_hash": "e578a7143ed2d0ed996fd03cc5a59ce1300d1f7f7a8b4004b59d6ca8db278ce6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydecorator_signature_test_pydecorator_signature.assert_domain_objects_de": {"doc_hash": "6464abb80f654acf154813c465709dbc71d1e2dc6f79707ba0c0e53597e25c7f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydecoratormethod_signature_test_pydecoratormethod_signature.assert_domain_objects_de": {"doc_hash": "28281a0769f0eb60c1fc3f8cba1c53ef61047cfd0c88a98ba4ddfcadd24ec2e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_module_index_test_module_index.assert_index_generate_": {"doc_hash": "b23158819cc69ad280a0d5d425112b1daa48613353a756a50e13a139631627a5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_module_index_submodule_test_module_index_submodule.assert_index_generate_": {"doc_hash": "c3abf01d12dbf5187cb7ce7ed93caf94c2cccac48e2e4a4ec9d355b7a544ac1a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_module_index_not_collapsed_test_module_index_not_collapsed.assert_index_generate_": {"doc_hash": "d18f3c9f4112d3b4fb9aa6a445b7b3749f9da3cb4faf683e633c6e4f50439cb1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_test_rst_directive.None_5": {"doc_hash": "8dd109b638d9e56094f3bc6c2754835efab9b2dc3a5a5b0a627950ea19c217b9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_with_argument_test_rst_directive_with_argument.assert_node_doctree_1_a": {"doc_hash": "c306e5c61042536bc59d4f19e6ea131e051b65968e7c189b5c7c8b2a706a06aa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_option_test_rst_directive_option.assert_node_doctree_1_a": {"doc_hash": "e91bd697fdea06d77f23145005e26f8797d5302071d8c4c179a16ba78d90c919"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_option_with_argument_test_rst_directive_option_with_argument.assert_node_doctree_1_a": {"doc_hash": "93b8fbca8bcb604537003fe5a637f7102047292b66447dd470274df41422cf79"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_option_type_test_rst_directive_option_type.assert_node_doctree_1_a": {"doc_hash": "9fa5491d11a309597c7b6d5e3d02cbfb5aa619064fbea07cb93ec1ba7991cdd6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_and_directive_option_test_rst_directive_and_directive_option.None_3": {"doc_hash": "eceb9dd90109b8bda2ebaae0b6a81be4b8a9f5a9d8db32c7512dc39793fd4364"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_role_": {"doc_hash": "e8e7b0b5db6d3a2d91a9b52447617a58ec60dd98db9b8c5c34e03bf19040d7f5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_process_doc_handle_table_title_test_process_doc_handle_table_title.assert_domain_data_label": {"doc_hash": "320657b3ca2fe17a399117b2109f6c1b6435198b4208413b86ce3e8da5398c29"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_get_full_qualified_name_test_get_full_qualified_name.None_2": {"doc_hash": "48f6264861f6d75f80dc3adcdb7dabcd4e7b303302afca4314e7dd104cc0e2d4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_test_glossary.None_9": {"doc_hash": "5ce6f5b1179afb99f454932365808b47a4f5f3a82c5255982c3c5d3fdeba9d5a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_warning_test_glossary_warning.assert_case4_rst_3_WAR": {"doc_hash": "34b6fe34b3b4abea63901f74f36f3ff9b5238c8f2e19b30b0f70ae59bd167134"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_comment_test_glossary_comment.assert_node_doctree_0_0_": {"doc_hash": "551543887a28bfa66407f7b053894965516a4869ace03b16e11840e94a9195f9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_comment2_test_glossary_comment2.None_2": {"doc_hash": "19da976fcf7c6a9d6a319a25a1a39d7de5a1a904b9070ccbe4788bb662822908"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_sorted_test_glossary_sorted.None_2": {"doc_hash": "ea43ac9170935e9fe0d0566403b45d166fb735e41d8e23a8ee474a7b18744e9f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_alphanumeric_test_glossary_conflicted_labels.assert_foo_foo_te": {"doc_hash": "17a03e3bc3ec154c48067b5a98dded673dd1ebc4c525aa21b903bd2dfbb87afe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmdoption_test_cmdoption.assert_domain_progoptions": {"doc_hash": "e1fb35dc326fa419d41e82453f8c5f1fd4138a2dc145647326c5bfa012e0683b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_multiple_cmdoptions_test_multiple_cmdoptions.None_3": {"doc_hash": "31e31bf6fdb374a8e60893da6320da5f7ef0298c48c9e92b603d983663d67722"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py_test_images_test_images.None_3": {"doc_hash": "a6241993f29b393394db900e6ce33af35702885eb2b532e126176ba86676dc18"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py_test_object_inventory_test_object_inventory.assert_app_env_domains_c": {"doc_hash": "d81b0ff4e3d6e0070d4dc9dc6d69cbec3ca192c57b4f2304e5e9de71cf5c7960"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py_test_env_relfn2path_": {"doc_hash": "e158ab8e2bd447bcb7d958e62f98b8f4bf9133425ca8303eeb8f6b2a7a9ddb36"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_pair_index_test_create_pair_index.assert_index_6_\u0415_": {"doc_hash": "6200a0eff511ef743411e56e085af548e73f0e87be5998006b60d3b458390faf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_triple_index_test_create_triple_index.assert_index_4_S_": {"doc_hash": "3e226fb3ce3e4126b90749a6e3ba6f8da4ba5b744e504435fa2dce78a6454626"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_see_index_test_create_see_index.assert_index_2_S_": {"doc_hash": "7391ab51a0c94cbb6f8f023c7780361a9862bc5db58500453f2486acdb117578"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_seealso_index_test_create_seealso_index.assert_index_2_S_": {"doc_hash": "e8b5e7567471f2cb335dfcb323d6320f031888d7b1c07b7258fc16d2c6a30a4e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_main_index_test_create_main_index.assert_index_1_P_": {"doc_hash": "8d7fc2bd3b74edc238c3c165f14d8267536705dbe20b32e2059a23194cf5c6b5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_index_with_name_test_create_index_with_name.None_5": {"doc_hash": "b56551787fb5c146bca2368f4d468b99fdffc0ac73cd287eb7097fc903f1a176"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_index_by_key_": {"doc_hash": "f761829adaa1d9478c55349693c9640a9057682a2732d81c7fe70e2d3d44cf28"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_process_doc.None_3_test_process_doc.assert_qux_not_in_app_e": {"doc_hash": "a3a4a40ee9b8a0f8b87115642f47fe772b63aa82ff69befd3138639ac2592239"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_glob_test_glob.assert_app_env_numbered_t": {"doc_hash": "c0209fb003a4d421631d5ffbc562c405f3c2eaaa37e7bfe92a3c7c2dc37806f2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toc_for_test_get_toc_for.assert_node_toctree_2_0_": {"doc_hash": "1eac890c90123c1b7cfcc0863566d6828cbc10171c08f9a53b4b98d9f5091419"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toc_for_only_test_get_toc_for_only.assert_node_toctree_2_0_": {"doc_hash": "4833b32d9299555f084d0e42e3711dd0a0e3b84f9b7568bc8dd3fa86577665c7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toc_for_tocdepth_test_get_toc_for_tocdepth.assert_node_toctree_0_1_": {"doc_hash": "f1b0dc555950667774ce515313ab83a614f97cffd84935ac9e56ece71d66a734"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_test_get_toctree_for.assert_node_toctree_3_1_": {"doc_hash": "74307f61d48fe82aa849ccaa42da677754f1631b47c8d18863ba95a37b9bf051"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_collapse_test_get_toctree_for_collapse.assert_node_toctree_3_1_": {"doc_hash": "e29c429a733c53541f299a21b2fd0e805310925b0a3bd11d13aaef01a71431f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_maxdepth_test_get_toctree_for_maxdepth.assert_node_toctree_3_1_": {"doc_hash": "360cb3f24425e4c3ddcfeaf09414ec35ef521c61095239db397a86ef41d7a203"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_includehidden_": {"doc_hash": "7a006b5aa0638deabee37467fa6b3a159b49b82d5a667ed399cbd7cc48b7436c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_errors.py__": {"doc_hash": "53cd0d9673d5eff0c5f3e7226d27b06c55fe78b28bae314ec6b4de1e38097ba4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_apidoc_params_test_simple.print_app__warning_getval": {"doc_hash": "82c19192e0d5cdd74b4972cc9e1c38d763ebb8bd543b3f4c98752ba89cea6fca"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_enabled_test_pep_0420_enabled.None_5.assert_a_b_x_namespace_n": {"doc_hash": "54119406b90bdcf19d79fb508e0c42e20e7ac35a30d85a62eafac94ee8276e13"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_enabled_separate_test_pep_0420_enabled_separate.None_5.assert_a_b_x_namespace_n": {"doc_hash": "a450d8ad0135ebfefd5254670e0c5f6fd78f627488c696b5c4db02d5e9c6ef4d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_disabled_test_pep_0420_disabled.print_app__warning_getval": {"doc_hash": "f64875f1a1172283978281427ed9739f92fe740f81bb183ce2b8263dde52e91e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_disabled_top_level_verify_test_pep_0420_disabled_top_level_verify.print_app__warning_getval": {"doc_hash": "6c7ae58d965729d97ad147b011de3bca454a74a2d6089fe6a7f17e2b03dcf534"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_trailing_underscore_test_trailing_underscore.with_open_builddir_pac.assert_package__module__": {"doc_hash": "2a2ff73535adf82ab69f2668211e7c5f545236e5d22e92f4bc92f53e716a7691"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_test_excludes.assert_outdir_a_b_x_y": {"doc_hash": "0c5a66d569c38e4e57faab5156a9a5c6f21341163fd7db01b529aa41bdaf4cce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_subpackage_should_be_skipped_test_excludes_subpackage_should_be_skipped._skipped_because_b_e_s": {"doc_hash": "64a9beb7db2ff08842d804ba92f3e6776bd7493ee72a95060bc4dcb9c6f7676a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_module_should_be_skipped_test_excludes_module_should_be_skipped._skipped_because_of_empt": {"doc_hash": "15f8e15e646d90ee005b11d5969cc1302c47d9802d38626c547f3c4068281cc5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_module_should_not_be_skipped_test_excludes_module_should_not_be_skipped._skipped_because_of_empt": {"doc_hash": "7eb6aa71c7eda92afaee84084cbf82d0c22a2c622d8ff21dbb04a22719024556"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_multibyte_parameters_test_extension_parsed.with_open_outdir_conf_.assert_sphinx_ext_mathja": {"doc_hash": "463fede1b26564bd00074bc413f3968aff09a053d7ebf54ea5c4f4e5ee9e9373"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_toc_all_references_should_exist_pep420_enabled_test_toc_all_references_should_exist_pep420_enabled.assert_len_missing_files_": {"doc_hash": "adcdf1071182cd74d673873b81d6899a591952c511e5eef7011fbae9f0c68fe7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_toc_all_references_should_exist_pep420_disabled_test_toc_all_references_should_exist_pep420_disabled.assert_len_missing_files_": {"doc_hash": "f58d400f4f78e87f6666dcf14a4bffb9b5358ea9ed6f92cfc4696d7780d9472c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_extract_toc_extract_toc.return.toctree": {"doc_hash": "bb4dba78efe0080c6b42bd612e88401f7781ef2413f478b883e0bbe65335d956"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_subpackage_in_toc_test_subpackage_in_toc.None_5": {"doc_hash": "7c7e3ad8d9ae1ceef66314079e33343faf7f048cc650f0228191e578a7f69eef"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_private_test_private.assert_tempdir__world": {"doc_hash": "b3432eb9f6706293cd2a22b9a5f1873edbb2a59fb4ecc404cea9c5c92f2ad3e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_toc_file_test_toc_file.assert_content_test_": {"doc_hash": "51352a359916d6540950b12ff5d1d1df6362e62244546accad0d9bab7bcb31d8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_module_file_test_module_file.assert_content_examp": {"doc_hash": "a7e85102f73f2e587f7f09fa7bd44e97dc7724d803caaea14eeb60fcdb246ef7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_module_file_noheadings_test_module_file_noheadings.assert_content_au": {"doc_hash": "671f4abf65a2117eaacf33a747069d12a1d885d9a0f98a92c7fb16eddcd9c9bd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_test_package_file.None_3": {"doc_hash": "3fdc37899e50e4999037eef53bb40d71dc4d0e1ac37fe21037eb5d70af40b8d8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_separate_test_package_file_separate.None_3": {"doc_hash": "24c5ff81ffb4181d09a8139f1f428679123a3603aafcc3d29a9e0f9c40b06049"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_module_first_test_package_file_module_first.assert_content_testp": {"doc_hash": "a5df13587706ea1f319636f47f9a456189c47886e6f730546b1378c3460022fc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_without_submodules_test_package_file_without_submodules.assert_content_testp": {"doc_hash": "2a66a3f2a3535110ad24c144fbd88bdfe0676253d2252fec18e475be40b068ff"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_namespace_package_file_": {"doc_hash": "7cc5f49624e79d4e1a22439d58153af5ab24efe1a50422cb39debdef594a24ef"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_do_autodoc_do_autodoc.return.bridge_result": {"doc_hash": "0bc18f46f6aa474468f45f706702bd08df3f9a0d1d9df9b74567f781d0117077"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_make_directive_bridge_skip_member.if_name_skipmeth_.return.True": {"doc_hash": "a23d1a973307d6af4252cd75b1863097d5cd26df672125d488b04277c03bbf51"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_new_documenter_test_new_documenter.assert_list_actual_": {"doc_hash": "c100f8a06960f79e2ff0d64c3830edd5f2268e985e6e710e5237f543d28cc0a3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_attrgetter_using_test_attrgetter_using.with_catch_warnings_recor.None_2": {"doc_hash": "3f5d457cdb8c27f8d448ac7bff2a45c786230d809ea02f7aaf20d8d6c1b38203"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_py_module_test_py_module.None_4": {"doc_hash": "7cda008c7b72fa920d9a49b8f55ff2b11600078cd085fe7b0c1c4f9d64a82338"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_decorator_test_autodoc_exception.assert_list_actual_": {"doc_hash": "41dfc46d47625a8a024496b3ca3efb770e5d2b059437d50cd6392da17a93fd3a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_warnings_test_autodoc_warnings.None_4": {"doc_hash": "854302c32ec85600722bdcb4f635129a67e0150d3871f7586b0f373cce11e082"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_attributes_test_autodoc_attributes.assert_list_actual_": {"doc_hash": "9733a15449363d9bd72f6e63a2f5e0c566c88f59cbc37fb8a56d33fd373b3467"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inherited_members_test_autodoc_inherited_members.assert_list_filter_lambda": {"doc_hash": "dad958834246e2615c8e860b28f9af7ec466f213f35ca02e8c12c53356cff12c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inherited_members_Base_test_autodoc_inherited_members_Base.None_1": {"doc_hash": "a29d73022dd32bb9ecfaf967c2a3a436704722873e56ec6f384de6b57e63362e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inherited_members_None_test_autodoc_imported_members.assert_py_function_": {"doc_hash": "36090c5d225bb372b6d98f013d099681af5e4a9c9bd12178cebd25f8c7f28b35"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_ignore_module_all_test_autodoc_ignore_module_all.None_1": {"doc_hash": "f925817159675894959fc7aa3f6325aa17d6486d77dc776560216318761e9a0d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_noindex_test_autodoc_subclass_of_builtin_class.assert_list_actual_": {"doc_hash": "971ec46a25d276046416bb4b409d57eb84f5d5642ec22f0f492724965365f293"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inner_class_test_autodoc_inner_class.None_3": {"doc_hash": "98d1d11aa1f731093cad171fc7effd9fd0293cf4f886c652e3d6a4954bb4adc7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_classmethod_test_autodoc_staticmethod.assert_list_actual_": {"doc_hash": "4a10099f469c33a4ad4ccc4f3202b51e4cc2417eca95c0d5fe56b772b7237a0b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_descriptor_test_autodoc_descriptor.assert_list_actual_": {"doc_hash": "777a35b0f70f9da8adc07b23f20cd57d96758b460a8eca567a17a41fd5c2acd1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_member_order_test_autodoc_member_order.actual_5.do_autodoc_app_class_": {"doc_hash": "221b0bc192bb7a24e7d728ab740805f0c64e377ccdc95d1012554cd794c15d14"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_member_order.None_2_test_autodoc_member_order.None_2": {"doc_hash": "e32d2528c0308a073634d2768a838ef8f5277e7b5dbc5db98a0c6e644abd1cca"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_module_scope_test_autodoc_module_scope.assert_list_actual_": {"doc_hash": "e41749f55debba47fa1d00e6c545d70543581f868b30016baadd58a83ac88b06"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_class_scope_test_autodoc_class_scope.assert_list_actual_": {"doc_hash": "e041e95f75b3cad321c4dc7c2666ccc1ff664f2c7476de81aa2a1f6924a56b06"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_class_attributes_test_class_attributes.assert_list_actual_": {"doc_hash": "6e99d8ecfeb8aec6eb784c11e0283b4c8abebf3b72f455ae75ac4ddb27b20927"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_enum_class_test_enum_class.None_1": {"doc_hash": "f6cf2988ba35fa8e8e8119020ae621a663add3a6f8a902d200bf24daa5cecf96"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_descriptor_class_test_descriptor_class.assert_list_actual_": {"doc_hash": "55a0b95c6dc48be7f70cf15b99d6444b258a5e53fc72463baa6c45d136d102b2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_abstractmethods_test_abstractmethods.assert_list_actual_": {"doc_hash": "635564d613832983e9db0f30d2113103e8c154ed5b89ded5b03c49ab9351f039"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_partialfunction_test_partialfunction.assert_list_actual_": {"doc_hash": "a632e2bb9291d6fd4c6d56f8c34d70d3eea012596992a22e45ec84cb53ed5f3a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_imported_partialfunction_should_not_shown_without_imported_members_test_bound_method.assert_list_actual_": {"doc_hash": "75e7bb0f427d460a29ebae07961f74e26af9ce0e7a06c1334422f5e2a04f258a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_partialmethod_undoc_members_test_partialmethod_undoc_members.assert_list_actual_ex": {"doc_hash": "ebaf3da68b42bfb0bc0ab1388143a456151067539cbfd5634d4b40ec4782b277"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_typed_instance_variables_test_autodoc_typed_instance_variables.assert_list_actual_": {"doc_hash": "ec7f508502a9e689f444e48d7850bc6ae136ab46a94ab7c7bdccc7910af088ba"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_Annotated_test_autodoc_Annotated.assert_list_actual_": {"doc_hash": "a4bf27fcea77b496f5770d02fee6a3c76d1541e34a833e1923ad28bd85854d83"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_for_egged_code_test_autodoc_for_egged_code.assert_list_actual_": {"doc_hash": "df15ac1a16f32051d463dba41280cebf7d1bc8eeb4775e796359f21a1592035f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_singledispatchmethod_test_singledispatchmethod.assert_list_actual_": {"doc_hash": "8da0dc27fc21f4f22809abce68140ef43a3a7db5681fb96066aebf8cf30b3c8c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_singledispatchmethod_automethod_test_singledispatchmethod_automethod.assert_list_actual_": {"doc_hash": "0bef5882f0144af239a9766cb27721d70427a67bf79a3a1c61ca45b399ddbd99"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_cython_test_cython.assert_list_actual_": {"doc_hash": "801a51f082ed852a0f807a6dd0244bcb5174bff85184006512a0151176eb9e7b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_final_test_final.assert_list_actual_": {"doc_hash": "a7d3897134f51ff5ab42ed50b9a0cd9d857af5ba1713057e6d9f104698bd7114"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_init_test_autoclass_content_init.assert_list_actual_": {"doc_hash": "037ec5d326757b8ab54c56269cab55d052c1d80361c55f230d09c153907a5a8d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_both_test_autoclass_content_both.assert_list_actual_": {"doc_hash": "a5b803ccc900ed1e06156b4b133681102aec57d985889c4b4be54ae09b743735"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_inherit_docstrings_test_autodoc_inherit_docstrings.None_2": {"doc_hash": "27a37dc583d39ea71b6c18e83af637dbf817a2fb66dfb5b3eb054a938a26213b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_and_docstring_signature_class_test_autoclass_content_and_docstring_signature_class.assert_list_actual_": {"doc_hash": "458fe140ef95752d86d0b22f451c29e7fc618f764e6e326dbabd67b7dd145d90"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_and_docstring_signature_init_test_autoclass_content_and_docstring_signature_init.assert_list_actual_": {"doc_hash": "1c2dbb31e708505ba2f031da01845588c77d943645edf272b9aedda21701cbb4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_and_docstring_signature_both_test_autoclass_content_and_docstring_signature_both.assert_list_actual_": {"doc_hash": "de512dcedd129193957bf2fdca3e74388fba6af5ac5facffe14fb341c1213ae1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_mocked_module_imports_test_mocked_module_imports.assert_warning_getvalue_": {"doc_hash": "13aff299bc1b52d4e0bfdcebdfff45977c5158cb514073af1f851599d1435e19"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_signature_test_autodoc_typehints_signature.assert_list_actual_": {"doc_hash": "b35e7c239dbdc070ec2fd63f7633f0139709b2458bde975548fee00c39027fcf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_none_test_autodoc_typehints_none.assert_list_actual_": {"doc_hash": "525cded9f0c65afa9748bc4f530958daa80dd129c0a08e53a97aafa0b3e482dc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_default_options_test_autodoc_default_options.assert_Makes_this_": {"doc_hash": "32c77088e7ef82e312c1e41416f5f2d2dc5cdf4d15d39787f50bae792b2d0ab4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_default_options_with_values_": {"doc_hash": "c8f12e1123122046df784830e0637466fb92ba67ce0af2a6caecaa02fc243aef"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_cut_lines_test_between.assert_list_actual_": {"doc_hash": "cf87760ef742107bfd66c41fb9aa3eb883f391c801227a79c9df3a3d22e90b61"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_mock_test_mock.None_2.import_module_modname_": {"doc_hash": "5dad89a4b37d6cb914c284e997a508087269b81d652b784ef059e776cc6322e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosectionlabel.py__Re_use_test_definition__": {"doc_hash": "bf3dad1f66523010ab3b3503796a3ee5a1ae0a1d080f9cdd48d9a21444c84c3a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_mangle_signature_test_mangle_signature.for_inp_outp_in_TEST_.assert_res_outp_s": {"doc_hash": "3589b8dd9181c7080cab44bc09913787f9bc1249fbd6f963e145822fc86e168e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_extract_summary_test_extract_summary.assert_err_": {"doc_hash": "2f5e544a4c2d80465765e29dd58c66c5d041e2ebd9e50c13dcfb55f8d88f05c7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_get_items_summary_test_get_items_summary.assert_autosummary_items_": {"doc_hash": "5f13cc2d16e65fff1845d0e4c512843be813ebceb1e256d58e6b329ee89ba663"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_str_content_test_escaping.assert_str_content_title_": {"doc_hash": "e5f0128769f46ff9d8fbf36e061ba5c1f17f5bfe365e94069a87ce8cd2384d06"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_overwrite1_test_autosummary_generate_overwrite1.assert_autosummary_dummy": {"doc_hash": "3fde3ee11d2a2539f7f5a10388b5e23c90f7f5430322671d5a40857912aed5c6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_overwrite2_test_autosummary_generate_overwrite2.assert_autosummary_dummy": {"doc_hash": "e15037a4e7b176748f3927c3e593ac1cd331590831ab006fadfe260da3e12d10"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_mock_imports_test_autosummary_imported_members.try_.finally_.sys_modules_pop_autosumm": {"doc_hash": "98dfb582896429aa4616007a26e375aff18556f03645db95d7b5f4c46cabab1f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_generate_autosummary_docs_property_test_generate_autosummary_docs_property.assert_content_targe": {"doc_hash": "7163a4bff598c02170b1ca04ca69dc612ff0dc381a4d4d5cb60d0e61616daf40"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_skip_member_": {"doc_hash": "2491aaa273fc2286a0ac17ef08f9e8c6d583a6f0f2a4f6c1d897ec789bc08c27"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_test_is_allowed_version_recorded_calls.Counter_": {"doc_hash": "4cf24adc33054a7382667735399da7827076db31759ffb255f85a32dd7de91fb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_test_skipif_test_skipif.assert_recorded_calls_": {"doc_hash": "335452bdfe1360b792b12ceb4aa4b83a8de4a312af5816c95aa2755875aa1633"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_record_": {"doc_hash": "48bdcfcbf7fa4b61f11ea2817ee953f0ffef2b29a582dc6471bfda54735fdcba"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_svg_html_test_graphviz_svg_html.None_3": {"doc_hash": "e5ebdc943fb31ac0dd660dd8a3dfa6df178fe0a9e88274628484a2a4e5bee7f5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_latex_test_graphviz_latex.None_3": {"doc_hash": "37c4d2df079adf8ad581a5f1115872c706c402e5c50c56fd3826199bb755ba9f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_i18n_test_graphviz_i18n.assert_re_search_html_co": {"doc_hash": "f540d07f4aa909b136d5cf13cd73e1ea1a6b90f8fae553234d9ae7ef7d19ce3f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_parse_mapfile_test_graphviz_parse_mapfile._inheritance_diagram_s": {"doc_hash": "fbffed0d8cf106b14c2951d74a241ac3a91cd9c54572df7c9cf00b7c23a34e81"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_parse_mapfile.content_6_": {"doc_hash": "2cfeab8ca4c82d78afe00359e1c3dc232c6c21676a31c0fa2f8428558751d313"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram.None_3_test_inheritance_diagram.None_5.assert_cls_in_": {"doc_hash": "f148524924b201aa90e57c1e3ed28bc582bded4c711cca0b367167976683d35e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_png_html_test_inheritance_diagram_png_html.assert_re_search_pattern_": {"doc_hash": "cada54ba741d4cb0c493c761bc97f9d712913f5db30c2f17b4781fae65bebef9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_svg_html_test_inheritance_diagram_svg_html.assert_re_search_pattern_": {"doc_hash": "c4841f0d06000fd3d70c1600e5bd269e84c526bbeb5b5074d70eb90c3ff6e308"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_latex_test_inheritance_diagram_latex.assert_re_search_pattern_": {"doc_hash": "422af785eed4ed092d9ccb0c7df3acd198cbd05fe52048c4ce94fe5e638b2645"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_latex_alias_test_inheritance_diagram_latex_alias.assert_re_search_pattern_": {"doc_hash": "b087534f19635ae98e6bb424122d1de1b68481f1fbdb941c7f56768d169ad937"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_import_classes_": {"doc_hash": "9fddeae5014323d302159a62e2276ccb42a7908e7692663fac6b7028d227d5b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_fetch_inventory_redirection_test_fetch_inventory_redirection.None_7": {"doc_hash": "9768cdb3f9e95654e34377c07e70612f62206d8eaea5185b1a9f0e11550207bd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_test_missing_reference.assert_rn_refuri_p": {"doc_hash": "2984873ded82c8f70c1d1835f736bb1265279454aa070096d0e81ebfb90ffc2b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_stddomain_test_missing_reference_stddomain.assert_rn_astext_l": {"doc_hash": "18e00e5f6fa10396fd74bbd28e329e7b43b023741eb0c9b70f3c975a1aea7e91"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_cppdomain_test_missing_reference_cppdomain.None_2": {"doc_hash": "e1dfcba15e4c7788b159cbea4c9eac1f6c04968a48d6af4281dd8c774b3f8d21"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_jsdomain_test_missing_reference_jsdomain.assert_rn_astext_ba": {"doc_hash": "fcd3fffa1ef96240ac915793144d7b30968d6360542f7ecec690e1a28b48d150"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_inventory_not_having_version_test_inventory_not_having_version.assert_rn_0_astext_": {"doc_hash": "7eb26d5e2f899408206a04b9ccca68706daca56cc10fd488c9966940227ed3e5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_load_mappings_warnings_test_load_mappings_warnings.assert_warning_getvalue_": {"doc_hash": "65876e846a298f76f2dc5dc7c3020e60f6187857bda716ca97f88ccfe7ec448b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_load_mappings_fallback_test_load_mappings_fallback.assert_isinstance_rn_nod": {"doc_hash": "b6e3773278737b9ea2c2c48fc09bfe961664d06aed11b3216d523a8bdef87b60"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_TestStripBasicAuth_TestStripBasicAuth.test_having_port.self_assertEqual_expected": {"doc_hash": "eab0fb6de25b9d595e3042f857cb87419f64ff5ab9c10de81c6f7a5691857413"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_getsafeurl_authed_test_inspect_main_file.assert_stderr_": {"doc_hash": "2201adef6477572b29c9af4eeee7db97654458856179dbfd8b6a552b9b8765f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_imgmath_svg_test_imgmath_svg.assert_re_search_html_co": {"doc_hash": "c2e5109c7807ee35b55447c2eda3d724912ae2a1f1945df917edf8925b31f0f4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_options_test_mathjax_options.assert_script_async_a": {"doc_hash": "bd63172beec5f957e5d389da410035a8043360f09e17d39d20560873f361b72a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_align_test_mathjax_align.assert_re_search_html_co": {"doc_hash": "ccf030ec0490139faf50a2d34a12439779baf6af5d2994370181240a7cbcb15f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_number_all_mathjax_test_math_number_all_mathjax.assert_re_search_html_co": {"doc_hash": "291cd8a942248e4a5c727aeee15daf31f7ff36efb6624223d35753390adf34a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_number_all_latex_test_math_number_all_latex.None_4": {"doc_hash": "2fde099c8a6c1fb6f0a5c163dd9cffca7db02a5da0af6cf38665c57d8dc8b69f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_eqref_format_html_test_math_eqref_format_html.assert_html_in_content": {"doc_hash": "49a1b452d2359e4f77967b906cad0d8f574d14bec1a7cd193c80f25a30898119"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_eqref_format_latex_test_math_eqref_format_latex.assert_re_search_macro_c": {"doc_hash": "d2b8612f1b4281051bf83997374b5cce94cc021dc0a19a38517662e77f753084"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_numfig_html_test_mathjax_numfig_html.None_1": {"doc_hash": "da3b1f1c95bb0d036a7faf4989fa4a273eebea2a323684387d27eef0896462eb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_imgmath_numfig_html_test_imgmath_numfig_html.None_1": {"doc_hash": "2c09bb8ae7270152e62146809a8e9d1cb816354f35c9ed3daa9467c57e73a94b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_compat_test_math_compat.with_warnings_catch_warni.assert_node_doctree_0_2_": {"doc_hash": "59e4640a62f3ba3890616f33a2390252bc1eecbd34e023bc9dac25c4b9e26f2c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SetupTest_SetupTest.test_add_config_values.if_not_has_skip_member_.self_fail_autodoc_skip_m": {"doc_hash": "d1bf57e1a89f0989a67d138bbe5d37a14ed03b79f6223328df911b275310b326"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SkipMemberTest_SkipMemberTest.assertSkip.self_assertEqual_None__s": {"doc_hash": "b6bd9b2fa07d2db0615b01fc5ab9564d7b2fb632d05168c7042e600d5bb990f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_InlineAttributeTest_InlineAttributeTest.test_class_data_member_inline_ref_in_type.self_assertEqual_expected": {"doc_hash": "f5404dd65f0bf17f29f73df96c1ac54dd615b86300bf3e6ac1a5b43ab18290e9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest_GoogleDocstringTest.docstrings._": {"doc_hash": "b52d7e3d49c872531b32344e1f33d5793d185a392cf9847fa2500854e21f8b37"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_sphinx_admonitions_GoogleDocstringTest.test_sphinx_admonitions.for_section_admonition_i.None_1": {"doc_hash": "d4f789c02f3394003179d584ea70e401f74bdfafe1e49eed79c75721aa98d081"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_docstrings_GoogleDocstringTest.test_parameters_with_class_reference.self_assertEqual_expected": {"doc_hash": "0c8f3813f4149a96eb3f19a2120653aee3e50823ac4857fb69bb0cb5316706a8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_xrefs_in_return_type_GoogleDocstringTest.test_xrefs_in_return_type.self_assertEqual_expected": {"doc_hash": "727d6020a097981c3cb2d9a8d9781401ce22059de59df3ea7b4e91d440645f4c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_raises_types_GoogleDocstringTest.test_raises_types.for_docstring_expected_i.self_assertEqual_expected": {"doc_hash": "c1b3d5f031e705ad01f9dce6ea3500874a1644d59ed2d4b57eea80b9aebf976c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_kwargs_in_arguments_GoogleDocstringTest.test_kwargs_in_arguments.self_assertEqual_expected": {"doc_hash": "c14f83456d6e13a7fe5f80fac7434726fadfa5eed32596dbf5f9ef25918f5063"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_section_header_formatting_GoogleDocstringTest.test_section_header_formatting.for_docstring_expected_i.self_assertEqual_expected": {"doc_hash": "c4ed84c4cdea454b7072179bb3030ebb04037f77beb90548de19ea4bf7758ff3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_list_in_parameter_description_GoogleDocstringTest.test_list_in_parameter_description.docstring._One_line_summary_": {"doc_hash": "d31a33440ffcbb0a8f1ae9dafe6b44e148b9a505d913384bf9542988a292a327"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_list_in_parameter_description.expected_GoogleDocstringTest.test_list_in_parameter_description.self_assertEqual_expected": {"doc_hash": "a81d00f674f5a0cf3b2f6631b8a988cc2224882fcab7603f48cc2f1b792121f6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_list_in_parameter_description.expected_4_GoogleDocstringTest.test_list_in_parameter_description.None_1": {"doc_hash": "11dcfd17fa29bd81613953d8a9defafd32d887fe92dfc775b2b7f3a20adc6b7c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_custom_generic_sections_GoogleDocstringTest.test_custom_generic_sections.for_docstring_expected_i.self_assertEqual_expected": {"doc_hash": "6988f76d503bc945c2cc5a42d4ed911af3ca8e3f45d8780818ea3ca2926e78a7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest_NumpyDocstringTest.docstrings._": {"doc_hash": "6f96970ab2833fe2531261d7a007596bcc8b1cdf77bcfff2572e8c2e7b702c5b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_sphinx_admonitions_NumpyDocstringTest.test_sphinx_admonitions.for_section_admonition_i.None_1": {"doc_hash": "e3820d87e203d7a150967b57ed48f6b5901e088fd29473391d171d269b8bdf73"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_parameters_without_class_reference_NumpyDocstringTest.test_parameters_without_class_reference.None_1": {"doc_hash": "765766e9b2fbc31f312bf411cb3080cb62be126e501f4affc3e4fc82f8fbdf7e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_raises_types_NumpyDocstringTest.test_raises_types.for_docstring_expected_i.self_assertEqual_expected": {"doc_hash": "31b9dbb6c5a409b10a584bc49085d36f015a4404178a143a8043eae6c660ff55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_xrefs_in_return_type_NumpyDocstringTest.test_xrefs_in_return_type.self_assertEqual_expected": {"doc_hash": "3818ee5749f6564513a8c09d6d5b699f701743871a5612fee47c0e04f688c657"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_section_header_underline_length_NumpyDocstringTest.test_section_header_underline_length.for_docstring_expected_i.self_assertEqual_expected": {"doc_hash": "fbde72056e6675e9ac81709751f6e53a9e5f2d2ff103fb66ae71dcfa5892406e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_list_in_parameter_description_NumpyDocstringTest.test_list_in_parameter_description.docstring._One_line_summary_": {"doc_hash": "b03cf2cca72849c48648216d5d0ce692677b22e683fe7fa69546d8306d4410cf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_list_in_parameter_description.expected_NumpyDocstringTest.test_list_in_parameter_description.self_assertEqual_expected": {"doc_hash": "77209006d4060d2fb2dc1dda72f396047028b22f5dc5fce5ef11421b70cfadc1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest_PeekIterTest.test_iter.None_4": {"doc_hash": "b3b29171a1e3257b6a6e6d247d75fc4462456493697fc2f8a3b42324e3b8c03b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_multi_PeekIterTest.test_next_with_multi.None_19": {"doc_hash": "e7e0443cdd67d533a70b3cf1a32e9ca61dec102a180e611460ce0a24a44712b9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_none_PeekIterTest.test_next_with_none.self_assertNext_it_3_": {"doc_hash": "370a524c917b7f0b970bf3bbf42eb96996db32e65c88e6f60f2b0bba730c20b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_one_PeekIterTest.test_next_with_one.None_11": {"doc_hash": "8fb723b4fe3f50b34b162074ba71d55369a783109ad66df950e8c825364c050b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_zero_PeekIterTest.test_next_with_zero.None_9": {"doc_hash": "3b934aa5cd2e36579cf74f1f89ed7260eeb46a4b4a40019c411b987cc5681cd0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_multi_PeekIterTest.test_peek_with_multi.None_29": {"doc_hash": "aec90ed02e25c6ecbbe389dc49b3e5db2cc83979c0c6aa67062c5c33a16834c2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_none_PeekIterTest.test_peek_with_none.None_17": {"doc_hash": "d8fe6183d2fb4227819960c8a66f2d758fa635525c2d1e990af8d888053bcd7a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_one_PeekIterTest.test_peek_with_one.None_17": {"doc_hash": "6b1dfa9a34f2faf3e475a4e23b90166347feb9b9127073f67de17d656465e4d9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_zero_PeekIterTest.test_peek_with_zero.None_9": {"doc_hash": "26282159022f25807b58f79bbf784d7c82a071fe2f554969e755a1ec1d6ff418"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_ModifyIterTest_": {"doc_hash": "eca9aa82fae27eec37fd26b9b523547cbde0455095850a7565843e3cbfc1a98c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_todo.py_test_todo_not_included_test_todo_not_included.assert_todo_1_astext_": {"doc_hash": "d9c51f2a8c42e8dba174271b55da2fe5f40afee65955823eb1548d3fd8675409"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_todo.py_test_todo_valid_link_": {"doc_hash": "008945aab1fe7c553648ef46621b750da44c457ab6a799a9b6aa1b8c3bb00604"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py_test_local_source_files.app_connect_viewcode_fin_": {"doc_hash": "33c1b2afc3f2da149eda291ebd43392b5d5bc08b25a0344ddfc0a4f27478fd75"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_highlighting.py_test_default_highlight_": {"doc_hash": "66ff1b4c1959bfd1eaf33fc9f0580e00e729e790d88305c4cf11f19212577e7e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py__info_test_text_warning_node.assert_result_expect": {"doc_hash": "60864f887166235786164181b3572fffcaa40182d0a0dae9acbbebe28acde96b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_title_underline_test_text_subdirs.assert_startswith_result_": {"doc_hash": "fc22332e4896578bfc3615de915c43db91a0c7c504c9397196f3462ea6510f9b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_inconsistency_warnings_test_text_inconsistency_warnings.None_2": {"doc_hash": "7cdb7436af9c2d5bef9d2a7d9cb8189d5dccaeb4b56d5aa8c6bd8f065be86c59"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_literalblock_warnings_test_text_literalblock_warnings.assert_re_search_expected": {"doc_hash": "f90090cb7151afafe6bbcc42f926c16f9ee7e0fcc1b502af6370e89de714de81"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_definition_terms_test_text_definition_terms.assert_result_expect": {"doc_hash": "e5f7e79bbf54796a0c14f3acaa46991ec8d3c8d128a1ec7210029e240a01f636"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_glossary_term_test_text_glossary_term.assert_term_not_in_gloss": {"doc_hash": "12c3a874e75030e540e66edecaa5eaaeef8144d86b7299992b914b5e70287df1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_glossary_term_inconsistencies_test_text_glossary_term_inconsistencies.assert_re_search_expected": {"doc_hash": "87c00003c6c32d720a7a4f86f3f979bfe0318446c358f54390f012f54825ef6f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_section_test_text_section.for_expect_msg_in_m_for_.assert_expect_msg_string_": {"doc_hash": "7692d0a8a0ccf1e23d472f0073bff6bfb3496c79bbed8d5b168d110ff298d328"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_seealso_test_text_seealso.assert_result_expect": {"doc_hash": "71fca982efb0d9d61f1a451e6233c21df040d8afb124fd826393367d3ed4f552"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_figure_captions_test_text_figure_captions.assert_result_expect": {"doc_hash": "8ab3e8d9d72127400a7dd5e5aa6b3d2ea727d112a889f88df78d0aed23c34539"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_rubric_test_text_rubric.assert_result_expect": {"doc_hash": "df08610afa2090982ebcbc0b328c737ac2968adf16dbd2531b649aadaffc3a69"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_docfields_test_text_docfields.assert_result_expect": {"doc_hash": "8b024661b21e4f4dd884851bf0f1ba0c2cdc16cc38992ec263f12679d51529e6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_admonitions_test_text_admonitions.assert_1_ADMONITION_TIT": {"doc_hash": "bfdfe55221de2afacc63f6e9202f91ece3ef95b82005bfaa7bb7dd5618ca0504"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_table_test_text_table.for_expect_msg_in_m_for_.assert_expect_msg_string_": {"doc_hash": "e746d6693e7773dd3790e31f68b257a7d1d35e8700e8255c678c1dadbc7a484c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_glossary_terms_test_gettext_glossary_terms.assert_term_not_in_gloss": {"doc_hash": "cf6c181543d5bbdc9eab6619310c2883b43a3cabb3442322b953d214214677bf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_glossary_term_inconsistencies_test_gettext_glossary_term_inconsistencies.for_expect_msg_in_m_for_.assert_expect_msg_id_in_": {"doc_hash": "8925c3d207a7ec34caa09462e56d2d8c956b22cb0ce83e7552931c0c10cbf071"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_literalblock_test_gettext_literalblock.for_expect_msg_in_m_for_.if_len_expect_msg_id_spli.else_._skip_code_blocks_and_li": {"doc_hash": "77777886c9626b089ec237075f3d98cfcc6053f345432dafabd1d591e8c9770a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_buildr_ignores_only_directive_test_gettext_buildr_ignores_only_directive.for_expect_msg_in_m_for_.assert_expect_msg_id_in_": {"doc_hash": "00d03462e66c15fadc3f4f4c10513420873a1f18c65512611dfe893077d1d221"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_dont_rebuild_mo_test_gettext_dont_rebuild_mo.None_5": {"doc_hash": "d9452ab23c53403837e751053a8cf816faf7dc58944b527ad72a9edfff720297"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_meta_test_html_footnotes._app_outdir_footnote_h": {"doc_hash": "d0687cadf7273ec9c9a534f0a6d24774cf695dd9d43ab3959efe265091fb0513"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_undefined_refs_test_html_undefined_refs.None_2": {"doc_hash": "3accbc31d6754d04e7bf455f2a80bcd3de320837d27d33c7cada1c6a6c23a436"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_index_entries_test_html_index_entries.for_expr_in_expected_expr.assert_re_search_expr_re": {"doc_hash": "721911a538a9903b18ced9520e4eff146fb97a2a118b9c00043bee0b0e5a4f6c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_versionchanges_test_html_versionchanges.assert_expect3_matched": {"doc_hash": "2b437439c62568a5be1c7a23f80687ad8c5969da9173d94b984782a12300050a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_docfields_test_html_template.assert_SPHINX_2013_120_": {"doc_hash": "e3cfd092ed50679c48ad387ea6eb66483a6446ed9d252434d52539a97d43e1d4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_rebuild_mo_test_html_rebuild_mo.assert_len_updated_1": {"doc_hash": "503f51b47d77bd12ae3611f933105237e9fac4ed14c28d0b07ba24c1e85a1af7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_footnotes_test_xml_footnotes.assert_not_re_search_warn": {"doc_hash": "4b0ea25675954120c8b4bcac3f38533b271d01335d2efebb971306cfe757e46d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_footnote_backlinks_test_xml_footnote_backlinks.for_footnote_in_footnote0.assert_refid2id_ids_in_b": {"doc_hash": "1894afb9b15ce6b33dccc191d352f32ff6b41d59804abf38ea20949505064ac7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_refs_in_python_domain_test_xml_refs_in_python_domain.assert_elem_": {"doc_hash": "0cfca715d994241a2b8b90b7414ead99762e0b8dc0d3be950648f320101b88b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_keep_external_links_test_xml_keep_external_links.None_7": {"doc_hash": "780e6b05762cbb4f2c0601afa2244a4be894893aa686087d6d738165d89bb3a3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_role_xref_test_xml_role_xref.None_8": {"doc_hash": "e5db9425c5245d8507c7f15aa0213e582ddd6777f78cb17bd0e735138c5ac217"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_warnings_test_xml_label_targets.None_6": {"doc_hash": "304c73eda4417a058772f827ef91e4e94abdfb7f1aef143360c74b05a26e0106"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_additional_targets_should_be_translated_test_additional_targets_should_be_translated.None_9": {"doc_hash": "221642fc36c2c7300074520a5d107ad19b80b8bf3be6867fafd46d3ab7b5685c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_references_test_image_glob_intl.None_7": {"doc_hash": "edea70b268a89a2676202c7c15fab80db62d6c31c19cc4038f3481fc69672308"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_locale.py_test_init_with_unknown_language_": {"doc_hash": "fb88f8cf529ecc0fe63a0c6d678df6665d4f35726d79e95ec12a08350fe1cfb2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_verify_re_latex_verify_re_latex.return.verify": {"doc_hash": "9faafe6d0c51e17724e67d57e6616200d6e132dba0d421bad08832477eecb258"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_verify_re_get_verifier.return.get": {"doc_hash": "6d9baca5ec24c27a89d55ca119d631cb2ca819a2b251455fda4908b053741664"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_inline_docutils16_test_inline_docutils16.verifier_rst_html_expect": {"doc_hash": "8f4757084fb72ee9cdc7d0e439ec8221843575cdeb054d3cf3505130b284a134"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_inline_for_unicode_latex_engine_test_inline_for_unicode_latex_engine.verifier_rst_html_expect": {"doc_hash": "683d76de78f373f00902c90a2f06b20b8bdcf2ca28316379d6b5f6a65e930ea4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_samp_role_test_samp_role.None_4": {"doc_hash": "35f54a3b42e9fd470bad1124694a2cfb60773aa1541502bfa9621e4814949c6c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_download_role_test_download_role.None_5": {"doc_hash": "5f1fa221f1dd2e4d918126aa85f82c2068b13b9738088be2693930dac1691582"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_XRefRole_test_XRefRole.None_10": {"doc_hash": "ec6bf5756b2eba9a1d8cdea779796c7633db6e88f3398aa354bbe85102f24f07"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_rst_prolog_test_rst_prolog.assert_not_md_rawsource_e": {"doc_hash": "ccfdc2dc0da2a40921a305c6d9f732838f7582d9705c7dc5c52592479be3199b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_keep_warnings_is_True_test_keep_warnings_is_False.assert_len_doctree_0_": {"doc_hash": "8c38dcc5bca3b55b40d2f52eb6acc6a7b026b33668251d38d59177147e023842"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_compact_refonly_bullet_list_test_compact_refonly_bullet_list.assert_doctree_0_4_0_0": {"doc_hash": "34782cd76061d71ba7b4186beeda60c9fda105840e0a5bd50fbea9653619b8b4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_default_role1_test_default_role1.None_9": {"doc_hash": "89c15399fe8f3bcd431b519d90fe715fae4bf7f0c3be2d640b2a908cc667984b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_default_role2_": {"doc_hash": "eab32c067c18d66de75afa9f7f0263e6e60a946603bdd3b9b8e80ef024d6fbd4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_project.py_test_project_path2doc_test_project_path2doc.assert_project_path2doc_a": {"doc_hash": "e9e376d9f04db4e29267c14052831bcebb4bcc5a56363e1186b3343fcae1fbf3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_project.py_test_project_doc2path_": {"doc_hash": "51f1931dc352b4a082a882574c76a5d8b9711b4fc23aea9f8fdac44ccf810f56"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_for_module_test_ModuleAnalyzer_for_module.try_.finally_.sys_path_pop_0_": {"doc_hash": "24fb47d601021e7a1a7156437a972a3a2f39f6fc678fce31a4ddba0a42757173"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_for_file_in_egg_test_ModuleAnalyzer_for_module_in_egg.try_.finally_.sys_path_pop_0_": {"doc_hash": "058c01d6603d1652670f8f0166384fcd76f07ae80cbd0db39ff728ac0c95201b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_find_tags_test_ModuleAnalyzer_find_tags.assert_tags_Corge_grault": {"doc_hash": "68e2ccdfe4d773df51d21df6390b7a2f609d2667138377fa2aea02dd1ec67237"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_ast.py_test_unparse_None_": {"doc_hash": "d59c2d713c93ceeffa56b96c9cd3817e6ae9021872640aa6644524b07dea6a00"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_comment_picker_location_test_comment_picker_location.None_5": {"doc_hash": "4ca8659b504ecd8c030901b8c09aff1911f8d9f6a4beb8219078c893d65e6e3c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_complex_assignment_test_complex_assignment.assert_parser_definitions": {"doc_hash": "4c45fddc562723ee0a4e694000fabed033e0f422106ac151b6395ed9c075e205"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_complex_assignment_py3_test_complex_assignment_py3.assert_parser_definitions": {"doc_hash": "adc483a5e8cd4d328a46c3475e4be903a4cafeda1966e7b8492a324b86455eda"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_assignment_in_try_clause_test_obj_assignment.assert_parser_definitions": {"doc_hash": "557040748d6aa3a827110f6b1bd54f0d0f449e3d42111acf8fd4fc7c1a78e76d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_container_assignment_test_container_assignment.assert_parser_definitions": {"doc_hash": "edcdea6cba86878ff2bb3bc1c13a641b9498a9a5fb70d028857bd10552fb90f9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_function_test_nested_function.assert_parser_deforders_": {"doc_hash": "168e00798e67383839c0f0eb5cce26d72e3b1677860727afc73358cc732a1b07"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_class_test_class.assert_parser_deforders_": {"doc_hash": "00904462dba0ce3b684889fd0e5cf76ad61b264b9430f809c49ca692509847fd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_class_uses_non_self_test_class_uses_non_self.assert_parser_deforders_": {"doc_hash": "aa86b620e63723d8f5b37eaf7889bbacbdecfdf298a81aba58fb47981de797e0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_nested_class_test_nested_class.assert_parser_deforders_": {"doc_hash": "1ac4f5cb8300c6c5df7e956848853ce52322724aff818c2960b2f5e9f164e002"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_class_comment_test_comment_picker_multiline_string.assert_parser_comments_": {"doc_hash": "f03029ca8a4909331f06dbb179adcdd6659a6cd3f8faf6044cc68cee7cabcc9f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_decorators_test_decorators.assert_parser_definitions": {"doc_hash": "639b618299f448a4ffca6f140e3c05f024cce14359f55adc1cb2f74613137b4a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_async_function_and_method_test_async_function_and_method.assert_parser_definitions": {"doc_hash": "e9d7006ef28ad97680e44df3ddea5d30082c6279941215222726c10c1a6e80c4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_imports_test_imports.assert_parser_deforders_": {"doc_hash": "7c9f0f1457f818c3b5f46f6fed9c210e5bba08c670094d99d1f97746d4639c3a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_do_prompt_test_do_prompt.with_pytest_raises_Assert.qs_do_prompt_Q6_valida": {"doc_hash": "9dd1ee06869a1fafbb7f600775b355eddfa50fb420a20d130bd62b0f6c4345b5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_do_prompt_inputstrip_test_do_prompt_with_nonascii.assert_result_u30c9_": {"doc_hash": "6c13893b971e8eea8da036b1e16c1e18410f4c9ad233f322137b7ec0b5b6977b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_quickstart_defaults_test_quickstart_defaults.assert_tempdir_make_b": {"doc_hash": "03b23a679cd31d4f4f2bc0b3cdf2b6410bec8260256a6836b079cb4c9d78ab55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_quickstart_all_answers_test_quickstart_all_answers.None_14": {"doc_hash": "b3326bd0763495de6146198e96894f077a226112c1fae8ac4dab274f7c909f46"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_generated_files_eol_test_generated_files_eol.assert_eol_tempdir_Mak": {"doc_hash": "81192d159d560dc078fbe1fe799439c6577f20adc2da3f3cba4c2631b9597529"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_quickstart_and_build_test_quickstart_and_build.assert_not_warnings": {"doc_hash": "a2984bb2f274148ccddf872973fdf39aba01a73daf5af31f7eda2faac9f85bad"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_meta_keys_are_handled_for_language_en_test_meta_keys_are_handled_for_language_en.None_6": {"doc_hash": "45184acb00c6935267128ae0229fda96c2c17dcb3be319fbc2b4b147904dab9c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_meta_keys_are_handled_for_language_de_test_meta_keys_are_handled_for_language_de.None_6": {"doc_hash": "86db71c730baf8e348ad7d087e359549f67c4e5e209e79ad0d6d66c408fc4c7c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_stemmer_does_not_remove_short_words_test_term_in_raw_directive.None_2": {"doc_hash": "84485b3f769c9d87c4e03c5f32ef70a051c5a0b9dcfe894e7aada6a6d8372071"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder_lookup_": {"doc_hash": "6a620d90c86b6e84accf2780032ad36ecb1bb82803ca8b284dc17b758915b300"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py_test_build_sphinx_test_build_sphinx_multiple_invalid_builders.assert_proc_returncode_": {"doc_hash": "4d2497d015782ac331876ad60ac9c5cd320fd439e0f4c042781969335513c020"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py_test_build_sphinx_with_nonascii_path_": {"doc_hash": "9d7dab54e436dd32ac52cdca8b9a9010d288fe862e4a98f72bb34a4d038bd4f6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_templating.py_test_autosummary_context_": {"doc_hash": "da2fa706f0c90fa9c09897aa51091d250fdfee8d90ee1004fc087e9eb3fd04ae"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_js_source_test_js_source.None_3": {"doc_hash": "69928a788ca9ef38518ace988aba684ff262682a0d6ec968738af810866d0a14"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_double_inheriting_theme_test_staticfiles.assert_meta_name_testo": {"doc_hash": "1651b6d8fbb4b72d26c9561ee38e29dab9bc7d6111df2a1a3c98c4fa392b6c7a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_dark_style_test_dark_style.assert_link_id_pygmen": {"doc_hash": "259042d135be5c4d1244ba123fbc25518b2a0ed0c86b99721e35d76dfc21235f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_theme_sidebars_": {"doc_hash": "5ac812f63d89bf0c507572bd98e9782d2b70cc42a17c9f54056f2148777c6b1e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_toctree.py_test_singlehtml_toctree_": {"doc_hash": "78f1041ec27d1b9c214261b2286d944759b275247aa43943ba9b568f4b9c4f28"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms_code.py_pytest_": {"doc_hash": "86ca35af018c6b498fa088ff862df8e863b04d47255e77a488941708bdbc16fd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_ensuredir_test_display_chunk.None_4": {"doc_hash": "8e34def3c114c317069c6af54101e936ddffba88df5a494f7806af8f8c6e6222"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_import_object_test_import_object.None_4": {"doc_hash": "4a7c601965e1be0aa6ad97263af01aadf61062ed529fac417c0f30f268d88ca2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_status_iterator_test_status_iterator.None_9": {"doc_hash": "6d02c5122d278ad1179e93cab4c30e4f3eebb4d6c91727e9cac797e940c0dc3d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_parselinenos_test_parselinenos.None_3.parselinenos_3_1_10_": {"doc_hash": "ad16651710ff9c24b792a74cc8a77b6caa0dafa269251bb3524e13c2c80302fc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_progress_message_": {"doc_hash": "c977a048e60b3ad98e23e3364f30a96ff1216cc578e5be19495f828ff7524e6a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docstrings.py_test_prepare_docstring_": {"doc_hash": "3fc4805911ee08ad259e95045b14fc6a52c9cd0b61944960e7f4bc6798202ab0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docutils.py_test_SphinxFileOutput_test_SphinxFileOutput.None_7": {"doc_hash": "df58af1d6bc62cce70358cc0bd701b3d737f2bcdae73edd920ba5b3d89ed9e90"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docutils.py_test_SphinxTranslator_": {"doc_hash": "626b46437edf6aa36bad74d5c24cdb72f3653aeb7f670201ff0095a2f452f348"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_fileutil.py_test_copy_asset_": {"doc_hash": "112241e27d3575b6bac1b8f6406b476803ebb42960dbab0ad8fb5b57595d5f55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_catalog_outdated_test_catalog_write_mo.with_open_cat_mo_path_r.assert_read_mo_f_is_not_": {"doc_hash": "9a148993fade3a05b4d4c7e093c1dc2762a4ebf867a785a070df8a97dc96354e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_CatalogRepository_": {"doc_hash": "ae3721c0ca66866d0e8b86954ce9430f1d497f57edbcb6b3cf2fa212fa3827aa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_images.py_test_guess_mimetype_test_get_image_extension.None_3": {"doc_hash": "5181820442f7a6ba7466c3f2f2eefaa58d110369b84169bc22a112d5d4b01384"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_images.py_test_parse_data_uri_": {"doc_hash": "7fa1bfb3002cec32c7ae30dfd5c69a6bf79617ccb27bc6af138afe9d53829fb6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_methods_test_signature_methods.None_7": {"doc_hash": "ccb68c7184a508189d40f79cd4ad2e1a167ad47ccd19a201dc4bd274fc737095"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_partialmethod_test_signature_partialmethod.None_2": {"doc_hash": "a2b3c7955e57c68374cc45a460986f705f574eca41544e3f8e06ecd9e3b1f04c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_annotations_py38_test_signature_annotations_py38.None_3": {"doc_hash": "9e268a55a9cfcf9a642fc2e408981f032e2f9d80ac4bd314eb4d10928448714e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_basic_test_signature_from_str_basic.assert_sig_return_annotat": {"doc_hash": "d0d390eabe1ea3ee85a1bf90f486eba253b21a634188273e24f98e0361754349"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_default_values_test_signature_from_str_default_values.assert_sig_parameters_m_": {"doc_hash": "224f69b962e6b98c7659adc5c0c0a8a8f564ffb8a43cf3a11c2665dd5753aa89"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_annotations_test_signature_from_str_annotations.assert_sig_return_annotat": {"doc_hash": "9a2e5f3b217c04241bde5296e4a170e604b8760cdb4e70884c020984f072e534"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isfunction_test_isfunction._partial_ed_builtin_func": {"doc_hash": "4a787313dbebd85c04acb60d70f7ef219ce9dea95fcaa081e6fd77d18a252fd1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isbuiltin_test_isdescriptor._function": {"doc_hash": "d9e18b0ac41bad1147ce7a9fc5e8a96b60c66d82471c6bd7e9d0f6d25df88129"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isproperty_test_getdoc_inherited_decorated_method.None_1": {"doc_hash": "6f08a44748f549082d92006320c15cdc9b330c307446c19f55086ebc5a1733dc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_is_builtin_class_method_": {"doc_hash": "b1594afa016ec09b2cdcb8ca848827480bc5efbb25295520f4e787361a9200bc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inventory.py_test_read_inventory_v2_": {"doc_hash": "03f44f1b80fa152ee2e5ef00f5c25ed90eb74219dc5cb597565f7573e3869a51"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_jsdump.py_from_sphinx_util_jsdump_i_": {"doc_hash": "7e159b9d56ed66ad3cb6996cc986c360635b4d0239412f3b2b2b448e45c82672"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_verbosity_filter_test_verbosity_filter.None_11": {"doc_hash": "22a7339949775d21ee84a90eac97c9d94faf84b979f144329125053110f7cac4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_nonl_info_log_test_once_warning_log.assert_WARNING_message_": {"doc_hash": "cf153418a8301f774838d96722f2cf0f99c4b257dee7cb894c00b7dbcd5029a0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_warningiserror_test_warningiserror.None_1.logger_warning_s_": {"doc_hash": "667b65ba428faff5558ec6fe70f0e28143c1d3fc8433223fad4c3e1eaf61aaf8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_info_location_test_info_location.assert_nmessage7_in_st": {"doc_hash": "5998dcf04f282dfe7c2888da37dcbd25b9d0a0a3beed84f1b4a440ab592f4de5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_warning_location_test_warning_location.None_10": {"doc_hash": "4c7a97b0b75cde28e6187e3ce0a1735efddf23c49b5e592579fe15e0679719d9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_suppress_logging_test_pending_warnings.assert_WARNING_message2": {"doc_hash": "198333880a78cfad3390fbfbd72a7ac776de730e8a0f805c237a35d8416dcaac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_colored_logs_test_colored_logs.assert_colorize_red_m": {"doc_hash": "551018c49f457436c51856c614a51a5af3ce41c793dd79f23a18b46fae745f4a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_prefixed_warnings_": {"doc_hash": "e92452cb708c275301ed437299abd5048107caefa5ff3b67071bea6195fe141d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_NodeMatcher_test_NodeMatcher.None_10": {"doc_hash": "e74cf39f5c1dbd852bf31876603d92eded94f1ca0274a968f9238690eed3eeb8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_extract_messages_test_extract_messages.assert_node_count_msg_no": {"doc_hash": "a2732f10888ea02dada93957e62b07fd9707c049cb15fce7f3f0933341035c33"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_extract_messages_without_rawsource_test_clean_astext.None_3": {"doc_hash": "74291c3cad9cddba1ee5b326f95971861732deac1d0d11c5107e513d2d8594a8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_make_id_test_make_id.assert_make_id_app_env_d": {"doc_hash": "8ed8d45b37b293524a2250ab1bb2905d6f72e2b249d926f81c6c10a12ab7b83b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_make_id_already_registered_": {"doc_hash": "2177d196dbd21e97e62d603d5deb71357ef386a57f7cdd26ca7d8996c41dadeb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_append_epilog_test_append_epilog.assert_list_content_xitem": {"doc_hash": "aa77b90c681405c3c589275be667368d4cb9583b57a8e7f850d9a815084851ff"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_prepend_prolog_test_prepend_prolog.assert_list_content_xitem": {"doc_hash": "258e8433490cc94ced2b0fe0ba3197539187b7e71ba49a09c4f0b493763f25ea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_prepend_prolog_with_CR_test_prepend_prolog_with_CR.assert_list_content_xitem": {"doc_hash": "90375ffbc08cc28dda956c0d3c7fb0bd9d34ea489fdcec9d26a2ea6d91782c42"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_prepend_prolog_without_CR_test_textwidth._Cyrillic_are_ambiguous_": {"doc_hash": "d1fa91c64395b798e16f8b3a66225889ad6a6cd1ca59b9093d8e07e42f54cd10"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_heading_": {"doc_hash": "258eeb972b0be3e5273761233895a9716420bf5f890db1d3d2eb6240c750e394"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_versioning.py_doctrees_test_picklablility.assert_all_getattr_n_ui": {"doc_hash": "0f89c61b9047783459da1cac88588e8170aa5da07fe21084170d14d7dfc2d6e1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_versioning.py_test_modified_": {"doc_hash": "bac26a34ab774ded5ef0d5f03c09e86161828c3077b061eaddd38a554e53b05e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py__usr_bin_env_python3_stringify_version.return.version": {"doc_hash": "52408096d599e368760c782224d95b09c4695fb8b0fa9c1f6b9971d9fa050d8f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_bump_version_bump_version.with_open_path_r_as_.f_write_body_": {"doc_hash": "7f158123c904881cde511fe247294ea3c69d14036229085f02729c18a49cd11a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_parse_version_parse_version.raise_RuntimeError_Unkno": {"doc_hash": "0e597591a9783f0ceab0d10dce2a08486898e59dc74d33d8dafed9169757bd45"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_Skip_Changes.fetch_version.with_open_self_path_as_f.if_self_release_date_.else_.self.in_development.False": {"doc_hash": "2099eafd393dcc6ca95d3bb0ed714d9242dfb6d87a0ef85efe39b3c7f51f432e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_Changes.finalize_release_date_Changes.finalize_release_date.with_open_self_path_r_.f_write_self_filter_empty": {"doc_hash": "10a327361749e8e3589eed2887c1a880e29d76ce8d982577cbc441c271e26d9c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_Changes.add_release_Changes.filter_empty_sections.return.re_sub_n_n_3_n_": {"doc_hash": "107aea49b3a6a0752f3003cd319f7f68bb5a6fe0570ce6964900e3d180f23e6a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_parse_options_": {"doc_hash": "cf98fe5ce48a781baf03f6a201cd1b5417c594364ac5b0133a919da236b05064"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_object_members_Documenter.get_object_members.if_not_want_all_.else_.return.False_m_name_m_value_": {"doc_hash": "c6b5553ea96cfc89fccf3d5eafbea3e38c7aa6ee7929ebabf3042aa0fce38a59"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autosectionlabel.py_register_sections_as_label_": {"doc_hash": "49b343db1e225217f47d324d6f4f13dd85f6acb85cc2cd4ec8c9c52a694de21d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_transform_SphinxComponentRegistry.add_latex_package.if_after_hyperref_.else_.self_latex_packages_appen": {"doc_hash": "098fa197321ad68939d73dd64502346d47e28ec764690ccb4c3002aa6695e9c3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_automethod_for_builtin_test_automethod_for_decorated.assert_list_actual_": {"doc_hash": "c3e22eaa6298875f49db3094c67ceb3634d14df70e105aa9048f086a60230036"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_partialmethod_test_partialmethod.assert_list_actual_ex": {"doc_hash": "4c6f63cd98d74d5ce3f26d82adbf50f4ef3829910dda3920d94c1b4f4d77acfb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_callable_test_decorated.assert_list_actual_": {"doc_hash": "ffaa9d227aa9027bce8bc674e3cb7e5eb201baff8f123c6e1c0406bb4b933de2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module_test_autosummary_generate_content_for_module.assert_context_objtype_": {"doc_hash": "e3dc1efaa372fa804ea43b06571fe5dc9a7106a4da313529db566507fd58746b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module_skipped_test_autosummary_generate_content_for_module_skipped.assert_context_exception": {"doc_hash": "93304a7a282833c87f9da547f5fd7cb2218718ef8551a851f1328ae5dc2efbc5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module_imported_members_test_autosummary_generate_content_for_module_imported_members.assert_context_objtype_": {"doc_hash": "cb6f8251d9c4cd92f7b722670caefb1db78f07727663c912cf5b5e2e210c1d88"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_TodoDirective_TodoDirective.run.return._targetnode_todo_node_": {"doc_hash": "1a72b2b4c66921fcf057727385d8b7b7fcb1e40b193ba0fb8ad2cf341ecd93b9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_purge_todos_merge_todos.if_hasattr_other_todo_a.env_todo_all_todos_extend": {"doc_hash": "73b4e3ce9bb4160e3bd110bf75aa054abde060e50296fa9b7f071d845f96ede6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_translatable_not_smartquotable.support_smartquotes.False": {"doc_hash": "1848d2b589c6a327d2f097c5a90a3713a39c4d630a1198a319b6ed9c5cba3dd1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.add_sidebars_StandaloneHTMLBuilder.get_target_uri.return.quote_docname_self_lin": {"doc_hash": "ec1a80dcc8aaeb5824f3874a7ddafd85bc646e87fb5734c6fef89f8ea99802e9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/deprecation.py__ModuleWrapper__ModuleWrapper.__getattr__.return.self__objects_name_": {"doc_hash": "a1fc1dd192e117666229178b5129b0e00b99e18323521b0c91275c33d860fa50"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.read_file_LiteralIncludeReader.read_file.try_.except_UnicodeError_as_ex.raise_UnicodeError____En": {"doc_hash": "fb879905673df22d9ceca0326276e78657b53cdc7d8195fc48d11cfba596faf4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Names_ASTIdentifier.get_display_string.return._anonymous_if_self_is_": {"doc_hash": "a03f7b37f31a98601301af6c40c9807bce6e2405aeec46fa05bdaeab1cd4ea70"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTIdentifier.describe_signature_ASTIdentifier.describe_signature.if_mode_markType_.else_.raise_Exception_Unknown_": {"doc_hash": "c4c0e47c50abcfcb62876f5ea08a5edb187761b9a4adcd872d46f5b2f29a0c92"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.remove_Symbol.clear_doc.for_sChild_in_self__child.if_sChild_declaration_and.sChild.siblingBelow.None": {"doc_hash": "0076c40d5d712998b84fbf0af314577e7ca387b13a5c5e6024e7707434baf6c1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser.parse_pre_v3_type_definition_DefinitionParser.parse_pre_v3_type_definition.return.ASTDeclaration_typ_typ_": {"doc_hash": "200c1259aaa18a3632b77c45519bea570576dd520500090aede7e1943adabb02"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.add_target_and_index_CObject.add_target_and_index.if_noindexentry_not_in_.self_indexnode_entries_": {"doc_hash": "cc24385e3f9b56465c70532b96d8bf88be3a7e55a7cbd118128e562310bbf7f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CAliasObject_CAliasObject.run.return._node_": {"doc_hash": "adde2bb7d894e94e87f78038f57bc2732454a5d1499d5b53debda904f6381d70"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CXRefRole.run_CXRefRole.run.try_.except_DefinitionError_as.return._signode_": {"doc_hash": "3b7ac6ca7c7e910f4ea63657976075cd851386f50cdb017e7616e466b6aceb2f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.merge_domaindata_CDomain.merge_domaindata.for_fullname_fn_id__o.if_fn_in_docnames_._no_need_to_warn_on_dupl": {"doc_hash": "c105948af9aab2eaf48c6c98b3a78fff70144cb207f661fc04d3e031ae85a8b0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_setup_": {"doc_hash": "42208772a348c1c078b5a61f328bb1bdd437e398ac2de9fefae13c9f7b7d8963"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaration.describe_signature_Symbol.clear_doc.self._children.newChildren": {"doc_hash": "b270a3277b2ee41ee6919e1cb2a902aab9c79ec7879c5f858cdf25638703333a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol.get_all_symbols_Symbol._symbol_lookup.iTemplateDecl.0": {"doc_hash": "47005076df8f866be389aa119b549f802db51119e486f0129fc630955d61372d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol._symbol_lookup.for_name_in_names_1__Symbol._add_symbols.if_len_noDecl_0_.else_.return.symbol": {"doc_hash": "9c788ac877af2cecaca813a927b4243c330dbe4e601e59df63ce6588a5433a47"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser.parse_declaration_CPPObject.add_target_and_index.if_newestId_not_in_self_s.self_state_document_note_": {"doc_hash": "b5692531fed73ff954071e33ffe0757aca80c8e2708df13f5271b04f81b61f35"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPObject.object_type_CPPObject.run.return.super_run_": {"doc_hash": "72fcd217347912c5d72dc861b6d25156f41b43e05b08c42db85f6ad0e8878254"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.handle_signature_JSObject.handle_signature.return.fullname_prefix": {"doc_hash": "77cf3b09a7d4f8c2eb7d0c9e0105a6fc0aed7524b0cad4aa0f315e1fca6fa998"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.add_target_and_index_JSObject.add_target_and_index.if_noindexentry_not_in_.if_indextext_.self_indexnode_entries_": {"doc_hash": "8db271153eb69ea0c4bfe358af775b48cfdc3890a79b149da465a183b235ab7d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.get_index_text_PyObject.add_target_and_index.if_noindexentry_not_in_.if_indextext_.self_indexnode_entries_": {"doc_hash": "389a569a331ca0d5b1ef922067d700e4214003e3e0f9f4b7e22fdfdda468dfa6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_real_modname_Documenter._call_format_args.return.self_format_args_": {"doc_hash": "5fa6f117889a0348877e9fb48c99296d879e9571fd47d46567d38f3a0b618764"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.sort_members_Documenter.sort_members.return.documenters": {"doc_hash": "be73b72520fe1365a50781d0ddca628870c415f949e9be8b0141570a38e8c932"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.import_object_ModuleDocumenter.import_object.return.ret": {"doc_hash": "4ee7f11c97f7989e8d252c4b22b139e845e8ce3bbe2d1885620d0b6fc9e6db20"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.sort_members_ModuleDocumenter.sort_members.if_order_bysource_an.else_.return.super_sort_members_docu": {"doc_hash": "136528b572736437a716afe84c5f4161d2a4e68e6f3077f20a8ba03327e4a853"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter.format_signature_FunctionDocumenter.format_signature.return._n_join_sigs_": {"doc_hash": "d6f9b50ec90d288533768c79f7cf11fa5bca1443b1d69a1d7b5e5f62fa6ef5a2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter._get_signature_ClassDocumenter._get_signature.return.None_None_None": {"doc_hash": "437ca5b60367a7a608910afc87dea97ce647e54de1857c0a2ec3f3b933cc227a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.format_args_ClassDocumenter.format_args.return.stringify_signature_sig_": {"doc_hash": "05eab2f376231c482526d1e6acac86ad996db38cc771fb8be374cb9c5302dee1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.format_signature_MethodDocumenter.format_signature.return._n_join_sigs_": {"doc_hash": "7e6f3d8398f0fa80291b9d4fa62b9c094136cbe15bcc3c13d066f686202b1df7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.get_doc_AttributeDocumenter.add_content.super_add_content_more_": {"doc_hash": "8484ff8c85e8b44cc6cdc0b5fbcb7ecaf03d0582162012cbec8056a1aab80ec2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_unmangle_unmangle.return.name": {"doc_hash": "2a56486981e1acf8bfed95d18acd9ac838affe0ff8103098332369f3008e4c98"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_import_module_import_module.try_.except_BaseException_as_e.raise_ImportError_exc_tr": {"doc_hash": "ead79b07a5e630b5d63661ebc8d10937d1a4e1655b2060e93cb8ce41f8e84098"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_html_visit_displaymath_html_visit_displaymath.raise_nodes_SkipNode": {"doc_hash": "d9c9e94ce5c6475554f73b9994272fffb9214f48260f00000befe4b1021443d7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring.__init___GoogleDocstring.__str__.return._n_join_self_lines_": {"doc_hash": "97a2167e4a7ff1f58ed6e4467c5121f9aca0c64f0030fe6d630829a5dc3f976d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring.lines_GoogleDocstring._consume_empty.return.lines": {"doc_hash": "a262cc002b37773f2ef7f066b56df6957cde29e6610508c84f867c360dc21006"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_BuiltinTemplateLoader_BuiltinTemplateLoader.init.if_use_i18n_.self_environment_install_": {"doc_hash": "3ba49356fab6365255429ec8128a5e174f29b4f481f00d57e4f7489d910f5b26"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_Assign_VariableCommentPicker.visit_Assign.for_varname_in_varnames_.self_add_entry_varname_": {"doc_hash": "aaeb3b4ccb6e4727bc3dcddd1575a74f660f300369d6e7fcbfa66728f4a99f12"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_Try_VariableCommentPicker.visit_ClassDef.self_current_classes_pop_": {"doc_hash": "9f3eaaca3bcdd4ecd8608452c337eff605049564582a90542fd59a262c4a3db9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_FunctionDef_VariableCommentPicker.visit_AsyncFunctionDef._type_ignore": {"doc_hash": "685abc31bbe676ac66a48c3fb12e0010928aea6f71a70c4cf7f250f25aaf9a70"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_setup_": {"doc_hash": "ed5879b86f912835bb771938542a826fff6aa1ffb2c9399d625a29abbaaebc08"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_safe_getattr_safe_getattr.try_.except_Exception_as_exc_.raise_AttributeError_name": {"doc_hash": "ec166c62185db0876d9055d33bec9e36aa72a4f895f619e8a407fd35889eb2c7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_evaluate_signature_evaluate_signature.return.sig_replace_parameters_pa": {"doc_hash": "5c5075813c9054f5dada525fd6078f919c5db6dd1018cda5932e12c1fb70170d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_stringify_signature_signature_from_str.return.signature_from_ast_functi": {"doc_hash": "f269abe67ee461751ad65f2d9b5b1cca994f0a76fe215d92b31985a4af2f3670"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_signature_from_ast_signature_from_ast.return.inspect_Signature_params_": {"doc_hash": "f1cb586b3a87bc513b894c38c8040443a45aafd749fb78390023d29729ef7cf2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_inline_LaTeXTranslator.encode.return.text": {"doc_hash": "27a91b4c973b7840b020bf4cf7446826c763e1dd7667aad20913ed36ef7e0120"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.encode_uri_LaTeXTranslator.encode_uri.return.self_encode_text_replace": {"doc_hash": "84a534f710f9148438b079d55ebe4a68ebefd86deb7c79c3ec619b39a7410f51"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_Text_LaTeXTranslator.visit_math.raise_nodes_SkipNode": {"doc_hash": "9f865fbbba1a379520d48a2a77f56dc5ebb78b5a3416af00b8fa7a613e6c901b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.__str___Table.__str__.writesep.return.head_join_chain_from": {"doc_hash": "d9f540f55ac51e13cad1e88e844ee616d0e2a3835d1d245ddd069e809b9bf715"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/docstring_signature.py_A_": {"doc_hash": "a8940247ea4903d73bf07bddab3e78815aa462b4e9e783858aae64007691ac19"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/genericalias.py__": {"doc_hash": "a8bce7eedca220f602a1d4c6ee49080f6117cff91bb412c1e3fab26de69f8529"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/name_conflict/__init__.py__": {"doc_hash": "787245e69fe19491305b07a75cc0c6035cbd0148f26e38c0ef8da5da677e1615"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/name_conflict/foo.py__": {"doc_hash": "1cfece1a37a97b24e8c4b25093e922015ab7ccb7279639755669cf422760fcfb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/name_mangling.py__": {"doc_hash": "80fff1ef1239c065133899a58eb4e3bf9b436d19c49f1138c7cbf272bdf97577"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/overload.py_from_typing_import_Any_o_": {"doc_hash": "d84871f2a47693b457a1fe868afb470ac37bcad4a155bd76192edc6b5d2d4ed5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/sort_by_all.py__": {"doc_hash": "84090fc285198e3ab0fd09c23c0b65ecc912b1ddd48eac714a8a76898c3dc1f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_scaled_image_link_test_html_scaled_image_link.None_2": {"doc_hash": "59918cfe2a681f3614ff6af2f84af78ae2729a0157d896464ef31dfb9424ec73"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_js_data_test_js_data.assert_node_doctree_1_a": {"doc_hash": "ef310af94110d6a325dabd6aa6740784a758b48de08ed197846d039d4af255d9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_noindexentry_": {"doc_hash": "07e0aff377fe0786dea2005fda83ca83ab71c4e5bf397966ce000933fc9cf905"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyobject_prefix_test_pyobject_prefix._not_stripped": {"doc_hash": "af371d83142521cb55f16750857591f12ba4d6d840e0b5f40e1448492ec02371"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_test_pydata.assert_domain_objects_ex": {"doc_hash": "0984999b4d3cb829609665917542c13ea81426c40cc5f224d2099598b8b4936d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_modindex_common_prefix_test_modindex_common_prefix.assert_index_generate_": {"doc_hash": "93a6c4b43e336727e243e7fcaf23b18d6982bd8d961eea4c54a8cb6cda5e1574"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_parse_name_test_parse_name.None_10": {"doc_hash": "6d45bc56bf4bf6ec7db90a46246982c1b426d93586117c3a449caa7090d9a654"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_format_signature_test_format_signature.None_5": {"doc_hash": "9bf172b498e9ef2df8f3a1588f1b16fd4c9797fe9f21b64549b2a7b57a17b8d6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_format_signature.None_6_test_format_signature.None_19": {"doc_hash": "11e7e9d10761ff3eaeeb6c2e9fcbd9b2bf94ef339a1284b7b7d6ea481380ecbb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_module_member_order_test_autodoc_module_member_order.None_1": {"doc_hash": "eccb9ef0f3e84f4486f152967b1d0a113b9945802002b9627b9b045615a8e69b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autoclass_instance_attributes_test_autoclass_instance_attributes.None_1": {"doc_hash": "482c293e59dcf6288b53c7e96ca13984cdf3a307c53d68f2018839d8e17e5107"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autoattribute_instance_attributes_test_slots.assert_list_actual_": {"doc_hash": "bf70034ad749ca95e68f7dcb768dc3848a2733c751e580612d9f316f294590d7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_GenericAlias_test_autodoc_GenericAlias.if_sys_version_info_3_.else_.assert_list_actual_": {"doc_hash": "3b4f123975de5c05f43a2379416b8bd74265644dcfd1b5d5c82a062e13bb3375"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_TypeVar_test_autodoc_TypeVar.assert_list_actual_": {"doc_hash": "4e12d22c13738d6b197d92b9c562e23d7c03f32cd6d94b930a00720ee41e2504"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_overload_test_overload.assert_list_actual_": {"doc_hash": "fa419b0771a56af09c66ea5cecbdb8d411397d1cdde835ad13f4f83045d06a30"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_pymodule_for_ModuleLevelDocumenter_test_pyclass_for_ClassLevelDocumenter.assert_list_actual_": {"doc_hash": "87b83fb301a3913d824c4e4fd2e446c78f555daf9a2377ff49cdf8597940c1f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_test_autodoc.assert_warning_getvalue_": {"doc_hash": "bc2c7e556ee65d43d17e79adfed794464923a8df00811dde2f8a4c90b9b6fdc5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_name_conflict_test_name_conflict.None_1": {"doc_hash": "a2d0025b77ff1ba6ea314a87aa33d0ba348e8e36155bb5533412fed19ffa98f4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_cfunction_test_cfunction.assert_list_actual_": {"doc_hash": "9b50dc95075b3ea56935e41d8a18e892fe6cc887831bebad8a3fcee0e70f8bfd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_MockObject_test_MockObject.assert_isinstance_obj2_S": {"doc_hash": "eef68a0fdf94bdfe5909a82aa0753f7bd96609084a8bc6115d7dde1df46d9d1f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_coverage.py_test_coverage_ignore_pyobjects_test_show_missing_items.assert_c_api_Py_": {"doc_hash": "f49c9de878993e1ddc8c068188c74c0efa47b43b54118e75e15a055330cc3ee9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_coverage.py_test_show_missing_items_quiet_": {"doc_hash": "161d3a555e1ecd03a9f25b58ba3cbedb163269b6c8533d243abc4b7b8e00c2df"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SkipMemberTest.test_namedtuple_SkipMemberTest.test_namedtuple.if_sys_version_info_3_.else_.self_assertSkip_class_": {"doc_hash": "b9c2ca38b19c20ba648c86f27c8ff00f7135422ac98693410c3eb1a0886c9888"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SkipMemberTest.test_class_private_doc_": {"doc_hash": "bde6bca30ca7c7f03472ce42fbe552c972beca3c270b2e018df05e455ef2b4c5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_colon_in_return_type_NumpyDocstringTest.test_colon_in_return_type.self_assertEqual_expected": {"doc_hash": "aad657b22c3d87bfdac877463b0d2c308fcbdd03838a3403f55acacb5e0ef81b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_underscore_in_attribute_NumpyDocstringTest.test_underscore_in_attribute_strip_signature_backslash.self_assertEqual_expected": {"doc_hash": "8d9382991e54adcb77097cbaddfc32191033975b941ed93818a7f01cbd905358"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_formfeed_char_test_typing_final_not_imported.assert_parser_finals_": {"doc_hash": "dfa44898e3ba84b4c4aea426798696df8f211c9802157d9cabb0b08a2d62490b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_test_typing_overload.assert_parser_overloads_": {"doc_hash": "78825070370f2cd1bccd5bf861af84c8ba3365f90783d365c622a0f253189fc1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_from_import_test_typing_overload_from_import.assert_parser_overloads_": {"doc_hash": "8d12708ff368ad97e14b2cdd447589153b3a758fdb11eb6576802ce90152e5c3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_import_as_test_typing_overload_import_as.assert_parser_overloads_": {"doc_hash": "281c72fcbf75cd9fbfeec67ec1a7dc589282790ec93431f01f1f1c9539d41173"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_from_import_as_": {"doc_hash": "ccd644b026394d01c0dc7337a67a608aac5cae7719cbee96315239fc118ed614"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_complex_annotations_test_signature_from_str_kwonly_args.None_4": {"doc_hash": "ad19eaae0a95f5dc16eeb3710270cff7b9111758335c8b81c88fb85c3a25bc2b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_positionaly_only_args_test_signature_from_str_invalid.with_pytest_raises_Syntax.inspect_signature_from_st": {"doc_hash": "3e013722c3c9497ffbf9387f444b347e45ee4f68ed2b02b1e6b71bc376bd3f60"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_ast_test_signature_from_ast.assert_sig_return_annotat": {"doc_hash": "441775bf33a52786624a047c91ad64adb9b649688c2c9590c786bf51a9507410"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/typing_test_data.py_from_inspect_import_Signa_": {"doc_hash": "3b26008238c4c80d2436db86fedbe8b5344cf0fb6d9e5860b442677ee452c35a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_theme_static_files_StandaloneHTMLBuilder.copy_theme_static_files.if_self_theme_.for_entry_in_self_theme_g.copy_asset_path_join_entr": {"doc_hash": "7152ada7e633f8290f049c9fef6e98303dc3bcedbf597d5ea86cb600421d5e2c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_html_static_files_StandaloneHTMLBuilder.copy_html_favicon.if_self_config_html_favic.copy_asset_path_join_self": {"doc_hash": "054993739fc85a058f583243866de5daaed5120c39075ac3e35364a9b2411182"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_XINDY_CYRILLIC_SCRIPTS_LaTeXBuilder.get_relative_uri.return.self_get_target_uri_to_t": {"doc_hash": "749f31dcb71d119471ca2c315f45b3a95c952059f6b12b31c1e9a820d2c69a4e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.init_context_LaTeXBuilder.init_context.if_self_config_release_.self_context_setdefault_": {"doc_hash": "6c90a97cbcf72cead5f95917c6e3ba77284751929e6ae79fded0998b9b2ca8ee"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTParameters_ASTParameters._stringify.return._join_res_": {"doc_hash": "794a7e840cf90d838cc0760c657c521f0b66b2be524dd6f2c3352d1c150b978a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTParameters.describe_signature_ASTParameters.describe_signature.for_attr_in_self_attrs_.attr_describe_signature_s": {"doc_hash": "219c989620bc783cc14dc9e0f4026ce5a8155ce54212d7cea4d3aefdc22a505e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_parameters_DefinitionParser._parse_parameters.return.ASTParameters_args_attrs": {"doc_hash": "2c8f95f6bb4645c10b2f8fa0d00966b818c10940b19d4426d8b06ed2252e5fa0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_AliasTransform_AliasTransform._render_symbol.return.nodes": {"doc_hash": "745c3a65e62057dc38e9d6611162fa42abee6be5bd82780675de571a6822b97f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_AliasTransform.apply_AliasTransform.apply.for_node_in_self_document.node_replace_self_nodes_": {"doc_hash": "5e0a759c700fc9e726c7c82bbacd8fe8c3a7875dbffd72975ae311ececec0471"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Cmdoption.add_target_and_index_Cmdoption.make_old_id.return.nodes_make_id_prefix_": {"doc_hash": "9a55f1ec32ee0a8c97937be91e3e47b95c0d5c67b145de63307a55aafb052dd1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.domain_IndexEntries.create_index._sort_the_index_entries": {"doc_hash": "4605a0f203dbede87f01901b244a6b7a33b0b52a52b2d7c88f5075531466549b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.keyfunc_IndexEntries.create_index.keyfunc.return._sortkey_entry_0_": {"doc_hash": "f6d9f31f422969ade0c1d3671f36c0f4f642bcd19e7eadf1cbba260b5ebf01b1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_merge_special_members_option_merge_members_option.for_key_in_private_memb.if_key_in_options_and_opt.for_member_in_options_key.if_member_not_in_members_.members_append_member_": {"doc_hash": "6654f1cd6d855f37857aca3ab74572675221fbde5fcdd8d45e2ac6ece9df30eb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py__Some_useful_event_liste_cut_lines.return.process": {"doc_hash": "e7c073964b3b62eab0cc00f906a5264e300efadecf34d214d72b4e73f076f530"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph._class_info_InheritanceGraph._class_info.all_classes._": {"doc_hash": "a4f69d92dac597521c08cf2f7a909d4f22902dc05b9d219fe164099f4878dfc0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_fields_GoogleDocstring._consume_fields.return.fields": {"doc_hash": "a4d11cd9dae84e37d44c3993ddf9dfc2a6f1e369832077ea6eb1ac0cd93faf59"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_inline_attribute_GoogleDocstring._consume_inline_attribute.return._type__descs": {"doc_hash": "e474e42847c118ec62fbbc646d2b3ec182e84f4abe59d5d34758eb72d0d2d0b1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__recombine_set_tokens__recombine_set_tokens.return.list_combine_set_token_qu": {"doc_hash": "38b983880877473b75774794d36b0f7e976e3fb592656115a7a31c99221e125d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__tokenize_type_spec__tokenize_type_spec.return.tokens": {"doc_hash": "4c315529af881ef83f792955485ebdf7d7c94345ce81c6e0821c037bcccbfca0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__token_type__token_type.return.type_": {"doc_hash": "a3da1843fba0a90eb6e0e9e73fffff9c2b3522d2f2fb1b53e3ca6d03d50ce87a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__convert_numpy_type_spec__convert_numpy_type_spec.convert_obj.return.translation": {"doc_hash": "cb3c31ad357158ffb3a17046418e22e6f0363320f1baac1e847cfe541e1d6fb2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__convert_numpy_type_spec.tokens__convert_numpy_type_spec.return.converted": {"doc_hash": "39a4261747a7f62cedac8cfb56698aa0d86cf712c7245ae67a83654d643cc50e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._get_location_NumpyDocstring._escape_args_and_kwargs.if_in_name_.else_.return.func_name_": {"doc_hash": "b235a0859ab31bfc2c3e890556e74b82df5d5b1daac8700fd4c753b67c501b9f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_desc_annotation_TexinfoTranslator.visit_desc_annotation.if_self_descs_and_txt_.raise_nodes_SkipNode": {"doc_hash": "5b4f39402fc4186fb2eccd2ff25bf9587fe285c6f2630c0f9dbedd14ca2dfe63"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-circular/conf.py__": {"doc_hash": "f1e4ad8c865fe22ba2d0926d9cd7f2c3e2bc579acb59267dd05a29bf64cdfc06"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/TYPE_CHECKING.py__": {"doc_hash": "3c991ac92b944329cf361c2f0148af5db8a9d1bb03217e5f1739acfd808cff39"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/cached_property.py__": {"doc_hash": "55e8e339fc0203ea267ce76cfc30b94f338e10093385e98a96ac51cbffad2f5e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/enums.py__": {"doc_hash": "611f7066c0f340fc18fbf5af0a69cc21b3e79dcddb9a68d08ec340ba55a67372"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/generic_class.py__": {"doc_hash": "7ce3016907d67fefae9c4001c6eaef44354750d58d4d3be6532b2b1968ad7d05"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary/autosummary_dummy_module.py_from_os_import_path_": {"doc_hash": "4b2e05f4572e3b1166d87ebbcf716cc49811ab716d1404faf9bc7e99239af4a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-filename-map/autosummary_dummy_module.py__": {"doc_hash": "0a67b0abab936e2b2d1e75d46b04d813c228b8458e432b72940d312da6931104"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-filename-map/conf.py__": {"doc_hash": "e4af2e0db5c266da9744c08181ec6ed3111c11006622373ef9ac4a169dee59e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver/conf.py__": {"doc_hash": "8e3c8f8abdf2c2ec5d04161ec77fabe7b2fd074e4c51ab12b2d151ee592c83b9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-numbered-circular/conf.py__": {"doc_hash": "5dd5363839170134ae66285ff9c89c069a8b9c573d9377f496c6e0b28fe937c9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-theming/conf.py__": {"doc_hash": "85ba1e153b2ccaa27afbb0bcaa03ec17a0830880f94f279b27b6526f14303b55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-theming/setup.py__": {"doc_hash": "ab1f7b2b7d64fff84ad019e027f3ae81bdb0dac19ea35f5e2647a6f27f62f955"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-theming/test_theme/__init__.py__": {"doc_hash": "eafd057ef1a814b44645c39d54d0506bdd829911220b8155ae446bc0fc551b2c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_gettext_template_test_gettext_template_msgid_order_in_sphinxpot.assert_re_search_": {"doc_hash": "37d3f4a85b32f4dad8ac273be33ec40939d1238d3be7d2850d9842cc5e6ab0b4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_build_single_pot_": {"doc_hash": "e65033237006a426faee5181ed895ef826acaffb947679542c8f4691e278cec3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_cached_property_test_autodoc_cached_property.assert_list_actual_": {"doc_hash": "9937827959489c98519eaeed998c4e62d7b9b1ab806a7f74594d04ce6db8425e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_typed_inherited_instance_variables_test_autodoc_typed_inherited_instance_variables.assert_list_actual_": {"doc_hash": "ea75f7604c404239c739f4e9f24fa51512191ee8737316817d031bfeefc35ad5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_TYPE_CHECKING_test_autodoc_TYPE_CHECKING.assert_list_actual_": {"doc_hash": "98be2dd605f397fc1fd7b867e8a8388188c9d54e7142274cf3ddf5df44da3200"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_private_members.py_test_private_field_and_private_members_test_private_field_and_private_members.assert_list_actual_": {"doc_hash": "dd4bddfbfbf51c666013248ee428339fcfd2dd9c9da9a48e94a6d18ecb30341f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_private_members.py_test_private_members_": {"doc_hash": "4cb10143ce71f11f276df85f8283dc726ea52d4e5e55a151c2863c760e2d2762"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_test_autosummary_generate.None_14": {"doc_hash": "031e9157b9b9bd23bb0a077ae8628f0b2fa53131ebb3d40f606c206c59fd0961"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_filename_map_test_autosummary_latex_table_colspec.assert_r_p_0_5_linewidth_": {"doc_hash": "48262a351ff654e2d79c2c872cde9f928ea3d45894ac423c17d925263d8cb53c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_import_by_name_test_import_by_name.None_14": {"doc_hash": "7dcdb2df73947782d18b6e54ea1255563074c604a32dadbb8021a372e905ba16"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_noindex_GoogleDocstringTest.test_keywords_with_types.self_assertEqual_expected": {"doc_hash": "62b8811e37f9185957f4c30cf04c29fc2343ed2221991cb40a57c2ce2d55c7f2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_docstrings_NumpyDocstringTest.test_type_preprocessor.self_assertEqual_expected": {"doc_hash": "12ee880c6835950fd2661475ddcfabd984776ced2016555d72f19e4adc4ea791"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_parameters_with_class_reference_NumpyDocstringTest.test_parameters_with_class_reference.None_1": {"doc_hash": "a53ee97db1e03234d6d8d8347b6c7e7a44a6a730cc1cab6412df1895d9d7ff9a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_multiple_parameters_NumpyDocstringTest.test_multiple_parameters.None_1": {"doc_hash": "6ba1b9c7bbcd02f64449404fbb4a2fad4226a7e2f480947327ad8157a98334bf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_list_in_parameter_description.expected_4_NumpyDocstringTest.test_list_in_parameter_description.None_1": {"doc_hash": "384beb36d6c2487215913411e9bdc603bc52c33ef6b46c508e7202d4ef756806"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_token_type_NumpyDocstringTest.test_token_type.for_token_expected_in_to.self_assertEqual_expected": {"doc_hash": "57f0e17a5b4debc45ffda6e4710d24dc619d09bf8b399f7bdad8cbd72c989251"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_tokenize_type_spec_NumpyDocstringTest.test_tokenize_type_spec.for_spec_expected_in_zip.self_assertEqual_expected": {"doc_hash": "51795848eb552ead1c78b09ca8dfb2d69c6e5425741bc544a0fc652163267efa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_recombine_set_tokens_NumpyDocstringTest.test_recombine_set_tokens.for_tokens__expected_in_.self_assertEqual_expected": {"doc_hash": "cda5ea7f724fdb6ef9e166341ec79f61995285cc406b0fff1a6c2804df5c68c1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_recombine_set_tokens_invalid_NumpyDocstringTest.test_recombine_set_tokens_invalid.for_tokens__expected_in_.self_assertEqual_expected": {"doc_hash": "2bf47e7b129ecadf90e08984b621274d7f8bd1a9743a3691c56f6acd59bbad6c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_convert_numpy_type_spec_NumpyDocstringTest.test_convert_numpy_type_spec.for_spec_expected_in_zip.self_assertEqual_expected": {"doc_hash": "3c80ad825d1aab23c5a5032d9551242596a2a7477599946210a716ed455ee70f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_parameter_types_NumpyDocstringTest.test_parameter_types.self_assertEqual_expected": {"doc_hash": "3d3bb6086b3fcdd637388a0c935fb64c9253b34809c9f4ae6eeda4255e7e9e0a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_warns_TestNumpyDocstring.test_token_type_invalid.for_token_error_in_zip_t.with_warns_warning_match._token_type_token_": {"doc_hash": "c6651aea32d66373171ac0fc8ce34d35425adbbe59d2878348871f594a518c83"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.emit_firstresult_Sphinx.emit_firstresult.return.self_events_emit_firstres": {"doc_hash": "96f3f2465072a92a9ab59c15b7caed72218fa946e4840a3ae64c328b347a9a12"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._registering_addon_parts_Sphinx._TODO_stephenfin_Descr": {"doc_hash": "de387355a52c0464ac99c737a009c1fef636114c63a5576306b46e9180ef3c9f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_source_suffix_Sphinx.add_source_suffix.self_registry_add_source_": {"doc_hash": "0d9a15847d4c37393f8c46c5a8e8bbf6eceeb45c6902cb8b8133c529465be38c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_source_parser_Sphinx.add_source_parser.self_registry_add_source_": {"doc_hash": "06cd2323a972e77b139a58fddad3d512fa00e1623c6f0ef2165a30908852bb9c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_get_parser_get_parser.None_18": {"doc_hash": "d437e4316c4ad8d117d355cb095feeb8f046d5206db4eb27fabdb7b1fe6b16bc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_get_parser.group_add_argument_m__get_parser.return.parser": {"doc_hash": "3964ff8f3ad35f3bc1ba698c5ef68e1b64b1d7b979394936e545cd20edf05890"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.resolve_xref_CDomain.resolve_any_xref.return._": {"doc_hash": "ad10e28b4e2629232717543e1ddc010f2b3c4b5bbe88a882f4e155c0f28a3da8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.get_objects_CDomain.get_objects.for_symbol_in_rootSymbol_.yield_name_dispname_ob": {"doc_hash": "524029d70948d0f6c824a66801b290dd51bc0fdc2db815560b19b886a9a82a0c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DecoratorDocumenter__CLASS_NEW_BLACKLIST._": {"doc_hash": "48ceda9844ca85d717ddaa59bb36774fccc9490270f993d126a09327b1bdfe3c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_Attribute__UnparseVisitor.visit_Set.return._join_self_visi": {"doc_hash": "80fcde2186e6cdf8b7308feba1984a8d87db3b1657d5aee3da73249d43059cd3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_Subscript__UnparseVisitor.visit_Subscript.if_is_simple_tuple_node_s.else_.return._s_s_self_visit_no": {"doc_hash": "d1b6a5a3248add3829890d0dcceed3a3db9021fbd708efd58a96e2a99ce24414"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_UnaryOp_": {"doc_hash": "fff88c476e31d04427ce71776a1191a5e3f32c62fa9e40780e313bb0bedb337f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_SharedResult_SharedResult.restore.return._": {"doc_hash": "724bfeab70fd3cae0788632ca323a5e5d3f90a509a851d339086bbc99ca7ab58"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter_ImageConverter.__init__.super___init___args_": {"doc_hash": "26460ecd497ff88605b0aa4f4484d4a3805dc95c7d27e5d8e2f0326bb16ee452"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter.match_ImageConverter.match.if_not_self_available_.else_.if_rule_.else_.return.False": {"doc_hash": "abe7368bcaac34c2f8e8f81865d0b49d95176d36c99d7883586e253b89f6281b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter.get_conversion_rule_ImageConverter.guess_mimetypes.if_in_node_candidate.else_.return.node_candidates_keys_": {"doc_hash": "a0c84864422d333f59cf2a53380d9929d914ad84249662079153bf9861c569e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/overload2.py__": {"doc_hash": "fdf47641d75a580aa297d907f69369e57a9ece107bf8aaaaca1876b998c1567f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_extract_role_links_extract_role_links.return.entries": {"doc_hash": "495532c1dd6abe2fbfce4eb2d11ee5121aebe9f65639457fad31aa6291e6054a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_with_number_literals_test_pyfunction_with_number_literals.assert_node_doctree_1_0_": {"doc_hash": "ffcfbac777f3c4af9e571ffcc9454943b8b3d2bdae7dc8ed6fd883b41d8aa391"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_overload2_test_overload2.assert_list_actual_": {"doc_hash": "43cefa73ed8a99254c5dfed270c68b6e487ffe07b4178d4dfbff261c51d6eeb2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_image_glob_intl_using_figure_language_filename_test_image_glob_intl_using_figure_language_filename.None_7": {"doc_hash": "b64975e45f88e7559513a9ab5b1acbd27de530390ed2b5662d9bfcfc3a70511a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol_Symbol.__init__.self__add_function_params": {"doc_hash": "19d6b8a8f0f89f450a77cfbb7b7b10fa0392629aec23a0bbc60c4305ce4c4b21"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._fill_empty_Symbol._fill_empty.self__add_function_params": {"doc_hash": "8cbc26736de3b05d96c50304b77111691d5221a273350312b301fd5289e56332"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._add_symbols_Symbol._add_symbols._otherwise_there_should_": {"doc_hash": "94aa0248c5f25731de2d9a79482da7fb8803426d821806491dc626cb0c914e0c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._add_symbols.makeCandSymbol_Symbol._add_symbols.if_len_noDecl_0_.else_.return.symbol": {"doc_hash": "be15593e9413381c8c24374194ab60a8a5ac92fdf81a3e4e941d9afacf590b6c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.__init___StandardDomain.note_hyperlink_target.if_title_.self_labels_name_docn": {"doc_hash": "6445ff938ed38c7fd26862cd9f50513e2a3724d68c1767120523ebef4fb6654c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_warn_missing_reference_": {"doc_hash": "478ba512970c33d69e7cab0d342d586bae2f6ead4ae02879adf36cf7ae222455"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_between_between.return.process": {"doc_hash": "e44ab3a36eb9b0cd5b6682a786528d33b900ed9dcd88d728edd2a593b14b7841"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py__This_class_is_used_only_ObjectMembers.Union_List_ObjectMember_": {"doc_hash": "1d4514337e16f136fc192a12234d41e05e950c26f02eb1ca61471f4021bf6d98"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.import_object_Documenter.import_object.with_mock_self_config_aut.try_.except_ImportError_as_exc.if_raiseerror_.else_.return.False": {"doc_hash": "c38779cf833926f8c3bdf43c23992a71ea23ef84799eaee65f8d08704e544bd1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.process_doc_Documenter.process_doc.for_docstringlines_in_doc.yield_from_docstringlines": {"doc_hash": "5440c92bc205074241c69e113d84649fcb37fe4908293ce3ff49b2deca54dd59"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_sourcename_Documenter.get_sourcename.if_self_analyzer_.else_.return._docstring_of_s_fulln": {"doc_hash": "725f3556ab8bcccae2087fb743e646cf9e5d37b2bebe9627c429c9b52152ca58"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.filter_members.for_obj_in_members__Documenter.filter_members.return.ret": {"doc_hash": "aa392e4aa5d9f214a1989b162c570eee921fefd491c78c57494ef3222e06f1c5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.get_object_members_ModuleDocumenter.get_object_members.if_want_all_.else_.return.False_ret": {"doc_hash": "94ab034d03dbc39b50d79e18ed6d2895449edaaedec06b1a8b81b4e6833ee4ce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.format_signature_ClassDocumenter.format_signature.return._n_join_sigs_": {"doc_hash": "992583e47858d960dd34912e97849c1d47f9d9b86214368b667e42c29e2796bc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_overloaded_signatures_ClassDocumenter.get_overloaded_signatures.return._": {"doc_hash": "eff06af9b1ef500bcbd885635815609ab39bec98f9df631602cd2bf56613e828"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getslots_getslots.if___slots___is_None_.else_.raise_ValueError": {"doc_hash": "252a590e13a67ad621436f652f57ec6829deb666326ff5d28f5fc20b5c1cd91f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isgenericalias_isgenericalias.if_hasattr_typing__Gen.else_.return.False": {"doc_hash": "5f1d3c99bdf21baecd85f3b9b1b2d0c59136ab8ebbe1a452ebc31e5b4d28f74d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__restify_py36__restify_py36.if_module_typing_.else_.qualname.repr_cls_": {"doc_hash": "c166be08644f36fb6f161d67b4e23ab6d6533a6914c02e913f17dcca777440cd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_attention_TextTranslator.depart_download_reference.pass": {"doc_hash": "0b50837911fd74dca4cddd88f7e0d1d8f7b440adbf9527e298e28c88ed0386a4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_emphasis_TextTranslator.visit_meta.raise_nodes_SkipNode": {"doc_hash": "06b6e21fdddad67b3f1afa60fc8500d99f413eb8b0b6b1e2cdcc8ff44c56195c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/classes.py_from_inspect_import_Param_": {"doc_hash": "6a64b96938558d8a3f8cb27c84b01b92fdcdcea8f5b168ee3b87368e813f87b0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/decorator.py_from_functools_import_wra_": {"doc_hash": "53aa3a995faeb35486e66e3fa172971b278f8c0b2fd584fec5eae84a76112611"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/singledispatch.py_inspect_": {"doc_hash": "d4689bfa61c503278a93edf45fb3cb4d8a28459c3d931f5893406ceffc5a366f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver-anchor/conf.py__": {"doc_hash": "fcf15e006e17165e4ecfd7df91ec5079aa8289c88e0d6fc45941325be291b1a2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver-https/conf.py__": {"doc_hash": "4f7d4f4f31a342d37d30d3906aae339a0b0b2de4d1c0cc0ecc5939242bd59231"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_raises_for_invalid_status_HeadersDumperHandler.do_GET.print_self_headers_as_str": {"doc_hash": "db2b3814a301977a7438de2852feacae106b1cc4251cacae5dd5b0fcc34e19c8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_auth_header_uses_first_match_test_auth_header_uses_first_match.assert_Authorization_s": {"doc_hash": "4cf9d67a8d1e766eed32fd8308245e3eef7f5c5a908c95c8cd76be79299d4e3d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_auth_header_no_match_test_linkcheck_request_headers.assert_sesami_not_in_st": {"doc_hash": "c30c664eb04671e437e9db3bde2a94f6e27d9aa719738319b5ed603870f852f6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_request_headers_no_slash_test_linkcheck_request_headers_no_slash.assert_sesami_not_in_st": {"doc_hash": "7d3bf99885e89642ec21005727d0e6949f46b4e6098179c33fbd7fae80649194"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_request_headers_default_test_linkcheck_request_headers_default.assert_X_Secret_open_se": {"doc_hash": "9397356b7b0b1faed363678f9bcd7a9849b8ae8f2f2a4e40f66664bea4759ff8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_make_redirect_handler_make_redirect_handler.return.RedirectOnceHandler": {"doc_hash": "266fb212be8f998f44b32b26fcdc62e8026a97559706165feb9ee55ee51a33ae"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_OKHandler_test_invalid_ssl.assert_SSLError_in_cont": {"doc_hash": "9bf6aaefc8f432fdfd7c89aa2724e487a94ab4dd0e055500ae69e1a75a2a0dda"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_fails_test_connect_to_selfsigned_fails.assert_SSL_CERTIFICATE": {"doc_hash": "f5d23570c66abe968a97a6c89cdd840a9f322837f29664af2a041321c109d245"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_with_tls_verify_false_test_connect_to_selfsigned_with_tls_verify_false.assert_content_": {"doc_hash": "b8b709f5953169b7631aad5eb893fe356c029e4c5906fde93abc45be7884f8c5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_with_tls_cacerts_test_connect_to_selfsigned_with_tls_cacerts.assert_content_": {"doc_hash": "feeba8aa8e1db2d99ddfab611cdd18ff1301a47dd3b6cb93c4679924ad8da5a1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_with_requests_env_var_test_connect_to_selfsigned_with_requests_env_var.assert_content_": {"doc_hash": "b332d317aa43fa66f345eb3a833442a0a2520e98e6c0a1f4bef5c9667613f9f6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_decorators_test_decorators.None_2": {"doc_hash": "63fcfee64af449ed8545896e742c887e3fe4cf52975d228c16d01b15459f0862"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_none_for_overload_test_autodoc_typehints_none_for_overload.assert_list_actual_": {"doc_hash": "b7230c10d3f31d321482f74f7f3dfa5207952af089f09de918edeed399f4ea7c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_between_exclude_test_between_exclude.assert_list_actual_": {"doc_hash": "cfd1c93f9b62a818d33299e96b03a4a8a6f122edd354edd5a2de5d6a682a36c5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_skip_module_member_": {"doc_hash": "552d89e78fc9e28b12ec67b892fb0e82fb9bcbfa8cec4204a44cf24954d11af0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_see_also_refs_NumpyDocstringTest.test_see_also_refs.None_2": {"doc_hash": "32e441cfcd9a6361848b4c1e2ea7c0955fe70bffba28119b5da2c963f91673af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_return_types_NumpyDocstringTest.test_return_types.self_assertEqual_expected": {"doc_hash": "bb4e938ec3c4bbead74fb6f791c2696481a8088228485de7181048ec578eb0d4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_yield_types_NumpyDocstringTest.test_yield_types.self_assertEqual_expected": {"doc_hash": "f05225b5cb09888a842501a85036c6f4fd8ec5b54c601d036db30d41c2b84d2b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_getslots_test_getslots.with_pytest_raises_TypeEr.inspect_getslots_Bar_": {"doc_hash": "4fe20a4363670198850f4325a2f89126ae0f9bd2c19539cf1436801a495d6bab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isclassmethod_test_isstaticmethod.None_3": {"doc_hash": "55d74a405cf534887cf002715a39b17f98bd07257a6a76664569af7140213952"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_iscoroutinefunction_test_iscoroutinefunction.None_5": {"doc_hash": "284d1ad9a0543a96c094cfee4aaadfe7c46d95101335f5dc8a6ac9b5d9811ed1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_containers_test_restify_type_hints_containers.assert_restify_Generator_": {"doc_hash": "7dabe8e50fbc64079864ceb7cf722821beac548d93975884d40aa7743d1264e0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_Callable_test_restify_type_hints_Callable.if_sys_version_info_3.else_.None_1": {"doc_hash": "550062482cc4b70bd2b558abb4de8eba029a4d575f9fa334820147806de9077f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/utils.py_contextlib_": {"doc_hash": "7fd22ea23b8248be1aa7ecf5112bd5073116e94912efb82ba129bc726b6c7eb2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DataDocumenter.add_directive_header_DataDocumenter.add_directive_header.if_self_options_annotatio.else_.try_.except_ValueError_.pass": {"doc_hash": "9a7999ef7b2ae0f43041ef574134082ea1e942b38187d81d7b51b73c3d6b452a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NewTypeDataDocumenter_NewTypeDataDocumenter.can_document_member.return.inspect_isNewType_member_": {"doc_hash": "53787d14f1e19ba7f8048d0fc30423f83388f8baffb753ca450e94a07bfb94af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter_AttributeDocumenter.document_members.pass": {"doc_hash": "72078825988e17cc2f5de0c7f5d6563f78a430e008e36557bf0947632169c99c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.isinstanceattribute_AttributeDocumenter.isinstanceattribute.return.False": {"doc_hash": "aeb9c0c15510a3d2ccecc6ce251756ff0731a61ff5c9bc08025feacc1ccaff7b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NewTypeAttributeDocumenter_NewTypeAttributeDocumenter.can_document_member.return.not_isinstance_parent_Mo": {"doc_hash": "9ac4bf5e241346b2e1a6c851976458c37b7cef25ad4b1c1072b9b17871ed6378"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.__init___ModuleAnalyzer.parse.self_analyze_": {"doc_hash": "9bda08367e15bc7dac319904806e7761b7ab0a0aeec9bed2853f8ef79246bcf3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_typed_variable_test_autoattribute_typed_variable.assert_list_actual_": {"doc_hash": "dd3784e396ee2374529c57298bf663790c7d4f11ba51eab4d553721deb72688e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_typed_variable_test_autodata_typed_variable.assert_list_actual_": {"doc_hash": "81bcb7bf8e702bd26bb1ba2decfc681f633425d550bd34854e4e1f3b1de41f7b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_toctree_test_gettext_toctree.None_1.assert_expect_msg_id_in_": {"doc_hash": "473f66788ae03a949d58da17fc47ecc3e28219a53e6cd59b58d56804f224d04a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_toctree_test_text_toctree.for_expect_msg_in_m_for_.assert_expect_msg_string_": {"doc_hash": "191c4e6bf02531e865d2f105654a2c59b0b4542514a2b38e8a3e3e98c82257e9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_topic_test_text_topic.for_expect_msg_in_m_for_.assert_expect_msg_string_": {"doc_hash": "6150ba3500856bedfc914703cf491a99bcd1ce3f165a78445a2d27eb4a9699af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_definition_terms_test_gettext_definition_terms.for_expect_msg_in_m_for_.assert_expect_msg_id_in_": {"doc_hash": "d0339350e630ebb05976c7ce119aee1737bf926fb3b9abb37490b9f2d38e552b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleClass.__special_without_docstring___ExampleClass._private_without_docstring.pass": {"doc_hash": "d27e289f0aefec1dd92e7658708f0a22939241c8a98ecaeef116522bfb344ce5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NewTypeMixin_NewTypeMixin.update_content.super_update_content_mo": {"doc_hash": "037ca2e14fb64012540c85c180eb21b3aaadba7869a62e45deda8a9eb792bac8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_TypeVarMixin_TypeVarMixin.get_doc.if_isinstance_self_object.else_._type_ignore": {"doc_hash": "27f23984368fe33e4628cd8ae05459f276b425a04c7592296a6c8bb7a88852ae"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_TypeVarMixin.update_content_TypeVarMixin.update_content.super_update_content_mo": {"doc_hash": "da3f0cf52457414f34217ad4c39366818d5c5ea29c3744a280892fa7f02708c7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._lookup_annotation_GoogleDocstring._lookup_annotation.return._": {"doc_hash": "7d8cb9c59278143acddc4aa8d21c26885837d1df73bb314116fffa2d1ad56bcb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_FileAvoidWrite.close_FileAvoidWrite.close.with_open_self__path_w_.f_write_buf_": {"doc_hash": "0cd02c72d4fd8ac19e58f4ed9e201d588df60c638ea259afb371d81651d3d6f2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_FileAvoidWrite.__enter___": {"doc_hash": "b1692deb0faab53964c32bddec318908ff1e38d7ef306c16aad785b60f69fdb2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/ext_napoleon_pep526_data_google.py__": {"doc_hash": "41ab2efc40764954c3de1db64520a925d0a7d3f172606fc41e9e90475fd52c0b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/ext_napoleon_pep526_data_numpy.py__": {"doc_hash": "37f99d0dcfbf9c85a99ba2f1fa93a4035c6d9fe6be32cb6dcdbf136623d509a4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_nonexistent_cert_file_test_connect_to_selfsigned_nonexistent_cert_file.assert_content_": {"doc_hash": "e9713a7717b1eca9b6d5d22094790c053d3936066da5697bf2e46f0564c302f1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_TooManyRedirects_on_HEAD_make_retry_after_handler.return.RetryAfterHandler": {"doc_hash": "2f1b8be13ce3062351a30652519cced1f5b0213f514f2abb50d710dbcd8645f6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_retry_after_int_delay_test_too_many_requests_retry_after_int_delay.assert_stderr_textwrap": {"doc_hash": "f0fa1dcb62313946953b161d8689a1839b0b427196299ca6d6761c6a2f2f7981"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_retry_after_HTTP_date_test_too_many_requests_retry_after_HTTP_date.assert_stderr_textwrap": {"doc_hash": "b315ae1f5328cffe5a38442f00daf0212249b9ea3609d4196639f9629ca9209c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_retry_after_without_header_test_too_many_requests_retry_after_without_header.assert_stderr_textwrap": {"doc_hash": "f98b097ab4df086490dc5f336bfc78e316ffbd28cd4babf26cbb5a1039330b9e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_user_timeout_test_too_many_requests_user_timeout.assert_json_loads_content": {"doc_hash": "79fad7b0d6108c8f97dde868121facfa5847686d17b4b7aaf0351af50042c7d7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_instance_variable_test_autoattribute_instance_variable.assert_list_actual_": {"doc_hash": "b0c449d1161f0e7987ae47c4809f24a6a3feb15504067533e9fdc5b4c62b9989"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_type_comment_test_autodata_type_comment.assert_list_actual_": {"doc_hash": "b50f4774655e825016463f58df52d27d11a38cbfde8abc5c1f1c0f40059ef747"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NamedtupleSubclass_BaseDocstringTest.pass": {"doc_hash": "a4b794e78715176c50225a040fa57ec7d2ba192c0aa673c98dc38632519c7261"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NamedtupleSubclassTest_NamedtupleSubclassTest.test_attributes_docstring.self_assertEqual_expected": {"doc_hash": "65b085469ba56baf80c2514d475c2538ff1046c1a53f4f193d20948876b81fe5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_pep526_annotations_GoogleDocstringTest.test_pep526_annotations.if_sys_version_info_3.self_assertEqual_expected": {"doc_hash": "1e3ee9f8e3c935289969607c4bc0d1178c1cb2f42a8fae820608a97b960e88f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_TestNumpyDocstring.test_escape_args_and_kwargs_TestNumpyDocstring.test_escape_args_and_kwargs.assert_actual_expected": {"doc_hash": "00fd6f6290cc9258d6852c965c0f636bc841c9253a231751cd6899398a9e485b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_TestNumpyDocstring.test_pep526_annotations_": {"doc_hash": "0e080b0798cc71ff90904c58d81cb537bf75961f50b6f12bc09a86f4ef99a84f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_AliasNode_AliasNode.copy.return.self___class___self_sig_": {"doc_hash": "dd7a3e34fc83d7accbd14babaa924a60d6bcd839fd123d80169ba8dcc8846dcf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.get_module_members_ModuleDocumenter.get_module_members.return.members": {"doc_hash": "08068875948d18cfa75b0adcefd5ce30d4fab3b13725599873d31671433fe4b4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_GenericAliasMixin_GenericAliasMixin.update_content.super_update_content_mo": {"doc_hash": "2a678c2c1b0b2dda165ee52e264038fc8aa7de9b2d9d632917fbc625986290c2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_UninitializedGlobalVariableMixin_UninitializedGlobalVariableMixin.get_doc.if_self_object_is_UNINITI.else_._type_ignore": {"doc_hash": "286e29167a0c5d73c9dc57658108e1ef3a41c82fb8305b85ae3916d16f1fec01"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DataDocumenter_DataDocumenter.should_suppress_value_header.return.False": {"doc_hash": "62acf31324eb3ddf7fd3fd0f8c50ba070de9e1f9da489d3ae191b39960e18451"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DataDocumenter.document_members_DataDocumenter.add_content.super_add_content_more_": {"doc_hash": "0f675e27d2537daa6d27f3bc47913b8db17ffd7103173a2dfe4305e7cbc08c5f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_RuntimeInstanceAttributeMixin_RuntimeInstanceAttributeMixin.is_runtime_instance_attribute.if_self_get_attribute_com.else_.return.False": {"doc_hash": "b83d1c6f53d42f45c9a7fda2150f07a0f16ffa85c1ca9714b094a1f9a40d393c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_UninitializedInstanceAttributeMixin_UninitializedInstanceAttributeMixin.is_uninitialized_instance_attribute.if_self_objpath_1_in_an.else_.return.False": {"doc_hash": "83d7ca279abc439874ef17bc3ddb1bedb9b7c33168740b11ed24bbe6fb45a0cb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.import_object_AttributeDocumenter.should_suppress_value_header.return.False": {"doc_hash": "ef1d2227e5822555ef8443f262aeaa92581f552af8b896f2fc11ebc5aabceb4d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.add_directive_header_AttributeDocumenter.add_directive_header.if_self_options_annotatio.else_.try_.except_ValueError_.pass": {"doc_hash": "5ca60ed857a8ab9863f4a425d7fab4ec8c74008d3826b224ae412c98d4e48aa4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.get_attribute_comment_AttributeDocumenter.get_attribute_comment.return.None": {"doc_hash": "521eae477ba6bfe11d4af418eee5aa1f97670042cd715e4d42a06c72373acc4c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_get_documenters_None_26": {"doc_hash": "892120f0e052ce3857ef532d0756f941f68064086f007c88e378dc6a1f264d50"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_None_18_": {"doc_hash": "fd9cd1e45188764ed0b805140f0aef3ae0c253653ec266428402bfba16e5fb8f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_DataDeclarationDocumenter_DataDeclarationDocumenter.__init__.super___init___args_": {"doc_hash": "d5b1dfc22be83aa9b8bb9fdfdb2119ac6e8573922d369b7cf5911d3832a4a1af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_TypeVarDocumenter_TypeVarDocumenter.__init__.super___init___args_": {"doc_hash": "b9f799c4eab5713cea21c990f34e1fd5ff73845c461d45ed8cfb7972c4d620e9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_SingledispatchMethodDocumenter_SingledispatchMethodDocumenter.__init__.super___init___args_": {"doc_hash": "a60527333c1e642995b16991f27cddbeec08295c90bf0be0be3f7120b17b4393"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_InstanceAttributeDocumenter_InstanceAttributeDocumenter.__init__.super___init___args_": {"doc_hash": "e96fb1bc66c237bae51e0aacffb13565c28d8bdad285317dc792d8da4293bccf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_SlotsAttributeDocumenter_SlotsAttributeDocumenter.__init__.super___init___args_": {"doc_hash": "76c5f181f148aaa2a24b5c3b2254f88cfd4b37de53a93ac3ace3c42de35b26cd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_GenericAliasDocumenter_": {"doc_hash": "f1476378a193c646f9e66bf91d4d7e2cd7a7abacea8736e3cfe4b606af35b645"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_raises_section_GoogleDocstring._parse_raises_section.return.lines": {"doc_hash": "b25d7f13a442bc3d1cae96e17774435b4c4e19e6dc3d17d9f4b90d2385fd1fee"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_receives_section_GoogleDocstring._parse_references_section.return.self__parse_generic_secti": {"doc_hash": "99144737bc57854b31ad40c9436dfc79c78ade9bcea4a24b08fbb14a44cae992"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_BuildDoc.initialize_options_BuildDoc._guess_source_dir.return.os_curdir": {"doc_hash": "db5ac50ba0161721f09c2f5b2e59b633a4a4798a835f8a604a7903003e921200"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getall_getall.if___all___is_None_.else_.if_isinstance___all___.else_.raise_ValueError___all___": {"doc_hash": "7b90c3bd5f46a447bd936df54b92a9394538b7ed696578dd58d99640eef363af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getannotations_getmro.if_isinstance___mro___tu.else_.return.tuple_": {"doc_hash": "8fd07b1b6448ab5651540080e7bd665bdd7a522c339ae8c82696ec5d99922b4f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/hide_value.py__": {"doc_hash": "c3084d14163297451a6e8389f11bff6921a7e0e1735c777f87c60dc16cd026ad"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/instance_variable.py__": {"doc_hash": "479e3a44022742f08c63e5638d0362c2a2c12b20673121f866580fa38ded67e5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmd_option_with_optional_value_test_cmd_option_with_optional_value.assert_j_j_cmdo": {"doc_hash": "b29abce198985400db3a1ffd68889936aa5d56080387f9ec1f6ee85d1c4b8af3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmd_option_starting_with_bracket_test_cmd_option_starting_with_bracket.assert_enable_enab": {"doc_hash": "5da26340565ccc373e756e5a0aa8d3a403ab3b0f353d2b3918c1e8b6e69e9db5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_get_doc_test_get_doc.None_4": {"doc_hash": "f1d865ca0a74fbb394fd6d44106636fb7e40fc4eabbe7b9ee8da17b27295c916"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_name_mangling_test_name_mangling.assert_list_actual_": {"doc_hash": "0199a03527d877df37bd17355619004b018bd5948197c1e91c8b298aa92556e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_typed_variable_in_alias_test_autoattribute_typed_variable_in_alias.assert_list_actual_": {"doc_hash": "625d6b783ab2971a5d1ce10dc630470954b6f72ccd423c1ca0d291f2cd488b42"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_instance_variable_in_alias_test_autoattribute_instance_variable_in_alias.assert_list_actual_": {"doc_hash": "e3f6ea5fed0105a1319df2b829cd4480caf2f9f0f8663f2abe13c6c93b38c786"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_GenericAlias_test_autoattribute_GenericAlias.if_sys_version_info_3_.else_.assert_list_actual_": {"doc_hash": "94498e0a8a9f69526951b9972c362aee8594bf17e8aa0e9bd6f9594f12e73bb2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_NewType_test_autoattribute_TypeVar.assert_list_actual_": {"doc_hash": "9adc4562bac530b7579e07902c39213dad7d4975b554a90f819f36884a8583c9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_hide_value_": {"doc_hash": "24c302bb27b2a18e4a03a85c947fb441088c48c17c4d00b79407adafadb06e13"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_instance_variable_test_instance_variable.assert_list_actual_": {"doc_hash": "d55345cf1e403425a8eb50edc3372cd7c02256da15d01d7a7214567dd3a52287"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_inherited_instance_variable_test_inherited_instance_variable.assert_list_actual_": {"doc_hash": "3179386fd1d36a6b04340691e967e6b9fa073ff185293a5f60c85ae89b38e2a3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_slots_attribute_test_slots_attribute.assert_list_actual_": {"doc_hash": "214347b97d1e08a1959ce2e6620e212b3a50cdb7b3dfbb44d38aab9a4057cd4e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_show_inheritance_for_subclass_of_generic_type_test_show_inheritance_for_subclass_of_generic_type.assert_list_actual_": {"doc_hash": "1368c2fea7b9eecdf555ce482b5c025452419b013960c5a91f9762f3f6946eba"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_GenericAlias_test_autodata_GenericAlias.if_sys_version_info_3_.else_.assert_list_actual_": {"doc_hash": "bb30026cc0fefd5963f1e3b02cb9b912593277b802b9e46185bdfcfc01f7d510"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_NewType_test_autodata_TypeVar.assert_list_actual_": {"doc_hash": "5df18dc92e2d476f3c59b022fc7f8816810cbdd9fc8866f4c458167b1185e564"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_hide_value_": {"doc_hash": "1c94b1f15d60da4c3e177233054d9d05c1fe12083eb1e1998a3f04db2160aa0a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_object_members_ClassDocumenter.get_object_members.if_not_want_all_.else_.return.False_m_for_m_in_member": {"doc_hash": "4f257f4cfe9290b0e30afc7438bcfaf552555f69095df990739c67702d744ee6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_get_object_members_get_object_members.return.members": {"doc_hash": "2e29792ca186674728fad2e1d33ff5a7657f622baaaa4ab71cae0bd2a0ed16ad"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/empty_all.py__": {"doc_hash": "b565178d2e42fe146171476681874c8497c594daa9bd7c8e1bacb70f586e2523"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_Stylesheet_Stylesheet.__new__.return.self": {"doc_hash": "373e294a74ccd24a9777d19049c73fd5102fd1122bbe7cc83150505e45cc1c4d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_JavaScript_JavaScript.__new__.return.self": {"doc_hash": "619846fb9ed7ea62c621146d31387701b584adbd2c7315eb04bed103980c26d1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.handle_page_StandaloneHTMLBuilder.handle_page.ensuredir_path_dirname_ou": {"doc_hash": "ca5906e189302c79095de44db11c8f7e3c7bf6e956ec52fd3ca215ab077aa7c6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.dump_search_index_StandaloneHTMLBuilder.dump_search_index.with_progress_message____.os_replace_searchindexfn_": {"doc_hash": "ebf4cdef0a375acb68dd7f41f438ce6d23d9f1f3a54277fc59299ad510f4494c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPDomain_CPPDomain._resolve_xref_inner.checkType.assert_False": {"doc_hash": "8e35ed6c2fec0fbd9fecd07a7e7a47e328f9fef6bce7a3cf12b397b7ce0ddeca"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPDomain._resolve_xref_inner.if_not_checkType__": {"doc_hash": "cf72a9c601842548146355d8d87634df0bded3be49424916640e6a83b444d947"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NonDataDescriptorMixin_NonDataDescriptorMixin.get_doc.if_getattr_self_non_dat.else_._type_ignore": {"doc_hash": "d55ecb115329bb9b2a42b4a7d0f3b16bc4934180e64e4b241a5517af749ed176"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_UninitializedInstanceAttributeMixin.import_object_UninitializedInstanceAttributeMixin.get_doc.if_self_object_is_UNINITI.else_._type_ignore": {"doc_hash": "97820bef885ef24e7abacb08703bf3b73654ffb6d05d5b0cde9f95ece1c0c102"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_DocumenterBridge_DocumenterBridge.reporter.return.self__reporter": {"doc_hash": "2c3505881c84244a001ae4da96cc33a63cd43b96d2078151ccebed10462906c2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-c-intersphinx/conf.py__": {"doc_hash": "32d84531cb74d088f27be79541bf7c470a0bb5b7fc9f4132accecc7272659409"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-cpp-intersphinx/conf.py__": {"doc_hash": "7f6b543d416b54538d3be6856adc5041fcffb1007999cdecb47dc8612503a505"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-highlight_options/conf.py__": {"doc_hash": "376a3137180a14d3ba29bd01c879469fbf2d5f27b8369635e21a3170e57fd67e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_assets_order_test_assets_order.None_1": {"doc_hash": "a53762ac7e5812f1976e0d3d779ef39867d69415ff2646216cc31b6616655797"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_highlight_options_test_highlight_options.with_patch_object_subject.assert_call_args_2_ca": {"doc_hash": "befd2eaa99b9202ad04b7cb7ae5875598ed1e5189ae1c343aaa560fca9df2b80"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_dedent_test_LiteralIncludeReader_dedent.None_7": {"doc_hash": "a367ad431b671af59ef8673b3f98eeb7d7015ddc9d1d86d68342f922f739eb64"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_xrefs_abbreviations_test_domain_py_xrefs_abbreviations.None_4": {"doc_hash": "85ea07ea4711b62cef4f85059f51f541bd17ebd338a6a1a0398d8f43592d36e0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_productionlist_test_productionlist.assert_A_strong_B": {"doc_hash": "539d5a46a38bd9cddf3815388d52622f7a9655ceb74ae7c9f868f309e802673b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_disabled_docref_": {"doc_hash": "bafec79b14aeeb62d07bc191ebcb9d4a7faacf0fa4de31679007bbdc2a50f737"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_process_docstring_for_nondatadescriptor_test_process_docstring_for_nondatadescriptor.assert_list_actual_": {"doc_hash": "0a1b20d2b082dce141e9404eff7352c29e9007980db95c31a4e850a492027011"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_recursive_test_autosummary_recursive.assert_package_package_m": {"doc_hash": "8e207c64d473f636e610fa8687f2a693f39225b2abacd1113d2be194f743383b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_recursive_skips_mocked_modules_test_autosummary_recursive_skips_mocked_modules.None_3": {"doc_hash": "7c26a51f2f612e4e1e627b829bf5ccd33991f308d20b1c9b7c08ae10ded13872"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_format_date_test_format_date.None_15": {"doc_hash": "23d06423da97baa48dc75131a3f939bdbc8faa6ba0164c2fd2ab88052bd311a9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_stylesheet_Sphinx.add_stylesheet.self_add_css_file_filenam": {"doc_hash": "35601bb80f228c29acc6e36255f98603f56e9cfea28c84e21a832cf6223abea9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkCollector_HyperlinkCollector.run.for_imgnode_in_self_docum.if_uri_and_in_uri_.if_uri_not_in_hyperlinks_.hyperlinks_uri_uri_inf": {"doc_hash": "5a617a8f3f09f0202bdc02bee936c89c9e4022179d39b43da9bfd05bfcbaf392"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_boolean_ok.return.x": {"doc_hash": "accb8f613d5f39817e412e80007246b09e1069817fc96d735f248d50a7f94d78"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_do_prompt_do_prompt.return.x": {"doc_hash": "9e725393e3cdd1b1ccf5b182c9c8b98418b0178d194ab3ffc0239404bd3b46a4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_setup_": {"doc_hash": "14a8007c8fcae54016b5ef0a12857fc1c1fa96afc8f221d25a1bcf2488a36642"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._load_custom_sections_GoogleDocstring._load_custom_sections.if_self__config_napoleon_.for_entry_in_self__config.if_isinstance_entry_str_.else_.if_entry_1_params_st.else_.self__sections_entry_0_l": {"doc_hash": "924a0f23e1df50f54bae8d83b303252261d335790bc9db593832631f0ecfd5ca"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_should_generate_module_page_should_generate_module_page.return.True": {"doc_hash": "e33672eb30cdbc6d06dc0afccade8f4f035b5cc26be24983ef8c4d7b53b88b62"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_collect_pages_collect_pages.stack._": {"doc_hash": "d06aef78dec92bd531e4ebee2d2ce17867bfe9deb25c4ae2e765d2bef66b6800"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_collect_pages.for_modname_in_sorted_mod_collect_pages.yield_posixpath_join_OUT": {"doc_hash": "abbf24e350b7ff4b9ead61bd85f7c7f3fe4f907296c66b3fd8981eea27db66f5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_ASTBaseBase_ASTBaseBase.__repr__.return._s_self___class____": {"doc_hash": "fe1fd6d2cdc39d49b37d89f8a189e73ef25ffcd172ced7c80ffff3627d058bab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_is_builtin_class_method_is_builtin_class_method.return.getattr_builtins_name_N": {"doc_hash": "5966de039ebe9e4c442687b46f9eeac931c2d7e9c4c8470f8f5de6f248494762"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_process_doc_handle_figure_caption_test_process_doc_handle_figure_caption.assert_domain_data_label": {"doc_hash": "b5a42182c5d3c7779179bce353120675d9a7d11199a89210b7622f4ab2d146ab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._general_extensibil_Sphinx._event_interface": {"doc_hash": "6bc6c30e206dc9d88e945f98b9a90b8d19f797c7089c67e872e79317089df400"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.connect_Sphinx.connect.return.listener_id": {"doc_hash": "639a10d13817e751f5d657e2ee060be2f81d8bda5e98f185a45f97d03f9a2d1b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_migrate_html_add_permalinks_sphinx.builders.singlehtml": {"doc_hash": "e337d60cb791cd9c4afe213b5e2c1559297c30710e0adc6ab0a19320cc6e88c3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/transforms.py_KeyboardTransform.run_": {"doc_hash": "d55c44951e47e528020bebb69b4a1350482b278ef13f5424d5e77be5d912f553"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.clear_doc_StandardDomain.clear_doc.None_4.if_fn_docname_.del_self_anonlabels_key_": {"doc_hash": "6ec8fb0551ca8b76005af9974f766fbe059a2cbd29cd63b0455d45b4001826bb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.merge_domaindata_StandardDomain.merge_domaindata.None_4.if_data_0_in_docnames_.self_anonlabels_key_da": {"doc_hash": "eeab63714cfd1a4d933d36434f73a9c50ddd1dadd946c8eb06749045afc6ceaa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_term_xref_StandardDomain._resolve_term_xref.if_result_.else_.if_target_lower_in_self.else_.return.None": {"doc_hash": "56a92acd561e04ca585e2422604687a8c46720b7d7584d39e6260537a6083436"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_walk_has_child_module.return.False": {"doc_hash": "386d5136a113c299d7cc65052b587172908be6128530feeb57a3680b76304b3a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_ismock_": {"doc_hash": "ff2a2742a680d972392d486b516fe5217efd44cf2d7add1e7763ae58c02ca100"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py__get_full_modname_is_supported_builder.if_builder_format_htm.else_.return.True": {"doc_hash": "87853847c3d960e41b122ac170b13284618294e1706db6b59b5ca3188ddad85d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_missing_reference_get_module_filename.if_source_info_.else_.try_.except_Exception_.return.None": {"doc_hash": "d4df6503d1057bc295175133288697df57d1ee3b3d61f4eb18ecdfb3d8ced996"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.for_node_msg_in_extract__Locale.apply._phase2_translation": {"doc_hash": "32bea3916f4d01e15f05ed39babb5bb7bbcb3eb0f37c024356b859e5c914ddb4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_paragraph_LaTeXTranslator.visit_hlist.if_self_table_.self.table.has_problematic.True": {"doc_hash": "575a4a695b41fd0b596205cb54eb811f26c613ca1096bbe61d3ed10d2be7bff7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_hlist_LaTeXTranslator.is_inline.return.isinstance_node_parent_n": {"doc_hash": "eb173bb87bd59a50e10732dbe7824d647bc9a191ea64a5b4e3500b396365f8fe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_productionlist2_test_productionlist2.None_7": {"doc_hash": "6583fd465449cd5a00ddb037b51f8d6b5ec2a80fd0d47d8d5b83744c702291ca"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_mock_does_not_follow_upper_modules_test_abc_MockObject.assert_isinstance_obj_som": {"doc_hash": "30b53f4b1d9ea54f609c3dcb3f6362e717ed4fc3f3f8e6b3047828ff638d3ee3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_mock_decorator_": {"doc_hash": "59e8862a6e5b1c620003f7fcfa1bd34ecef4a2e0c2b985e6f6cce3a08b44ff10"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_preprocess_types_GoogleDocstringTest.test_preprocess_types.None_1": {"doc_hash": "d58a4f9f6e9c0c70ddd65b3913ade8991d78e295ea77d246f4a651d8c16d9d2f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py_test_viewcode_epub_default_test_linkcode.assert_http_foobar_cpp": {"doc_hash": "bc2c45969b884010f546f81e325d501e58ca42894f25f20d83944d44dcfdaa25"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py_test_local_source_files_test_local_source_files.find_source.return._source_tags_": {"doc_hash": "c7a5c88e93d9135096845e5a15f02e11c40bd2e6947f9d89f8b58860827e7d70"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py__Sphinx_documentation_bu_todo_include_todos.True": {"doc_hash": "2ebef67ba31700901524af579f3c9e5010c63d5702db2afe70bc6858069ea99d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py_extlinks_parse_event.return.name": {"doc_hash": "240f818ccce8f3d860c1819c9238d230648624078d2ee000cd33dacd2ed3e352"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py_linkify_issues_in_changelog_linkify_issues_in_changelog.if_docname_changes_.source_0_source_0_rep": {"doc_hash": "7f08c50fb4ba2e9a0a2598a7fb5c8a267d9592605279e8cf1a40a9816320f102"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py_setup_": {"doc_hash": "52b56846af40c72230acdd5d79f7974df355804264565b7fafcf9d532119c51e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/autodoc_intenum.py_from_enum_import_IntEnum_IntEnumDocumenter.add_directive_header.self_add_line_final_": {"doc_hash": "1b4f3ddac59844e1c28b73581569c54f6d3945af54ca7a81693e5b804e689336"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/autodoc_intenum.py_IntEnumDocumenter.add_content_": {"doc_hash": "3a3a2ce8e4d237c0aae1739e6468d7ac5c219bac44040ab9dbf6461cef63f958"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_from_collections_import_d_RecipeDirective.add_target_and_index.if_contains_in_self_opt.recipes_add_recipe_sig_i": {"doc_hash": "a064dc30116d5ff9e9759ddde098b6ab85090f38d518f5c8fd3dd59f2d565940"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExamplePEP526Class_": {"doc_hash": "6cd3c3d64ee2eefd9d1279faef5557a097c18a96b10c79a6cb94f72660f4bb4d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/__init__.py__The_Sphinx_documentati_": {"doc_hash": "7e42059a8d3022e40eec9d77f00d8b9aba88cc7774ba780dfc6b092618c27efc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py__Additional_docutils_no_document.set_id.return.ret": {"doc_hash": "57e9df1072260d4828e1941928f8e4839388a70f52d5420e9bb56351623ad084"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py___desc._that_forces_the_specif": {"doc_hash": "39ed5b6adeef4f42c4fd0d4701afdf18826b20d18f7e22da4c4361b46431d0b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_signature_desc_signature.child_text_separator.if_self_get_is_multiline.else_.return.super_child_text_separa": {"doc_hash": "5933ef9d0ea1cac27ff420b8e82cd9d0627282ef0b54164af4632144228b15cd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_signature_line_desc_content._Node_for_object_descri": {"doc_hash": "2769d4e888250eb7eea23ca30b5258bb22c240e7b23498b39abeb4aed98c970b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_inline_desc_inline.__init__.self_classes_append_do": {"doc_hash": "e71ef888553d51cbb837c905af58b46e228c570682d64de261fe5fb5b02f2e00"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py__Nodes_for_high_level_st_desc_name._descname_is_for_backw": {"doc_hash": "7f8d26f724687840c74cf0173c6d0c0ae8415e5a16c5f4a93469a056f5c71b36"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_addname_desc_addname.classes._sig_prename_descclas": {"doc_hash": "a36ace5e85288e3c1531fa623486941db480637fd792b88394d76289a2928232"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py__compatibility_alias_versionmodified._Node_for_version_chang": {"doc_hash": "7a3851fb1512e8fe7a539cd3edf2d6751a1dc4acf5e53a30234c363d2e392ed6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_seealso_index._Node_for_index_entries": {"doc_hash": "dbe058b515801bea4ecab64ea7f860fff1b5117be9587f7664e17683ba7f1563"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_centered_pending_xref.child_text_separator._": {"doc_hash": "86dd1f1cff3e07a540d973754a46bf40b3a616876875d2ccb9c668de3f973ea4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_pending_xref_condition_pending_xref_condition._Node_for_cross_referen": {"doc_hash": "9e6fb4780cfcceaddad9dbd433fa5379018996e21b6321daa971aa8d07716306"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_number_reference_manpage._Node_for_references_to": {"doc_hash": "10182e2b9d1c780c4c85e05d42efe0286f88b4cd5e9b984c11a85f91e7a489e6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py__Sphinx_application_cla_if_TYPE_CHECKING_.from_sphinx_builders_impo": {"doc_hash": "7952abd59d4e162179850618cb365ad80e7848efd4559ebdba2ddadfa700e62b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._init_i18n_Sphinx._init_i18n.if_self_config_language_.else_.if_has_translation_.else_.logger_info____not_avail": {"doc_hash": "c787be09292ae6ad317297a861e8efcd49954626521aa7552c17e545f46d87dc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_transform_Sphinx.add_post_transform.self_registry_add_post_tr": {"doc_hash": "dadf9cdaea17f60ce4ae2672ff1e882240a2e062af9b720cf8d554c054b0c993"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_lexer_Sphinx.add_lexer.lexer_classes_alias_le": {"doc_hash": "23ec6c5d05d0565d82051e1d0777f197fc704301a47dcbe1684af5415620985c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_env_collector_Sphinx.add_html_theme.self_registry_add_html_th": {"doc_hash": "04a6b26c6a61db7878d9a1fa7ca14fc86689052d2f550dd9077d9ee16f184608"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.set_html_assets_policy_Sphinx.html_themes.return.self_registry_html_themes": {"doc_hash": "1a80b00400c7492e4f6577fadc9af0002e12129c9653f3e8a4b161336cb30986"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py__Builder_superclass_for_logger.logging_getLogger___name_": {"doc_hash": "de00778b71f5634fe561e4b97765e39cc9a7fdfa422f4453484ff550fa44f0f6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.post_process_images_Builder.post_process_images.for_node_in_doctree_finda.self_images_candidate_": {"doc_hash": "2fc19da4d412f4d26897ebe039ef95f3c674352963b9d30d9574bd94b1be4116"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py__Base_class_of_epub2_ep_ssp.sphinx_smarty_pants": {"doc_hash": "97a94f212d073f85e31e223bb2490595bce12bd5b1c637299d13c18a388a1931"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.add_visible_links.if_show_urls_no__EpubBuilder.add_visible_links.for_node_in_list_tree_fin.if_uri_startswith_http_.if_show_urls_inline_.elif_show_urls_footno.fn_idx_1": {"doc_hash": "a3427de487a00855e2b6f57c7050499f965ee57f74e3d96d2b5e3c3e1484dafb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_mimetype_EpubBuilder.build_container.copy_asset_file_path_join": {"doc_hash": "cf1fb2c069bb3042a8018baae4d515e250f0880c620feb2450884e15eb93522f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py__Changelog_builder__logger.logging_getLogger___name_": {"doc_hash": "751c9f999d671ffaa22a6c8d11ac29c1aef723f218741658da07a143c5522115"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/dirhtml.py__Directory_HTML_builder_": {"doc_hash": "e6cb1bb7af5476a2bc18ca001b017d8281b4d05d4931af0e9160eb135f1128ca"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/dummy.py__Do_syntax_checks_but__": {"doc_hash": "d25bbef8d2075297cb91e0450fea20ee900d8687f985bdbf9fae8f26112af7f4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py__Build_epub3_files__HTML_TAG._": {"doc_hash": "b182740783d504776af45b2ca377a4a32bd890994532f0bc9a4315878fe0bf0e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder_Epub3Builder.handle_finish.self_build_epub_": {"doc_hash": "c6a86b6835ae7d867c7c852717bde2f7adfe6cd7507f0658d2a0b642611e3ce5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder.navigation_doc_metadata_Epub3Builder.build_navigation_doc.if_nav_xhtml_not_in_sel.self_files_append_nav_xh": {"doc_hash": "09d54bb5edf508e6677d16d333e0b569e257eb2ac895e01858603029b5f0957a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py__The_MessageCatalogBuil_Message.__init__.self.uuids.uuids": {"doc_hash": "7e4667064fcb0db890cd1244283fa076c7120f99d15fb3fb1f1843f5d8acf020"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_I18nBuilder.write_doc_I18nBuilder.write_doc.if_index_in_self_env_co.for_node_entries_in_trav.for_typ_msg__tid__main.for_m_in_split_index_msg_.catalog_add_m_node_": {"doc_hash": "7e8571be350d1397ca9e82a52bbc96e53a7e10a9c1b6bc02d72b17ab15539b2f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py__Several_HTML_builders__return_codes_re.re_compile_r_n_": {"doc_hash": "9b82befe459448d3aeb08aa4e1999755231ac365ab61c72fdb655c04dd016ca5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_get_stable_hash_convert_locale_to_language_tag.if_locale_.else_.return.None": {"doc_hash": "22aa7f7319289c52b103e9b768a0416303ead89acb685ecefc7567ee1f311c09"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder_StandaloneHTMLBuilder.__init__.self.script_files._": {"doc_hash": "1d446b102f8dc9e447ace05774ea3d1739cc55f0e9fadf3bb0754999782b07d9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.create_build_info_StandaloneHTMLBuilder._get_translations_js.return.None": {"doc_hash": "15908062964235a1e46602faa93446a60349c26410df18a39187fcece36c936f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder._get_style_filename_StandaloneHTMLBuilder.init_templates.self_templates_init_self_": {"doc_hash": "b02590d1415df6d10c029695675b937ab9136ed731b40c52bf86d9e53542109f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_css_files_StandaloneHTMLBuilder.add_css_file.self_css_files_append_Sty": {"doc_hash": "d8db40bad18bce17dfc0c4fc85ffa89f4fae71e981c38caf6bb44b8574575061"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_js_files_StandaloneHTMLBuilder.init_js_files.if_self__get_translations.self_add_js_file_transla": {"doc_hash": "03c84da46cfcea22dcc8af9d4235c85d08ac9c47cdfc0edb20546712c81816da"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.add_js_file_StandaloneHTMLBuilder.math_renderer_name.if_name_is_not_None_.else_.if_len_renderers_1_.else_.return.None": {"doc_hash": "0c4dd930cd68d7f6e5134bf5f36d05361846c390d3f58b75d4d1c32166630d15"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.prepare_writing_StandaloneHTMLBuilder.prepare_writing.self._css_files.list_self_css_files_": {"doc_hash": "093e45358bf9e5dfd8db9275271383cd09ee21b35cddd688a274ee6e735ed23c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.create_pygments_style_file_StandaloneHTMLBuilder.copy_translation_js.if_jsfile_.copyfile_jsfile_path_joi": {"doc_hash": "c32dca0daa0853784f4852b5b034b0d6199e94932d2190c0e1974887a840be8d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_stemmer_js_StandaloneHTMLBuilder.copy_stemmer_js.if_self_indexer_is_not_No.if_hasattr_self_indexer_.else_.if_jsfile_.copyfile_jsfile_path_joi": {"doc_hash": "526953e13f1b0745b74a23ec1336310633fdff6a6628f16868641c81f31131f9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.post_process_images_StandaloneHTMLBuilder.post_process_images.if_self_config_html_scale.for_node_in_doctree_finda.reference_append_node_": {"doc_hash": "9c5a8161249b880ceb7b5e5bd10622948a65e4fc6d24855f5b18eb9e646324e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.index_page_StandaloneHTMLBuilder.index_page.if_self_indexer_is_not_No.if_nosearch_in_metadata.else_.self_indexer_feed_pagenam": {"doc_hash": "9e4f243e7f64db6cda5418202c97c1f0f21d9ff34cd748db9a42da97862b41bc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.handle_page.None_3_StandaloneHTMLBuilder.dump_inventory.InventoryFile_dump_path_j": {"doc_hash": "b17b69f9d9965a1d961ecbd398ae4fed7545d693f23fd81eda8062c9fed28d22"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup_css_tag_helper_setup_css_tag_helper.context_css_tag_css_": {"doc_hash": "06d29c96f2d125a3f2a477d8ae1001cf2ea5b9750f835eb4a51d2dd7ff3f076a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup_resource_paths_setup_resource_paths.if_logo_and_not_isurl_log.else_.context_logo_url_log": {"doc_hash": "3bd4c42d917e57344c1d0919a0c5e556beb488536a6f479cab881ae5cd905964"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_validate_html_logo_UNSET._stable_repr_object_": {"doc_hash": "96f04545c826f4f48a1b40fbdd72b943c13807a250f7b6a9aab3630beb9a1f1a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_None_6_setup.app_connect_config_inite": {"doc_hash": "a0c0919395ace6cfb0e977a697dd759082eb3a16cdaa3c20c3f0d8287455158d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup.None_46_": {"doc_hash": "a4c446f5799fae567b46b66d125354ff9c9a07ae03ecd5637441a8a1ff1f64f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/transforms.py__Transforms_for_HTML_bu_KeyboardTransform.multiwords_keys._caps_lock_": {"doc_hash": "ec60f6de6b8a68426ac7444802edbeda3b65f365eee7791400e88a1bbde4b8c8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py__LaTeX_builder___isort_skip": {"doc_hash": "d68742210e1ee3c429c2f68ab268242474183830c22ad229ca9788c76dbc2142"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.update_context_LaTeXBuilder.init_babel.if_not_self_babel_is_supp.logger_warning____no_Bab": {"doc_hash": "4b0c3668bc202650734319effc66871b15e5c03576361c421023933dd743d62a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.finish_LaTeXBuilder.copy_support_files.if_os_name_nt_.copy_asset_file_path_join": {"doc_hash": "9209f08ff0ff9ff305dc06a5c83a5fdc92ffaca34ea855b9da78bbff3c3b3ca9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_validate_config_values_default_latex_documents.return._config_root_doc_": {"doc_hash": "69afb9f43874c3f37d180f02632d6ee0dbb8fa13f7bd405bb1e03905c4c753fb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/constants.py__consntants_for_LaTeX_b_LUALATEX_DEFAULT_FONTPKG.XELATEX_DEFAULT_FONTPKG": {"doc_hash": "0b4504f7577a129499610164a5c5dbe9ba0a973dcc113434d1b0655c3d3aeaad"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/constants.py_DEFAULT_SETTINGS_DEFAULT_SETTINGS._": {"doc_hash": "9ebc33b69a630b99156d00894a57d43bed0d7ec6d53e0966cf53524dd20cfaff"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/nodes.py__Additional_nodes_for_L_": {"doc_hash": "a8e24c72079f2308a03f1f1186c2cc41c66109323c24effeed5bb664cbff467b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py__Theming_support_for_La_Theme.update.for_key_in_self_UPDATABLE.if_key_in_config_latex_th.setattr_self_key_value_": {"doc_hash": "f433bf5d18dbb976d8fbc785c6c469384c7bda827f78c41bfa806cf12715fae4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py__Transforms_for_LaTeX_b_SubstitutionDefinitionsRemover.run.for_node_in_list_self_doc.node_parent_remove_node_": {"doc_hash": "9802ee96edb2dc342715881435d8a7a26768f873f44c2e8318ea446ef4fa1291"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform.expand_show_urls_ShowUrlsTransform.expand_show_urls.for_node_in_list_self_doc.if_uri_startswith_URI_SCH.if_node_astext_uri_.if_show_urls_footnote.else_all_other_true_v.node_parent_insert_index_": {"doc_hash": "fd478336192ff377b4e074e628ac5d63e46d2d065b3dab4b37ce40321bc04aa0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_IndexInSectionTitleTransform_IndexInSectionTitleTransform.run.for_node_in_list_self_doc.if_isinstance_node_parent.for_i_index_in_enumerate.node_parent_insert_i_1_": {"doc_hash": "f320c58fd329876ea1bf25dc517f9bf3c8313eac30bd598e78f37fa35f7f2247"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/util.py__Utilities_for_LaTeX_bu_ExtBabel.is_supported_language.return.self_supported": {"doc_hash": "6b5953ff31f4e8b2ea937f2de650cf2034aaa3790ee6475f5573541b1cd417b2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py__The_CheckExternalLinks_AnchorCheckParser.handle_starttag.for_key_value_in_attrs_.if_key_in_id_name_.break": {"doc_hash": "fc4283597cbd0b4e05a7d52cfafd3fbe80f7212815609734e28d11070f851bfe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_CheckExternalLinksBuilder_CheckExternalLinksBuilder.process_result.if_result_status_igno.else_.raise_ValueError_Unknown": {"doc_hash": "5c0cf670032540549fd66a01408c7faa574ab90b7a8ba38a97edc9fdc9e198e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_CheckExternalLinksBuilder.write_entry_CheckExternalLinksBuilder.finish.if_self_broken_hyperlinks.self.app.statuscode.1": {"doc_hash": "ef69b38457c0ac847da78b0d2cd8b2fea05ce45b55aa0da3e4ec0bfeb34d38a4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityChecker_HyperlinkAvailabilityChecker.shutdown_threads.for__worker_in_self_worke.self_wqueue_put_CheckRequ": {"doc_hash": "19f1e745d0b71f956c05aa861c98c6f697a534f2633fdad59e8dbed938117504"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityChecker.check_HyperlinkAvailabilityChecker.is_ignored_uri.return.any_pat_match_uri_for_pa": {"doc_hash": "c1154911aea456caabe645c663725d40c7802bda3178a0533f57722cefdae2cf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker_HyperlinkAvailabilityCheckWorker.__init__.super___init___daemon_T": {"doc_hash": "0af292b68d57ecf7134c9e8b8fce0a2be6e9de6b5ee18b5303cda642bcefd694"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run_HyperlinkAvailabilityCheckWorker.run.get_request_headers.return._": {"doc_hash": "0ada065f7b7f2a65c6e4a08869fee4c336bef6608d2f5a716dbe1948a31d8268"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run.check_uri_HyperlinkAvailabilityCheckWorker.run.check_uri.if_response_url_rstrip_.else_.if_allowed_redirect_req_u.else_.return._redirected_new_url_0": {"doc_hash": "8001d10e2d0d1c11b0f43784f06150790d2c08cd4a1ee4e74f9de8c29c1457fe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run.allowed_redirect_HyperlinkAvailabilityCheckWorker.run.check.return._status_info_code_": {"doc_hash": "6bf7d8ffd3de4a400beb907f1249aaff769db1b0713bdc6bbe70812cc3118942"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run.while_True__HyperlinkAvailabilityCheckWorker.run.while_True_.self_wqueue_task_done_": {"doc_hash": "fddf2695bcd310896eac982e7c8febd53e4270f838719e5b8ed53b0afcb3156a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.limit_rate_HyperlinkAvailabilityCheckWorker.limit_rate.return.next_check": {"doc_hash": "e6658b8794fc8781c874b19ddc96e9670c04af29be30425b95800b8698749d36"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_rewrite_github_anchor_rewrite_github_anchor.return.None": {"doc_hash": "915b2822358faa39b56f0bbdd9fb12b9fa72687ef2929b5e511e072bb7ad6aec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_compile_linkcheck_allowed_redirects_compile_linkcheck_allowed_redirects.for_url_pattern_in_list_.try_.finally_.app_config_linkcheck_allo": {"doc_hash": "05e90d9b86f51a16d263fc9ecce0c3af2c406374596cadbe2c58a191ef0a0643"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py__Manual_pages_builder__logger.logging_getLogger___name_": {"doc_hash": "3fbee1796952504d535c16d00356fd3ae431b5de26210dc612a58e9b25a4f4db"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py_ManualPageBuilder_ManualPageBuilder.get_target_uri.return._": {"doc_hash": "ce0d92c02c57800eab738127cc5d830e9ea2c44fcd44b99c24773752245e2b9f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py__Single_HTML_builders__logger.logging_getLogger___name_": {"doc_hash": "f038497cec9cf6d059ea53ff5cc4ec39deff4e4bd1350e3ad5515a3817c11658"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.fix_refuris_SingleFileHTMLBuilder.fix_refuris.for_refnode_in_tree_finda.None_2.refnode_refuri_fname": {"doc_hash": "b73861c6aa7c34cb365c3123645adb4c712ad8068cc1f21fb89d954dc8d45ce7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.assemble_toc_secnumbers_SingleFileHTMLBuilder.assemble_toc_secnumbers.return._self_config_root_doc_ne": {"doc_hash": "59cc30e3b22dd7c9a713e9574442f946dd5caaa8518600cf85c428747b351420"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.assemble_toc_fignumbers_SingleFileHTMLBuilder.assemble_toc_fignumbers.return._self_config_root_doc_ne": {"doc_hash": "4a2d804bfae3b42c4f739fbbc42ea46ea19f82efe5d11706e3fa97991bfb8907"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.finish_": {"doc_hash": "b83ebaa47f4a22d81ac65150ae663933dc6c0fe61b40dd2a063de9b26cadcd61"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py__Texinfo_builder__template_dir.os_path_join_package_dir_": {"doc_hash": "f6c2446af6ac802af5bf6047bac32c592dfbb46df1320c35ecc37d3456bfe818"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/text.py__Plain_text_Sphinx_buil_TextBuilder.get_outdated_docs.for_docname_in_self_env_f.None_1.except_OSError_.pass": {"doc_hash": "551b46f2a99182da5bbae4ea30d7581268bb6aa843f0de5eca8b04f5eef0ff9c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py__Docutils_native_XML_an_logger.logging_getLogger___name_": {"doc_hash": "f63dca1f733b1f4bde6d6b79272c411f0b6a7e4930d75caf83beba5262a7b5ea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py__Build_documentation_fr_from_sphinx_util_osutil_i": {"doc_hash": "06861fc4c4a6f688a0b8455b249f5c6220b0df8bc3055b6ca5a96818dd0e42ac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py__sphinx_build_M_comman_BUILDERS._": {"doc_hash": "daa304a42d27801eac2d29ddd233098a77f149243de30d78fba569cca029533e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py__Quickly_setup_document_choice.return.val": {"doc_hash": "dd4766ae9fce8bc15a863de4c9ef5b6377a53f89dc9cd0723b5fb14501030367"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_QuickstartRenderer_QuickstartRenderer.render.if_self__has_custom_templ.else_.return.super_render_template_n": {"doc_hash": "511c4aefff809de17863f322e2d558af92ed7c7361acf19b9285fed7ffefd34e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_generate_generate.if_d_get_make_mode_is_.else_.batchfile_template._quickstart_make_bat_t_": {"doc_hash": "f6727858d9bf1a47f5612a15f36bfc65f4ce72f9892907835b654f19dedbc071"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_generate.if_d_makefile_is_True__generate.None_12": {"doc_hash": "1e204bfccccb2710b0bc9404d56cbab3c78bb1ebb86ac52fb5ca0728bf55ed30"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py__Build_configuration_fi_is_serializable.return.True": {"doc_hash": "3321b4a97a930fdbe437f9ef7c40b7f400335afcbfcbfae76ede534f2181ef23"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_ENUM_ENUM.match.if_isinstance_value_lis.else_.return.value_in_self_candidates": {"doc_hash": "3f49d38da5f0e80a3822ad9b9efdfcfdb8d8a6cb87b6c9f88f75e5263802621f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config_Config._quickstart_py_file_temp": {"doc_hash": "7c06fe982c735b083347502bfbc0cac4df297050565ee13e21adf5676f1f7eb9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.config_values_Config.config_values._": {"doc_hash": "edd8f4aa3a08a27d8903320bc9447ae05a26fbaeb45c3269eee42a9c261c3306"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.post_init_values_Config.filter.return._value_for_value_in_self_": {"doc_hash": "dc3f2b639b520e2c68cd94f360beb3f09dbfdf67b5699d2d571fa19a07db3499"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_convert_highlight_options_convert_highlight_options.if_options_and_not_all_is._type_ignore": {"doc_hash": "6e5750600f3f9f03e04c8392cd638120c1f19d3fcd6ce68b99afd6664b077fac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_init_numfig_format_correct_copyright_year.if_getenv_SOURCE_DATE_EP.for_k_in_copyright_e.if_k_in_config_.config_k_copyright_yea": {"doc_hash": "8abd986e67fb37546146c6f6dcde53a53316319869df32f172c1e51522c3370a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_check_primary_domain_check_root_doc.return.changed": {"doc_hash": "5b2d65f5f484467348f94476c31a9a2718c5a4f8a8d20c35b78655084cccdf3c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/deprecation.py__Sphinx_deprecation_cla_deprecated_alias.sys_modules_modname__M": {"doc_hash": "0341472a4089fc0ea78eaa263de55190d0f630e4428745827e7c5d92370181f5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py__Handlers_for_additiona_optional_int.if_argument_is_None_.else_.return.value": {"doc_hash": "4662ee6ee37961a3048f62f0dd0c579d41a3eddf7f82bad4d524e0df65db8330"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription_ObjectDescription._doc_field_type_map._": {"doc_hash": "540306a879bd49b313c0466fb34bad6e9680e438060022cd8f4862476cf51de0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_dedent_lines_dedent_lines.return.new_lines": {"doc_hash": "331e1dfa9d1ade6764fe591f7fe536a01c71a8d747f1a24f832ad9eae2e70a04"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Include_Include.run.return.super_run_": {"doc_hash": "aa50041ed9b4b54f3f1771d71a07a5b74a5c690a90c423981e4a06a46912d951"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_os_logger.logging_getLogger___name_": {"doc_hash": "8c069b7f2cdf6a053ccf67341cfb89db731280a6b925476dc444f87f98f2c339"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_RSTTable_RSTTable.make_title.return.title_message": {"doc_hash": "54072ba72ca79a262436f4f8fb4ab8eb00448c0ca503e29fa66faf4571399c16"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_CSVTable_CSVTable.run.return.super_run_": {"doc_hash": "83c85d9c18f96d3f225cf5001a322357aef50ac8dc22ca761078059496b43378"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_ListTable_ListTable.make_title.return.title_message": {"doc_hash": "2a48d396ac9475e8571f0182f9357802a8276eb72cce6086e38f1646876958b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_MathDirective.add_target_": {"doc_hash": "5ee8996c0372f14ac9b30640c877f118a115c4ec2dcd939f0fd3afea173c28b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py__Support_for_domains__if_TYPE_CHECKING_.from_sphinx_environment_i": {"doc_hash": "112780508d27eba1554383828d2abacd2d5712c1a5868fae1ff5f8868c1b456c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_ObjType_IndexEntry.descr": {"doc_hash": "cb4ae14b9afd992fd3a4271d64650e9ee1bb96ffebf84171006b4747dfc0e7af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__The_C_language_domain___expression_unary_ops._": {"doc_hash": "d57498afb40b45fa7fbe215b7acf841152f7305a2f9dd89ff45ec3ca2010a8e0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__expression_assignment_ops_ASTBase.describe_signature.raise_NotImplementedError": {"doc_hash": "52b27565d7f6449c356781e7ad4bceb1e9e4f6a1862feb0db5d63af13f19e5a5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_None_10_ASTNumberLiteral.describe_signature.signode_addnodes_desc_": {"doc_hash": "0b9cb8f87801bd39dc3bab736c4e2625c119b4acb4d735673d06923e031cc831"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTCharLiteral_ASTCharLiteral.describe_signature.signode_addnodes_desc_": {"doc_hash": "9706634c2ccb3263dfc4d9e16b955a33703c1e9e8ae8dadc251279f2138c2189"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTParenExpr_ASTParenExpr.describe_signature.None_1": {"doc_hash": "712a9b0e7da540027c1890d6369aa2ccd0fdd0c7c728ed3bb9335a5b1ed1459e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixArray_ASTPostfixArray.describe_signature.None_1": {"doc_hash": "1b4f99db70cdc17002a12bb024c1c2f8de9dcd45a7996d4eeb1126d0e1ba0423"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixInc_ASTPostfixDec.describe_signature.signode_addnodes_desc_": {"doc_hash": "d68d99a6ea058a2af66384eb23b3803c0f063de5097a4434848adf8eb71c4cb7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTFallbackExpr_ASTTrailingTypeSpec.pass": {"doc_hash": "c904a024dc63f2d07668b7147e1740b38c2d0776880274980f074c18878f894c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTTrailingTypeSpecFundamental_ASTTrailingTypeSpecFundamental.describe_signature.for_n_in_self_names_.signode_addnodes_desc_": {"doc_hash": "192e6fdce3a8f60eeeb3d00386a3ae038c3ea80ba1db6f92261699daf6badc2f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Initializer_ASTParenExprList.describe_signature.None_1": {"doc_hash": "89e56862bd78e3eee5b395e4f5b7c7845bbdb4c7fda9d891c602b7fc0aab21f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTBracedInitList_ASTBracedInitList.describe_signature.None_1": {"doc_hash": "0a9e51e3cd905f0f11e20e29850d0d049ac73219e603cd0fa60ee734111a76f5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaration.describe_signature_ASTDeclaration.describe_signature.if_self_semicolon_.mainDeclNode_addnodes_": {"doc_hash": "55801019ab1b7fe067638ad893208d7b4aef6fb3dd7efd72229a78e2563062ab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_simple_type_specifier_DefinitionParser._parse_simple_type_specifiers.return.ASTTrailingTypeSpecFundam": {"doc_hash": "070e547986f77b3d734154a6189c5fed4c681b9c40d5c4698af60e72a07dfc36"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser.parse_namespace_object__make_phony_error_name.return.ASTNestedName_ASTIdentif": {"doc_hash": "2ebef565435db03debeebda70660574f1dfabe391164ef807dd82523d728d773"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject_CObject._add_enumerator_to_parent.Symbol_parent_targetSymbo": {"doc_hash": "67eed78aebd50bb1aef02534ed7e0ebfe04d4cb57effc81f63bd06aa2f10f8af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain_CDomain.initial_data._": {"doc_hash": "29fb26b585f4b03523d89786f1d5de2a0239cb6abe261d47950a72aa0c508b36"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/changeset.py__The_changeset_domain__ChangeSet.content": {"doc_hash": "9a3afa97f5b1c5e861fd6b2feb57007d4288dd313516d7d4d2041ba939e88bac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py__The_citation_domain__logger.logging_getLogger___name_": {"doc_hash": "9917959d70163605a7e5069ba9f9d576e0065b85216c312d9c3e14a9f9f62bbb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__The_C_language_domai_udl_identifier_re.re_compile_r_x_": {"doc_hash": "ddee60e0994367dc807f00cb9cd889591c019ff8315f1a2bbe1e19c62c17f183"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTNestedName.get_id_ASTThisLiteral.describe_signature.signode_addnodes_desc_": {"doc_hash": "bddb5bd043844325dab7b838ef58e7064d1aaf0215fff0dca968b8f8dc7b4139"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTFoldExpr_ASTFoldExpr.get_id.return._join_res_": {"doc_hash": "df3a23312226447bb4c2acc1accaaf36f894713335b9e15e2e61603000c8d145"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTFoldExpr.describe_signature_ASTTypeId.describe_signature.None_2": {"doc_hash": "0f3ecef5aef421d676dc02cac39686c0484610c91a908fbefbf4d7a803ef3c2d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__Unary_expressions_ASTBinOpExpr.get_id.return._join_res_": {"doc_hash": "48d1ff6b5b30429f8264e0315e19db5d01a1ea9c4a8f81f14a990cc61fcbe35e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTBinOpExpr.describe_signature_ASTOperatorLiteral._describe_identifier.self_identifier_describe_": {"doc_hash": "bc9b09ac12210dfeea25289c081afb458135478c7a854798196cda8aa60808e6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTOperatorType_ASTFunctionParameter.describe_signature.if_self_ellipsis_.else_.self_arg_describe_signatu": {"doc_hash": "cd7e4740e1f416b8c2e33740ef90f0197f57bfe04222e129f44f4f5eaae9a775"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTNoexceptSpec_ASTParametersQualifiers._stringify.return._join_res_": {"doc_hash": "6808fe46d54f30978b5496c9e309ef3f216e1437d5dbed4936f9f75080e530bb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTParametersQualifiers.describe_signature_ASTDeclSpecs.describe_signature.if_self_trailingTypeSpec_.if_len_str_self_rightSpec.self_rightSpecs_describe_": {"doc_hash": "aea556658d660c6438ed71479e353d0525194c2cbcf35380f88b2a440bdc0a74"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__Declarator_ASTDeclarator.describe_signature.raise_NotImplementedError": {"doc_hash": "cf4c3b037c1e0d3c41ee762f188952670506759ee2ef0259b6edad69a882f460"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaratorNameParamQual_ASTDeclaratorPtr.describe_signature.self_next_describe_signat": {"doc_hash": "ad5c03587571526d49045dc6f10acf02f1fd113440a10e793698a32cb330c3dc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaratorRef_ASTDeclaratorMemPtr.describe_signature.self_next_describe_signat": {"doc_hash": "0619405c9a9ea8e14e4e129f48ab2da918074b1d80680fe7ff40d3b16ab0faa6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaratorParen_ASTType.describe_signature.self_decl_describe_signat": {"doc_hash": "276e23c972c6c0bc5f8ff2d10549aa4234cda0ae37a4de438313ed142280fa0c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTTemplateParamConstrainedTypeWithInit_ASTEnum._stringify.return._join_res_": {"doc_hash": "bcbcb88e65ff7128e7f5c26678730bbeaa7f5cae80664a7286f71bd42ce06bb9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTEnum.describe_signature_ASTTemplateParams.describe_signature.None_2": {"doc_hash": "c379a98716bda6108925ce277213f94e19a733bc6affa3bac3179c504a17ea8e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTTemplateParams.describe_signature_as_introducer_ASTTemplateIntroductionParameter.describe_signature.self_identifier_describe_": {"doc_hash": "a2b0d46a4b2f62c4f0d4d469dfff2966ebaae53a12ce4d1c9fbe0746fa6e673e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTTemplateIntroduction_ASTDeclaration._stringify.return._join_res_": {"doc_hash": "91787266e32ce434543d2b321e90137f69a0b3872fc0297495ca5146bc0765cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_template_argument_list_DefinitionParser._parse_trailing_type_spec.return.ASTTrailingTypeSpecName_p": {"doc_hash": "98129e00e7012ec832549339d674cec0c066e620f714588763a78dee08cfb986"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_parameters_and_qualifiers_DefinitionParser._parse_declarator_name_suffix.return.ASTDeclaratorNameParamQua": {"doc_hash": "731129c555bb612b45545488a6113a1b546f06459fee5a67c9fc6a529df1a286"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_type_with_init_DefinitionParser._parse_requires_clause.parse_and_expr.if_len_andExprs_1_.else_.return.ASTBinOpExpr_andExprs_op": {"doc_hash": "fd326d5adc231b2b0dc1af6b0c37228d2aef00073f09582abd0b3635a7a2efdb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_requires_clause.orExprs_DefinitionParser._check_template_consistency.return.templatePrefix": {"doc_hash": "ee16cc6313a17742fa540df60c249292d630b81db6e59b681279100dbf78fe55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPObject.handle_signature_AliasTransform._render_symbol.return.nodes": {"doc_hash": "931d61d2664a6c26750304493a1e661c376e190dbe575c9d4bb96f2af1be64b0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_AliasTransform.apply_CPPExprRole.run.return._signode_": {"doc_hash": "34e664ab146475e03967d8fc094d931cd0ec62ae2b9ec3462b42ac5e71db8cab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py__The_index_domain__logger.logging_getLogger___name_": {"doc_hash": "2985242996581bb17dec1b43c6e5c3a3dcde7333f333070a57af9f9c48193bdc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexDomain.process_doc_IndexDomain.process_doc.for_node_in_list_document.try_.else_.for_entry_in_node_entrie.entries_append_entry_": {"doc_hash": "007b6114ccad211732a122aaa275741284a46a6aced0646bb873acc9cec53152"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py__The_JavaScript_domain__logger.logging_getLogger___name_": {"doc_hash": "8298f8f6f34b92f291c643455a7664999c2a5f60e8f1bc3beac49ba9404d944c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject_JSObject.get_display_prefix.return._": {"doc_hash": "1f129c9a4856c161b6b1fb552f9e85cfacf9319619686942bd4de918f0932052"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSCallable_JSConstructor.get_display_prefix.return._addnodes_desc_sig_keywor": {"doc_hash": "5363666e285ec6aca3f2ab32fc2cbc013cdbbe4fa0104b3ac0bc0b0822e5afb0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py__The_math_domain__MathReferenceRole.result_nodes.return._node_": {"doc_hash": "5135a7314fb01082c3fd5b620b1a0406ed6b5e1a257e76e62e7f7d197b3780c1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py_MathDomain.resolve_any_xref_": {"doc_hash": "1f04269e932aa80d95780711ba84d863bb3ab4aeeb1e4c9a25ef84a370c15fa3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__The_Python_domain__ModuleEntry.deprecated": {"doc_hash": "0e2550a875adc855cc9853a25d5fc10662ecd508c002f2f77da22b084bd3985e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_parse_reftarget_parse_reftarget.return.reftype_reftarget_title": {"doc_hash": "b7777bd45c99f0447187c07ac943daa698a69c11245642c87d559a0d83807a20"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_type_to_xref_type_to_xref.return.pending_xref_contnod": {"doc_hash": "09f02d44fe26114facc85b21e73cf3832d0cbd0a2a8962ca41a6c9ef4d0929a3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__parse_annotation__parse_annotation.unparse.if_isinstance_node_ast_A.else_._unsupported_syntax": {"doc_hash": "be945c4af7d7a0e5dd7b6fcd1ef67cd280e658677237e4d2c7757a46a7e15e70"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__parse_annotation.try___parse_annotation.try_.except_SyntaxError_.return._type_to_xref_annotation_": {"doc_hash": "21af1fd67cac76a688f2659f538adf40ad4b92ee15180ad0876c264469160737"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyXrefMixin.make_xrefs_PyTypedField.pass": {"doc_hash": "0a98a172ae45e792c1ebca512ceed18c1f98580c41ca100b54cff8af44903aec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyMethod_PyMethod.get_signature_prefix.return.prefix": {"doc_hash": "b34ff65ac955df3ceba9071ac9f6acd8e34443d1b08134aa2608feac05ed0161"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyProperty_PyProperty.get_signature_prefix.return.prefix": {"doc_hash": "f0843795e4bde66b2364df65eb02af2804ca2b6ec66a967ec7ce75857f6b4fd3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyProperty.get_index_text_PyProperty.get_index_text.return.__s_s_property_": {"doc_hash": "d0e225545b18ef45dc029423e1b1a2abc13bef8b2b107cdb0032a8be2ce6ab49"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_builtin_resolver_builtin_resolver.return.None": {"doc_hash": "57dec886b667edcf1f0f4d388bb2aa5fc64d1f5836e5b9a9d0acaca0f4870237"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_setup_": {"doc_hash": "b5688c53948f31ea27c47536525ff329ce79e39037e7838a262519c98296073c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py__The_reStructuredText_d_dir_sig_re.re_compile_r_": {"doc_hash": "8fb42513c3ae47a126411050543c32180686f262a924e9a1be49d47540d24755"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py__The_standard_domain__token_re.re_compile_r_w_": {"doc_hash": "af1e7e04f9ae09c08b8eff4ee5795159ee4d2d92f1b2b5ad573133e3118b7a4e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain_StandardDomain.enumerable_nodes._": {"doc_hash": "daa4ff4280b31d4f8555dcdf5b10b82980bf3373d136048b120ec87ba85e5ee1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._terms_StandardDomain.anonlabels._labelname_docname_l": {"doc_hash": "37ffe47be4ba4e073b6b4d52035b213df33c10a2f79e0ecdde8927cf21248890"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_fignumber_StandardDomain.get_full_qualified_name.if_node_get_reftype_.else_.return.None": {"doc_hash": "d00b4184be43b1ffbdf22430fed2e26ba834f6531e2ab18ab8411b55416c3d1c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py__Global_creation_enviro_versioning_conditions._": {"doc_hash": "ec0620b4b800e00b6ab1aa7a37c5a5caebb228ed26365312efe0a857c94623b4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment_BuildEnvironment.__init__.if_app_.else_.warnings_warn_The_app_": {"doc_hash": "ffbedb8318e84ce996408da742bc27abff0410db3bc0eab09816367c35319416"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.path2doc_BuildEnvironment.doc2path.return.self_project_doc2path_doc": {"doc_hash": "5db597939706cd71a2c530b0d14883e90b606193b54f95824a513f2cb69fc4cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.check_consistency_": {"doc_hash": "f61f77cfd81f663c1c75f26a3d2a789c0e39ca2f53e8e916d273983f6ed3ce71"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/asset.py__": {"doc_hash": "30b5599b696c0de319355462adb99722fe471b857b4f19c8cc32498f98d179a0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py__Index_entries_adapters_IndexEntries.create_index.add_entry.if_subword_.elif_link_.try_.else_.entry_0_append_main_ur": {"doc_hash": "d7b7001618cdc1d84103cf5aa67c1ef851723d6fad1d2f038d509aa15c2fb35b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py__Toctree_adapter_for_sp_logger.logging_getLogger___name_": {"doc_hash": "6a7f1f3daa2b0c59cd39a28cb8bc84cb3fd677c0998a97078f4549c18a13f9f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree_TocTree.note.self_env_toctree_includes": {"doc_hash": "ec922450ffa80ee185f96ab85aed14e20e711f53f9c4f1bbfbe62b52b21aa7ba"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/__init__.py__The_data_collector_com_EnvironmentCollector.enable.self.listener_ids._": {"doc_hash": "7c1d8f7cc451bc2cb6fb572e04e90eb14f89ce4cce1f9d73f343cc60255eacce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py__The_image_collector_fo_logger.logging_getLogger___name_": {"doc_hash": "7963c52449def5e28d6ced520c81e297d8d0629cf03500d74830a10d55490018"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py_ImageCollector_ImageCollector.process_doc.for_node_in_doctree_finda.for_imgpath_in_candidates.app_env_images_add_file_d": {"doc_hash": "48c94013a37c700dcca6eccd3cfdde4c01129f2eb08c87d79492cd2d3b2a2b44"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/dependencies.py__The_dependencies_colle_": {"doc_hash": "b841f19e7ba14f6845607e397bfa298267d8a5ef66ecab686b6263b0d1128681"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/metadata.py__The_metadata_collector_": {"doc_hash": "dc7529ca69539827b718bc5856479f62716af8ffe174cc6f2d56b0d5c55bdbc2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/title.py__The_title_collector_co_TitleCollector.merge_other.for_docname_in_docnames_.env_longtitles_docname_": {"doc_hash": "5e05847a0afe11341cd7e0b75d2cb26f178d053e82ae0f7beec0623e8973cb2e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py__Toctree_collector_for__logger.logging_getLogger___name_": {"doc_hash": "ab02a6df818cb129ebe27df91f74d0a00e9bec36a553dec145fcd3fc44b871df"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/errors.py__Contains_SphinxError_a_ApplicationError.category._Application_error_": {"doc_hash": "6e7443025b4030b94e20e62b96dda4f65c896644e47369a1a92e190c9883c759"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/errors.py_ExtensionError_ExtensionError.__str__.return.parent_str": {"doc_hash": "e430ce89e9ce7bdb40ef6b145fdf914c1bfcb62316e41fb2170a3cc38abd5402"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/events.py__Sphinx_core_events__core_events._": {"doc_hash": "2c21663517bf4b58db2ea4228f35d9b494f15cbd6ce84d7aeff3e28f9cd7a4d8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py__Extension_to_create_au_members_set_option.return._x_strip_for_x_in_arg_s": {"doc_hash": "78e1de464d55982384a3052697932492f2877ab7b51a0a8ccb97583c313f423e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_exclude_members_option_bool_option.return.True": {"doc_hash": "0bc25db9fbf50667a37358b73542198f11331abe8384587f1f5675796ebee09f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DocstringSignatureMixin.get_doc_DocstringSignatureMixin.format_signature.if_self__signatures_.else_.return.sig": {"doc_hash": "b8131a2137844a62461950c5857db847a9d87b52b5f750a6df02c1c3cc183820"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter.merge_default_value_FunctionDocumenter.annotate_to_first_argument.if_params_0_annotation_i.else_.return.None": {"doc_hash": "373b8622c933f0300972c153c5a66a1339692565b687f24965aa407b51a17e16"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter._find_signature_ClassDocumenter._find_signature.return.result": {"doc_hash": "8eede4f091f46eec5da41a8a8b487ae84095868313d24ca8334aa296bc6cc7e1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_canonical_fullname_ClassDocumenter.get_canonical_fullname.if___modname___and___qual.else_.return.None": {"doc_hash": "0d19686d2bf8df55e95ce2b51a8ebd235f729d365810aa8b707eb76bad5a18be"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.add_directive_header_ClassDocumenter.add_directive_header.None_3.self_add_line___": {"doc_hash": "66c02ae39d41bcc624f922fb236b2a100c45c852cd71d67dadfdc982d2e4344f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_variable_comment_ClassDocumenter.add_content.super_add_content_more_": {"doc_hash": "2b9d01f0a0fd517bf30c55b79a589a6a0371763851ee108e915e5c45cfb81296"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.document_members_ClassDocumenter.generate.return.super_generate_more_con": {"doc_hash": "036d0efa1e611966f1667e87c255d0c63129135bd2004570613c879c68e926dc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ExceptionDocumenter_DataDocumenterMixinBase.update_content.pass": {"doc_hash": "bae5429e92ccfa7435c1e3b91ee4c559a5864dbf034883307d60e2338fd3d4f7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter_MethodDocumenter.import_object.return.ret": {"doc_hash": "7d232dcc110d86efaea73dadd2da4e770e2d3502e3d08fda75adbf15eddbacfe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.merge_default_value_MethodDocumenter.annotate_to_first_argument.if_params_1_annotation_i.else_.return.None": {"doc_hash": "5ad54e8a246a5e1b967f2a1824793c061bfb1859879c0cd4b8291a6cf2f9de2f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.get_doc_MethodDocumenter.get_doc.if_self_objpath_1__.else_.return.super_get_doc_": {"doc_hash": "8823a0e7090776dade13261723fadef313b75d25427606d9cf77fbade687464e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_SlotsMixin_SlotsMixin.should_suppress_value_header.if_self_object_is_SLOTSAT.else_.return.super_should_suppress_v": {"doc_hash": "d932eceee7e028339e4fc9a2b03310cad5608d05e3bc35aab37864bc5d35e1d8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_SlotsMixin.get_doc_SlotsMixin._datadescriptor.if_self_object_is_SLOTSAT.else_.return.False": {"doc_hash": "7ef1b987ade938b07e28bb47318e36dda236b522534fe4fca4df74d2b4896b65"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_RuntimeInstanceAttributeMixin.is_runtime_instance_attribute_not_commented_RuntimeInstanceAttributeMixin.is_runtime_instance_attribute_not_commented.return.None": {"doc_hash": "2e0251cd52980db81a5287b5d56c0ff472cf7d6cda5f0e243e56f50d0e432b4a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_RuntimeInstanceAttributeMixin.import_object_RuntimeInstanceAttributeMixin.get_doc.if_self_object_is_self_R.else_._type_ignore": {"doc_hash": "bd2f3bbdb7dfa6722a5df73f0d447082ee8a0535e3cf6dcf28a6cc73ce48947f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.update_annotations_AttributeDocumenter.update_annotations.try_.except_AttributeError_T.pass": {"doc_hash": "180dde2d909879123c63218501498b9cdc3fb0d6c2b1ff07cd06157fdb99ab88"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_PropertyDocumenter_PropertyDocumenter.can_document_member.if_isinstance_parent_Cla.else_.return.False": {"doc_hash": "ef3d024bce47d00fe53c5e49307b9a6d7db5c25684f634c3493e1c09a5c879b3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_PropertyDocumenter.import_object_PropertyDocumenter.get_real_modname.return.real_modname_or_self_modn": {"doc_hash": "c5d0ab9f6b4f6b6735cffb3cd983999afac8f64a025e9fd641f18b39c98a41a1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_PropertyDocumenter.add_directive_header_PropertyDocumenter.add_directive_header.if_func_and_self_config_a.try_.except_ValueError_.return.None": {"doc_hash": "0a3de1918c1887f56c3ea5c9f86bcf0376ada31498daac5655d05df068cda66e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py__The_deprecated_Documen_SingledispatchFunctionDocumenter.__init__.super___init___args_": {"doc_hash": "1dfea8e1ba1779c431d7cab3e85812335277237a33383570ecf88335c8f44b97"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py__Importer_utilities_for_mangle.return.name": {"doc_hash": "986a5a4c19f44578b13871a7369e1cfc7ffeab52a44469df355277483f86964e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_get_module_members_Attribute.value": {"doc_hash": "da31eb577b52ded28b5d44137f5036584a6611e58c28bdea40b3ece3fa670d3c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_get_class_members_": {"doc_hash": "427f6dfe7fb40966dbbbba61c8beb54e0c27b6fa1f621210155da762a5db50e9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py__mock_for_autodoc___MockObject.__repr__.return.self___display_name__": {"doc_hash": "7784486d79cb1c7a5da0f37c14a4d912b80afa35240600f14618fd1ee6564e06"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_MockFinder_MockFinder.invalidate_caches.for_modname_in_self_mocke.sys_modules_pop_modname_": {"doc_hash": "d3c6420b0793e25ac0303b48e0dcebd275cf50083da3761099e3f9e3dff258a1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_mock_ismockmodule.return.isinstance_subject__Mock": {"doc_hash": "e5de6bf81aff1907a7a87abb30acf137748143f9ee9606c49ef4fd0217b71bb0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/preserve_defaults.py__Preserve_function_defa_DefaultValue.__repr__.return.self_name": {"doc_hash": "891a8e848c82b0fc2aaa18ebe32ff2edde36a1b7d3269324c59a3fe3906d8122"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/preserve_defaults.py_get_function_def_get_default_value.try_.except_AttributeError_I.return.None": {"doc_hash": "cc5a450958d38c8487a9e104a01b6b6f2cd5b05303885fb702cc91cb31544249"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/preserve_defaults.py_update_defvalue_": {"doc_hash": "6782e868d20906eb5b3544f91ff9b09ee212b6631be3561007afa53783129b42"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py__Update_annotations_inf_not_suppressed.if_len_argtypes_0_.else_not_suppressed.return.True": {"doc_hash": "ec227d14b90cd5b0b80c94593b7b978bf5c8eeddb0dac22b8f128a4e0b2edaa0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py__Generating_content_for_record_typehints.try_.except_TypeError_ValueE.pass": {"doc_hash": "f7b3d5d9a8534619cf8dc83393e8d09354c4000303014b4c25ecc0a5a309cb72"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py_modify_field_list_modify_field_list.if_return_in_annotation.node_field": {"doc_hash": "5e0c323ba4b36744cebc622d1a7aef63e596b3615095e32c3e8b35756d65d59f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py_augment_descriptions_with_types_": {"doc_hash": "5ce846abae4d880bddd480c2cf8c010cbed45897c04531943d84ed462358e5b0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autosectionlabel.py__Allow_reference_sectio_get_node_depth.return.i": {"doc_hash": "f0279d6ca4fa629b952e468c022792c6e0de440a8488b47ac80935b5ff0c725b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py__Check_Python_modules_a_compile_regex_list.return.lst": {"doc_hash": "aa7b04212cfbca4e2bb48e68fd3aa16c6a73d5188c421997bac4e1e00f72b659"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__Mimic_doctest_in_Sphin_doctestopt_re.re_compile_r_s_doctest_": {"doc_hash": "05f54a5b4ac911299870172c2ab57caf4cfef5927058b4a0632049e8bfc63dee"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/duration.py__Measure_durations_of_S_DurationDomain.merge_domaindata.for_docname_duration_in_.if_docname_in_docnames_.self_reading_durations_do": {"doc_hash": "8141de0e33e0389ba8d0f44374f1cf1bd97d9ce7189dfbbeca30b01f09554cd1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py__Extension_to_save_typi_logger.logging_getLogger___name_": {"doc_hash": "2afb11b88b33d04113d196e458402062ef0ae63de7bb4f5939d03341bbbdde70"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_ExternalLinksChecker_ExternalLinksChecker.check_uri.for_alias_base_uri__ca.if_match_and_match_groupd.logger_warning_msg_uri_": {"doc_hash": "b9d8f0e22a04a5177b766caaa1fe9de8d47788305a9091f2b63e083bca12c158"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_make_link_role_make_link_role.if_caption_is_not_None_.try_.except_TypeError_ValueE.caption.caption_replace_": {"doc_hash": "c7cdd314d797330015e5b84b4ab25deeed52b297dfe3ff1d2b77dbbca04a66b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_make_link_role.role_make_link_role.return.role": {"doc_hash": "d2c3d579d8bee3c948422cb433e0ece41ccb5f801c332d7ccb24318b88e60631"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_setup_link_roles_": {"doc_hash": "00842b101cf9976383879fd240ede64869753148577783faa1e0e991fb5f81ab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/githubpages.py__To_publish_HTML_docs_a_": {"doc_hash": "c31631b0037e9ccbaca398988c8d2365ade39d564b9d14fe135a0b95c3408294"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/ifconfig.py__Provides_the_ifconfi_IfConfig.run.return._node_": {"doc_hash": "0e7d41cd66c5dbc6ced17aafbd09635ace1e9599d1eac6b234bf45cd7140da56"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgconverter.py__Image_converter_extens_ImagemagickConverter.is_available.try_.except_CalledProcessError.return.False": {"doc_hash": "c2a0e00758c8928ed9f9f6a9c4db2b60290ad2e8e62d4ce49d2ad92cb612dee3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py__Render_math_in_HTML_vi_write_svg_depth.with_open_filename_a_.f_write_n_DEPTH_s_": {"doc_hash": "00336006c25a498d85d7e33e8cac01fa0d93dea674c3a22c7fdc096da95444e2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_setup_": {"doc_hash": "5629b047c6c732809b370eb9622722cce721a2b467779c42102cd28a85b8ec3b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_r_Defines_a_docutils_di_py_builtins._obj_for_obj_in_vars_buil": {"doc_hash": "9d73b6327eb2d469cb1532f5e852b0baa8e0abdb7ded99cb653fbe8e2fc78437"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__Insert_links_to_object_logger.logging_getLogger___name_": {"doc_hash": "3a884793ff200134b35d415cb4b9560ea12b354e31ca871e535fb4b3c1b4a231"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__create_element_from_result__create_element_from_result.return.newnode": {"doc_hash": "e78b21edaac9a3f0269bf5fc1b789b3e2b82de5a7f43d8ea545acbe285ea5792"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__resolve_reference_in_domain_by_target__resolve_reference_in_domain_by_target.return.None": {"doc_hash": "7a810e17b0852c997d7abcee12dcef90c0a96c33b99d2f956dd05e1491f3cd9c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__resolve_reference_in_domain__resolve_reference_in_domain.return._resolve_reference_in_dom": {"doc_hash": "6860b8c19578e4478c2729ec801f0f96345d84eb69b55f48353ea36962f84acb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__resolve_reference__resolve_reference.if_typ_any_.else_.return._resolve_reference_in_dom": {"doc_hash": "284530f6f6a2a6dfdb122e1bc5e693fa1024706238b4999af28f2029d0e0f3b9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_inventory_exists_resolve_reference_any_inventory.return._resolve_reference_env_N": {"doc_hash": "b34cfeffbbf9c0b3cf4217bd9c6a99bb5a948532eb3144f11e5670016cbc3d7e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_resolve_reference_detect_inventory_resolve_reference_detect_inventory.return.res_inv": {"doc_hash": "79d730548decb66aeda8d78381bf4646114f0e17e077121f9a8b596a7ace3c55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_missing_reference_IntersphinxDispatcher.role.if_len_role_name_9_and.else_.return.super_role_role_name_l": {"doc_hash": "2b3c0e048bafb7dd4a4f62aa69d1977a6a493803519539466a4f6594f1637986"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole_IntersphinxRole.run.return.result_messages": {"doc_hash": "33559152e1fead43cd9c5b16b63dc2bc19e49263d4ca7cb2930d74eff77857bf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole.get_inventory_and_name_suffix_IntersphinxRole.get_inventory_and_name_suffix.return.inv_suffix": {"doc_hash": "ed41ecb2602b58735ee8f9a61526b23d7865e0e3f125fcb2c3ce7710ab08899e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole.get_role_name_IntersphinxRole.get_role_name.if_domain_and_self_is_exi.else_.return.None": {"doc_hash": "a1856480ad4382801c94219f9c50ae4cd5709ed5612184ea09d08deaeba9b09c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole.is_existent_role_IntersphinxRole.invoke_role.if_domain_.else_.return._": {"doc_hash": "92fa3896c697cd3a10e023092874096196f7a544f0382a1009e9c9fbf29e804b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRoleResolver_IntersphinxRoleResolver.run.for_node_in_self_document.if_newnode_is_None_.else_.node_replace_self_newnode": {"doc_hash": "85e39a71c45ee7baf3065649afe50dd5e9b5d5987a9ce30f60a331d17e552e55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_install_dispatcher_normalize_intersphinx_mapping.for_key_value_in_config_.try_.except_Exception_as_exc_.config_intersphinx_mappin": {"doc_hash": "25424ce10f2581a3cd7ef7947e2bb0255167afb47ffd1afaecde81214779b2bf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/linkcode.py__Add_external_links_to__": {"doc_hash": "9a3ffe9192007158a210e242ad863b947a2172edee59ed76c564e93422c0dbeb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py__Allow_MathJax___to_be_html_visit_math.raise_nodes_SkipNode": {"doc_hash": "66673b3b4b2faf3b2426aec898c496c6cc4ef2fe23dbf9e026a87ccfeb5b9340"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py_install_mathjax_install_mathjax.if_app_registry_html_asse.app_add_js_file_app_confi": {"doc_hash": "3a7965d5456f2fa7ebaa1c14629db1bc50f922c66a3fb5c411e1afeda433b5d8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__Support_for_NumPy_and__Config": {"doc_hash": "c4c16f868ee3be782bac2eff8000ca4e0e8ef5698d441624c33b503d17fc5634"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__Classes_for_docstring___convert_type_spec.return._type": {"doc_hash": "a9e9f78867c2fd5244de343d2dde1cef9de192b3f013d4f60a2ae6b6a3d1bca4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_keyword_arguments_section_GoogleDocstring._parse_parameters_section.if_self__config_napoleon_.else_.return.self__format_fields___Pa": {"doc_hash": "2964e3038ee8ab11fe2657782649ac3e2a9b40a03d0ee0d6ce9cfe4b9e746cdf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py__A_collection_of_helpfu_peek_iter.has_next.return.self_peek_self_senti": {"doc_hash": "d541a750fd14504c02c75a04d28ee274cd87d2a8fa22607311f5f6b1540211d5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py__Allow_todos_to_be_inse_todolist.pass": {"doc_hash": "f18873e95c445528095a0bbe5cb09c3ce1ce0d62fccf82b20f22ab44cabe2bea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_TodoDomain_TodoList.run.return._todolist_": {"doc_hash": "8c775f4c9be36c09d6f1c63ed25a78ed9d886e13d78d42382c158318dcbb7551"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_TodoListProcessor_TodoListProcessor.process.for_node_in_list_doctree_.node_replace_self_content": {"doc_hash": "ddb90414fafcc35071610c2ac60a7d52fd98073d65671c6a5b3beff4c3f54a72"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_TodoListProcessor.create_todo_reference_TodoListProcessor.resolve_reference.self_document_remove_todo": {"doc_hash": "def766b86c8390c76cf209952d169fe9ba8beeb093f19f6c0aa77ee9103e73df"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_visit_todo_node_latex_depart_todo_node.self_body_append_end_s": {"doc_hash": "af038361222f2f188399f520426c2cafcf43c42ceec1c0ed18b7702ebf95c1b1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py__Add_links_to_module_co_viewcode_anchor._Node_for_viewcode_anch": {"doc_hash": "8f591350d8ecc62a0a381710bdc94af73e3b987b0e1426330af6fa25e3e048f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_doctree_read.for_objnode_in_list_doctr_doctree_read.for_objnode_in_list_doctr.for_signode_in_objnode_.signode_viewcode_ancho": {"doc_hash": "320b7e2c15aee087d259bff1b51d616f9408e2010770bcfd92b83dd928bcbc39"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_env_merge_info_env_merge_info.for_modname_entry_in_oth.if_modname_not_in_env__vi.else_.if_env__viewcode_modules_.for_fullname_docname_in_.if_fullname_not_in_used_.used_fullname_docname": {"doc_hash": "9fec941c87c2d3158364f9e69e59943f02479513e545db0a9724cdd03e87e30b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_env_purge_doc_ViewcodeAnchorTransform.remove_viewcode_anchors.for_node_in_list_self_doc.node_parent_remove_node_": {"doc_hash": "62c43555acd7d94d9d462f7b620ef44431b94cce830f53495df32dfc11305696"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/extension.py__Utilities_for_Sphinx_e_Extension.__init__.self.parallel_write_safe.kwargs_pop_parallel_writ": {"doc_hash": "b252c67c25aa4b090b1aff3f98873b9ba9603f550dbba7f81a42bc31ecb06318"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py__Highlight_code_blocks__if_version_parse_pygments._LATEX_ADD_STYLES__LAT": {"doc_hash": "e12e6799d1ade25e939689ed426991a15bb3901e22ba12b8d1a6b7ed649e7661"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py__Input_Output_files__logger.logging_getLogger___name_": {"doc_hash": "93594a8adde0157df84785d2b8f0d24bc90830ed17af8a1f88f5cf107d4b4684"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py__Glue_code_for_the_jinj__toint.try_.except_ValueError_.return.0": {"doc_hash": "e2f1a6aaeff18fff9701457320d195ecfc5dac961f987a6a8b7138d21210cb63"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py__Locale_utilities___TranslationProxy.__repr__.try_.except_Exception_.return._s_broken_self___cl": {"doc_hash": "3b6f2f71094cf490d2bb67f4e847fae9e1a704b622fe85ef29c5fbc07f51129b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/parsers.py__A_Base_class_for_addit_if_TYPE_CHECKING_.from_sphinx_application_i": {"doc_hash": "66f5306c9a040ad460b91cddadd05a55aec28d6ba292844adfc223422e452646"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/project.py__Utility_function_and_c_Project.restore.self.docnames.other_docnames": {"doc_hash": "ba8cfca5dda7e3fa8f5537c49d6cedad882733c597180005c9fa75c569625e79"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py__Utilities_parsing_and__ModuleAnalyzer.get_module_source.return.filename_None": {"doc_hash": "43a0c92e4099f01d15fc9725dcb6e97c51239b21ebe5450703d57af5a8c62a57"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.analyze_": {"doc_hash": "6b40cff1e5fe2cdb3dcfdb4d0104ece2a99ab12bf46b3b931bb92e743d80caea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__Helpers_for_AST_Abstr_OPERATORS._": {"doc_hash": "7a8b60227b38ca6b55d09b9b33bf14cf785538209ddbcf588d3b460126516af1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py_parse_unparse_3.return._UnparseVisitor_code_vis": {"doc_hash": "2448249112e6d71a96e29b086fa58c13ead4fdaf4ac2d8718e43ab90e3203cbd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py__Utilities_parsing_and__get_assign_targets.if_isinstance_node_ast_A.else_._type_ignore": {"doc_hash": "30fe43073fa4d9c2f3ecfefac48585c36beb72691b0107d190a43bb5c244dddc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker_VariableCommentPicker.is_overload.return.False": {"doc_hash": "4810e85ca4e77b8102940aa276bea15c8cffa58b078e80cb394ddb24de9f1bc6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.get_self_VariableCommentPicker.visit_ImportFrom.for_name_in_node_names_.if_node_module_typing.elif_node_module_typi.self.typing_overload.name_asname_or_name_name": {"doc_hash": "4e250d9bfd701a1b7d1704ae4b16349c1c9d3ee5ffc85b584f26caab68f2b9b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pygments_styles.py__Sphinx_theme_specific__SphinxStyle.styles_update_": {"doc_hash": "5d6b8770120876d424649ca779436ad617c528fa32425b95287ff7fad867f764"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py__Sphinx_component_regis_EXTENSION_BLACKLIST._": {"doc_hash": "de58772065901722fe2f6b3ac0527a58f5ae9ab73108e384120a91c24a4e5d9b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry_SphinxComponentRegistry.__init__.self.transforms._": {"doc_hash": "d12b2a38573c8f88879b3cf636042a7ff8c0664eb004afb17294cc0d36ba34dc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_html_math_renderer_SphinxComponentRegistry.add_html_theme.self_html_themes_name_": {"doc_hash": "aac56229b6e797fa199bda59d4cd6452bab34c4b2c1335391b0331c1de23abbe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__Handlers_for_additiona_generic_docroles._": {"doc_hash": "05db8af7ece6c7e4e6301f9bcadf0fad495e0d6545200c58a47c7af62bf25e9d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__generic_cross_refere_XRefRole.update_title_and_target.return.title_target": {"doc_hash": "649a352a63ba57bcf4c825826fda1befcd8dce06bf56f093e71033ff9fe66655"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole.run_XRefRole.create_non_xref_node.return.self_result_nodes_self_in": {"doc_hash": "7fda65fe16e9a3a3dc3cab9464bbe4e7ee086eb5a233392650ff3594c495c839"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_PEP_PEP.build_uri.if_len_ret_2_.else_.return.base_url_pep_04d_": {"doc_hash": "1413a939ad2cb499108489988fd97edf1ca1ba2abf36221a9256c1124c0277ef"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__amp_re_parens_re.re_compile_r_": {"doc_hash": "705aca855d099a3524e213081c51d0270b435e282f93a826d52c606bdd219975"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__abbr_re_specific_docroles._": {"doc_hash": "e01a907db16bacc04b309a69c1f119dc70bb2c20d629ce0f286fffdd5302c1fb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_setup_": {"doc_hash": "6577d1ae6bfab6c8b8e2eaf6e6dc548eb538bdd8f3cd9d1aeef642b6c4c3edd5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py__Create_a_full_text_sea_SearchLanguage.word_filter.return._": {"doc_hash": "92e5998afc76ed0780b62e46c3c0feb1628e6061002f47afe763a1630bfdbe56"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py__JavaScriptIndex__JavaScriptIndex.load.return.self_loads_f_read_": {"doc_hash": "67add00c6da4e4a37158ba0686c91be371e32b4ac9c18203f56278cb745aa083"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_js_index_WordCollector.is_meta_keywords.return.False": {"doc_hash": "095f9e78b3380fd89f63434864e8846411c81ff94ece9dd3d2d6a6a35608d9b9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_WordCollector.dispatch_visit_WordCollector.dispatch_visit.if_isinstance_node_nodes.elif_isinstance_node_Ele.self_found_words_extend_k": {"doc_hash": "9775cd0c4290354dec0f853cfe5ed45575094f3d0d5fc2f696968b0a1256e6c8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder_IndexBuilder.__init__.self.js_splitter_code._": {"doc_hash": "7c6a1bd1453a7d594ac27a44152f44f4d76494b5c817c4f869cb828f227dea89"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.context_for_searchtool_IndexBuilder.context_for_searchtool.return._": {"doc_hash": "c070f51531b55f47ba48585dbfbd6a048443caeafcf792223610bd8c9a92d97c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_js_stemmer_rawcodes_IndexBuilder.get_js_stemmer_rawcode.return.None": {"doc_hash": "78d9999127f29fe7db8fbb3ce0dfaba1807c5ba87e7435563ca01b16aacd111c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_js_stemmer_code_": {"doc_hash": "b00be592efa8c96d5c2c621f155d5fa570ef2a6ef795e0ae9b536890123ddc2c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/da.py__Danish_search_language_": {"doc_hash": "cc77404dff7442fef0a975ca2c2085d00d250faeb6d2360f4fc4cc0cf7f483af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/de.py__German_search_language_": {"doc_hash": "152c04e632c18a0fe72a5913bcafffe057260ba24935265483e7af48585b1eab"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/en.py__English_search_languag_english_stopwords.set_": {"doc_hash": "7ce7f67b589ab260ebf147fb694503103beba6858f5c86863825945c956041c5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/en.py_js_porter_stemmer_": {"doc_hash": "06fa668353f2932d314dc9844dc9bae3dd62435487ac8e37a697ba5dc0862f36"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/es.py__Spanish_search_languag_": {"doc_hash": "7ebd0fcd0167ba3b6058d672d32086636445b2978a6691569c5d9ab6c68eda41"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/fi.py__Finnish_search_languag_": {"doc_hash": "426edda39f53b8eacf401dfd12dec293b1e44bec1d3ed031e77eb6d14b6bc17c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/fr.py__French_search_language_": {"doc_hash": "19d2d999f0367839a9943b247c595fceed7516fd2a96d3e64110a90463eac953"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/hu.py__Hungarian_search_langu_": {"doc_hash": "0ee6f0b83992d2ad9e01430a552f44dad8167761efd10e9a44d736180a250f9f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/it.py__Italian_search_languag_italian_stopwords": {"doc_hash": "27623a4da88d02f43d0bbce28436fd9d6c1789ee720e7c4176f7d8a9fc28c939"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py__Japanese_search_langua_BaseSplitter.split.raise_NotImplementedError": {"doc_hash": "49db942104cbc30992b918f7ef49344976f32cd52768a65b4c2d8624c9c03ba8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/nl.py__Dutch_search_language__": {"doc_hash": "baa9e764936276f6772095042b18800876b5328d8f77cb4ee9e4067741a99241"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/no.py__Norwegian_search_langu_": {"doc_hash": "6e83d3508752a186f2d0e1773637163070058aa9a7ca3c045b60285ebfef5b8f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/pt.py__Portuguese_search_lang_": {"doc_hash": "15d875524cd471844785e4809768214b37c59ffd0338501d6e5e3eeb63a3f04a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ro.py__Romanian_search_langua_": {"doc_hash": "ace68cf2735a1ad26792ce890ec3e7e46233f2148917bac2c0e360a607b0ac56"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ru.py__Russian_search_languag_": {"doc_hash": "0e313ed65e650b9e84499f142f8bf12736f4aa99bc7b7dcb697ed8c9c38b9f4f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/sv.py__Swedish_search_languag_": {"doc_hash": "3ecac08a18cbe949388bf46088befd7f18979c6233f4157cbd5d2c87a162d45f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/tr.py__Turkish_search_languag_": {"doc_hash": "887f94ad99b3657147f73a2f87fa81542e19b28504fcfab9f240e35b612e5c1e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py__Chinese_search_languag_english_stopwords.set_": {"doc_hash": "da868628028faa555c021601e81471f3ad665c0bc970beb3c22bb8398c6b0933"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/comparer.py__Sphinx_test_comparer_f_PathComparer.__eq__.return.not_bool_self_ldiff_other": {"doc_hash": "7a802856f4cb549315942f343e21c60172ac66631ce057a043366e275444a20c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py__Sphinx_test_fixtures_f_rootdir.return.None": {"doc_hash": "518d95a899b55e580fa9dece796984adb89d0aeeea52ebd6e071f569163abd35"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_builtins_UMASK.getumask_": {"doc_hash": "d868ca08e4a8f3ed45c326ce0107c9770b01782cfa024152894b25a2cdf246f7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path_path.ismount.return.os_path_ismount_self_": {"doc_hash": "3dc6d0dafd1cb5f70e5b3ac27249dfcf67ddf5855011384f323874b100fde993"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path.copytree_path.copytree.if_os_environ_get_SPHINX.for_root__dirs_files_in.for_name_in_files_.os_chmod_os_path_join_roo": {"doc_hash": "bed8e6814eca779e378de204697030b9fcb14e155cde24fa794e66eb5b2d1486"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py__Sphinx_test_suite_util_assert_startswith.if_not_thing_startswith_p.assert_False_r_does_no": {"doc_hash": "cee873ab89099e07c14d7419cc44b796ecdf278e0e3717a7397d59e318896dd3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py__Theming_support_for_HT_extract_zip.with_ZipFile_filename_as.for_name_in_archive_namel.with_open_path_join_entry.fp_write_archive_read_nam": {"doc_hash": "dabc7f1aea061162178abc77ce0526b37f7d1a7e8ffeeebe3eadc49924c441af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_HTMLThemeFactory_HTMLThemeFactory.load_external_theme.try_.except_KeyError_.pass": {"doc_hash": "f7f19199ee2de26f3827c149505cc75c1410a8af12009445ff6bac0a17fe90b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py__Docutils_transforms_us_default_substitutions._": {"doc_hash": "8dd292cd3a0b07067bf9fd88c4c5f8c2d429338810df7155699b70b277f768bd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_MoveModuleTargets_MoveModuleTargets.apply.for_node_in_list_self_doc.if_ismod_in_node_and.node_parent_remove_node_": {"doc_hash": "e0f236371ee099c436b5468f2b0683aff550948150227fdc6a5378390016ee88"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_DoctestTransform_FigureAligner.apply.for_node_in_self_document.node_setdefault_align_": {"doc_hash": "25dc5e15dc69376bf6635446a7391fa42d45ca55239f758a5a68ab4aff682942"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_FilterSystemMessages_SphinxContentsFilter.visit_image.raise_nodes_SkipNode": {"doc_hash": "bef8d99245864e391e51bd21eed2a0a24abaf0fe8903e9c3609c353d0974aa1b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_GlossarySorter_GlossarySorter.apply.for_glossary_in_self_docu.if_glossary_sorted_.definition_list_sort": {"doc_hash": "4cf91aee635525f342d9efd0a39018248c95cb0c52ddd09992af4b712c649b1c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/compact_bullet_list.py__Docutils_transforms_us_RefOnlyListChecker.invisible_visit.pass": {"doc_hash": "5ef2564d343de1b61df9776c4a0003b5b1a35da69145ca143e28751c72d57f21"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py__Docutils_transforms_us_N.TypeVar_N_bound_nodes_": {"doc_hash": "4062c8c40e6f6646bb9d4e2c3a000a3b3d067dcd9ad7d559bb06447d9704eeb0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_parse_noqa_PreserveTranslatableMessages.apply.for_node_in_self_document.node_preserve_original_me": {"doc_hash": "6627840ffa451bcdcf98852b8929ee103041ddd4bb7703814eace3f0e236d4fe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale_Locale.apply._phase1_replace_referen": {"doc_hash": "7c665301ebbf1c922573f33ecc3f772b30d1ccbaad041fdcffc44cabd92d609a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.None_2_Locale.apply.None_2.refname_ids_map._": {"doc_hash": "74250ad5b82e0ef56e205cd1b5fef33ea551fd0338959dafb66076695d392ba4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.None_2.None_16_Locale.apply.None_2._to_avoid_double_transla": {"doc_hash": "0caec6f0535eaf0c78e6fd694de6457499a72688b3a13c8772015a927b14b943"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py__Docutils_transforms_us_logger.logging_getLogger___name_": {"doc_hash": "42cee5e742a7be84316ede9dea52771def8f124aa2dba370b747164c65f865af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_ReferencesResolver.warn_missing_reference_ReferencesResolver.find_pending_xref_condition.for_condition_in_conditio.else_.return.None": {"doc_hash": "c2d3e4d11679d2be3142d38cd9fad233467004d0b0c287ea9da4ac252b21dc26"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_SigElementFallbackTransform_SigElementFallbackTransform.fallback.for_node_in_self_document.node_replace_self_newnode": {"doc_hash": "a96e76ee30d938b45fba3bdf2e232cb660ebd6cc81e1711201b7ead347ac587f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_PropagateDescDomain_": {"doc_hash": "e5b1455f2d576baf67c3684fa850075d8edb54caa6165c6141f62090db367695"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py__transforms_for_code_bl_HighlightLanguageTransform.apply.for_node_in_list_self_doc.node_parent_remove_node_": {"doc_hash": "dcbc9367df8d6c1579c62f9050b5ebd491801b1233003ada5b0333306a827133"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py__Docutils_transforms_us_BaseImageConverter.imagedir.return.os_path_join_self_app_doc": {"doc_hash": "7a8262e49f1ca208086e962eec87cf04ee2f277976962fcee147f8d991c29920"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/references.py__Docutils_transforms_us_": {"doc_hash": "5baacfce5c5a7d8dd60802a4911e70fcbc22406be0b1c6fe17aae17e59b00a0f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py__Utility_functions_for__path_stabilize.return.unicodedata_normalize_NF": {"doc_hash": "920ae0c55f2637ecb1bdd7691c911fe4761b8d1f24a3c376446944577f3949e4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_get_matching_files_get_matching_files.for_root_dirs_files_in_.for__i_filename_in_sorte.yield_filename": {"doc_hash": "17e53a0da3a0e5280e7418538fad610b6a3a71f24ed05b4b704b1b708efb5c63"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_get_filetype_FilenameUniqDict.add_file.return.uniquename": {"doc_hash": "f069f347fab454532f5e044cf57496e4eff50d4f1cb6c10c4de0f780a18c796e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_split_into_split_index_msg.return.result": {"doc_hash": "2e9d2d8d334aa6459ee97fb904f2499cb3ccb4c9b0eee40b843a16229c1fab33"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_format_exception_cut_frames_import_object.try_.except_AttributeError_I.if_source_.else_.raise_ExtensionError_Cou": {"doc_hash": "5f2f7c605e95ee369370543fde1fd0d0eb905cba3673855e3be15e38a6bd38d5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py__Utility_functions_comm_integers_literal_suffix_re.re_compile_r_x_": {"doc_hash": "8eea5fa0e788c69ac1efdac80e6925792190fd877b7be51f8d6ac8e5c233edb1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_float_literal_re_NoOldIdError.pass": {"doc_hash": "323f5b41d382d964a68df9bd42a0768a3294fbf8122d562cf95f71a8137f5898"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py___ASTCPPAttribute.describe_signature.None_2": {"doc_hash": "25a144213600b27b5bd27ea8f5f0d75898e2aa4bb51b51fdf1461b663c849854"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_ASTGnuAttribute_ASTGnuAttributeList.describe_signature.signode_append_nodes_Text": {"doc_hash": "b7e4ab7cff12a0d895d665072e0e8742ba383805bad46e066386c6a346b9aac1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_ASTIdAttribute_DefinitionError.pass": {"doc_hash": "924381d0226f5f9b8717808f1990c411e48aba905606b745815b40b1cd93e17a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/compat.py__modules_for_backward_c_": {"doc_hash": "77d18440103b91a4966afd8ee91aac7ca6fa87e560ee8badcfc0dfb74ccbbb1a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py__Format_colored_console_terminal_safe.return.s_encode_ascii_backsl": {"doc_hash": "17277aa353e107ea11ec9f1f90f685d91b3ab6b2a3b7f469905fd1f336b50249"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_get_terminal_width_term_width_line.if_not_codes_.else_.return.text_ljust__tw_len_text": {"doc_hash": "ba640b453eda1e0b402f522171280ee2905fd9e6d21f67c71961e2f9f7bdd9af"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_color_terminal_coloron.codes_update__orig_codes_": {"doc_hash": "d3dfa060add50838d8ac57f5ee086a57ebaaea774f5f2914d819d096e1542a13"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py__Utility_code_for_Doc___is_single_paragraph.return.False": {"doc_hash": "239140bb82059168bc15ed76f675a26f9070ba8868c64c94b93fe4135537f7b8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field.make_xref_Field.make_xref.return.nodes_inline_target_": {"doc_hash": "b8c0fe5ff9b98cd0efaf491859f451653a34888603722583e8e38b17a2872e6b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_DocFieldTransformer_DocFieldTransformer.transform_all.for_child_in_node_.if_isinstance_child_node.self_transform_child_": {"doc_hash": "7e9aeaa6d1996490fdfce9788a067762a133cac7690d21ed6b555603d0a4712e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_DocFieldTransformer.transform_DocFieldTransformer.transform.for_field_in_cast_List_no.if_typedesc_is_grouped_.else_.entries_append_typedesc_": {"doc_hash": "2a0bc79e54b0989b49ecd59cb9fdb21a4fd88b67d1bf2c89ae59f9ee94a70b84"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_DocFieldTransformer.transform._step_2_all_entries_are_": {"doc_hash": "f401eb5509998fefe9fa63dc9ec6a0825cd33a3c672e74dbd362272fcc716212"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docstrings.py__Utilities_for_docstrin_extract_metadata.return.metadata": {"doc_hash": "b150a04874bac474add013e147cb190bf3e66a96ac96558917a3e3ca6e900013"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py__Utility_functions_for__register_node.if_not_hasattr_nodes_Gene.additional_nodes_add_node": {"doc_hash": "bc63e2c69bf2308aaed73f48602774f067244ba8ea7f6eab429a0ba1bce6b723"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_patched_rst_get_language_patched_rst_get_language.try_.finally_.docutils.parsers.rst.languages.get_language.get_language": {"doc_hash": "d3cde6b34379dae10587d67ddc67b361bce72f320531598e01f2da25e0de2bcd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_using_user_docutils_conf_patch_docutils.with_patched_get_language.yield": {"doc_hash": "248a62f838506a3e8f88257fc6de13e7803ccbe79c0caa62716d0b7c5f3be470"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_CustomReSTDispatcher_CustomReSTDispatcher.role.return.self_role_func_role_name_": {"doc_hash": "e565d6169a48c15233c33ee95c70e417dcaf936f05c81ddbcd4ebdbb2de381b1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_ElementLookupError_sphinx_domains.lookup_domain_element.raise_ElementLookupError": {"doc_hash": "5fbdcd8b794d33a7365a43cf60a16870b99b49419d2b621f2f54288d0465dbc2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_sphinx_domains.directive_WarningStream.write.if_not_matched_.else_.logger_log_type_message_": {"doc_hash": "23621e4908afae6a790a14874e569cfd0a9b9db31b8b97d379ce578c3739c52b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_LoggingReporter_LoggingReporter.__init__.super___init___source_": {"doc_hash": "77423adeacb3e68dbee23bfc61b517591f42697d8b8cf82ed473598363d5f836"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxDirective_SphinxDirective.get_location.return._join_str_s_for_s_in_": {"doc_hash": "1e2b86c42d363f2952d58f50e5e91eb53f0d43cb66460173d450f07aa1589252"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxRole.run_SphinxRole.get_location.return._join_str_s_for_s_in_": {"doc_hash": "efaa639e4c511912f566e13c448796e5513c2dd98105a3adbd12347d87a908f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxTranslator.dispatch_departure_SphinxTranslator.unknown_visit.logger_warning____unknow": {"doc_hash": "b1f660b5142c10054b3d1da2ec055015f21a595d30ca28b24e8d4ca8ebeb0e74"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py__Node_findall_is_a_new___document_cache__.None": {"doc_hash": "60c7e59bf91b1ddfa0d653a21a6334a10f10df909c805c8969d22dfb686ef1e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_new_document_": {"doc_hash": "db683af1033231813108363e06bdacb2490c1aff5b46407b11ff9d47465842cd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/fileutil.py__File_utility_functions_copy_asset_file.if_source_lower_endswit.else_.copyfile_source_destinat": {"doc_hash": "16e9a50940b32cd580c15cbcde436a542400d64d8a2b82caefe157a5173f1761"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py__Builder_superclass_for_LocaleFileInfoBase.charset": {"doc_hash": "c3025c5c0c22aaf2afe0e91ba8c03b1abb244f812a447a1789d5678ff6543250"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogRepository_CatalogRepository.locale_dirs.for_locale_dir_in_self__l.if_path_exists_locale_pat.else_.logger_verbose____locale": {"doc_hash": "0ecacde4579b4e4b6c0fae7e049eaf61594d3cbea4f06b963d6c85d635ded723"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogRepository.pofiles__date_format_mappings_u": {"doc_hash": "32d0fb5b8ba4d96c8425f538e263282db2c32c1bc295a965694db12c689a77ac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_date_format_mappings_date_format_re.re_compile_s_j": {"doc_hash": "70b175b5228456264b69fd9d10a0ba752ce73fd88c5302d73bde614c51699008"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_babel_format_date_babel_format_date.try_.except_AttributeError_.return.format": {"doc_hash": "895a491193934ef77b82794fdd8159a67a623bc373fc46dc7253550d65114cdb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/images.py__Image_utility_function_get_image_extension.return.None": {"doc_hash": "6931a69369516a75568518d4ac7f48cfe2df8bfda2c262acedb6bdd96b84ff6e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/images.py_parse_data_uri_parse_data_uri.return.DataURI_mimetype_charset": {"doc_hash": "09f61e2078fd78315207f06f08e0c0739d45d4dbcae76933e2822da9e078170a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/images.py_test_svg_": {"doc_hash": "3d4ec9d3fe76f310246e6d8992a8019bd0f2a68f58d1eed79505ac690390932b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py__Helpers_for_inspecting_unwrap.try_.except_ValueError_.return.obj": {"doc_hash": "52b6cdbf8eab3fab37339e921ce48e776996cd27fc58f48dc476e0d3095b043a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_unwrap_all_unwrap_all.while_True_.if_stop_and_stop_obj_.else_.return.obj": {"doc_hash": "935bbff826657e67d4d587c0a2207cd61b228017d9d30a25bdde1afff2bc4e41"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getorigbases_getorigbases.if_isinstance___orig_base.else_.return.None": {"doc_hash": "901211ef089a3b4522aab508f87c70202373a680bd2f2f0340fa30ff148d88a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isNewType_isNewType.if_sys_version_info_3.else_.if___module___typing_.else_.return.False": {"doc_hash": "533cecde4081157446970793bb8c2754f70837772e8712095a1914dfd59b3252"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isenumclass_ispartial.return.isinstance_obj_partial_": {"doc_hash": "3396cc571bbef3a50891da33e16a39b57c9aa7ade3bb9bb78085a8b376e2c954"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isclassmethod_isclassmethod.return.False": {"doc_hash": "5ac02ea974c8aa9e5185b5e707c23a688c9ef5f90c402eebddb0880711840f15"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_iscoroutinefunction_iscoroutinefunction.if_hasattr_obj___code__.else_.return.False": {"doc_hash": "243d124e61682248b1164cfeac528ad7b9ce8c9a085f0b6427f8977316ec7e5a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isasyncgenfunction_isproperty.return.isinstance_obj_property_": {"doc_hash": "be84382b5e6066682605875462100e109d3815e8a112b12347013b9b176d56f9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_DefaultValue_TypeAliasForwardRef.__eq__.return.self_name_other": {"doc_hash": "550f3cb6ac1005418d907fdddbcbb59e2879234eb7fa20762836f36e997441f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_TypeAliasModule_TypeAliasModule.__getattr__.if_fullname_in_self___map.else_.if_nested_.else_.try_.except_ImportError_.return.getattr_self___module_na": {"doc_hash": "8698797527432e808313652465d9533d5bfbc2d98738bacc9ed4690ed82ea790"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_TypeAliasNamespace__should_unwrap.return.False": {"doc_hash": "68529c3d6872bba4cf2ef9c5235b221d2460ba995eb4e3f0f120d39cded2cd44"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py__Inventory_utility_func_InventoryFileReader.read_compressed_lines.for_chunk_in_self_read_co.while_pos_1_.pos.buf_find_b_n_": {"doc_hash": "c03240fc54589099212ae9e87a3542beb35114a7c01cab545ba62d0380405959"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py__This_module_implements_ESCAPED.re_compile_r_u_4_": {"doc_hash": "5dbd66a45a07c0b908ab7c42842fa532a029d4093d3a129bde999afb632a4954"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py__Logging_utility_functi_COLOR_MAP.defaultdict_lambda_blue": {"doc_hash": "e2e852e28b9d15d436cb108a84d735b07ce6b4ec9a8fa722c22669c20188196e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_convert_serializable_SphinxWarningLogRecord.prefix.if_self_levelno_loggin.else_.return._WARNING_": {"doc_hash": "1c62ba06b855f66770393d7d454e905b59a0914e1f752401a36ede62abc4c40c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_LogCollector_is_suppressed_warning.return.False": {"doc_hash": "a76c05fa44279bd432c5332ae1f0f79165d9704ea12cff7a11bec5d03f863a3a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/matching.py__Pattern_matching_utili__translate_pattern.return.res_": {"doc_hash": "a2394f646aa8c8650046dccf5aee860cb09fa06c6fc7334fee7ff42abddafb26"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/math.py__Utility_functions_for__get_node_equation_number.if_writer_builder_config_.else_.return.node_number_": {"doc_hash": "c62697c6e1e82a08c5d7c31deb5a51696ce12ca3b3d2646f330bf6cb9eb9790e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__Docutils_node_related__caption_ref_re.explicit_title_re": {"doc_hash": "048aad4c978b3d353b2070aed1dbd2020cdcf590f324862c2893826ecffafaf8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_LITERAL_TYPE_NODES_extract_messages.for_node_in_doctree_finda.if_msg_.yield_node_msg": {"doc_hash": "0efc0c47537f4dfb675ddebf3bdef22f29610c3cc58a9a759ca9425f6a69bda2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_get_node_source_traverse_translatable_index.for_node_in_doctree_finda.yield_node_entries": {"doc_hash": "b0702cb8aec2572564347cb42cb15ca23e7b20ecc5ce86d522f8ae1ae5e62c6e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_find_pending_xref_condition_make_refnode.return.node": {"doc_hash": "9d7139a82f7a5684104204918e53e4f027c6cb4a42776ef08ccec60b2acca2fd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_set_source_info_is_smartquotable.return.True": {"doc_hash": "544c579bcfbfd01049ebc91f581048e7696f5e7f595fa6064182f15703f4cf42"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_process_only_nodes_process_only_nodes.for_node_in_document_find.try_.else_.if_ret_.else_.node_replace_self_nodes_c": {"doc_hash": "4c2f3dd6131b701b97737b01c2c803add41424aaed50cd9901a6069da4517287"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__new_copy_": {"doc_hash": "0a097e1a27a952605c4fae68165fb84ce89386685c157ac2f60a0fb951fb1f7f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py__Operating_system_relat_canon_path.return.nativepath_replace_path_s": {"doc_hash": "3de67ded62f7fd574b1e9b7959d75852450eb47371d9b175bde2f8f927f8e98a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_ensuredir_cd.try_.finally_.os_chdir_cwd_": {"doc_hash": "8efd5438c044c74fef685b9664433ce31671c1b1d1339a9d46b8be962d623009"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_FileAvoidWrite_FileAvoidWrite.write.self__io_write_data_": {"doc_hash": "7a12361e1f5782e413d54b54573f2fefd9e5311d88d6677b7ff7acb40d6bc10a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py__Parallel_building_util_SerialTasks.join.pass": {"doc_hash": "a6276c74e70d36dbdb6241e48a978f214f4e527e1f2bf31fde955f2e10309870"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks.add_task_ParallelTasks.terminate.for_tid_in_list_self__pre.self__pworking_1": {"doc_hash": "30508ac1af6e619ad7d80270c899b61a81c73a7181fbc5fd56ff2e5165d56598"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks._join_one_ParallelTasks._join_one.return.joined_any": {"doc_hash": "966a0a0175b8faad7f04301a0b535c5b676166c9a81cf2f00b21c5dd4a2e6641"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/png.py__PNG_image_manipulation_read_png_depth.with_open_filename_rb_.if_not_depthchunk_startsw.else_.return.struct_unpack_i_depth": {"doc_hash": "3212d8ed7873efb681b9acf1d463c4d732181f773699d90850f72c794d8ca16b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/pycompat.py__Stuff_for_Python_versi_convert_with_2to3.return.str_tree_": {"doc_hash": "85dce78a27fa6e57b9be2f9081e1ad880cdda8a8b3723a9298549ce149d212f5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/pycompat.py_execfile__": {"doc_hash": "cc456c4e617ca155d1044e964c8ab7d2079f0b018a17fcc645944c12c2e2f039"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py__Simple_requests_packag_ignore_insecure_warning.with_warnings_catch_warni.yield": {"doc_hash": "b768e257300dbde891af0ad82c07a79a1d8e251a20637bbf20ecea72d66d8008"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/rst.py__reST_helper_functions__default_role.docutils_unregister_role_": {"doc_hash": "0766bb024fe6a301a456d22a52a81dfcd41ede708aeb5118977d59db1875e0d0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/__init__.py__Word_stemming_utilitie_": {"doc_hash": "7196ba24810d16eb40faaa38d7f08fda3fc0d9a043046aebe2a4e074e92c49f5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py__Templates_utility_func_BaseRenderer.render_string.return.self_env_from_string_sour": {"doc_hash": "8e07e91a8edeea8ce862a0db3fa44fb4712927370d8a300ba71385c0605299b3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/texescape.py__TeX_escaping_helper___for_LaTeX_engines_whic": {"doc_hash": "4011038b2792dce1d738354928f84a2356cf31300e08f48d9002e8e8f30aac57"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/texescape.py_unicode_tex_replacements_hlescape.if_latex_engine_in_lual.else_.return.s_translate__tex_hlescape": {"doc_hash": "659f55d6a3b32d701f99a6292d3b65b46d16239064e0839dcb33ebface3cb4e3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/texescape.py_escape_abbr_": {"doc_hash": "c796bf304c4c9065e5256cc860eadb84683cea93a9db69d27c9371a750945274"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__The_composite_types_fo_Inventory.Dict_str_Dict_str_Inven": {"doc_hash": "e80278ec84c129e810fb0ad2a51321f841c57b52e8770656b672f7abf25830c6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py_get_type_hints_is_system_TypeVar.return.modname_typing_and_i": {"doc_hash": "972f3161eb49267e7cc40ea5ee095264ac4ddef8c6da718b6d6511d6f4b41def"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py_restify_restify.try_.except_AttributeError_T.return.inspect_object_descriptio": {"doc_hash": "76f5142c2449cf7ec87b963e37265b06e0302d7c4bf2576d34e84f00eee58b25"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__restify_py37__restify_py37.if_inspect_isgenericalia.else_.if_cls___module___typ.else_.return._py_obj_s_s_s_mo": {"doc_hash": "1bb642e067a913da04e8d4d88f77f3f2409590c42e2fcb24350c6129bb80b8fd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__restify_py36.if_isinstance_cls_typin__restify_py36.if_isinstance_cls_typin.else_.if_cls___module___typ.else_.return._py_obj_s_s_s_mo": {"doc_hash": "e1c84af4f00bd2e86f1c1b40c50a557fc72c4f3f66daf5c7a70c790b2618e4ce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__stringify_py37__stringify_py37.if_module_typing_and.else_.return.repr_annotation_": {"doc_hash": "2b49c6f64cf5f54c42af094b0445e8035f6c9c0d7493f75fcfe72d03d53ee513"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__stringify_py37.if_getattr_annotation____stringify_py37.return.modprefix_qualname": {"doc_hash": "e69da2221ecd6abae8bbfe9e6fbf409a94cbd484808c51a02ddc5ad7f89f393c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__stringify_py36_": {"doc_hash": "6b354a6bc673a04354b937001c8e72b8aef8f93ad315fc7b70fcf940405dff93"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py__Implements_the_low_lev_VERSIONING_RATIO.65": {"doc_hash": "7ba0be978d5483db77392b007ba1e73a6d6cf0360e5382ea0546035e7472b7d9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_add_uids_add_uids.for_node_in_doctree_finda.yield_node": {"doc_hash": "159a24bba56a3842c626f15bd9d5913b3287d0cf08d24c653fafdef6c582ac22"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py__docutils_writers_handl_multiply_length.if_not_matched_.else_.return._s_s_int_result_un": {"doc_hash": "80c266fa208de5846adf7f4fcdb113c9fc1940ceb967a44c892a59a0bcd6daa7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator_HTMLTranslator.depart_desc_returns.self_body_append_span_": {"doc_hash": "bfa90eaa8fd28a4ff63f4f891ff0f95af65b144cc3f4eb359b1f6a8149a27e7b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_desc_parameterlist_HTMLTranslator._overwritten": {"doc_hash": "8e8ea55ff747fab2fee5591b075a525c2da4fdcb67c3002429d63f17c63e0634"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.None_18_HTMLTranslator.None_25": {"doc_hash": "4a30d3387ea9111ca096351d47f7a081842e1004361779231bc444383b6909d9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.depart_term_HTMLTranslator.None_26": {"doc_hash": "2464e35e7f0089d442d16936b2513cc029746f5f211a4d34126ac155a37bf49d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_title_HTMLTranslator.visit_title.None_1.self_body_append_span_c": {"doc_hash": "bec178efd8df6a203abfae735c94e1f159e56eb6aefac85178b251a987d47b72"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.depart_title_HTMLTranslator.None_27": {"doc_hash": "f2aad184b4ae932fd15b09d9a51e2daf42b3328d1b5f325d1bafd1cb75257902"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_download_reference_HTMLTranslator.None_32": {"doc_hash": "f88c7a1ce451bb93492e5a32aa7c5d07f8e29aebe374c58c6da94b5b8740d9fb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.None_33_HTMLTranslator.None_34": {"doc_hash": "c169d2bbe957b1bd9b721adb342534719e1484e1e4a495c4b43e8f46be423edc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_note_HTMLTranslator.depart_table.super_depart_table_node": {"doc_hash": "294d68380e6bf9eca093f9e2e06e45da40f2630e798b21ec0eede1967a219c52"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_row_": {"doc_hash": "c5cb67c6161822205bac9ce3f35f32e5e540785266c69eaa648d0d067ba3bfc5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py__Experimental_docutils__multiply_length.if_not_matched_.else_.return._s_s_int_result_un": {"doc_hash": "b59f93edef216e94820a08329ed53d3f389edb5f9d4bf3d1ba74a0a5187181da"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator_HTML5Translator.depart_desc_type.pass": {"doc_hash": "b98a76c02174db1baf75f75ef3289ea63e4eda7b4396bd703a4dec86b06a6ba3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_desc_returns_HTML5Translator._overwritten": {"doc_hash": "fffa0bf463a2a53826f41546de05bc5e1ada99edabfc04293c7199b9583ff706"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.add_permalink_ref_HTML5Translator.None_27": {"doc_hash": "24efb76b59e3efa607f36088b7dea81d0a709e9349184071e97ac0321451c2da"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_term_HTML5Translator.None_28": {"doc_hash": "6b72c0c3b67f072278e5abc799b55870955ecde4c91b0f64fda6c8c3cc9a402a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_title_HTML5Translator.visit_title.None_1.self_body_append_span_c": {"doc_hash": "43a5735878bb1cfbc7906767ffc5ac81fd0f824c13e6ac8e9b28d6814390ff9e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_title_HTML5Translator.None_29": {"doc_hash": "0a6bec2e0ff37cae07a61292845f46513166dfb971aed545bd1b1860f3c34704"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_download_reference_HTML5Translator.None_33": {"doc_hash": "6c709d17526c6e476b33e9027f0492292b1d54ee3d47a1ce87592cd27c67f849"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.None_34_HTML5Translator.None_35": {"doc_hash": "94677bbfabd172f603de808f600115b63d8fc7a3c8e43a4d6d72378a4803fa93"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_table_HTML5Translator.depart_math_block.if_depart_.depart_self_node_": {"doc_hash": "948227b0b12bb53e44dfe2e745f28d9de461d80ff8decff127eaa3a2be2519d2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.generate_targets_for_table_": {"doc_hash": "56f21662a55d0362713f8d1912b5a4ecb242c7cefe41663aa0ccd5691bf9ec74"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py__Custom_docutils_writer_UnsupportedError.category._Markup_is_unsupported_in": {"doc_hash": "f9bcc3d3b5c2574bc5b32bec98bff7083fb4c70c87bad9f30e19c3d2b0c1af8c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator_LaTeXTranslator.__init__.self.handled_abbrs.set_": {"doc_hash": "4f8af303a68c39820f4a8f0ef83454f1f7ed9268478d4fd9915caa870cdb69f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.pushbody_LaTeXTranslator.babel_renewcommand.return.r_s_renewcommand_s_s_": {"doc_hash": "98e472ea2d2ebb0c7a3e0b41e5b3e3e6384749bdf0dd379a75b4b4f9ea570995"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.generate_indices_LaTeXTranslator.generate_indices.generate.ret_append_r_end_sphinxt": {"doc_hash": "5a35769b26ebab218c341e039023faf9d10bf1ef6798833bd643660a11dc5127"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_title_LaTeXTranslator._depart_signature_line.self_body_append_": {"doc_hash": "f28155270d858256009d4403e8fb900b4b6f6faeaaa17ac06f9401a69e87804e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_desc_signature_LaTeXTranslator.visit_desc_signature.if_not_node_get_is_multi.else_.self_body_append_CR_r_": {"doc_hash": "0746f9ff7df6d8de213239662b71ca227a80edcb696380a4f336573a317a5c3b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_desc_signature_LaTeXTranslator.depart_seealso.self_body_append_BLANKLIN": {"doc_hash": "5422ff410f262d06a8925a91097ba71672fdc7e3f1f219a2a7232f4ae0178862"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_rubric_LaTeXTranslator.visit_footnote.self_body_append_r_sphin": {"doc_hash": "62dd859ef4b532013b98d0393f8bd77de322f91548157a65c2a16417b4e6ab41"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_footnote_LaTeXTranslator.visit_tabular_col_spec.raise_nodes_SkipNode": {"doc_hash": "598ce1a07c7677a64b69516041e314429b921be5855cefffabd244cb25ac1329"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_row_LaTeXTranslator.visit_row.while_True_.if_cell_is_None_not_a.else_a_bottom_of_mult.if_cell_width_1_.else_use_multicolumn.self_body_append_r_multi": {"doc_hash": "c480f9827fd5bfc7b6656d27f576d0d5f0569ff85eafe45a5848e3042640c172"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_entry_LaTeXTranslator.depart_entry.while_True_.if_nextcell_is_None_n.else_a_bottom_part_of.if_nextcell_width_1_.else_.self_body_append_r_multi": {"doc_hash": "1407121647e3d6962cb46944527565e43abb93fab6d170500016a31b329690c6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_acks_LaTeXTranslator.depart_bullet_list.if_not_self_compact_list_.self_body_append_r_end_i": {"doc_hash": "aa1dc6966381b3030d7a92acf52e5af4ff345f5a0d0aab8c4543c0ee95c4b9d2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_paragraph_LaTeXTranslator.visit_paragraph.if_index_0_and_isinsta.else_.self_body_extend_CR_r_": {"doc_hash": "9d0ba2448c3c2a5d76c75f8bb8e4d5763542f1e0dc05823679b87f588448ceee"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_image_LaTeXTranslator.visit_image.self_body_extend_post_": {"doc_hash": "2365de2bd72ebdf5b0fa64da605c0fe79f303a40e3a8d23bd35d9c730eb9c0c8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_image_LaTeXTranslator.visit_figure.if_self_table_.else_.self_context_append_r_en": {"doc_hash": "8854eaf4e55504e1a55fb0a167e3649162d65d3da599340cc90ca949870ccb59"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_target._skip_if_visitor_for_nex_LaTeXTranslator.depart_attribution.self_body_append_CR_r_": {"doc_hash": "4f6b324840d89f92c3b0d1c8d5a2a0b94c4cda502208fdc2634a7e0d524ba120"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_index.for_type_string__tid_i_LaTeXTranslator.visit_index.raise_nodes_SkipNode": {"doc_hash": "b3e54fe154b5b8f04043d30495d8d87a7cc5b4f220dfdc70a143e259082249b1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_thebibliography_LaTeXTranslator.visit_thebibliography.self_body_append_CR_r_": {"doc_hash": "3370080a8a38023b360d34aed42b12f67d72cafe1044f5a030edf572d9263af7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_literal_block_LaTeXTranslator.depart_line_block.self_body_append_r_end_D": {"doc_hash": "483010ba81e008efe81d61e1a39874ee8afa4b4ac64f5c0ec5df363e10754143"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_math_reference_": {"doc_hash": "547a32719ec98d090b94773a7fe00a9cd64e27125fc3beb720f55a4c9bff71a9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py__Manual_page_writer_ex_ManualPageWriter.translate.self.output.self_visitor_astext_": {"doc_hash": "5dd3a7a0fd1e8a67f8088e8160fb06d5c362f783c6be335e909c9abb9c05c875"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_NestedInlineTransform_NestedInlineTransform.apply.for_node_in_list_self_doc.if_any_matcher_subnode_f.if_not_len_node_.node_parent_remove_node_": {"doc_hash": "83108c0781f9da7df87c0dab932858e1f1c0a0c0d7f45faddce6f051795d3791"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator_ManualPageTranslator.depart_desc_returns.pass": {"doc_hash": "5a3250f49db253aedec7164c64447ba0c83e2ae751ad9584a48b68c567e5e4d2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_desc_parameterlist_ManualPageTranslator.depart_seealso.self_depart_admonition_no": {"doc_hash": "b777e280d5a8fc9c069590e7004bc9f039c8e01803c53b4d625c8ebc6f92d218"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_number_reference_ManualPageTranslator.None_17": {"doc_hash": "7737292ef5bb4edaf6813db2235865d8670e5974a4e641b197a31d5f723caed9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py__Custom_docutils_writer_smart_capwords.return._sep_or_join_words_": {"doc_hash": "ce3ff27a4fdf7e4a24d70a8b3b96a23d7d78bda22e880f12cee88d5228e52bdf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator_TexinfoTranslator.__init__.self.colwidths.None": {"doc_hash": "774e0b65795ac91c1eb282202e729bcaf0fee24f43d7d5b93c1fe1b288a6bec0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_node_menus_TexinfoTranslator.collect_node_menus.for_name__content_in_sel.node_menus_Top_append_": {"doc_hash": "92b750aad7938166baf1c77efc5a7777d9b0eb7ce47dc929ad0aaae647b71d97"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_reference_TexinfoTranslator.depart_collected_footnote.self_in_footnote_1": {"doc_hash": "f393710a05adcdc178400132c58d56ff9094039f98d976a13dd716a0a77864a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_footnote_reference_TexinfoTranslator.depart_definition_list.self_body_append_end_ta": {"doc_hash": "7a72f114d9d668ece81767caf578afdaa769179611e9c23931da95cf6ad8982f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_definition_list_item_TexinfoTranslator._Admonitions": {"doc_hash": "96358b39edea9e5300dbb76864abe3b978d304022d9afa6331c84b737fc13cc4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_admonition_TexinfoTranslator.depart_figure.self_body_append_n_end_": {"doc_hash": "a52ecc6fe19c2a3504fb6cb81e45bdbbcdcb7daf81427aed1a6cf592def30000"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_caption_TexinfoTranslator.depart_caption.if_isinstance_node_paren.self_body_append_n_": {"doc_hash": "8c7913baefc29820f082b33d72b96014d3780c469fc57f84e6b198dfcd01b430"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_image_TexinfoTranslator.visit_image.self_body_append_n_imag": {"doc_hash": "072195bff49bc3a0d2a0dba30c95e8fe5b53b43b7a734fada1923a5b27874a4c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py__Custom_docutils_writer_if_TYPE_CHECKING_.from_sphinx_builders_text": {"doc_hash": "d86e8922bd0af674639e63e86fca8a800d448e5c49863aa0c9e2f5f0d566193b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.__getitem___Table.cells.for_line_in_self_lines_.for_cell_in_line_.if_cell_and_cell_not_in_s.seen_add_cell_": {"doc_hash": "2f38cb6509f112af1f73675b6a6131d3e2b90c63749a9e97ec5edc4be8e07864"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/xml.py__Docutils_native_XML_an_XMLWriter.translate.return.super_translate_": {"doc_hash": "9cadb8cef50ad48d52cf9ab3f1b36cf1dc6150fa0d6155bbd05cbdd67c0b1eeb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-py-python_use_unqualified_type_names/conf.py__": {"doc_hash": "bb935f346b6cf526723667346c152644c5b0fd6d3519055d85f3d50a2a0054f0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_CustomDict_DocstringSig.prop2.return.456": {"doc_hash": "2a3eeeea24435bfd34dc9bbfd26f4cb323671a710739eb7e69a9b7ac94e3b4b1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_StrRepr_": {"doc_hash": "2d2113583282f02f8a2c64b82036ed3ce93b9549393e90306a916931e1d9a880"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/autodoc_type_aliases.py_from___future___import_an_": {"doc_hash": "2c77283945a53f1fef9ec337f77f4bda2e28ad01505f7769861e35534f4a6bfc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/canonical/__init__.py__": {"doc_hash": "c5f2a74b6b4bc1b859c555552ebd7985e6a1f83f8a6f7f9bbba87213030b2f49"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/canonical/original.py__": {"doc_hash": "ee3b7b6f7fb384f0ee5dcb809f321a7cde1485bc6f76221c4c3402ac90edb9ea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/metadata.py__": {"doc_hash": "8aa10f64d2b7a4ea8553cb2fc2296756ebe6f45aa9044c4f588a72201544d29d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/module.py__": {"doc_hash": "b0ccee88fc5a4f6975f1c9ac1bef168e1bf13825339c8bf8443e27cfa02b28e9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/pep604.py__": {"doc_hash": "4c671676b77e1beb2db3cd8ff9b222b0917c2665de5455ce43faa950d1e303f8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/preserve_defaults.py_from_datetime_import_date_": {"doc_hash": "50b7c05d94cf2bb933542f26b01f84605c76629dcd641af1b787a787e3007a1b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/properties.py__": {"doc_hash": "9607af853e3821c641cce8b2b758634a17bf8a1f235e6bd2c717fb14777a9c1c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typehints.py_from_typing_import_Any_T_Math.prop.return.0": {"doc_hash": "b6684e26e587239b55b71735c8a867723857e35ee4e44526c2565c12c3421275"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typevar.py_from_datetime_import_date_": {"doc_hash": "7552ed210f429a74bce357ff1ff9e15ad398f839e8cc0044b1c3c4ff4a39b0df"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/uninitialized_attributes.py__": {"doc_hash": "61e778aebd579144ef3dee235976a384c192d0f5b119469b2eb7f07c46c2a0d7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-extlinks-hardcoded-urls/conf.py__": {"doc_hash": "815f8e1c0e0eb4364103bdd515ff79e3a19892d7c8df1c978ba4feb992da39c9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-extlinks-hardcoded-urls-multiple-replacements/conf.py__": {"doc_hash": "1440945b129b3452682e3e63ac163d4e5ca65003b5c6277719cd9d9f4bfcb004"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-intersphinx-role/conf.py__": {"doc_hash": "cb15ba543d4b5ef1f8d9bc1383ac2998ce2545811326e3e58c8ceb6374398711"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_signaturereturn_icon/conf.py__": {"doc_hash": "40a5522857b9f8771690a9395d4e19160e9f59d5be387771d9b24ecf26074f20"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-includegraphics/conf.py_exclude_patterns_": {"doc_hash": "29b9e076bdbd0df93cf4c982afa1deef1df199f181cdfc913b3affbe21c2f5ae"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-documents_exclude/conf.py__": {"doc_hash": "2917c13040d1533c68fbb23b274d759021ec82a8a6b0735125db7b328ed0dd6b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver-warn-redirects/conf.py__": {"doc_hash": "1ea0076e1f4d80a9d209c7010c2f586d8e25ec533b3f7db68c525c8dc0587cf1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-local-logo/conf.py__": {"doc_hash": "d156ab0a4191701665f83a5fe96b5a0ef136b91f0f6781af990f407149d984cd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-nitpicky-warnings/conf.py__": {"doc_hash": "35abfd7cf5a05ec91b88b28b2662eb06ca486b864e80d4cab6e05d5aafe525c7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-remote-logo/conf.py__": {"doc_hash": "2aaca83c14df0682fb9eaf3530a53903b7561841ec7271bb21f5dc5020d07958"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-transforms-post_transforms-missing-reference/conf.py__": {"doc_hash": "4115a42e6c23b2c0c685c29f9965248454c25dfe86b97e91ddc4c9cedbedc1d6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_api_translator.py__Test_the_Sphinx_API_fo_": {"doc_hash": "ec49785daf9ebdf0a5c6f5c47ffe33c9d7c6444f889b4e28247d0e6a9b610af4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py__Test_the_Sphinx_class__test_events.None_3": {"doc_hash": "2fc4721dc846515c649645eccd418fc9ffb10d61609f216a6056371548888fc5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py__Test_all_builders__nonascii_srcdir.return.srcdir": {"doc_hash": "ae85ba9a7c10aa61599930b471d5017b1200cf781e515767d3811396eab1e353"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py_test_root_doc_not_found_test_numbered_circular_toctree.None_1": {"doc_hash": "f2682ff2a04f221066ccab289d7958e70c5ecb543d24ae147c3cc11061a1f664"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_changes.py__Test_the_ChangesBuilde_": {"doc_hash": "eddb64ac0e067c881c6a22412ea704df5cc5d7f32e81d4c85e161217a6de665e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_dirhtml.py__Test_dirhtml_builder__": {"doc_hash": "eb06ac59734604e5f4d61f75d3470467246848175fb49e11bfc380105b5fb462"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py__Test_the_HTML_builder__EPUBElementTree.__iter__.for_child_in_self_tree_.yield_self___class___chil": {"doc_hash": "c937c90d7a9dfd66430ee319a9b991867677c8e3cc68021069621c79a7d1b8db"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py__Test_the_build_process_test_build_gettext.assert_msgid_something_": {"doc_hash": "f48f6eaf36f6ccbf67460dda8ee3f8478694fd822d662dd8496cb2ffe5889b23"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py__Test_the_HTML_builder__tail_check.return.checker": {"doc_hash": "b5f138a9487fbf4055d47318e132ff5ce16355fd8acd7726cadc1e0a5cd017f4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_check_xpath_check_xpath.if_callable_check_.else_.assert_False_r_not_fo": {"doc_hash": "69357a5125efc1ae22638d0582b7a13b397af6b16782f2173a7fcd153002c6de"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_warnings_test_html4_output.app_build_": {"doc_hash": "81e8948ba34f4b5c091da67162f74db9856a22cfac265c084bf980b4c3b7f5cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_docutils17_output_test_docutils17_output.check_xpath_cached_etree_": {"doc_hash": "9f04dbf031771c3256b9796904cafc061a70cd29768f05a33c68acc7ab1546c1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_docutils18_output_test_docutils18_output.check_xpath_cached_etree_": {"doc_hash": "d63306a418d70efd98e38bb5efb9acab10016c67a744c770d5d4cb7d2a4d39d7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_parallel_test_html_download.None_6": {"doc_hash": "f39b8a4625ce224b09d5a47de18457a6ea9a4bc9fd86ec52b6f6f180e0f856aa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_javscript_loading_method_test_javscript_loading_method.assert_script_defer_de": {"doc_hash": "ba18916054d3ee6ea8445d8f08d528f510e84e1aee5afeeaf017cd0c46a4d1c8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_anchor_for_figure_test_html_anchor_for_figure.if_docutils___version_inf.else_.assert_figcaption_n_p": {"doc_hash": "660f466d4f755b5aa68615017172be36a0fb0387503f20303acbed52ba2e6169"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_remote_logo_test_html_local_logo.assert_app_outdir__st": {"doc_hash": "5894c157a6212c22b6ac7cc512e8a3e9bc73576759522053d7b35a6aaf4befc5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_codeblock_linenos_style_table_test_html_codeblock_linenos_style_table.if_PYGMENTS_VERSION_2.else_.assert_div_class_linen": {"doc_hash": "47b2e3f6f68468a9856ae3f49413f91e4edaf674577ddfaa4ceced9f66e0a059"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_codeblock_linenos_style_inline_test_html_codeblock_linenos_style_inline.if_PYGMENTS_VERSION_2_.else_.assert_span_class_line": {"doc_hash": "4c6aed7441122ae5459f775b1534f51f6255e191775f4ddc1168e89dd6af7ba8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_highlight_options_old_test_html_permalink_disable.assert_h1_The_basic_Sph": {"doc_hash": "3b171645767f63b1fc518dcb0b986ffc4e497a7fe293555232e9023a1884801f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_permalink_icon_": {"doc_hash": "b21102284644d72a07dba5524ef12443085841e53fa1bfbca110dda5776c3e96"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py__Test_the_build_process_kpsetest.try_.except_OSError_CalledPr._command_not_found_or_ex": {"doc_hash": "97f90e244dbce4a137ffd4680da441a08a973220bc41db53ee0784133df8cbf7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_footnote_referred_multiple_times_test_footnote_referred_multiple_times.assert_Named_footnote_": {"doc_hash": "000db087f4cb4ec126d3153d429829b3937c148f142becc68cfb37a10305d168"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_inline_test_latex_show_urls_is_inline.assert_sphinxlineitem": {"doc_hash": "363781246b96a13ad8813622eb4a2e5b8453479d887d757006bce2763db08f3d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_inline.None_11_test_latex_show_urls_is_inline.assert_begin_savenotes": {"doc_hash": "3330a71b45d594f93313d4c0d41f5a7f27b9a26fc8d58fa879309a20c3d89d85"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_footnote_test_latex_show_urls_is_footnote.None_9": {"doc_hash": "3f70e68ae45a6822cd03c4fd93967435f73866567d330ef9a81bda40534bacce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_footnote.assert_sphinxlineitem_test_latex_show_urls_is_footnote.assert_begin_savenotes": {"doc_hash": "53e6040b07fbd8009fcd2aa948d1b05d262625e54be7bb1f53010e32195f9d32"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_no_test_latex_show_urls_is_no.None_11": {"doc_hash": "eda6a748afc6c94213f978ff6aa779120a1d7f79b25d03bda207219ca3535d05"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_no.None_12_test_latex_show_urls_is_no.assert_begin_savenotes": {"doc_hash": "55a2e989647f5b22b3f71cb75b7e6077e3d49b1353dce5f470c4bd88c85e1ac1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_glossary_test_latex_glossary.None_4": {"doc_hash": "7005de73602e8f31989d853eedd093b0b6be5037897715f345a041c6083c297f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py__Test_the_build_process_ts_re.re_compile_r_P_ts_": {"doc_hash": "28198fa1dc8f64213b7353f9262ae14b4148f3b4c870d7edf573b521cab5f66c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_defaults_test_defaults.assert_len_content_splitl": {"doc_hash": "38fcbed501ccaa44cf0da889986b08328dd52de21d4bd2e125c1f8ec070f7397"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_follows_redirects_on_HEAD_test_follows_redirects_on_HEAD.assert_warning_getvalue_": {"doc_hash": "4d6b612af5cea9f0347b0251aa377bcd68c749f349c18eb917d8c34626b3ead1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_follows_redirects_on_GET_test_follows_redirects_on_GET.assert_warning_getvalue_": {"doc_hash": "a71c2f39ad2a7a9bc352b76a69de7d5c2afd0669f49e8b30956f7034274c66ec"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_allowed_redirects_test_linkcheck_allowed_redirects.assert_len_warning_getval": {"doc_hash": "d31c581e2de3d75c8975b52ff2572f2fcf063d5dbd5206966de8fb10634868b3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_FakeResponse_ConnectionResetHandler.do_GET.self_end_headers_": {"doc_hash": "6d282b7159d0b28c3d5d6e52c6d65776ad4f04ffe726977a057703c796f7b9a6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_get_after_head_raises_connection_error_test_get_after_head_raises_connection_error.assert_json_loads_content": {"doc_hash": "a1bd3b8acbe682599922481c022edf66542bab807085d82759a403d92934cdc0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_exclude_documents_": {"doc_hash": "c32e231d8c6fb5e81b745e31207944f8f4f7d96a7ff4acf3fd1e197ca1d929ca"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py__Test_the_build_process_test_all.assert_Footnotes_not_in": {"doc_hash": "9e5228eec69ba66639713e9e261ee5d63b6a8e93cb38677fe3845429d9b20d3e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py_test_man_pages_empty_description_test_man_make_section_directory.assert_app_outdir_man": {"doc_hash": "04d20c05fea3e94f4e24c04b6dbc77a7c4a3a1438f1eb4b348bc071b4253a804"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py_test_captioned_code_block_test_captioned_code_block.assert_sp_n_": {"doc_hash": "e8b048cbfaa9524fd4be472a2f17c0f70520a40514fc1889987f726985b02e83"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py__Test_the_build_process_TEXINFO_WARNINGS.ENV_WARNINGS_": {"doc_hash": "ddf2a77dc7abc568e34284011096a9c593f9729e3baa9e0ba840269e38270bb0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_default_texinfo_documents_test_texinfo_escape_id.None_6": {"doc_hash": "b291b706af256604924ea3592ce0dbf4ee90a884b295d85ecc9a6b633d1a7384"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_footnote_": {"doc_hash": "11921a2839b1354f641169aa6c42c1ae51f7e9ab753686abf20a1cd601bbec29"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py__Test_the_build_process_test_maxwitdh_with_prefix.assert_lines_11_startswi": {"doc_hash": "d937ec3865c360691e12ad3017768f79dc0df6fea4a83d98405c3f80feed1b4d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_builder.py__Test_the_Builder_class_": {"doc_hash": "9d63ca3b3056ff45fb3a3bc1f1f4160887aa87f8b96373a703c294e9586b63fa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py__Test_the_base_build_pr_setup_test._srcdir__build_rmtre": {"doc_hash": "75cf81578fb3d0c9dc51ae80de449115c145790c910bc2b83aa72d9c4d71a2a7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py__Test_the_sphinx_config_test_core_config.assert_cfg_project_": {"doc_hash": "30325c8ef86d702c0d03b11c28df462d2bb05997a5181769927591404eb8db2a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_config_not_found_test_extension_values.None_3": {"doc_hash": "73318981653788827f7efc63d10a02456c8c39de64036ffb213a797c08ec103d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_check_enum_for_list_test_nitpick_ignore_regex2.assert_not_len_warning_ge": {"doc_hash": "2c780ed9097c2f36cb646b2fc69e77a3b42b77229b61c27eae7b650a856f54fd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_nitpick_ignore_regex_fullmatch_": {"doc_hash": "08cbcaf957445a9a3d1919e14172f1dd630a4954572a7cd60c5219460fa6e268"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py__Test_the_code_block_di_test_LiteralIncludeReader_lines1.assert_content_Lit": {"doc_hash": "e36415d8e3a5c008a4ca378ea9419930a3458de7f6210604be30b5edad09fc74"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_dedent_and_append_and_prepend_test_LiteralIncludeReader_dedent_and_append_and_prepend.assert_content_class": {"doc_hash": "896b34258e69e9f83663f1e9f5eb2fb42903871eb0eb709650ae69ee01072f50"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_linenothreshold_test_linenothreshold.assert_span_span_sp": {"doc_hash": "083d656ece6d6794d50169392cb774e1ca20e6ec249e5b90ed06eb9448ab8cf9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_dedent_": {"doc_hash": "877c4dfdc3d8eba3533ae2121ff764ee3a9fdc935dac9f0d1a6fea24533df2e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_only.py__Test_the_only_directiv_test_sectioning.testsects.for_i_subsect_in_enumera.testsects_prefix_str_i_": {"doc_hash": "998177c262ca11f2b0f27eb3eda237770048631b87f6778f1c85f1d89977132d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py__Test_the_other_directi_test_toctree.assert_node_doctree_0_0_": {"doc_hash": "566e9b7c811f492881636eacede72ecdc97bbbdb6d6b411c75470220ebc20fb2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_patch.py__Test_the_patched_direc_test_code_directive.None_7": {"doc_hash": "7ede51bc88c64ff2df974e1eb729f97788462d4d3ba243bc40376ee8182f0783"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_patch.py_test_csv_table_directive_test_csv_table_directive.None_3": {"doc_hash": "5a78bd60cc89fb693917fcce956b5295e1b7cf12acde7ddd224a40e65f9f25b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_docutilsconf.py__Test_docutils_conf_sup_test_html_with_default_docutilsconf.assert_node_doctree_0_1_": {"doc_hash": "80c56a6a0b16fe582f34b12bbc9caefa861c0f558d9d3e00bf6561ed594ee625"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py__Tests_the_C_Domain__parse.return.ast": {"doc_hash": "251327742be9023aa04b43836d8895352f49a33751d89c5e1996222824270ef0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_check_test_domain_c_ast_expressions.exprCheck.if_res_displayString_.raise_DefinitionError_": {"doc_hash": "0a757132a06dd734abbab795a18019f48a30f02be86b69071025a97f9cc73058"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_expressions._type_expressions_test_domain_c_ast_expressions.None_20": {"doc_hash": "f96316a905553a746acd7d581722ee101536ee94d1d0328c0cacf10521cc5906"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_expressions.None_21_test_domain_c_ast_expressions.exprCheck_a_or_eq_5_": {"doc_hash": "039b534aa4218b5f771615efd2e30b051af3ed998624f52e99b8ac79d3b72e85"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_fundamental_types_test_domain_c_ast_fundamental_types.types.for_sat_in__Sat_.for_t_in__Fract_frac.for_size_in_short_.for_tt_in_signed_size_t.yield_sat_tt": {"doc_hash": "09013de709802a3d555db7b5b3110b0f4dd81ed3b0ddbbfa78233ada0d7d0298"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_fundamental_types.for_t_in_types__test_domain_c_ast_fundamental_types.for_t_in_types_.if_in_t_.for_p_in_itertools_permut.check_type_input_1_": {"doc_hash": "339b1944a6a43747d8d4d73c032c2027372bd2dc5c46a4732270af3f9f6effca"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_type_definitions_test_domain_c_ast_type_definitions.check_type_key_void_": {"doc_hash": "74a1b4b77c8cb94c24be70e3b986c3a7142d30de21c333185b6e207877ed1206"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_macro_definitions_test_domain_c_ast_macro_definitions.with_pytest_raises_Defini.check_macro_M_arg1_a": {"doc_hash": "cd6f1610dc7be75d074d1ebb3ee23f23df7d29512e46c53ebc97de37c5d9b8bf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_member_definitions_test_domain_c_ast_member_definitions.check_member_int_b_": {"doc_hash": "cd7b3a4464949731fac8141c3c38b0f9054804d322284d08dac522e71fd347a7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_function_definitions_test_domain_c_ast_function_definitions.None_30": {"doc_hash": "89df80c7b2ef61ad5004955196055757151e4e1d7caa4dc2fb3d314a1a4d99e2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_nested_name_test_domain_c_ast_enum_definitions.None_2": {"doc_hash": "330e111003bd1298c962d8cb7dc36f5161ee5612ec9c4a5a5db80ed23eb0006f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_anon_definitions_test_domain_c_ast_anon_definitions.check_struct_a_A_": {"doc_hash": "ae60e028d446ad900c995dd127d69df731139771d0dee96dbadda6f2dbe11a23"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_initializers_test_domain_c_ast_initializers._TODO_designator_list": {"doc_hash": "f9345224a43f78617b769a29b038b1bdabb9a81664b9b8a8844ec12615e590d3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_attributes_test_domain_c_ast_attributes.check_function_LIGHTG": {"doc_hash": "9f5649e51d4c4bcfc3127caf895f9cd38e7bc09104fbf8d45c352bc5f4e47a5f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_extra_keywords_filter_warnings.return.res": {"doc_hash": "8945a3ef1b82c99a782ef2bd6f81e63d89451c5bf039cecbfde5f03de84de4de"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_test_domain_c_build_namespace.for_id__in_NS_NSVar_.assert_id_c_format": {"doc_hash": "1cbea7d9041065c1c29fb3d00a6af34ce1460f87d67d59bc595eb10e3108c887"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_anon_dup_decl_test_domain_c_build_anon_dup_decl.None_2": {"doc_hash": "80fb9c8f98e082094ce7f7faec7d730ce1731a7a259c89482e8c29ee0fcd92ea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_semicolon_test_domain_c_build_semicolon.assert_len_ws_0": {"doc_hash": "0bd0e1b87007012e326af9ded8fb80a076e64c7d7ce358837b954a515d59b139"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_function_param_target_test_domain_c_build_function_param_target.assert_entries_": {"doc_hash": "ed607a026a22fd6361fcfa9bb4b73e54e52ed9c2d6becfb0424ac9551732f807"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_ns_lookup__get_obj.return._queryName_not_found": {"doc_hash": "2ef575c74e39f7e136d36bcd063f1cf7ae925acda157a51b99c435db78ae897a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_intersphinx_test_domain_c_build_intersphinx.assert_len_ws_0": {"doc_hash": "350e0e3aa62a950a2ad9b22a86663c9a6187c82810511719f877806f7e1cf469"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_parse_cfunction_test_domain_c_parse_cfunction.assert_entry_index_": {"doc_hash": "2c51a8dc294d8b3bc1fa8228029c4de67fe3f4d173557846fcd54f44ac6c3057"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_parse_cmember_test_domain_c_parse_cvar.assert_entry_index_": {"doc_hash": "fa61fbe50a465bfd83bf143c6ffc9a5677e5d2c7eed87663138460c04978134c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_parse_noindexentry_": {"doc_hash": "03e53009ce4653d8b4870ac850f5f538ca438548feee2ce2797bdb79219e5691"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py__Tests_the_C_Domain__parse.return.ast": {"doc_hash": "74e1ec415d38c2c29f80ad37a705ace72a70cad4bc455e2018fd5288c1ff2c58"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_check_test_domain_cpp_ast_fundamental_types.for_t_id_v2_in_cppDomain.if_in_t_.for_p_in_itertools_permut.check_function_input_": {"doc_hash": "4133dfc0f0c811956a204acaa083561f445982e9df25d361a118083a3aba9e47"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions_test_domain_cpp_ast_expressions.exprCheck.if_res_displayString_.raise_DefinitionError_": {"doc_hash": "40cb8adebeb5238e2d244454d093ee2ab92602c2a78968939cb50a39f0d8bb8c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions._primary_test_domain_cpp_ast_expressions.for_p_t_in_charPrefixAnd.for_c_val_in_chars_.exprCheck_format": {"doc_hash": "a1787b7198feb2832b8389a77a433ddc7a7ce8cbe658669a401084b7b69d3eda"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions._user_defined_literals_test_domain_cpp_ast_expressions.exprCheck_sizeof_T_s": {"doc_hash": "af52f96dc4ab5389768f810e3ec32989393073cdd0f181034b88aedde7b07aad"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions.exprCheck_sizeof_42__test_domain_cpp_ast_expressions.exprCheck_5_42_dvL5": {"doc_hash": "3d9b915ce8ccc5922911383fc97cd7846d8b3f72cc65ad61901b0e1c2b6cddf3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions.exprCheck_5_42_rmL5_test_domain_cpp_ast_expressions.exprCheck_a_b_c_1_d_": {"doc_hash": "f837d72e5a990660f7f07a3effdb19e0cd60a3a51a87f3a53a437f9f298aa88d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_type_definitions_test_domain_cpp_ast_type_definitions.check_type_key_A_d": {"doc_hash": "9fe711b39678b1f02bb47737479a27af0ea8afb8cb02e12cbc17c27badf0ac1c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_type_definitions._from_breathe_267_named_test_domain_cpp_ast_type_definitions.None_27": {"doc_hash": "891bfaeb10b4f33ef6a92f381b9a6345aa57b9f6b3c8afc98baa1d98c018e1da"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_concept_definitions_test_domain_cpp_ast_concept_definitions.None_1.parse_concept_templat": {"doc_hash": "a81785797d7b5b13864f4f5ebba49bf18377291ae1271f22c44c86f41ec8a191"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_member_definitions_test_domain_cpp_ast_member_definitions.check_member_constini": {"doc_hash": "6a900a51520d4a590ff39e63886913d111a46b418028b7132a43f164d6c9f70b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions_test_domain_cpp_ast_function_definitions.check_function_": {"doc_hash": "db7130d1c09611cd7449b983bc84bd78dc7f97307ff2ab96b80a0a2f904d88df"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions.None_16_test_domain_cpp_ast_function_definitions.None_33": {"doc_hash": "e5197037341b7cfa168e276ed1008ccec65e18fcc8c0c35a7b5a6cffba047464"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions.None_34_test_domain_cpp_ast_function_definitions.None_48": {"doc_hash": "922e45782dabfde71eaca7513c957cd85150507bc0634ec20ce676806921e43b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions._test_for_nestedName__test_domain_cpp_ast_function_definitions.None_71": {"doc_hash": "bb14d0beb745ccc16aff5e4632d565067aec31783cd812fe20f349a4bc4cf9be"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions._pointer_to_member_func_test_domain_cpp_ast_function_definitions.None_100": {"doc_hash": "e788858e13bd04d3b26267e52181d2c2d75639249f066e0aad4c085beccdcb73"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_operators_test_domain_cpp_ast_operators.None_31": {"doc_hash": "d5d1bd31b86b9ac1b53738c8bb3de5f6365590c4663f8b7cb0c4b6ef44b5994b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_operators.None_32_test_domain_cpp_ast_operators.None_55": {"doc_hash": "7e132154a0459af76a91cce599627ef0a107346adab2dbc640b2fafcefd59e55"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_nested_name_test_domain_cpp_ast_nested_name.None_3": {"doc_hash": "8f6e1ebff2f806c7a5622388bd2a8d74bafdb82586f63b063fc69bbd909dcc83"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_class_definitions_test_domain_cpp_ast_class_definitions.None_19": {"doc_hash": "fa78d0fe06ab4c01005a36d85fea3947dee293117b5663ae57909ec5c3c046e9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_union_definitions_test_domain_cpp_ast_enum_definitions.None_6": {"doc_hash": "653b4a26d34c5f784d2c36713ad46c46475106fdcd00108b65ecce48dc6d833e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_anon_definitions_test_domain_cpp_ast_anon_definitions.check_function_int_f_": {"doc_hash": "bd43972c4ca40860be9b10732c6ee4008f1d4a1601c263023f7cfb89293de75f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates_test_domain_cpp_ast_templates.None_24": {"doc_hash": "c248f333a52379edf7f480b07574d29230c73613f80040f3d7e9b20366f4243f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates.None_25_test_domain_cpp_ast_templates.None_31": {"doc_hash": "7d2967a1c35a9b7e326d876d3db0fcc87a4bd063898c2faf5ac6925cff5f52bd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates.None_32_test_domain_cpp_ast_templates.None_42": {"doc_hash": "646f289fc1122f3e473bf8a77d0692432938a924dc5fbdfcdcb708c5200a93ce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates.None_43_test_domain_cpp_ast_templates.check_type_template_C": {"doc_hash": "4b586c5f533c821b5d9099996c7923ad56bc36911c5d0c5f3470be748006c0b0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_placeholder_types_test_domain_cpp_ast_placeholder_types.None_4": {"doc_hash": "1ed7e4a4ef99e38ea22ebe56f28df5097f14d8b2f9dd65aaf04d237eaffb4d5d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_requires_clauses_test_domain_cpp_ast_requires_clauses.None_2": {"doc_hash": "ad0d3fa10620d61339dd380f4fcdd40a8aec77cecd5d2f7dcf312cd25d621261"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_template_args_test_domain_cpp_ast_template_args.check_type_template_t": {"doc_hash": "d95fab6a4af9f57308f3c8e0bed1b36320bfce7bcb96eacf3b80424a353ab056"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_initializers_test_domain_cpp_ast_initializers.check_member_T_v_T_": {"doc_hash": "582f82435e23f6de4329d9df32c3840ad28ad249d952307c42c31a29e4d05c03"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_attributes_test_domain_cpp_ast_attributes._position_parameters_an": {"doc_hash": "ddc9a9e761d286a782a3100cdd01bcc090c8cca6f69189da86452994c55b6db9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_attributes.check_function_void_f_test_domain_cpp_ast_attributes.check_enum_key_nod": {"doc_hash": "3b9f325137a8c16706e57140729540685e07a269c1f5ad6777b15379845aecaf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_xref_parsing_test_domain_cpp_build_multi_decl_lookup.None_1": {"doc_hash": "9a87e2bad9083e2ee21d6bc27d1cd4892c81882ecb992c32c21cac24a4d6be09"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_warn_template_param_qualified_name_test_domain_cpp_build_warn_template_param_qualified_name.None_2": {"doc_hash": "c8d1d908b2b7165896b9a09572a8a09a6a96952dcf7f94cb1fffadaf4b1b862c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_backslash_ok_true_test_domain_cpp_build_backslash_ok_false.assert_WARNING_Parsing_": {"doc_hash": "bdd49850fe2140251f36e40111e90995bd43a0161e6a5e4d309cdd3a92116959"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_anon_dup_decl_test_domain_cpp_build_anon_dup_decl.None_2": {"doc_hash": "cf9e8625b66547442ca655b8983e7eb10156261813370d57b2dcbbfe5d6cba59"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_misuse_of_roles_test_domain_cpp_build_misuse_of_roles.assert_len_ws_len_war": {"doc_hash": "f5b8f4d00aa83b0e5018a8e0988f23d3d959fc111b15443fc52b5b01cc2ceaea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_with_add_function_parentheses_is_True_test_domain_cpp_build_with_add_function_parentheses_is_True.None_2.check_s_t_f_": {"doc_hash": "98ae1501a8a8ef48baec4c3d953bd2a777bfcbf8274b96c22b4ed79fdbba711d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_with_add_function_parentheses_is_False_test_domain_cpp_build_with_add_function_parentheses_is_False.None_2.check_s_t_f_": {"doc_hash": "aaadcdb1e769114686112f929c56dd716bd2ebc0af19639adc506678781a2700"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_xref_consistency_test_domain_cpp_build_xref_consistency.classes.return.set_result_group_classes": {"doc_hash": "166cfe9cbae64acc687575094035eaf7a8a82aec3b781226b68991702053a3a9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_xref_consistency.RoleClasses_test_domain_cpp_build_field_role.assert_len_ws_0": {"doc_hash": "8f3a65fa41214393a7417b4a495a5d69cf8fac27c2e1e8da619bbaa76e7fee03"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_intersphinx_test_domain_cpp_build_intersphinx.assert_len_ws_0": {"doc_hash": "1fe0d3f631e57b7dd0f560b779ff5976ee14eae4a25c204ee46aa204831a0728"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_parse_noindexentry_test_domain_cpp_parse_noindexentry.assert_node_doctree_2_a": {"doc_hash": "cbd3d0b202944ecf4c48eb913d32148f83926cdc6467ec8f5d2a17b031777436"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_parse_mix_decl_duplicate_": {"doc_hash": "0e20302c03f3b7662348559c9362db335fc912df0903140bbc4b255189d7d5de"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py__Tests_the_JavaScript_D_test_domain_js_xrefs.assert_len_refnodes_7": {"doc_hash": "0efa2fdd89fb57487ed87ae32137e29367fe6f047ee199db9d8492d05bd9509a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py__Tests_the_Python_Domai_parse.return.signode_astext_": {"doc_hash": "02410640eb7a0c936340c8b0f5894afcfa299ff2e8702dc0bd59cdac7c2649c5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_resolve_xref_for_properties_test_resolve_xref_for_properties.None_2": {"doc_hash": "476cb272c835af2b4921dce51307f04962dd0cb45ebe7db9bc53ca594547caf8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_canonical_test_domain_py_canonical.assert_warning_getvalue_": {"doc_hash": "97be9daf24ee6e78c81d737d44c1c6a58ecabb3c8e0d53d598fb1776f3c16a2a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_parse_annotation_test_parse_annotation.None_12": {"doc_hash": "d1454636efe3ab6a3ff098f863597a5629f6d2e2e4ad06dd9c7a22068ee7e407"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_parse_annotation_suppress_test_parse_annotation_suppress.assert_node_doctree_0_p": {"doc_hash": "33e92abd83e519332e838dd187be5fa4d41a2802a4011d2eb69063f4126bb426"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_parse_annotation_Literal_test_parse_annotation_Literal.None_1": {"doc_hash": "62ab94be58e9add2bf516c7b35a712f11eb9361b45c425c743ebc7f30a81f8a7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_with_union_type_operator_test_pyfunction_with_union_type_operator.assert_node_doctree_1_0_": {"doc_hash": "8c8e663b5c3abc700e2f665b463a7bad4b1a700d615a0fdd7f2f6e5d446a2c49"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_with_union_type_operator_test_pydata_with_union_type_operator.assert_node_doctree_1_0_": {"doc_hash": "99b48303379fabf4b937b5901e9cc837fefb8d9f7ef0eb2ec2a7a5ab5b9f5223"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pymethod_options_test_pymethod_options.None_8": {"doc_hash": "7d307c43687909b965d89488e722b969e2de01f80ab9d915c4b5705e5866b53d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pymethod_options.assert_Class_meth4_in_d_test_pymethod_options.None_13": {"doc_hash": "ce6f1fb64fabaa544927cbdab64e271d640ceab9a9f8042c26907a06bdf58881"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyproperty_test_pyproperty.None_3": {"doc_hash": "11e7a6d4be219b50afaf53f8707f9f19e21ccff78cc69c34e7003bd4f90630e8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_canonical_test_canonical.assert_domain_objects__i": {"doc_hash": "10d723afaacc78a2392db1c2d187bd5d26583a651b6f5dc01469090ee103ab3b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_canonical_definition_overrides_test_canonical_duplicated.assert_warning_getvalue_": {"doc_hash": "e07cfcc436d82b8bcb122ca1474521d671925c0a30b5d6578fdc13d9a512d0bb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_test_info_field_list.None_8": {"doc_hash": "3c32fe01f0d2335c8527b9b7c242e25d53db4652646afa6f2e7cfc18237a8c70"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list.None_9_test_info_field_list.None_13": {"doc_hash": "50f8c29bb899abadcb58918641699aa0557e7f8112eda53fd7d954645f957378"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_piped_type_test_info_field_list_piped_type.None_3": {"doc_hash": "f2529568309d8c7f26e645f4dc3698a7a3cfac495b27bbb9b90c4e401796f333"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_Literal_test_info_field_list_Literal.None_2": {"doc_hash": "8a4541c3c64129e7ad0132129ff1e63cda0a03929ce4025dead18c39ab46d02f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_var_test_info_field_list_var.None_3": {"doc_hash": "498c2c821f5e9fd86f73b652221a3d5649e37bc52df77441799c3a7dfee3e759"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_type_field_test_type_field.None_6": {"doc_hash": "ff9a14b33942ac4d924c839a68563a0c4f12061a17934911535fa991b5ef5ff1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_noindexentry_test_noindexentry.None_5": {"doc_hash": "7bc7cefd35ef993fd558114f9fd238057c645003d190de73730e6e97e4f49f13"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_python_python_use_unqualified_type_names_test_python_python_use_unqualified_type_names.assert_p_strong_age_s": {"doc_hash": "2143b5b3012a83fe55979d6861b18d2b1fe2333924a5d8f1456a34d97d0d44eb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_python_python_use_unqualified_type_names_disabled_": {"doc_hash": "717996dfb2a0639c34098add3840d8ac7363a1888573619173d50e5d8d6d47ff"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py__Tests_the_reStructured_test_parse_directive.assert_s_bar_": {"doc_hash": "05bf0549b2aeda3287dda7f309ebb9317e073d8748e0315d4f97070f7d6e6d05"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py__Tests_the_std_domain__from_sphinx_testing_util_": {"doc_hash": "d82a8b9afb6b27cf5082ee98f1b077226308585f75e493ba1ca4ed723716be86"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmdoption_for_None_test_cmdoption_for_None.assert_domain_progoptions": {"doc_hash": "ff81e225b7384ccc724eb59367bfec0e69ff984ef63e28bcb5d73af5d8da493e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py__Test_the_BuildEnvironm_test_config_status.assert_want_str_in_app4__": {"doc_hash": "a7825862e78f30df5f03f3766c3a92b28eec0acfcbfb8e73eb280756c1945a25"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py__Test_the_sphinx_enviro_test_create_single_index.assert_index_5_\u05e2_": {"doc_hash": "06ce4e0e89c59c5089ef6b03439154e9d9239e1df22c9b2bfdc96c0e8f137f3c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py__Test_the_sphinx_enviro_test_process_doc.assert_app_env_files_to_r": {"doc_hash": "1883050f539fb1d62886978fda7ef666cd1c19ce8400942dd1b805b629b93f26"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_events.py__Test_the_EventManager__": {"doc_hash": "82472fd5c9c5f2de63b3885dddfd35ed90684854ada8f96aca15b1e5c6e8c90f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py__Test_the_sphinx_apidoc_apidoc.return.namedtuple_apidoc_cod": {"doc_hash": "dc28c9a1a9370c534c79f8979a193b39c328f7979cad6f8392971d0a53a89f47"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py__Test_the_autodoc_exten_try_.except_ImportError_.pyximport.None": {"doc_hash": "efa13fa7c09d33e8fc594d15a54a33e484c942e28f602189648c7f9f8edb02f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_process_signature_typing_generic_test_autodoc_process_signature_typehints.assert_captured_app_": {"doc_hash": "9cda939f82655a83a6a7b2a5f05c8078b48e8f23d03fed2d052356612db75549"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_members_test_autodoc_members.None_8": {"doc_hash": "b2cf72984b84f06695a6748b90ebb92d80746240780840b6fa0a51995b319227"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_exclude_members_test_autodoc_exclude_members.None_10": {"doc_hash": "9b8c027150084b7861c2e457b9ebb0f6c279fef8a80081530f9de5f9faa3cf2e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_undoc_members_test_autodoc_undoc_members.actual_5.do_autodoc_app_class_": {"doc_hash": "9a78c95c9a3958b5fc82b1418b3da3de02474c2171f8c45ae2f5ee4cd9cbe6b0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_undoc_members.None_4_test_autodoc_undoc_members.None_4": {"doc_hash": "8ef66ccd6d6522847c154065bfe380168e179443843157129cb01b834cfc93ba"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_undoc_members_for_metadata_only_test_autodoc_undoc_members_for_metadata_only.None_1": {"doc_hash": "330030d480a79757e93a5a4e2d29ebf6024733cd2220a99de3dddc1cd57ed6f2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_special_members_test_autodoc_special_members.options_8._undoc_members_None_": {"doc_hash": "97738473943d5567627493fc535b9630425295e89178843f14e28c9986ce4e65"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_special_members.None_5_test_autodoc_special_members.None_8": {"doc_hash": "71f3f15f7552c119da78129d087b3b21fa177977d6856856296f2a5da2b73beb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_singledispatch_test_singledispatch.assert_list_actual_": {"doc_hash": "2b9760403d3867527f23e16a0bd2a368d1bf94e8b565e93dad27dfda6a65ea38"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_type_union_operator_test_type_union_operator.assert_list_actual_": {"doc_hash": "a178457ba0b9e70c4597d69e4646df0d1231b941a65d8c1187d985c7bed81d34"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_hide_value_test_hide_value.assert_list_actual_": {"doc_hash": "61a58ffcde25aa6a0fa27430f2de23f0e679791b05c818b5f1625ea93b77ab9a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_canonical_": {"doc_hash": "db9bfcd6dc3255791f0a770cfa584d999352550e35f632a7581d7a2c28c6e93c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py__Test_the_autodoc_exten_test_autoattribute_novalue.assert_list_actual_": {"doc_hash": "68db60fc874c8f1b7d6688a542fc0f76ed05604e88a619bbb9025b213c9e1f27"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_instance_variable_without_comment_test_autoattribute_slots_variable_str.assert_list_actual_": {"doc_hash": "0ac64a4b993112ed0066927ac861e51bae8521067a2034db757abaca289f166d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py__Test_the_autodoc_exten_test_classes.None_3": {"doc_hash": "9322505ee78e24636090556fa91763edae84712865f03fb804c7940c6aa5c670"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_uninitialized_attributes_test_uninitialized_attributes.assert_list_actual_": {"doc_hash": "4e8201c0ecd06fe20fb19021e5322175f109f2f2ad4dda6a401add19c19e8993"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_undocumented_uninitialized_attributes_test_undocumented_uninitialized_attributes.assert_list_actual_": {"doc_hash": "a4ff27134588dcf5d461c28b34000aee159f66fb9ec9501a5105c385b1e471dd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_properties_test_properties.assert_list_actual_": {"doc_hash": "31ab3a6f6dd17284031f9b38e281e5cbce7deb588329b17d0354885885786a57"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_show_inheritance_for_decendants_of_generic_type_test_show_inheritance_for_decendants_of_generic_type.assert_list_actual_": {"doc_hash": "6bec3e27c0e66781cd0017bf700280f2b4c6047a198f47e054ddd19e3d590032"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_autodoc_process_bases_test_autodoc_process_bases.if_sys_version_info_3_.else_.assert_list_actual_": {"doc_hash": "98a1dd38c2135cf92c064a0406e281dbccdaf05e70e35b6304cde55f069b75aa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_doc_from_class_test_class_doc_from_class.assert_list_actual_": {"doc_hash": "b5ec493cb0810c8d1c67c0ef3ab78d436afb3042a3d289e216c9a7a183473dfe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_doc_from_init_test_class_doc_from_init.assert_list_actual_": {"doc_hash": "b4552581faf9e0cf3ac7ab91f017407db61e82a01c702e91104daae52303ac4a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_doc_from_both_test_class_doc_from_both.assert_list_actual_": {"doc_hash": "0e4b7d9bcae72d91229f3f5902378c1c0a63cd01415852bc7d3f9114c60c880b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_alias_test_class_alias.assert_list_actual_": {"doc_hash": "5a549f2fdd2d1a6d9b23b98b2175fc8f0f75c323e1b69f95f183994cf107ca3a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_alias_having_doccomment_test_class_alias_for_imported_object_having_doccomment.assert_list_actual_": {"doc_hash": "3f98339b5efeb4e5fb291380bd2aad1235876fb740207d949e9f95a2943d035c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_coroutine_": {"doc_hash": "ab8f203fd403d5fda0187df9fb03325b45b57d4ebfae1e0f5332d206cb5e7d64"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py__Test_the_autodoc_exten_test_autodata_novalue.assert_list_actual_": {"doc_hash": "0a7931d4c4bbfa762d6c2b5128d0420146695a06a12398e703d7772a219cb417"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py__Test_the_autodoc_exten_test_classes.None_3": {"doc_hash": "c03d023ee71071f18fd1e48b01b1e3ad1a59815413f1be5eb6c5847d9f2812fd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_singledispatch_test_singledispatch.assert_list_actual_": {"doc_hash": "a5f09bba94a93ebf5f4c18cd611b429c01aab9d5d539bd7cac845e005cb337c6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_wrapped_function_test_wrapped_function_contextmanager.assert_list_actual_": {"doc_hash": "694260acb07ad29547d8e23fd9773156a41133be5b5642f823a209d60ffcf44d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_coroutine_": {"doc_hash": "bd8e94f94c50c95b85a8ebf633cf1c543e2a30851b7a4827512273efd18e99a8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py__Test_the_autodoc_exten_test_empty_all.assert_list_actual_": {"doc_hash": "bdaa41547e4d210c814448ccf2ed8bf4616a1b6d7d83caf804d7f423694d526e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_automodule_test_automodule.assert_list_actual_": {"doc_hash": "b41ab2af2fd87c0de6aac7abb8269ab179e5fb634f8a342a107fe97e881f9e51"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_automodule_undoc_members_test_automodule_undoc_members.assert_list_actual_": {"doc_hash": "008f45bf7fc4c1a47729ffa5f4671606f938d171945760d0b471f410e14ef6d5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_automodule_special_members_test_automodule_special_members.assert_list_actual_": {"doc_hash": "d292bbc33ce11e1d14d54712c2582815e3dfd743eb0665c852b995dc9c96ee1e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_subclass_of_mocked_object_": {"doc_hash": "786023e994363b0efd2c11a83cc7569b093d50660309ad5c9aefc6c948d225a5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoproperty.py__Test_the_autodoc_exten_test_class_properties.assert_list_actual_": {"doc_hash": "00560e4d9dc36facf0a1fb4b9f765f7c01c598268a4a3906645b30353a053452"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoproperty.py_test_cached_properties_": {"doc_hash": "4fca48f4d651f61feba893e5e236299c1792d0b959a95b40a0eb64ec3a0bb904"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py__Test_the_autodoc_exten_test_autoclass_content_class.assert_list_actual_": {"doc_hash": "8c691887ebbc920652b2c9752c223de9f84b95f7f03d4ea7aaf689edff7f7a98"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_class_signature_mixed_test_autodoc_class_signature_mixed.assert_list_actual_": {"doc_hash": "c7515a3290226b8b00745a9a4e3ee8e548027ea2d2d8d0d6de5389d6af054dd0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_class_signature_separated_init_test_autodoc_class_signature_separated_init.assert_list_actual_": {"doc_hash": "122a8faa51134f787e5fe98831387ad030fd2106cdcd9538b1485ef801d30d87"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_class_signature_separated_new_test_autodoc_class_signature_separated_new.assert_list_actual_": {"doc_hash": "7a4566d114bcb461a662a62e90de09af14bc59f4bfa9acfbb913c59480d3965e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_docstring_signature_test_autodoc_docstring_signature.actual_3.do_autodoc_app_class_": {"doc_hash": "201067cc2231d85ff15c2f03671ac3159c853d49bc6174f27ce7ba196bed503d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_docstring_signature.None_1_test_autodoc_docstring_signature.None_1": {"doc_hash": "bb98f43b31ef36038fa95fca6bac56336c15833928ea26e81d6ccde91afc3dfa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_test_autodoc_typehints_description.assert_target_overload_": {"doc_hash": "176182b034babadf13d554cf74adc257168caca4568fda1d71a680f21101813a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_no_undoc_test_autodoc_typehints_description_no_undoc.assert_target_typehints": {"doc_hash": "522ad31abd356ef18059524676341c02100936eb47134c81217c1af882455335"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_with_documented_init_test_autodoc_typehints_description_with_documented_init.assert_class_target_typ": {"doc_hash": "e5c34ae4e2bc8d9851b6ef59d9247ccf033ccf4ee2b67b896c9a80bfc0098110"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_with_documented_init_no_undoc_test_autodoc_typehints_description_for_invalid_node._raises_no_error": {"doc_hash": "1ff5077b7cf8f30ada8dd5d7c4f46c2cedadeb404ea4ac3133061b05ce2ee5f3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_both_test_autodoc_typehints_both.assert_target_overload_": {"doc_hash": "bc7b9bdc45ed0b4c479cc7ee8ccafc8193336b238f34289246bdaf2552e9537e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_type_aliases_test_autodoc_type_aliases.actual_3.do_autodoc_app_module_": {"doc_hash": "f3a342d053793873109176396c44dd93ee6408c9db9b691c9bcb9efd64620885"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_type_aliases.None_1_test_autodoc_type_aliases.None_1": {"doc_hash": "e8080180991d26bc5124a5918c0b34b4196ced422515a7d4d19024c10e041fc1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_and_type_aliases_test_autodoc_typehints_description_and_type_aliases.assert_target_autodoc_t": {"doc_hash": "6c0dae9a830db435fbaf026e57a3f223a74355f40ca90691e8893d1b4808d560"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_test_autodoc_typehints_format_fully_qualified.assert_list_actual_": {"doc_hash": "b6acf95b39a3f55bac2d87de7d0dccb2a3d6d8c0f67cdc882b8cb0d001e1b760"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_for_class_alias_test_autodoc_typehints_format_fully_qualified_for_class_alias.assert_list_actual_": {"doc_hash": "4c98d84569e2cf2fee03555e9b28617f3b900ae79c842b31411ffe9b6c162298"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_for_generic_alias_test_autodoc_typehints_format_fully_qualified_for_generic_alias.if_sys_version_info_3_.else_.assert_list_actual_": {"doc_hash": "e567703b3cb43f453ee093ac70f0eb7e33dc2653dc95c6fea966524d83f05249"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_for_newtype_alias_test_autodoc_typehints_format_fully_qualified_for_newtype_alias.assert_list_actual_": {"doc_hash": "5a3c0d86b4472c5e45014946ca763de5cf39249fb3881f1134d9cdca723c41b9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py__Test_the_autodoc_exten_test_process_docstring.assert_list_actual_": {"doc_hash": "1b2c9fa858e25cf914dcf7f213f95f06e1867599c0ef2b89afb04ada5ea1328a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py__Test_the_autodoc_exten_test_MockModule.assert_repr_mock_moc": {"doc_hash": "3f390495b3e4c8d3f17599aa7ff9db8c6cf623c998a9f4aecbb934c66a555bd3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_preserve_defaults.py__Test_the_autodoc_exten_": {"doc_hash": "6cb33608f53f44def1281166cbe52f9575816697d90f54d4aad864cb16cfe915"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_private_members.py__Test_the_autodoc_exten_test_private_field.assert_list_actual_": {"doc_hash": "7cc3aa3f49668939455beb0de26cf66259ee4ff38596a6afe75537d8a91bfd3b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosectionlabel.py__Test_sphinx_ext_autose_test_autosectionlabel_html.None_6": {"doc_hash": "f5a4ce231867c7a450e6dfb11e9b9b337c2b42ad4abb95ac95c9656a84cd4213"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py__Test_the_autosummary_e_unload_target_module.sys_modules_pop_target_": {"doc_hash": "112de6f30d1e4eae130e3a1e3a255028a146f4063dc765406c5ef1f0c3e37427"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module___all___test_autosummary_generate_content_for_module___all__.assert_context_objtype_": {"doc_hash": "8500b837e32fce4d4869b90cb49d48178e0fafc1c7513f1e0db141a2777a7fcb"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_coverage.py__Test_the_coverage_buil_test_build.assert_undocumented_c_": {"doc_hash": "5881043222ea657908e5cbc379dd1e7728e9d4b1beffbd56918f7de6a27a0ebd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py__Test_the_doctest_exten_test_build.assert_cleanup_called_": {"doc_hash": "a4605ef34e55f653bdc86c4cb631ff4eccae96b91b671ec44ffbc94d65776b48"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_test_highlight_language_default_test_highlight_language_python2.for_node_in_doctree_finda.assert_node_language_i": {"doc_hash": "e377e4a511c30aa8e870e6d2dee686398b5d52ba6595241224324b54289e6a78"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_duration.py__": {"doc_hash": "6e91a6e14fcf79fea1daecb823ddb58a69bdb673bb05131d4f7459f9019ae0c0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_extlinks.py_pytest_test_replaceable_uris_emit_extlinks_warnings.assert_message_15_i": {"doc_hash": "ab196b8e5042b5f1c438bdb53a63a6f59bf505a30bbe8be71c09b32cb7a073cc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_extlinks.py_test_all_replacements_suggested_if_multiple_replacements_possible_": {"doc_hash": "68496b1fd20ab89ce01323317266d759487d72b428a1c85b91f1dac4ab736a7e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_githubpages.py__Test_sphinx_ext_github_": {"doc_hash": "feec6c7b9bc2955893d912482a772c71642c4c5f93377865834d86369869d3e5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py__Test_sphinx_ext_graphv_test_graphviz_png_html.None_4": {"doc_hash": "8abda3dc887a1327fc6f1b9e38b9d2104acd27157f7de570d806624020aa5eb0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_ifconfig.py__": {"doc_hash": "05ab112232c1456e2d7d45ae63b5b609bfae62ce5eaef4063a227dcd82b9f444"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_imgconverter.py__Test_sphinx_ext_imgcon_": {"doc_hash": "26014ec77b6d2e7eb38b06c8fb87c11a801da4bafe407c8e86cf5b25a60f0a36"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py__Test_sphinx_ext_inheri_test_inheritance_diagram.None_23": {"doc_hash": "dd6a7fd2cc17e1aea12a470fb76f73261fd5852d88e869bd21480ce0178abb29"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py__Test_the_intersphinx_e_set_config.app.config.intersphinx_disabled_reftypes._": {"doc_hash": "3dc04147374b2ec042bbd7fc4f98be8c752001b8f909793a117f7afc58b19cd1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference.rn_9_test_missing_reference.None_21": {"doc_hash": "c2842850f2be5c60f7fee40ec6ad2baab261c6877830878039a412a9f2d7d4b7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_pydomain_test_missing_reference_pydomain.assert_rn_astext_A_": {"doc_hash": "b3919aa8bba9927674ac128d5cd5009814a1ce20ecf168d13ec1e138fe30901f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_disabled_domain_test_missing_reference_disabled_domain.case.assert__rn_func_": {"doc_hash": "d5a2028808f83fc97e4cf745db1759376311029414fae70d432827baac0acf1f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_disabled_domain._the_base_case_everythi_test_missing_reference_disabled_domain.None_7": {"doc_hash": "e1143fbdf85cf9110d172f12183512abe72e129033d2621ebbdbe427218d7085"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_inspect_main_url_test_inspect_main_url.assert_stderr_": {"doc_hash": "6a6f7d4bb1a764af3eb3f54faefb8c15b977b44225f5298000d1728931d18327"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_intersphinx_role_": {"doc_hash": "c2979acecad487d18e30a3e9cbfabc682194650c7c800602ad311e4bddc3070f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py__Test_math_extensions__test_imgmath_png.assert_re_search_html_co": {"doc_hash": "4e76bac5c368127b27a16429587790f9da0cc6c6ba009c0a2725b2cf1e24c250"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax3_config_test_mathjax3_config.assert_script_window_M": {"doc_hash": "a60b204ea4f2928fc2412a05a9c5fefff909caeea063dda714be26820fb5a76d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax2_config_test_mathjax2_config.assert_script_type_te": {"doc_hash": "3f909238059d9ea83303ae7b2cfb15367942a9485aacb803f2b24566a9392986"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_options_async_for_mathjax3_test_mathjax_options_async_for_mathjax3.assert_script_async_a": {"doc_hash": "cb46129dc4f46a53168f6745497977bb0201bdeae31bf2f494e568ea58f9cc2e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_options_defer_for_mathjax2_test_mathjax_options_defer_for_mathjax2.assert_script_defer_d": {"doc_hash": "5d0b21374dd94b94d980fb44ae172c474dd73ced8c9e490e7a637f5c00629c8f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_is_installed_only_if_document_having_math_test_mathjax_is_not_installed_if_no_equations.assert_MathJax_js_not_i": {"doc_hash": "2469d3840de9c13315f352de94591c04661da83a7ce029cf0284b5f4e1aecc3a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_is_installed_if_no_equations_when_forced_": {"doc_hash": "789ddd6e4ad270707c1dcdcfc60947e8b2ae36d07e7d20e10732b7c2a8b2a432"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py__Tests_for_mod_sphinx_ProcessDocstringTest.test_modify_in_place.self_assertEqual_expected": {"doc_hash": "3c9ba3e9a4b23feb7b1442ab133d4b42eb9a297129c4ad92e89df20e5433e636"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py__Tests_for_mod_sphinx_if_sys_version_info_3.PEP526NumpyClass": {"doc_hash": "aba58af8bdac2b192757040dd0ee20359c6d8f3577d0b778cfcb76504d61e814"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_attributes_with_class_reference_GoogleDocstringTest.test_attributes_with_class_reference.expected_5._": {"doc_hash": "6d2c1b4bc20b601059ff9dd00e58094f38db7a77c7638c11d743d656965a7370"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_attributes_with_use_ivar_GoogleDocstringTest.test_colon_in_return_type.self_assertEqual_expected": {"doc_hash": "ef9e76924426bef821f0c52538e6c4390e7afebaeff81fe2b430d2ea0d43f4e7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py__Tests_for_mod_sphinx_BaseIteratorsTest.assertTrueTwice.None_1": {"doc_hash": "5c906287efd89e2a9b022a28292bd7b5fc1d98b83d5f6eee103c858fc2cc9784"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_todo.py__Test_sphinx_ext_todo_e_test_todo.assert_todo_1_astext_": {"doc_hash": "d5f15be75a0d2490ce4fc179bcbed331e7b96ffca69fe997e4b73f89a71bc7a4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py__Test_sphinx_ext_viewco_test_viewcode.assert_div_class_view": {"doc_hash": "3dd53532edb1ef9d4cae696525eefa8ae280c37ffa90c9a6f29c120ee98c7bb7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_extension.py__Test_sphinx_extension__": {"doc_hash": "5fb7c125f839cb4dc53799d425c67a01ef46c1e4fc1e4414cde1d16a16f82dce"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_highlighting.py__Test_the_Pygments_high_test_set_formatter.try_.finally_.PygmentsBridge.html_formatter.HtmlFormatter": {"doc_hash": "b205f34555602dc080e3d17239ec11ec59adeb3beaf096e1049bb7790318f69a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py__Test_message_patching__write_mo.with_pathname_open_wb_.return.mofile_write_mo_f_po_": {"doc_hash": "8a77b22b2d7d45119f50cbc98af6ddc0122166895fc617730e2903da46a934cf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_setup_intl_setup_intl.for_dirpath__dirs_files.for_f_in_f_for_f_in_file.if_not_mo_exists_or_mo_.write_mo_mo_read_po_po_": {"doc_hash": "9c4ed887a2503c4afad4433ab0bfadfc077a5a3ce02ec2982b301de4e2ae46d3"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_noqa_test_noqa.assert_next_section_not": {"doc_hash": "866487c5ed2c98dc9404841e392bb7e9c7067732341367128e5d41368f5ec35f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_additional_targets_should_not_be_translated_test_additional_targets_should_not_be_translated.None_8": {"doc_hash": "5cfb52f7b722013538eb76f7f0ffe9c8728f31129988bc3d2af77b90effa793f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_getwarning_test_gettext_allow_fuzzy_translations.assert_FEATURES_in_cont": {"doc_hash": "8d1296d6459c008058a7bb9d0b760d162e5a69a5aa7b4b5d27df6d38b96b8adc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_disallow_fuzzy_translations_test_gettext_disallow_fuzzy_translations.assert_FEATURES_not_in_": {"doc_hash": "edb1d165e040f227ee07b66781bafe5e9575bbaf6069eb4241c8bd52c024924b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_customize_system_message_": {"doc_hash": "3e75161427f584509965b0175636a1da6823267bcbb770994c522a19e05441f9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_locale.py__Test_locale__test_init.None_11": {"doc_hash": "5fce76cdea39e73e6fb93fdd1612eb79ca1ea76d09577307e0ab3554328b0b70"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py__Test_various_Sphinx_sp_verify_re_html.return.verify": {"doc_hash": "d162448cccb4ef1ac2176daedc3438f83a07618db3ac3f5b45459e687bf6d41b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_metadata.py__Test_our_handling_of_m_": {"doc_hash": "06e12f3edb2beb24df1a0e2bf30b8a7d7a2498ec29054e6809eec91eaadfadbc"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_parser.py__Tests_parsers_module__": {"doc_hash": "8e58dc6e945e8fbb654e0cf7c284c29fe3c374204e65bbe615f33f6549cbb2e2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_project.py__Tests_project_module__test_project_discover.None_6": {"doc_hash": "9e407a72d623008a02b732e4b5a0038de3b1e75b4cb489555a5761f66b180dd7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py__Test_pycode__test_ModuleAnalyzer_for_file.assert_analyzer_srcname_": {"doc_hash": "3649fa557e467e04e4b621e04dcc5886bb0ebb1f703b85850c2d712d7c4874f5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_find_attr_docs_test_ModuleAnalyzer_find_attr_docs.assert_analyzer_tagorder_": {"doc_hash": "f48b45506e2bbb45a7ffe06790b753d45de6fb9cf29255e89595b21acc701243"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_find_attr_docs_for_posonlyargs_method_": {"doc_hash": "e9d9f333dd062b3e07566a934273ace301ab97b303da001331875813fb98a0d0"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_ast.py__Test_pycode_ast__test_unparse.assert_ast_unparse_module": {"doc_hash": "956f048964189e4df31d43bc241d67ae3561dd749ec2c70eecf397f14a8d74bd"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py__Test_pycode_parser__test_comment_picker_basic.assert_parser_comments_": {"doc_hash": "8791dff0994a3dd849dac88b1c3dacafa64c34d9b181279b191f3e7ad14caeb7"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_annotated_assignment_test_annotated_assignment.assert_parser_definitions": {"doc_hash": "fa92869b3928a813faa856278fca3c584d34fb2f5721ff3d20d52afb8f627e21"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py__Test_the_sphinx_quicks_teardown_module.coloron_": {"doc_hash": "a00869a025dcda3e5b34aaf6b4afb03d52d6df911c3f4a1f4085868bc0287d7f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_default_filename_test_default_filename.exec_conffile_read_text_": {"doc_hash": "c6ea0c943ab660387128200e0ddd2064a6e7859afd18899064e37169770c7c53"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_extensions_": {"doc_hash": "fffa406534ad32be92e9c5d6a534ea7e69dd766857bb22338b9190e629775128"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_roles.py__Test_sphinx_roles__": {"doc_hash": "7b7d0d1796e34110a6a3e4932ddc0fd5e8d3503a40bd428482bbc7816e73dea9"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py__Test_the_search_index__test_objects_are_escaped.for_item_in_index_get_ob.else_.assert_False_index_get_": {"doc_hash": "631d273109dd5cd4ea644f23207ce0bec94e0e89ec25901cdbc47988dbe1d276"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder_test_IndexBuilder._freeze": {"doc_hash": "c7389fbcd6f5db68bdee7b467be27a7d981bf83780ab05e861e0b168c5262017"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder.assert_index_freeze__test_IndexBuilder.None_20": {"doc_hash": "d78927cb518bf9abeb711bae1fb0e3519e73926ed1e008bb09eeeb874ea31ef8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder.None_21_test_IndexBuilder.None_27": {"doc_hash": "7c5a16ac78bd120b1535b4738fb1192d5dcc6969b6233bec71138aa3ad401e4e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py__Test_setup_command_for_setup_command.with_cd_pkgrootdir_.yield_namedtuple_setup_": {"doc_hash": "8cd55c92abed87192056819f47ded2d349874c2684c54bace10fe79b83044ca4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py_nonascii_srcdir_nonascii_srcdir.root_doc_write_bytes_roo": {"doc_hash": "ff7bafa5198ae1f2a6c59f8024f21f84c62c7c993222c4d74b524af3c2ea320b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_smartquotes.py__Test_smart_quotes__test_literals.for_code_element_in_etree.if_code_text_startswith_.None_1.assert_code_text_lite": {"doc_hash": "ca2bd46899b08c185564077861bad2477dc7f3878a3497fd4b0fa97c6854f61f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_smartquotes.py_test_text_builder_test_man_builder.if_docutils___version_inf.else_.assert_r_Sphinx_is": {"doc_hash": "3fc2edf3e21b59c08328792c93890f0f8f5c236db974d1f4126ca74961a6cbf6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_smartquotes.py_test_latex_builder_": {"doc_hash": "9d42a09427cd0c09d21263238e3c3e90eb289d70994955d44807a2f578ba6a65"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_templating.py__Test_templating__test_autosummary_class_template_overloading.assert_foobar_not_in_re": {"doc_hash": "d4423f6f38a5379ba671731164472901b3cebad76f1c2525b07851e63fa9e95c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py__Test_the_Theme_class__test_theme_api.assert_not_os_path_exists": {"doc_hash": "971303cf0e6baab9c3a06ed93943d85f50437d45edfb32f6185fea835b1df017"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_toctree.py__Test_the_HTML_builder__test_relations.assert_quux_not_in_app_": {"doc_hash": "f8f2c069461dc989be7f94b0da7d18b5c0924ad2b30ec1f0a2a0643c5ab72833"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms.py__Tests_the_post_transfo_test_nitpicky_warning.assert_p_code_class_": {"doc_hash": "e9db470a6d7a9bb7346cff4acc5af79d482b4d4a98242783f36304ba2637a723"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms.py_test_missing_reference_test_missing_reference.assert_p_span_missing_": {"doc_hash": "ca6bc029e669165b073b326c5c9e8357706af14bef8a0ed548bc6ee95518559e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms.py_test_missing_reference_conditional_pending_xref_": {"doc_hash": "69daa911d157c1fa514ed91ac03b801f0114b022c5621302b9b4a3850f70ed80"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py__Tests_util_functions__test_encode_uri.None_1": {"doc_hash": "ac13768eea7c5f4b5f1e200b93a8a6a66ab43110a7d9cf267e386f7fa76b8e02"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docstrings.py__Test_sphinx_util_docst_test_separate_metadata.None_14": {"doc_hash": "ab9ef9efa9dc20ce0be856d09ee5944fcadd6bb322c201ee770133b8f3c2878f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docutils.py__Tests_util_utils_funct_test_register_node.None_3": {"doc_hash": "11693cf7ea6739e9233b53d633242d56953131e1b891b908f0c061bfde172667"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_fileutil.py__Tests_sphinx_util_file_test_copy_asset_file.None_9": {"doc_hash": "32f1200e1c13d449e44d419a01bb14954a9ee3184a1510a6ed864a89520ba98d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py__Test_i18n_util__test_catalog_info_for_sub_domain_file_and_path.assert_cat_mo_path_os_": {"doc_hash": "b239499507e7fb546c059c89eaf884a2bd7a1127497e5e1a6365e2886a8c9914"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_get_filename_for_language_test_get_filename_for_language.None_18": {"doc_hash": "c65d364c5ff83391d49bdb2d8177fe2f174ec744065f7ce6c6918cf6e3d2ddba"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_images.py__Test_images_util__test_get_image_size.None_3": {"doc_hash": "c835239f2987b019125a18c21200e2b1105de3bf647dcb47ce209b16724cf620"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py__Tests_util_inspect_fun_test_TypeAliasNamespace.None_1.assert_type_alias_unknow": {"doc_hash": "ef493643af90a963a231ac255801a72a7f4248764aa2a12709e34c78ac285998"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_test_signature_partial.assert_stringify_signatur": {"doc_hash": "634f28996cc16edd9688f20ba91c82a069ce254ce40cdaf78eaf919ed4da2e0c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_annotations_test_signature_annotations.sig_16.inspect_signature_f15_": {"doc_hash": "c61b3c8242044f37d356019b93db5a98f83525be10f4d8d006e85c1b23568bae"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_annotations.None_14_test_signature_annotations.None_3.else_.assert_stringify_signatur": {"doc_hash": "9f0f06e64c148e1360b598866339cdceb0e143f7571072d15ed3743ece392459"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_safe_getattr_with_default_test_object_description_enum.assert_inspect_object_des": {"doc_hash": "34849a1ca75f0bb805f0158864959690410d1fd9c18263374b6c008c80ac0442"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isattributedescriptor_test_isattributedescriptor.try_.except_ImportError_.pass": {"doc_hash": "c854eef9710679863f644757d23fa1bac63ddab04b7e87534ac9c5e0077858d2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inventory.py__Test_inventory_util_fu_test_read_inventory_v1.assert_invdata_py_class_": {"doc_hash": "22bd6cce176ca0dafcb635f10a7dae7823efff0dd69a7db91fd99e63ff91a4cf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py__Test_logging_util__test_Exception.assert_class_Exception": {"doc_hash": "b5986b82b4b77416d5bf31c30ebda43137f35552c4a2cb49c4364066178d70de"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_is_suppressed_warning_test_is_suppressed_warning.None_8": {"doc_hash": "aa03ec5c3bc5ef7bc148f5b3d6937ddebb674ebd69a3f1a8c65fd382bcea42d6"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_suppress_warnings_test_suppress_warnings.None_14": {"doc_hash": "3065d2673ecbe023bb70377de7512ca4f7b9ccd2a8447c98b57b052f40f7f5ea"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_logging_in_ParallelTasks_test_output_with_unencodable_char.assert_status_getvalue_": {"doc_hash": "192710e4cb48cc5af8ad0e2af5fd9b565ebf7dd47fa05255afdbaa6d5d8e2f5d"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_skip_warningiserror_test_skip_warningiserror.None_3.with_logging_pending_warn.with_logging_skip_warning.logger_warning_message_": {"doc_hash": "ea8994c6094a809236060ccfc3260827c16db75651f0ffa0789af55489cd48f4"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_matching.py__Tests_sphinx_util_matc_": {"doc_hash": "301780345135756c02e3042c4a5d354fc16e3eae6401f8bb88b51e21c0478230"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py__Tests_uti_nodes_functi_assert_node_count.assert_count_expect_co": {"doc_hash": "9f0a908b7f677cd0a78eb07d2b88e398623cc5ac726341ce6a3e105a2e423d40"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py__Tests_sphinx_util_rst__test_escape.assert_escape_toctree": {"doc_hash": "9993c4b0989e7452a0e177d6efaebb30d05e543adb3c951deca5caa2c8f0dc51"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_template.py__Tests_sphinx_util_temp_": {"doc_hash": "b27576641386f27baff01ec7811285902ccaf380292d639d22297a320e35333c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py__Tests_util_typing_func_BrokenType.__args__.int": {"doc_hash": "325def9a478576a796c70ade27766a9d25a728d7c307098957f32286450d31b2"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_test_restify.assert_restify_str_sm": {"doc_hash": "52e36b54b2e98206bfa4546c676e4e5e413dcd2a194dee1c1ddd397b3b7eda9f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_Union_test_restify_type_hints_Union.if_sys_version_info_3.else_.None_3": {"doc_hash": "cb8b7b0404a2c71bbd0410236d7b8619da2c041e9d3b1b9946e0829926b24020"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_typevars_test_restify_type_hints_typevars.if_sys_version_info_3.else_.assert_restify_MyInt_sm": {"doc_hash": "94713b92d7099a54fc2e022df08d4ccd0a20cc8140318b86a207248f6fd9ae8f"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_custom_class_test_restify_type_hints_custom_class.None_3": {"doc_hash": "b82ea179679bf2f68cca32c1f8c6dde579da38b5969ed2a62c20d751143d6551"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_alias_test_restify_type_Literal.assert_restify_Literal_1_": {"doc_hash": "7c02895d0bf8fbc82d046fae12a4d96f30d3e1663efdc590c4e9bc1c48f63d8a"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_pep_585_test_restify_pep_585.None_2": {"doc_hash": "ad5ded1210e90452c3ec709694fc257802e99c1fad62acd418047959d4536335"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_union_operator_test_restify_type_union_operator.None_2": {"doc_hash": "690e594f02060b64dbd8d862babc2f8906db1bfb44f585e3a81ec98679f85268"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_broken_type_hints_test_restify_mock.with_mock_unknown_.None_2": {"doc_hash": "7c40102b8b1d891c8c086ced74165a529c036ab937be9309e0c81fe84d68b107"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_test_stringify.assert_stringify_Any_sm": {"doc_hash": "0a31a85233058a056c3eb13bac23f61bb9109d6d2a51f8086ca83ba03d3682bf"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_containers_test_stringify_type_hints_containers.None_29": {"doc_hash": "ae44664bc400da4b1574e19351bf9e5c0effc8ff3e8f4984ddc5a898f4916f89"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_pep_585_test_stringify_type_hints_pep_585.None_15": {"doc_hash": "925ca7a0ab164709c78f2abfd94fe8f1b4d725ce59aec36dce5bfaad283a76a5"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_Annotated_test_stringify_type_hints_string.None_9": {"doc_hash": "e81db132d73b4e76e874490e2e1fb6ce5add476c288bc1c7df9e20f5dac98a8e"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_Callable_test_stringify_type_hints_Callable.if_sys_version_info_3.else_.None_5": {"doc_hash": "8b50d56d669f78a69a17944fe3af4506e130c0fbe93d64d47e8286685e43b0fe"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_Union_test_stringify_type_hints_Union.if_sys_version_info_3.else_.None_5": {"doc_hash": "cc95f1cc12c56414c1ff1c6162b94db9e06953aa3fd101ad5c6b1add5c82d80c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_typevars_test_stringify_type_hints_typevars.if_sys_version_info_3.else_.None_1": {"doc_hash": "72aa1b8a46fd88ee5d0530ee2a780712aab7e41876ee6df588847b3965e9ac60"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_custom_class_test_stringify_type_hints_alias.None_1": {"doc_hash": "43d433b031dd72512e6f81977e72bd3e43118387d1412aae9760a93f9b6efe3b"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_Literal_test_stringify_type_Literal.None_2": {"doc_hash": "64a57a91b8e879594d5ad8b87cdc94d5077b8bbd170e1b67e3a997d6fc1d02e8"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_union_operator_": {"doc_hash": "ad8d87a93e7cac792910b54c3dd5ac76a22258ef9bcf241faaf6fcfe9fa04efa"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_versioning.py__Test_the_versioning_im_setup_module.app_cleanup_": {"doc_hash": "1f3e84f0c7a28a078b00a107476a49f717351bd32598ce580e4866cfcc3514ac"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_writer_latex.py__Test_the_LaTeX_writer__": {"doc_hash": "c7b89fdcf55421cab2c6ccc0a2412c96480d50f8f253167bce3c6d298fbc480c"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/doclinter.py__A_linter_for_Sphinx_do_": {"doc_hash": "24c5486aa4dd3ebe22f4741bd83e7943248cc6661a7652759caef51fd25880e0"}}, "docstore/data": {"/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/helloworld.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/helloworld.py__", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/helloworld.py", "file_name": "helloworld.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["HelloWorld.run", "imports", "HelloWorld", "setup"], "tokens": 89}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from docutils import nodes\nfrom docutils.parsers.rst import Directive\n\n\nclass HelloWorld(Directive):\n\n def run(self):\n paragraph_node = nodes.paragraph(text='Hello World!')\n return [paragraph_node]\n\n\ndef setup(app):\n app.add_directive(\"helloworld\", HelloWorld)\n\n return {\n 'version': '0.1',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_IngredientIndex_IngredientIndex.generate.return.content_True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_IngredientIndex_IngredientIndex.generate.return.content_True", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/recipe.py", "file_name": "recipe.py", "file_type": "text/x-python", "category": "implementation", "start_line": 36, "end_line": 70, "span_ids": ["IngredientIndex", "IngredientIndex.generate"], "tokens": 290}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IngredientIndex(Index):\n \"\"\"A custom index that creates an ingredient matrix.\"\"\"\n\n name = 'ingredient'\n localname = 'Ingredient Index'\n shortname = 'Ingredient'\n\n def generate(self, docnames=None):\n content = defaultdict(list)\n\n recipes = {name: (dispname, typ, docname, anchor)\n for name, dispname, typ, docname, anchor, _\n in self.domain.get_objects()}\n recipe_ingredients = self.domain.data['recipe_ingredients']\n ingredient_recipes = defaultdict(list)\n\n # flip from recipe_ingredients to ingredient_recipes\n for recipe_name, ingredients in recipe_ingredients.items():\n for ingredient in ingredients:\n ingredient_recipes[ingredient].append(recipe_name)\n\n # convert the mapping of ingredient to recipes to produce the expected\n # output, shown below, using the ingredient name as a key to group\n #\n # name, subtype, docname, anchor, extra, qualifier, description\n for ingredient, recipe_names in ingredient_recipes.items():\n for recipe_name in recipe_names:\n dispname, typ, docname, anchor = recipes[recipe_name]\n content[ingredient].append(\n (dispname, 0, docname, anchor, docname, '', typ))\n\n # convert the dict to the sorted list of tuples expected\n content = sorted(content.items())\n\n return content, True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_RecipeIndex_RecipeIndex.generate.return.content_True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_RecipeIndex_RecipeIndex.generate.return.content_True", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/recipe.py", "file_name": "recipe.py", "file_type": "text/x-python", "category": "implementation", "start_line": 72, "end_line": 97, "span_ids": ["RecipeIndex", "RecipeIndex.generate"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RecipeIndex(Index):\n \"\"\"A custom index that creates an recipe matrix.\"\"\"\n\n name = 'recipe'\n localname = 'Recipe Index'\n shortname = 'Recipe'\n\n def generate(self, docnames=None):\n content = defaultdict(list)\n\n # sort the list of recipes in alphabetical order\n recipes = self.domain.get_objects()\n recipes = sorted(recipes, key=lambda recipe: recipe[0])\n\n # generate the expected output, shown below, from the above using the\n # first letter of the recipe as a key to group thing\n #\n # name, subtype, docname, anchor, extra, qualifier, description\n for _name, dispname, typ, docname, anchor, _priority in recipes:\n content[dispname[0].lower()].append(\n (dispname, 0, docname, anchor, docname, '', typ))\n\n # convert the dict to the sorted list of tuples expected\n content = sorted(content.items())\n\n return content, True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_RecipeDomain_RecipeDomain.get_objects.for_obj_in_self_data_rec.yield_obj_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_RecipeDomain_RecipeDomain.get_objects.for_obj_in_self_data_rec.yield_obj_", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/recipe.py", "file_name": "recipe.py", "file_type": "text/x-python", "category": "implementation", "start_line": 101, "end_line": 125, "span_ids": ["RecipeDomain", "RecipeDomain.get_full_qualified_name", "RecipeDomain.get_objects"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RecipeDomain(Domain):\n\n name = 'recipe'\n label = 'Recipe Sample'\n roles = {\n 'ref': XRefRole()\n }\n directives = {\n 'recipe': RecipeDirective,\n }\n indices = {\n RecipeIndex,\n IngredientIndex\n }\n initial_data = {\n 'recipes': [], # object list\n 'recipe_ingredients': {}, # name -> object\n }\n\n def get_full_qualified_name(self, node):\n return '{}.{}'.format('recipe', node.arguments[0])\n\n def get_objects(self):\n for obj in self.data['recipes']:\n yield(obj)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_RecipeDomain.resolve_xref_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_RecipeDomain.resolve_xref_", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/recipe.py", "file_name": "recipe.py", "file_type": "text/x-python", "category": "implementation", "start_line": 127, "end_line": 162, "span_ids": ["RecipeDomain.add_recipe", "setup", "RecipeDomain.resolve_xref"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RecipeDomain(Domain):\n\n def resolve_xref(self, env, fromdocname, builder, typ, target, node,\n contnode):\n match = [(docname, anchor)\n for name, sig, typ, docname, anchor, prio\n in self.get_objects() if sig == target]\n\n if len(match) > 0:\n todocname = match[0][0]\n targ = match[0][1]\n\n return make_refnode(builder, fromdocname, todocname, targ,\n contnode, targ)\n else:\n print('Awww, found nothing')\n return None\n\n def add_recipe(self, signature, ingredients):\n \"\"\"Add a new recipe to the domain.\"\"\"\n name = '{}.{}'.format('recipe', signature)\n anchor = 'recipe-{}'.format(signature)\n\n self.data['recipe_ingredients'][name] = ingredients\n # name, dispname, type, docname, anchor, priority\n self.data['recipes'].append(\n (name, signature, 'Recipe', self.env.docname, anchor, 0))\n\n\ndef setup(app):\n app.add_domain(RecipeDomain)\n\n return {\n 'version': '0.1',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_from_docutils_import_node_TodolistDirective.run.return._todolist_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_from_docutils_import_node_TodolistDirective.run.return._todolist_", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 27, "span_ids": ["todo", "TodolistDirective", "todolist", "depart_todo_node", "TodolistDirective.run", "imports", "visit_todo_node"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from docutils import nodes\nfrom docutils.parsers.rst import Directive\n\nfrom sphinx.locale import _\nfrom sphinx.util.docutils import SphinxDirective\n\n\nclass todo(nodes.Admonition, nodes.Element):\n pass\n\n\nclass todolist(nodes.General, nodes.Element):\n pass\n\n\ndef visit_todo_node(self, node):\n self.visit_admonition(node)\n\n\ndef depart_todo_node(self, node):\n self.depart_admonition(node)\n\n\nclass TodolistDirective(Directive):\n\n def run(self):\n return [todolist('')]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_process_todo_nodes_process_todo_nodes.for_node_in_doctree_trave.node_replace_self_content": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_process_todo_nodes_process_todo_nodes.for_node_in_doctree_trave.node_replace_self_content", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 64, "end_line": 106, "span_ids": ["process_todo_nodes"], "tokens": 348}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def process_todo_nodes(app, doctree, fromdocname):\n if not app.config.todo_include_todos:\n for node in doctree.traverse(todo):\n node.parent.remove(node)\n\n # Replace all todolist nodes with a list of the collected todos.\n # Augment each todo with a backlink to the original location.\n env = app.builder.env\n\n if not hasattr(env, 'todo_all_todos'):\n env.todo_all_todos = []\n\n for node in doctree.traverse(todolist):\n if not app.config.todo_include_todos:\n node.replace_self([])\n continue\n\n content = []\n\n for todo_info in env.todo_all_todos:\n para = nodes.paragraph()\n filename = env.doc2path(todo_info['docname'], base=None)\n description = (\n _('(The original entry is located in %s, line %d and can be found ') %\n (filename, todo_info['lineno']))\n para += nodes.Text(description, description)\n\n # Create a reference\n newnode = nodes.reference('', '')\n innernode = nodes.emphasis(_('here'), _('here'))\n newnode['refdocname'] = todo_info['docname']\n newnode['refuri'] = app.builder.get_relative_uri(\n fromdocname, todo_info['docname'])\n newnode['refuri'] += '#' + todo_info['target']['refid']\n newnode.append(innernode)\n para += newnode\n para += nodes.Text('.)', '.)')\n\n # Insert into the todolist\n content.append(todo_info['todo'])\n content.append(para)\n\n node.replace_self(content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_setup_", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 116, "end_line": 136, "span_ids": ["setup"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app):\n app.add_config_value('todo_include_todos', False, 'html')\n\n app.add_node(todolist)\n app.add_node(todo,\n html=(visit_todo_node, depart_todo_node),\n latex=(visit_todo_node, depart_todo_node),\n text=(visit_todo_node, depart_todo_node))\n\n app.add_directive('todo', TodoDirective)\n app.add_directive('todolist', TodolistDirective)\n app.connect('doctree-resolved', process_todo_nodes)\n app.connect('env-purge-doc', purge_todos)\n app.connect('env-merge-info', merge_todos)\n\n return {\n 'version': '0.1',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py__Example_Google_style_d_module_level_variable2.98765": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py__Example_Google_style_d_module_level_variable2.98765", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_google.py", "file_name": "example_google.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["impl", "docstring"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Example Google style docstrings.\n\nThis module demonstrates documentation as specified by the `Google Python\nStyle Guide`_. Docstrings may extend over multiple lines. Sections are created\nwith a section header and a colon followed by a block of indented text.\n\nExample:\n Examples can be given using either the ``Example`` or ``Examples``\n sections. Sections support any reStructuredText formatting, including\n literal blocks::\n\n $ python example_google.py\n\nSection breaks are created by resuming unindented text. Section breaks\nare also implicitly created anytime a new section starts.\n\nAttributes:\n module_level_variable1 (int): Module level variables may be documented in\n either the ``Attributes`` section of the module docstring, or in an\n inline docstring immediately following the variable.\n\n Either form is acceptable, but the two should not be mixed. Choose\n one convention to document module level variables and be consistent\n with it.\n\nTodo:\n * For module TODOs\n * You have to also use ``sphinx.ext.todo`` extension\n\n.. _Google Python Style Guide:\n https://google.github.io/styleguide/pyguide.html\n\n\"\"\"\n\nmodule_level_variable1 = 12345\n\nmodule_level_variable2 = 98765", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py__int_Module_level_vari_function_with_pep484_type_annotations._Example_function_with_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py__int_Module_level_vari_function_with_pep484_type_annotations._Example_function_with_", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_google.py", "file_name": "example_google.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 71, "span_ids": ["function_with_pep484_type_annotations", "impl", "function_with_types_in_docstring"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"int: Module level variable documented inline.\n\nThe docstring may span multiple lines. The type may optionally be specified\non the first line, separated by a colon.\n\"\"\"\n\n\ndef function_with_types_in_docstring(param1, param2):\n \"\"\"Example function with types documented in the docstring.\n\n :pep:`484` type annotations are supported. If attribute, parameter, and\n return types are annotated according to `PEP 484`_, they do not need to be\n included in the docstring:\n\n Args:\n param1 (int): The first parameter.\n param2 (str): The second parameter.\n\n Returns:\n bool: The return value. True for success, False otherwise.\n \"\"\"\n\n\ndef function_with_pep484_type_annotations(param1: int, param2: str) -> bool:\n \"\"\"Example function with PEP 484 type annotations.\n\n Args:\n param1: The first parameter.\n param2: The second parameter.\n\n Returns:\n The return value. True for success, False otherwise.\n\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_module_level_function_module_level_function.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_module_level_function_module_level_function.return.True", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_google.py", "file_name": "example_google.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 129, "span_ids": ["module_level_function"], "tokens": 381}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def module_level_function(param1, param2=None, *args, **kwargs):\n \"\"\"This is an example of a module level function.\n\n Function parameters should be documented in the ``Args`` section. The name\n of each parameter is required. The type and description of each parameter\n is optional, but should be included if not obvious.\n\n If ``*args`` or ``**kwargs`` are accepted,\n they should be listed as ``*args`` and ``**kwargs``.\n\n The format for a parameter is::\n\n name (type): description\n The description may span multiple lines. Following\n lines should be indented. The \"(type)\" is optional.\n\n Multiple paragraphs are supported in parameter\n descriptions.\n\n Args:\n param1 (int): The first parameter.\n param2 (:obj:`str`, optional): The second parameter. Defaults to None.\n Second line of description should be indented.\n *args: Variable length argument list.\n **kwargs: Arbitrary keyword arguments.\n\n Returns:\n bool: True if successful, False otherwise.\n\n The return type is optional and may be specified at the beginning of\n the ``Returns`` section followed by a colon.\n\n The ``Returns`` section may span multiple lines and paragraphs.\n Following lines should be indented to match the first line.\n\n The ``Returns`` section supports any reStructuredText formatting,\n including literal blocks::\n\n {\n 'param1': param1,\n 'param2': param2\n }\n\n Raises:\n AttributeError: The ``Raises`` section is a list of all exceptions\n that are relevant to the interface.\n ValueError: If `param2` is equal to `param1`.\n\n \"\"\"\n if param1 == param2:\n raise ValueError('param1 may not be equal to param2')\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_example_generator_example_generator.for_i_in_range_n_.yield_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_example_generator_example_generator.for_i_in_range_n_.yield_i", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_google.py", "file_name": "example_google.py", "file_type": "text/x-python", "category": "implementation", "start_line": 132, "end_line": 150, "span_ids": ["example_generator"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def example_generator(n):\n \"\"\"Generators have a ``Yields`` section instead of a ``Returns`` section.\n\n Args:\n n (int): The upper limit of the range to generate, from 0 to `n` - 1.\n\n Yields:\n int: The next number in the range of 0 to `n` - 1.\n\n Examples:\n Examples should be written in doctest format, and should illustrate how\n to use the function.\n\n >>> print([i for i in example_generator(4)])\n [0, 1, 2, 3]\n\n \"\"\"\n for i in range(n):\n yield i", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleError_ExampleError.__init__.self.code.code": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleError_ExampleError.__init__.self.code.code", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_google.py", "file_name": "example_google.py", "file_type": "text/x-python", "category": "implementation", "start_line": 153, "end_line": 177, "span_ids": ["ExampleError"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleError(Exception):\n \"\"\"Exceptions are documented in the same way as classes.\n\n The __init__ method may be documented in either the class level\n docstring, or as a docstring on the __init__ method itself.\n\n Either form is acceptable, but the two should not be mixed. Choose one\n convention to document the __init__ method and be consistent with it.\n\n Note:\n Do not include the `self` parameter in the ``Args`` section.\n\n Args:\n msg (str): Human readable string describing the exception.\n code (:obj:`int`, optional): Error code.\n\n Attributes:\n msg (str): Human readable string describing the exception.\n code (int): Exception error code.\n\n \"\"\"\n\n def __init__(self, msg, code):\n self.msg = msg\n self.code = code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleClass_ExampleClass.example_method.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleClass_ExampleClass.example_method.return.True", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_google.py", "file_name": "example_google.py", "file_type": "text/x-python", "category": "implementation", "start_line": 180, "end_line": 259, "span_ids": ["ExampleClass.readwrite_property", "ExampleClass.readonly_property", "ExampleClass", "ExampleClass.example_method", "ExampleClass.readwrite_property_2"], "tokens": 563}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleClass:\n \"\"\"The summary line for a class docstring should fit on one line.\n\n If the class has public attributes, they may be documented here\n in an ``Attributes`` section and follow the same formatting as a\n function's ``Args`` section. Alternatively, attributes may be documented\n inline with the attribute's declaration (see __init__ method below).\n\n Properties created with the ``@property`` decorator should be documented\n in the property's getter method.\n\n Attributes:\n attr1 (str): Description of `attr1`.\n attr2 (:obj:`int`, optional): Description of `attr2`.\n\n \"\"\"\n\n def __init__(self, param1, param2, param3):\n \"\"\"Example of docstring on the __init__ method.\n\n The __init__ method may be documented in either the class level\n docstring, or as a docstring on the __init__ method itself.\n\n Either form is acceptable, but the two should not be mixed. Choose one\n convention to document the __init__ method and be consistent with it.\n\n Note:\n Do not include the `self` parameter in the ``Args`` section.\n\n Args:\n param1 (str): Description of `param1`.\n param2 (:obj:`int`, optional): Description of `param2`. Multiple\n lines are supported.\n param3 (list(str)): Description of `param3`.\n\n \"\"\"\n self.attr1 = param1\n self.attr2 = param2\n self.attr3 = param3 #: Doc comment *inline* with attribute\n\n #: list(str): Doc comment *before* attribute, with type specified\n self.attr4 = ['attr4']\n\n self.attr5 = None\n \"\"\"str: Docstring *after* attribute, with type specified.\"\"\"\n\n @property\n def readonly_property(self):\n \"\"\"str: Properties should be documented in their getter method.\"\"\"\n return 'readonly_property'\n\n @property\n def readwrite_property(self):\n \"\"\"list(str): Properties with both a getter and setter\n should only be documented in their getter method.\n\n If the setter method contains notable behavior, it should be\n mentioned here.\n \"\"\"\n return ['readwrite_property']\n\n @readwrite_property.setter\n def readwrite_property(self, value):\n value\n\n def example_method(self, param1, param2):\n \"\"\"Class methods are similar to regular functions.\n\n Note:\n Do not include the `self` parameter in the ``Args`` section.\n\n Args:\n param1: The first parameter.\n param2: The second parameter.\n\n Returns:\n True if successful, False otherwise.\n\n \"\"\"\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleClass.__special___ExampleClass.__special__.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleClass.__special___ExampleClass.__special__.pass", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_google.py", "file_name": "example_google.py", "file_type": "text/x-python", "category": "implementation", "start_line": 261, "end_line": 275, "span_ids": ["ExampleClass.__special__"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleClass:\n\n def __special__(self):\n \"\"\"By default special members with docstrings are not included.\n\n Special members are any methods or attributes that start with and\n end with a double underscore. Any special member with a docstring\n will be included in the output, if\n ``napoleon_include_special_with_doc`` is set to True.\n\n This behavior can be enabled by changing the following setting in\n Sphinx's conf.py::\n\n napoleon_include_special_with_doc = True\n\n \"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py__Example_NumPy_style_do_module_level_variable2.98765": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py__Example_NumPy_style_do_module_level_variable2.98765", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_numpy.py", "file_name": "example_numpy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 47, "span_ids": ["impl", "docstring"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Example NumPy style docstrings.\n\nThis module demonstrates documentation as specified by the `NumPy\nDocumentation HOWTO`_. Docstrings may extend over multiple lines. Sections\nare created with a section header followed by an underline of equal length.\n\nExample\n-------\nExamples can be given using either the ``Example`` or ``Examples``\nsections. Sections support any reStructuredText formatting, including\nliteral blocks::\n\n $ python example_numpy.py\n\n\nSection breaks are created with two blank lines. Section breaks are also\nimplicitly created anytime a new section starts. Section bodies *may* be\nindented:\n\nNotes\n-----\n This is an example of an indented section. It's like any other section,\n but the body is indented to help it stand out from surrounding text.\n\nIf a section is indented, then a section break is created by\nresuming unindented text.\n\nAttributes\n----------\nmodule_level_variable1 : int\n Module level variables may be documented in either the ``Attributes``\n section of the module docstring, or in an inline docstring immediately\n following the variable.\n\n Either form is acceptable, but the two should not be mixed. Choose\n one convention to document module level variables and be consistent\n with it.\n\n\n.. _NumPy docstring standard:\n https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard\n\n\"\"\"\n\nmodule_level_variable1 = 12345\n\nmodule_level_variable2 = 98765", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py__int_Module_level_vari_function_with_pep484_type_annotations._Example_function_with_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py__int_Module_level_vari_function_with_pep484_type_annotations._Example_function_with_", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_numpy.py", "file_name": "example_numpy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 94, "span_ids": ["function_with_pep484_type_annotations", "impl", "function_with_types_in_docstring"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"int: Module level variable documented inline.\n\nThe docstring may span multiple lines. The type may optionally be specified\non the first line, separated by a colon.\n\"\"\"\n\n\ndef function_with_types_in_docstring(param1, param2):\n \"\"\"Example function with types documented in the docstring.\n\n :pep:`484` type annotations are supported. If attribute, parameter, and\n return types are annotated according to `PEP 484`_, they do not need to be\n included in the docstring:\n\n Parameters\n ----------\n param1 : int\n The first parameter.\n param2 : str\n The second parameter.\n\n Returns\n -------\n bool\n True if successful, False otherwise.\n \"\"\"\n\n\ndef function_with_pep484_type_annotations(param1: int, param2: str) -> bool:\n \"\"\"Example function with PEP 484 type annotations.\n\n The return type must be duplicated in the docstring to comply\n with the NumPy docstring style.\n\n Parameters\n ----------\n param1\n The first parameter.\n param2\n The second parameter.\n\n Returns\n -------\n bool\n True if successful, False otherwise.\n\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_module_level_function_module_level_function.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_module_level_function_module_level_function.return.True", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_numpy.py", "file_name": "example_numpy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 101, "end_line": 162, "span_ids": ["module_level_function"], "tokens": 378}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def module_level_function(param1, param2=None, *args, **kwargs):\n \"\"\"This is an example of a module level function.\n\n Function parameters should be documented in the ``Parameters`` section.\n The name of each parameter is required. The type and description of each\n parameter is optional, but should be included if not obvious.\n\n If ``*args`` or ``**kwargs`` are accepted,\n they should be listed as ``*args`` and ``**kwargs``.\n\n The format for a parameter is::\n\n name : type\n description\n\n The description may span multiple lines. Following lines\n should be indented to match the first line of the description.\n The \": type\" is optional.\n\n Multiple paragraphs are supported in parameter\n descriptions.\n\n Parameters\n ----------\n param1 : int\n The first parameter.\n param2 : :obj:`str`, optional\n The second parameter.\n *args\n Variable length argument list.\n **kwargs\n Arbitrary keyword arguments.\n\n Returns\n -------\n bool\n True if successful, False otherwise.\n\n The return type is not optional. The ``Returns`` section may span\n multiple lines and paragraphs. Following lines should be indented to\n match the first line of the description.\n\n The ``Returns`` section supports any reStructuredText formatting,\n including literal blocks::\n\n {\n 'param1': param1,\n 'param2': param2\n }\n\n Raises\n ------\n AttributeError\n The ``Raises`` section is a list of all exceptions\n that are relevant to the interface.\n ValueError\n If `param2` is equal to `param1`.\n\n \"\"\"\n if param1 == param2:\n raise ValueError('param1 may not be equal to param2')\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_example_generator_example_generator.for_i_in_range_n_.yield_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_example_generator_example_generator.for_i_in_range_n_.yield_i", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_numpy.py", "file_name": "example_numpy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 165, "end_line": 188, "span_ids": ["example_generator"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def example_generator(n):\n \"\"\"Generators have a ``Yields`` section instead of a ``Returns`` section.\n\n Parameters\n ----------\n n : int\n The upper limit of the range to generate, from 0 to `n` - 1.\n\n Yields\n ------\n int\n The next number in the range of 0 to `n` - 1.\n\n Examples\n --------\n Examples should be written in doctest format, and should illustrate how\n to use the function.\n\n >>> print([i for i in example_generator(4)])\n [0, 1, 2, 3]\n\n \"\"\"\n for i in range(n):\n yield i", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleError_ExampleError.__init__.self.code.code": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleError_ExampleError.__init__.self.code.code", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_numpy.py", "file_name": "example_numpy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 191, "end_line": 222, "span_ids": ["ExampleError"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleError(Exception):\n \"\"\"Exceptions are documented in the same way as classes.\n\n The __init__ method may be documented in either the class level\n docstring, or as a docstring on the __init__ method itself.\n\n Either form is acceptable, but the two should not be mixed. Choose one\n convention to document the __init__ method and be consistent with it.\n\n Note\n ----\n Do not include the `self` parameter in the ``Parameters`` section.\n\n Parameters\n ----------\n msg : str\n Human readable string describing the exception.\n code : :obj:`int`, optional\n Numeric error code.\n\n Attributes\n ----------\n msg : str\n Human readable string describing the exception.\n code : int\n Numeric error code.\n\n \"\"\"\n\n def __init__(self, msg, code):\n self.msg = msg\n self.code = code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleClass_ExampleClass.example_method.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleClass_ExampleClass.example_method.return.True", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_numpy.py", "file_name": "example_numpy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 225, "end_line": 318, "span_ids": ["ExampleClass.readwrite_property", "ExampleClass.readonly_property", "ExampleClass", "ExampleClass.example_method", "ExampleClass.readwrite_property_2"], "tokens": 589}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleClass:\n \"\"\"The summary line for a class docstring should fit on one line.\n\n If the class has public attributes, they may be documented here\n in an ``Attributes`` section and follow the same formatting as a\n function's ``Args`` section. Alternatively, attributes may be documented\n inline with the attribute's declaration (see __init__ method below).\n\n Properties created with the ``@property`` decorator should be documented\n in the property's getter method.\n\n Attributes\n ----------\n attr1 : str\n Description of `attr1`.\n attr2 : :obj:`int`, optional\n Description of `attr2`.\n\n \"\"\"\n\n def __init__(self, param1, param2, param3):\n \"\"\"Example of docstring on the __init__ method.\n\n The __init__ method may be documented in either the class level\n docstring, or as a docstring on the __init__ method itself.\n\n Either form is acceptable, but the two should not be mixed. Choose one\n convention to document the __init__ method and be consistent with it.\n\n Note\n ----\n Do not include the `self` parameter in the ``Parameters`` section.\n\n Parameters\n ----------\n param1 : str\n Description of `param1`.\n param2 : list(str)\n Description of `param2`. Multiple\n lines are supported.\n param3 : :obj:`int`, optional\n Description of `param3`.\n\n \"\"\"\n self.attr1 = param1\n self.attr2 = param2\n self.attr3 = param3 #: Doc comment *inline* with attribute\n\n #: list(str): Doc comment *before* attribute, with type specified\n self.attr4 = [\"attr4\"]\n\n self.attr5 = None\n \"\"\"str: Docstring *after* attribute, with type specified.\"\"\"\n\n @property\n def readonly_property(self):\n \"\"\"str: Properties should be documented in their getter method.\"\"\"\n return \"readonly_property\"\n\n @property\n def readwrite_property(self):\n \"\"\"list(str): Properties with both a getter and setter\n should only be documented in their getter method.\n\n If the setter method contains notable behavior, it should be\n mentioned here.\n \"\"\"\n return [\"readwrite_property\"]\n\n @readwrite_property.setter\n def readwrite_property(self, value):\n value\n\n def example_method(self, param1, param2):\n \"\"\"Class methods are similar to regular functions.\n\n Note\n ----\n Do not include the `self` parameter in the ``Parameters`` section.\n\n Parameters\n ----------\n param1\n The first parameter.\n param2\n The second parameter.\n\n Returns\n -------\n bool\n True if successful, False otherwise.\n\n \"\"\"\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleClass.__special___ExampleClass.__special__.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleClass.__special___ExampleClass.__special__.pass", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_numpy.py", "file_name": "example_numpy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 320, "end_line": 334, "span_ids": ["ExampleClass.__special__"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleClass:\n\n def __special__(self):\n \"\"\"By default special members with docstrings are not included.\n\n Special members are any methods or attributes that start with and\n end with a double underscore. Any special member with a docstring\n will be included in the output, if\n ``napoleon_include_special_with_doc`` is set to True.\n\n This behavior can be enabled by changing the following setting in\n Sphinx's conf.py::\n\n napoleon_include_special_with_doc = True\n\n \"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleClass.__special_without_docstring___": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_numpy.py_ExampleClass.__special_without_docstring___", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_numpy.py", "file_name": "example_numpy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 336, "end_line": 356, "span_ids": ["ExampleClass._private", "ExampleClass.__special_without_docstring__", "ExampleClass._private_without_docstring"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleClass:\n\n def __special_without_docstring__(self):\n pass\n\n def _private(self):\n \"\"\"By default private members are not included.\n\n Private members are any methods or attributes that start with an\n underscore and are *not* special. By default they are not included\n in the output.\n\n This behavior can be changed such that private members *are* included\n by changing the following setting in Sphinx's conf.py::\n\n napoleon_include_private_with_doc = True\n\n \"\"\"\n pass\n\n def _private_without_docstring(self):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/setup.py_os_Tee.flush.self_stream_flush_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/setup.py_os_Tee.flush.self_stream_flush_", "embedding": null, "metadata": {"file_path": "setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 76, "span_ids": ["impl", "imports", "Tee", "Tee.write", "Tee.flush"], "tokens": 478}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\nfrom io import StringIO\n\nfrom setuptools import find_packages, setup\n\nimport sphinx\n\nwith open('README.rst') as f:\n long_desc = f.read()\n\nif sys.version_info < (3, 6):\n print('ERROR: Sphinx requires at least Python 3.6 to run.')\n sys.exit(1)\n\ninstall_requires = [\n 'sphinxcontrib-applehelp',\n 'sphinxcontrib-devhelp',\n 'sphinxcontrib-jsmath',\n 'sphinxcontrib-htmlhelp>=2.0.0',\n 'sphinxcontrib-serializinghtml>=1.1.5',\n 'sphinxcontrib-qthelp',\n 'Jinja2>=2.3',\n 'Pygments>=2.0',\n 'docutils>=0.14,<0.18',\n 'snowballstemmer>=1.1',\n 'babel>=1.3',\n 'alabaster>=0.7,<0.8',\n 'imagesize',\n 'requests>=2.5.0',\n 'packaging',\n \"importlib-metadata>=4.4; python_version < '3.10'\",\n]\n\nextras_require = {\n # Environment Marker works for wheel 0.24 or later\n ':sys_platform==\"win32\"': [\n 'colorama>=0.3.5',\n ],\n 'docs': [\n 'sphinxcontrib-websupport',\n ],\n 'lint': [\n 'flake8>=3.5.0',\n 'isort',\n 'mypy>=0.931',\n 'docutils-stubs',\n \"types-typed-ast\",\n \"types-requests\",\n ],\n 'test': [\n 'pytest',\n 'pytest-cov',\n 'html5lib',\n \"typed_ast; python_version < '3.8'\",\n 'cython',\n ],\n}\n\n# Provide a \"compile_catalog\" command that also creates the translated\n# JavaScript files if Babel is available.\n\ncmdclass = {}\n\n\nclass Tee:\n def __init__(self, stream):\n self.stream = stream\n self.buffer = StringIO()\n\n def write(self, s):\n self.stream.write(s)\n self.buffer.write(s)\n\n def flush(self):\n self.stream.flush()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/setup.py_try__try_.else_.cmdclass_compile_catalog": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/setup.py_try__try_.else_.cmdclass_compile_catalog", "embedding": null, "metadata": {"file_path": "setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 171, "span_ids": ["try_.else_.compile_catalog_plusjs", "try_.else_.compile_catalog_plusjs:2", "impl:13"], "tokens": 644}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "try:\n from json import dump\n\n from babel.messages.frontend import compile_catalog\n from babel.messages.pofile import read_po\nexcept ImportError:\n pass\nelse:\n class compile_catalog_plusjs(compile_catalog):\n \"\"\"\n An extended command that writes all message strings that occur in\n JavaScript files to a JavaScript file along with the .mo file.\n\n Unfortunately, babel's setup command isn't built very extensible, so\n most of the run() code is duplicated here.\n \"\"\"\n\n def run(self):\n try:\n sys.stderr = Tee(sys.stderr)\n compile_catalog.run(self)\n finally:\n if sys.stderr.buffer.getvalue():\n print(\"Compiling failed.\")\n sys.exit(1)\n\n if isinstance(self.domain, list):\n for domain in self.domain:\n self._run_domain_js(domain)\n else:\n self._run_domain_js(self.domain)\n\n def _run_domain_js(self, domain):\n po_files = []\n js_files = []\n\n if not self.input_file:\n if self.locale:\n po_files.append((self.locale,\n os.path.join(self.directory, self.locale,\n 'LC_MESSAGES',\n domain + '.po')))\n js_files.append(os.path.join(self.directory, self.locale,\n 'LC_MESSAGES',\n domain + '.js'))\n else:\n for locale in os.listdir(self.directory):\n po_file = os.path.join(self.directory, locale,\n 'LC_MESSAGES',\n domain + '.po')\n if os.path.exists(po_file):\n po_files.append((locale, po_file))\n js_files.append(os.path.join(self.directory, locale,\n 'LC_MESSAGES',\n domain + '.js'))\n else:\n po_files.append((self.locale, self.input_file))\n if self.output_file:\n js_files.append(self.output_file)\n else:\n js_files.append(os.path.join(self.directory, self.locale,\n 'LC_MESSAGES',\n domain + '.js'))\n\n for js_file, (locale, po_file) in zip(js_files, po_files):\n with open(po_file, encoding='utf8') as infile:\n catalog = read_po(infile, locale)\n\n if catalog.fuzzy and not self.use_fuzzy:\n continue\n\n self.log.info('writing JavaScript strings in catalog %r to %r',\n po_file, js_file)\n\n jscatalog = {}\n for message in catalog:\n if any(x[0].endswith(('.js', '.js_t', '.html'))\n for x in message.locations):\n msgid = message.id\n if isinstance(msgid, (list, tuple)):\n msgid = msgid[0]\n jscatalog[msgid] = message.string\n\n with open(js_file, 'wt', encoding='utf8') as outfile:\n outfile.write('Documentation.addTranslations(')\n dump({\n 'messages': jscatalog,\n 'plural_expr': catalog.plural_expr,\n 'locale': str(catalog.locale)\n }, outfile, sort_keys=True, indent=4)\n outfile.write(');')\n\n cmdclass['compile_catalog'] = compile_catalog_plusjs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/setup.py_setup__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/setup.py_setup__", "embedding": null, "metadata": {"file_path": "setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 174, "end_line": 251, "span_ids": ["impl:21"], "tokens": 651}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "setup(\n name='Sphinx',\n version=sphinx.__version__,\n url='https://www.sphinx-doc.org/',\n download_url='https://pypi.org/project/Sphinx/',\n license='BSD',\n author='Georg Brandl',\n author_email='georg@python.org',\n description='Python documentation generator',\n long_description=long_desc,\n long_description_content_type='text/x-rst',\n project_urls={\n \"Code\": \"https://github.com/sphinx-doc/sphinx\",\n \"Issue tracker\": \"https://github.com/sphinx-doc/sphinx/issues\",\n },\n zip_safe=False,\n classifiers=[\n 'Development Status :: 5 - Production/Stable',\n 'Environment :: Console',\n 'Environment :: Web Environment',\n 'Intended Audience :: Developers',\n 'Intended Audience :: Education',\n 'Intended Audience :: End Users/Desktop',\n 'Intended Audience :: Science/Research',\n 'Intended Audience :: System Administrators',\n 'License :: OSI Approved :: BSD License',\n 'Operating System :: OS Independent',\n 'Programming Language :: Python',\n 'Programming Language :: Python :: 3',\n 'Programming Language :: Python :: 3 :: Only',\n 'Programming Language :: Python :: 3.6',\n 'Programming Language :: Python :: 3.7',\n 'Programming Language :: Python :: 3.8',\n 'Programming Language :: Python :: 3.9',\n 'Programming Language :: Python :: 3.10',\n 'Programming Language :: Python :: Implementation :: CPython',\n 'Programming Language :: Python :: Implementation :: PyPy',\n 'Framework :: Setuptools Plugin',\n 'Framework :: Sphinx',\n 'Framework :: Sphinx :: Extension',\n 'Framework :: Sphinx :: Theme',\n 'Topic :: Documentation',\n 'Topic :: Documentation :: Sphinx',\n 'Topic :: Internet :: WWW/HTTP :: Site Management',\n 'Topic :: Printing',\n 'Topic :: Software Development',\n 'Topic :: Software Development :: Documentation',\n 'Topic :: Text Processing',\n 'Topic :: Text Processing :: General',\n 'Topic :: Text Processing :: Indexing',\n 'Topic :: Text Processing :: Markup',\n 'Topic :: Text Processing :: Markup :: HTML',\n 'Topic :: Text Processing :: Markup :: LaTeX',\n 'Topic :: Utilities',\n ],\n platforms='any',\n packages=find_packages(exclude=['tests', 'utils']),\n package_data = {\n 'sphinx': ['py.typed'],\n },\n include_package_data=True,\n entry_points={\n 'console_scripts': [\n 'sphinx-build = sphinx.cmd.build:main',\n 'sphinx-quickstart = sphinx.cmd.quickstart:main',\n 'sphinx-apidoc = sphinx.ext.apidoc:main',\n 'sphinx-autogen = sphinx.ext.autosummary.generate:main',\n ],\n 'distutils.commands': [\n 'build_sphinx = sphinx.setup_command:BuildDoc',\n ],\n },\n python_requires=\">=3.6\",\n install_requires=install_requires,\n extras_require=extras_require,\n cmdclass=cmdclass,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/__main__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/__main__.py__", "embedding": null, "metadata": {"file_path": "sphinx/__main__.py", "file_name": "__main__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["impl", "docstring", "imports"], "tokens": 27}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The Sphinx documentation toolchain.\"\"\"\n\nimport sys\n\nfrom sphinx.cmd.build import main\n\nsys.exit(main(sys.argv[1:]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_toctree_toctree.extract_original_messages.return.messages": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_toctree_toctree.extract_original_messages.return.messages", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 81, "end_line": 114, "span_ids": ["toctree.apply_translated_message", "toctree.preserve_original_messages", "toctree.extract_original_messages", "toctree"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class toctree(nodes.General, nodes.Element, translatable):\n \"\"\"Node for inserting a \"TOC tree\".\"\"\"\n\n def preserve_original_messages(self) -> None:\n # toctree entries\n rawentries = self.setdefault('rawentries', [])\n for title, _docname in self['entries']:\n if title:\n rawentries.append(title)\n\n # :caption: option\n if self.get('caption'):\n self['rawcaption'] = self['caption']\n\n def apply_translated_message(self, original_message: str, translated_message: str) -> None:\n # toctree entries\n for i, (title, docname) in enumerate(self['entries']):\n if title == original_message:\n self['entries'][i] = (translated_message, docname)\n\n # :caption: option\n if self.get('rawcaption') == original_message:\n self['caption'] = translated_message\n\n def extract_original_messages(self) -> List[str]:\n messages: List[str] = []\n\n # toctree entries\n messages.extend(self.get('rawentries', []))\n\n # :caption: option\n if 'rawcaption' in self:\n messages.append(self['rawcaption'])\n return messages", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 529, "end_line": 582, "span_ids": ["setup"], "tokens": 349}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: \"Sphinx\") -> Dict[str, Any]:\n from sphinx.util import docutils # lazy import\n\n app.add_node(toctree)\n\n app.add_node(desc)\n app.add_node(desc_signature)\n app.add_node(desc_signature_line)\n app.add_node(desc_content)\n app.add_node(desc_inline)\n\n app.add_node(desc_name)\n app.add_node(desc_addname)\n app.add_node(desc_type)\n app.add_node(desc_returns)\n app.add_node(desc_parameterlist)\n app.add_node(desc_parameter)\n app.add_node(desc_optional)\n app.add_node(desc_annotation)\n\n for n in SIG_ELEMENTS:\n app.add_node(n)\n\n app.add_node(versionmodified)\n app.add_node(seealso)\n app.add_node(productionlist)\n app.add_node(production)\n app.add_node(index)\n app.add_node(centered)\n app.add_node(acks)\n app.add_node(hlist)\n app.add_node(hlistcol)\n app.add_node(compact_paragraph)\n app.add_node(glossary)\n app.add_node(only)\n app.add_node(start_of_file)\n app.add_node(highlightlang)\n app.add_node(tabular_col_spec)\n app.add_node(pending_xref)\n app.add_node(number_reference)\n app.add_node(download_reference)\n app.add_node(literal_emphasis)\n app.add_node(literal_strong)\n app.add_node(manpage)\n\n if docutils.__version_info__ < (0, 18):\n app.add_node(meta)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_builtin_extensions_logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_builtin_extensions_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 63, "end_line": 125, "span_ids": ["impl:2"], "tokens": 494}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "builtin_extensions = (\n 'sphinx.addnodes',\n 'sphinx.builders.changes',\n 'sphinx.builders.epub3',\n 'sphinx.builders.dirhtml',\n 'sphinx.builders.dummy',\n 'sphinx.builders.gettext',\n 'sphinx.builders.html',\n 'sphinx.builders.latex',\n 'sphinx.builders.linkcheck',\n 'sphinx.builders.manpage',\n 'sphinx.builders.singlehtml',\n 'sphinx.builders.texinfo',\n 'sphinx.builders.text',\n 'sphinx.builders.xml',\n 'sphinx.config',\n 'sphinx.domains.c',\n 'sphinx.domains.changeset',\n 'sphinx.domains.citation',\n 'sphinx.domains.cpp',\n 'sphinx.domains.index',\n 'sphinx.domains.javascript',\n 'sphinx.domains.math',\n 'sphinx.domains.python',\n 'sphinx.domains.rst',\n 'sphinx.domains.std',\n 'sphinx.directives',\n 'sphinx.directives.code',\n 'sphinx.directives.other',\n 'sphinx.directives.patches',\n 'sphinx.extension',\n 'sphinx.parsers',\n 'sphinx.registry',\n 'sphinx.roles',\n 'sphinx.transforms',\n 'sphinx.transforms.compact_bullet_list',\n 'sphinx.transforms.i18n',\n 'sphinx.transforms.references',\n 'sphinx.transforms.post_transforms',\n 'sphinx.transforms.post_transforms.code',\n 'sphinx.transforms.post_transforms.images',\n 'sphinx.util.compat',\n 'sphinx.versioning',\n # collectors should be loaded by specific order\n 'sphinx.environment.collectors.dependencies',\n 'sphinx.environment.collectors.asset',\n 'sphinx.environment.collectors.metadata',\n 'sphinx.environment.collectors.title',\n 'sphinx.environment.collectors.toctree',\n # 1st party extensions\n 'sphinxcontrib.applehelp',\n 'sphinxcontrib.devhelp',\n 'sphinxcontrib.htmlhelp',\n 'sphinxcontrib.serializinghtml',\n 'sphinxcontrib.qthelp',\n # Strictly, alabaster theme is not a builtin extension,\n # but it is loaded automatically to use it as default theme.\n 'alabaster',\n)\n\nENV_PICKLE_FILENAME = 'environment.pickle'\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx_Sphinx.__init__.self__init_builder_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx_Sphinx.__init__.self__init_builder_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 118, "end_line": 256, "span_ids": ["Sphinx"], "tokens": 1137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n \"\"\"The main application class and extensibility interface.\n\n :ivar srcdir: Directory containing source.\n :ivar confdir: Directory containing ``conf.py``.\n :ivar doctreedir: Directory for storing pickled doctrees.\n :ivar outdir: Directory for storing build documents.\n \"\"\"\n\n warningiserror: bool\n _warncount: int\n\n def __init__(self, srcdir: str, confdir: Optional[str], outdir: str, doctreedir: str,\n buildername: str, confoverrides: Dict = None,\n status: IO = sys.stdout, warning: IO = sys.stderr,\n freshenv: bool = False, warningiserror: bool = False, tags: List[str] = None,\n verbosity: int = 0, parallel: int = 0, keep_going: bool = False) -> None:\n self.phase = BuildPhase.INITIALIZATION\n self.verbosity = verbosity\n self.extensions: Dict[str, Extension] = {}\n self.builder: Optional[Builder] = None\n self.env: Optional[BuildEnvironment] = None\n self.project: Optional[Project] = None\n self.registry = SphinxComponentRegistry()\n\n # validate provided directories\n self.srcdir = abspath(srcdir)\n self.outdir = abspath(outdir)\n self.doctreedir = abspath(doctreedir)\n\n if not path.isdir(self.srcdir):\n raise ApplicationError(__('Cannot find source directory (%s)') %\n self.srcdir)\n\n if path.exists(self.outdir) and not path.isdir(self.outdir):\n raise ApplicationError(__('Output directory (%s) is not a directory') %\n self.outdir)\n\n if self.srcdir == self.outdir:\n raise ApplicationError(__('Source directory and destination '\n 'directory cannot be identical'))\n\n self.parallel = parallel\n\n if status is None:\n self._status: IO = StringIO()\n self.quiet: bool = True\n else:\n self._status = status\n self.quiet = False\n\n if warning is None:\n self._warning: IO = StringIO()\n else:\n self._warning = warning\n self._warncount = 0\n self.keep_going = warningiserror and keep_going\n if self.keep_going:\n self.warningiserror = False\n else:\n self.warningiserror = warningiserror\n logging.setup(self, self._status, self._warning)\n\n self.events = EventManager(self)\n\n # keep last few messages for traceback\n # This will be filled by sphinx.util.logging.LastMessagesWriter\n self.messagelog: deque = deque(maxlen=10)\n\n # say hello to the world\n logger.info(bold(__('Running Sphinx v%s') % sphinx.__display_version__))\n\n # status code for command-line application\n self.statuscode = 0\n\n # read config\n self.tags = Tags(tags)\n if confdir is None:\n # set confdir to srcdir if -C given (!= no confdir); a few pieces\n # of code expect a confdir to be set\n self.confdir = self.srcdir\n self.config = Config({}, confoverrides or {})\n else:\n self.confdir = abspath(confdir)\n self.config = Config.read(self.confdir, confoverrides or {}, self.tags)\n\n # initialize some limited config variables before initialize i18n and loading\n # extensions\n self.config.pre_init_values()\n\n # set up translation infrastructure\n self._init_i18n()\n\n # check the Sphinx version if requested\n if self.config.needs_sphinx and self.config.needs_sphinx > sphinx.__display_version__:\n raise VersionRequirementError(\n __('This project needs at least Sphinx v%s and therefore cannot '\n 'be built with this version.') % self.config.needs_sphinx)\n\n # load all built-in extension modules\n for extension in builtin_extensions:\n self.setup_extension(extension)\n\n # load all user-given extension modules\n for extension in self.config.extensions:\n self.setup_extension(extension)\n\n # preload builder module (before init config values)\n self.preload_builder(buildername)\n\n if not path.isdir(outdir):\n with progress_message(__('making output directory')):\n ensuredir(outdir)\n\n # the config file itself can be an extension\n if self.config.setup:\n prefix = __('while setting up extension %s:') % \"conf.py\"\n with prefixed_warnings(prefix):\n if callable(self.config.setup):\n self.config.setup(self)\n else:\n raise ConfigError(\n __(\"'setup' as currently defined in conf.py isn't a Python callable. \"\n \"Please modify its definition to make it a callable function. \"\n \"This is needed for conf.py to behave as a Sphinx extension.\")\n )\n\n # now that we know all config values, collect them from conf.py\n self.config.init_values()\n self.events.emit('config-inited', self.config)\n\n # create the project\n self.project = Project(self.srcdir, self.config.source_suffix)\n # create the builder\n self.builder = self.create_builder(buildername)\n # set up the build environment\n self._init_env(freshenv)\n # set up the builder\n self._init_builder()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._init_env_Sphinx._init_env.if_freshenv_or_not_os_pat.else_.try_.except_Exception_as_err_.self__init_env_freshenv_T": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._init_env_Sphinx._init_env.if_freshenv_or_not_os_pat.else_.try_.except_Exception_as_err_.self__init_env_freshenv_T", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 286, "end_line": 299, "span_ids": ["Sphinx._init_env"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def _init_env(self, freshenv: bool) -> None:\n filename = path.join(self.doctreedir, ENV_PICKLE_FILENAME)\n if freshenv or not os.path.exists(filename):\n self.env = BuildEnvironment(self)\n self.env.find_files(self.config, self.builder)\n else:\n try:\n with progress_message(__('loading pickled environment')):\n with open(filename, 'rb') as f:\n self.env = pickle.load(f)\n self.env.setup(self)\n except Exception as err:\n logger.info(__('failed: %s'), err)\n self._init_env(freshenv=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.preload_builder_Sphinx._main_build_metho": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.preload_builder_Sphinx._main_build_metho", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 320, "end_line": 335, "span_ids": ["Sphinx.preload_builder", "Sphinx._init_builder", "Sphinx.create_builder"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def preload_builder(self, name: str) -> None:\n self.registry.preload_builder(self, name)\n\n def create_builder(self, name: str) -> \"Builder\":\n if name is None:\n logger.info(__('No builder selected, using default: html'))\n name = 'html'\n\n return self.registry.create_builder(self, name)\n\n def _init_builder(self) -> None:\n self.builder.set_environment(self.env)\n self.builder.init()\n self.events.emit('builder-inited')\n\n # ---- main \"build\" method -------------------------------------------------", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.build_Sphinx.build.self_builder_cleanup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.build_Sphinx.build.self_builder_cleanup_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 337, "end_line": 386, "span_ids": ["Sphinx.build"], "tokens": 410}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def build(self, force_all: bool = False, filenames: List[str] = None) -> None:\n self.phase = BuildPhase.READING\n try:\n if force_all:\n self.builder.compile_all_catalogs()\n self.builder.build_all()\n elif filenames:\n self.builder.compile_specific_catalogs(filenames)\n self.builder.build_specific(filenames)\n else:\n self.builder.compile_update_catalogs()\n self.builder.build_update()\n\n if self._warncount and self.keep_going:\n self.statuscode = 1\n\n status = (__('succeeded') if self.statuscode == 0\n else __('finished with problems'))\n if self._warncount:\n if self.warningiserror:\n if self._warncount == 1:\n msg = __('build %s, %s warning (with warnings treated as errors).')\n else:\n msg = __('build %s, %s warnings (with warnings treated as errors).')\n else:\n if self._warncount == 1:\n msg = __('build %s, %s warning.')\n else:\n msg = __('build %s, %s warnings.')\n\n logger.info(bold(msg % (status, self._warncount)))\n else:\n logger.info(bold(__('build %s.') % status))\n\n if self.statuscode == 0 and self.builder.epilog:\n logger.info('')\n logger.info(self.builder.epilog % {\n 'outdir': relpath(self.outdir),\n 'project': self.config.project\n })\n except Exception as err:\n # delete the saved env to force a fresh build next time\n envfile = path.join(self.doctreedir, ENV_PICKLE_FILENAME)\n if path.isfile(envfile):\n os.unlink(envfile)\n self.events.emit('build-finished', err)\n raise\n else:\n self.events.emit('build-finished', None)\n self.builder.cleanup()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.disconnect_Sphinx.emit.return.self_events_emit_event_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.disconnect_Sphinx.emit.return.self_events_emit_event_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 416, "end_line": 439, "span_ids": ["Sphinx.disconnect", "Sphinx.emit"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def disconnect(self, listener_id: int) -> None:\n \"\"\"Unregister callback by *listener_id*.\n\n :param listener_id: A listener_id that :meth:`connect` returns\n \"\"\"\n logger.debug('[app] disconnecting event: [id=%s]', listener_id)\n self.events.disconnect(listener_id)\n\n def emit(self, event: str, *args: Any,\n allowed_exceptions: Tuple[Type[Exception], ...] = ()) -> List:\n \"\"\"Emit *event* and pass *arguments* to the callback functions.\n\n Return the return values of all callbacks as a list. Do not emit core\n Sphinx events in extensions!\n\n :param event: The name of event that will be emitted\n :param args: The arguments for the event\n :param allowed_exceptions: The list of exceptions that are allowed in the callbacks\n\n .. versionchanged:: 3.1\n\n Added *allowed_exceptions* to specify path-through exceptions\n \"\"\"\n return self.events.emit(event, *args, allowed_exceptions=allowed_exceptions)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_config_value_Sphinx.add_config_value.self_config_add_name_def": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_config_value_Sphinx.add_config_value.self_config_add_name_def", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 474, "end_line": 511, "span_ids": ["Sphinx.add_config_value"], "tokens": 419}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n def add_config_value(self, name: str, default: Any, rebuild: Union[bool, str],\n types: Any = ()) -> None:\n \"\"\"Register a configuration value.\n\n This is necessary for Sphinx to recognize new values and set default\n values accordingly.\n\n\n :param name: The name of the configuration value. It is recommended to be prefixed\n with the extension name (ex. ``html_logo``, ``epub_title``)\n :param default: The default value of the configuration.\n :param rebuild: The condition of rebuild. It must be one of those values:\n\n * ``'env'`` if a change in the setting only takes effect when a\n document is parsed -- this means that the whole environment must be\n rebuilt.\n * ``'html'`` if a change in the setting needs a full rebuild of HTML\n documents.\n * ``''`` if a change in the setting will not need any special rebuild.\n :param types: The type of configuration value. A list of types can be specified. For\n example, ``[str]`` is used to describe a configuration that takes string\n value.\n\n .. versionchanged:: 0.4\n If the *default* value is a callable, it will be called with the\n config object as its argument in order to get the default value.\n This can be used to implement config values whose default depends on\n other values.\n\n .. versionchanged:: 0.6\n Changed *rebuild* from a simple boolean (equivalent to ``''`` or\n ``'env'``) to a string. However, booleans are still accepted and\n converted internally.\n \"\"\"\n logger.debug('[app] adding config value: %r', (name, default, rebuild, types))\n if rebuild in (False, True):\n rebuild = 'env' if rebuild else ''\n self.config.add(name, default, rebuild, types)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_event_Sphinx.set_translator.self_registry_add_transla": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_event_Sphinx.set_translator.self_registry_add_transla", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 513, "end_line": 540, "span_ids": ["Sphinx.add_event", "Sphinx.set_translator"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_event(self, name: str) -> None:\n \"\"\"Register an event called *name*.\n\n This is needed to be able to emit it.\n\n :param name: The name of the event\n \"\"\"\n logger.debug('[app] adding event: %r', name)\n self.events.add(name)\n\n def set_translator(self, name: str, translator_class: Type[nodes.NodeVisitor],\n override: bool = False) -> None:\n \"\"\"Register or override a Docutils translator class.\n\n This is used to register a custom output translator or to replace a\n builtin translator. This allows extensions to use a custom translator\n and define custom nodes for the translator (see :meth:`add_node`).\n\n :param name: The name of the builder for the translator\n :param translator_class: A translator class\n :param override: If true, install the translator forcedly even if another translator\n is already installed as the same name\n\n .. versionadded:: 1.3\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n self.registry.add_translator(name, translator_class, override=override)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_node_Sphinx.add_node.self_registry_add_transla": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_node_Sphinx.add_node.self_registry_add_transla", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 542, "end_line": 584, "span_ids": ["Sphinx.add_node"], "tokens": 440}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_node(self, node: Type[Element], override: bool = False,\n **kwargs: Tuple[Callable, Optional[Callable]]) -> None:\n \"\"\"Register a Docutils node class.\n\n This is necessary for Docutils internals. It may also be used in the\n future to validate nodes in the parsed documents.\n\n :param node: A node class\n :param kwargs: Visitor functions for each builder (see below)\n :param override: If true, install the node forcedly even if another node is already\n installed as the same name\n\n Node visitor functions for the Sphinx HTML, LaTeX, text and manpage\n writers can be given as keyword arguments: the keyword should be one or\n more of ``'html'``, ``'latex'``, ``'text'``, ``'man'``, ``'texinfo'``\n or any other supported translators, the value a 2-tuple of ``(visit,\n depart)`` methods. ``depart`` can be ``None`` if the ``visit``\n function raises :exc:`docutils.nodes.SkipNode`. Example:\n\n .. code-block:: python\n\n class math(docutils.nodes.Element): pass\n\n def visit_math_html(self, node):\n self.body.append(self.starttag(node, 'math'))\n def depart_math_html(self, node):\n self.body.append('')\n\n app.add_node(math, html=(visit_math_html, depart_math_html))\n\n Obviously, translators for which you don't specify visitor methods will\n choke on the node when encountered in a document to translate.\n\n .. versionchanged:: 0.5\n Added the support for keyword arguments giving visit functions.\n \"\"\"\n logger.debug('[app] adding node: %r', (node, kwargs))\n if not override and docutils.is_node_registered(node):\n logger.warning(__('node class %r is already registered, '\n 'its visitors will be overridden'),\n node.__name__, type='app', subtype='add_node')\n docutils.register_node(node)\n self.registry.add_translation_handlers(node, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_enumerable_node_Sphinx.add_enumerable_node.self_add_node_node_overr": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_enumerable_node_Sphinx.add_enumerable_node.self_add_node_node_overr", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 586, "end_line": 613, "span_ids": ["Sphinx.add_enumerable_node"], "tokens": 365}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_enumerable_node(self, node: Type[Element], figtype: str,\n title_getter: TitleGetter = None, override: bool = False,\n **kwargs: Tuple[Callable, Callable]) -> None:\n \"\"\"Register a Docutils node class as a numfig target.\n\n Sphinx numbers the node automatically. And then the users can refer it\n using :rst:role:`numref`.\n\n :param node: A node class\n :param figtype: The type of enumerable nodes. Each figtype has individual numbering\n sequences. As system figtypes, ``figure``, ``table`` and\n ``code-block`` are defined. It is possible to add custom nodes to\n these default figtypes. It is also possible to define new custom\n figtype if a new figtype is given.\n :param title_getter: A getter function to obtain the title of node. It takes an\n instance of the enumerable node, and it must return its title as\n string. The title is used to the default title of references for\n :rst:role:`ref`. By default, Sphinx searches\n ``docutils.nodes.caption`` or ``docutils.nodes.title`` from the\n node as a title.\n :param kwargs: Visitor functions for each builder (same as :meth:`add_node`)\n :param override: If true, install the node forcedly even if another node is already\n installed as the same name\n\n .. versionadded:: 1.4\n \"\"\"\n self.registry.add_enumerable_node(node, figtype, title_getter, override=override)\n self.add_node(node, override=override, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_directive_Sphinx.add_directive.docutils_register_directi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_directive_Sphinx.add_directive.docutils_register_directi", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 615, "end_line": 661, "span_ids": ["Sphinx.add_directive"], "tokens": 377}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_directive(self, name: str, cls: Type[Directive], override: bool = False) -> None:\n \"\"\"Register a Docutils directive.\n\n :param name: The name of the directive\n :param cls: A directive class\n :param override: If true, install the directive forcedly even if another directive\n is already installed as the same name\n\n For example, a custom directive named ``my-directive`` would be added\n like this:\n\n .. code-block:: python\n\n from docutils.parsers.rst import Directive, directives\n\n class MyDirective(Directive):\n has_content = True\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec = {\n 'class': directives.class_option,\n 'name': directives.unchanged,\n }\n\n def run(self):\n ...\n\n def setup(app):\n app.add_directive('my-directive', MyDirective)\n\n For more details, see `the Docutils docs\n `__ .\n\n .. versionchanged:: 0.6\n Docutils 0.5-style directive classes are now supported.\n .. deprecated:: 1.8\n Docutils 0.4-style (function based) directives support is deprecated.\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n logger.debug('[app] adding directive: %r', (name, cls))\n if not override and docutils.is_directive_registered(name):\n logger.warning(__('directive %r is already registered, it will be overridden'),\n name, type='app', subtype='add_directive')\n\n docutils.register_directive(name, cls)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_role_Sphinx.add_role.docutils_register_role_na": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_role_Sphinx.add_role.docutils_register_role_na", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 663, "end_line": 681, "span_ids": ["Sphinx.add_role"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_role(self, name: str, role: Any, override: bool = False) -> None:\n \"\"\"Register a Docutils role.\n\n :param name: The name of role\n :param role: A role function\n :param override: If true, install the role forcedly even if another role is already\n installed as the same name\n\n For more details about role functions, see `the Docutils docs\n `__ .\n\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n logger.debug('[app] adding role: %r', (name, role))\n if not override and docutils.is_role_registered(name):\n logger.warning(__('role %r is already registered, it will be overridden'),\n name, type='app', subtype='add_role')\n docutils.register_role(name, role)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_generic_role_Sphinx.add_generic_role.docutils_register_role_na": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_generic_role_Sphinx.add_generic_role.docutils_register_role_na", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 686, "end_line": 706, "span_ids": ["Sphinx.add_generic_role"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_generic_role(self, name: str, nodeclass: Any, override: bool = False) -> None:\n \"\"\"Register a generic Docutils role.\n\n Register a Docutils role that does nothing but wrap its contents in the\n node given by *nodeclass*.\n\n If *override* is True, the given *nodeclass* is forcedly installed even if\n a role named as *name* is already installed.\n\n .. versionadded:: 0.6\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n # Don't use ``roles.register_generic_role`` because it uses\n # ``register_canonical_role``.\n logger.debug('[app] adding generic role: %r', (name, nodeclass))\n if not override and docutils.is_role_registered(name):\n logger.warning(__('role %r is already registered, it will be overridden'),\n name, type='app', subtype='add_generic_role')\n role = roles.GenericRole(name, nodeclass)\n docutils.register_role(name, role)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_domain_Sphinx.add_domain.self_registry_add_domain_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_domain_Sphinx.add_domain.self_registry_add_domain_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 705, "end_line": 716, "span_ids": ["Sphinx.add_domain"], "tokens": 106}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_domain(self, domain: Type[Domain], override: bool = False) -> None:\n \"\"\"Register a domain.\n\n :param domain: A domain class\n :param override: If true, install the domain forcedly even if another domain\n is already installed as the same name\n\n .. versionadded:: 1.0\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n self.registry.add_domain(domain, override=override)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_directive_to_domain_Sphinx.add_directive_to_domain.self_registry_add_directi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_directive_to_domain_Sphinx.add_directive_to_domain.self_registry_add_directi", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 718, "end_line": 735, "span_ids": ["Sphinx.add_directive_to_domain"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_directive_to_domain(self, domain: str, name: str,\n cls: Type[Directive], override: bool = False) -> None:\n \"\"\"Register a Docutils directive in a domain.\n\n Like :meth:`add_directive`, but the directive is added to the domain\n named *domain*.\n\n :param domain: The name of target domain\n :param name: A name of directive\n :param cls: A directive class\n :param override: If true, install the directive forcedly even if another directive\n is already installed as the same name\n\n .. versionadded:: 1.0\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n self.registry.add_directive_to_domain(domain, name, cls, override=override)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_role_to_domain_Sphinx.add_role_to_domain.self_registry_add_role_to": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_role_to_domain_Sphinx.add_role_to_domain.self_registry_add_role_to", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 737, "end_line": 754, "span_ids": ["Sphinx.add_role_to_domain"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_role_to_domain(self, domain: str, name: str, role: Union[RoleFunction, XRefRole],\n override: bool = False) -> None:\n \"\"\"Register a Docutils role in a domain.\n\n Like :meth:`add_role`, but the role is added to the domain named\n *domain*.\n\n :param domain: The name of the target domain\n :param name: The name of the role\n :param role: The role function\n :param override: If true, install the role forcedly even if another role is already\n installed as the same name\n\n .. versionadded:: 1.0\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n self.registry.add_role_to_domain(domain, name, role, override=override)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_index_to_domain_Sphinx.add_index_to_domain.self_registry_add_index_t": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_index_to_domain_Sphinx.add_index_to_domain.self_registry_add_index_t", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 756, "end_line": 771, "span_ids": ["Sphinx.add_index_to_domain"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_index_to_domain(self, domain: str, index: Type[Index], override: bool = False\n ) -> None:\n \"\"\"Register a custom index for a domain.\n\n Add a custom *index* class to the domain named *domain*.\n\n :param domain: The name of the target domain\n :param index: The index class\n :param override: If true, install the index forcedly even if another index is\n already installed as the same name\n\n .. versionadded:: 1.0\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n self.registry.add_index_to_domain(domain, index)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_object_type_Sphinx.add_object_type.self_registry_add_object_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_object_type_Sphinx.add_object_type.self_registry_add_object_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 773, "end_line": 838, "span_ids": ["Sphinx.add_object_type"], "tokens": 708}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_object_type(self, directivename: str, rolename: str, indextemplate: str = '',\n parse_node: Callable = None, ref_nodeclass: Type[TextElement] = None,\n objname: str = '', doc_field_types: List = [], override: bool = False\n ) -> None:\n \"\"\"Register a new object type.\n\n This method is a very convenient way to add a new :term:`object` type\n that can be cross-referenced. It will do this:\n\n - Create a new directive (called *directivename*) for documenting an\n object. It will automatically add index entries if *indextemplate*\n is nonempty; if given, it must contain exactly one instance of\n ``%s``. See the example below for how the template will be\n interpreted.\n - Create a new role (called *rolename*) to cross-reference to these\n object descriptions.\n - If you provide *parse_node*, it must be a function that takes a\n string and a docutils node, and it must populate the node with\n children parsed from the string. It must then return the name of the\n item to be used in cross-referencing and index entries. See the\n :file:`conf.py` file in the source for this documentation for an\n example.\n - The *objname* (if not given, will default to *directivename*) names\n the type of object. It is used when listing objects, e.g. in search\n results.\n\n For example, if you have this call in a custom Sphinx extension::\n\n app.add_object_type('directive', 'dir', 'pair: %s; directive')\n\n you can use this markup in your documents::\n\n .. rst:directive:: function\n\n Document a function.\n\n <...>\n\n See also the :rst:dir:`function` directive.\n\n For the directive, an index entry will be generated as if you had prepended ::\n\n .. index:: pair: function; directive\n\n The reference node will be of class ``literal`` (so it will be rendered\n in a proportional font, as appropriate for code) unless you give the\n *ref_nodeclass* argument, which must be a docutils node class. Most\n useful are ``docutils.nodes.emphasis`` or ``docutils.nodes.strong`` --\n you can also use ``docutils.nodes.generated`` if you want no further\n text decoration. If the text should be treated as literal (e.g. no\n smart quote replacement), but not have typewriter styling, use\n ``sphinx.addnodes.literal_emphasis`` or\n ``sphinx.addnodes.literal_strong``.\n\n For the role content, you have the same syntactical possibilities as\n for standard Sphinx roles (see :ref:`xref-syntax`).\n\n If *override* is True, the given object_type is forcedly installed even if\n an object_type having the same name is already installed.\n\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n self.registry.add_object_type(directivename, rolename, indextemplate, parse_node,\n ref_nodeclass, objname, doc_field_types,\n override=override)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_crossref_type_Sphinx.add_crossref_type.self_registry_add_crossre": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_crossref_type_Sphinx.add_crossref_type.self_registry_add_crossre", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 840, "end_line": 877, "span_ids": ["Sphinx.add_crossref_type"], "tokens": 310}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_crossref_type(self, directivename: str, rolename: str, indextemplate: str = '',\n ref_nodeclass: Type[TextElement] = None, objname: str = '',\n override: bool = False) -> None:\n \"\"\"Register a new crossref object type.\n\n This method is very similar to :meth:`add_object_type` except that the\n directive it generates must be empty, and will produce no output.\n\n That means that you can add semantic targets to your sources, and refer\n to them using custom roles instead of generic ones (like\n :rst:role:`ref`). Example call::\n\n app.add_crossref_type('topic', 'topic', 'single: %s',\n docutils.nodes.emphasis)\n\n Example usage::\n\n .. topic:: application API\n\n The application API\n -------------------\n\n Some random text here.\n\n See also :topic:`this section `.\n\n (Of course, the element following the ``topic`` directive needn't be a\n section.)\n\n If *override* is True, the given crossref_type is forcedly installed even if\n a crossref_type having the same name is already installed.\n\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n self.registry.add_crossref_type(directivename, rolename,\n indextemplate, ref_nodeclass, objname,\n override=override)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_js_file_Sphinx.add_js_file.if_hasattr_self_builder_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_js_file_Sphinx.add_js_file.if_hasattr_self_builder_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 925, "end_line": 989, "span_ids": ["Sphinx.add_js_file"], "tokens": 653}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_js_file(self, filename: str, priority: int = 500,\n loading_method: Optional[str] = None, **kwargs: Any) -> None:\n \"\"\"Register a JavaScript file to include in the HTML output.\n\n :param filename: The filename of the JavaScript file. It must be relative to the HTML\n static path, a full URI with scheme, or ``None`` value. The ``None``\n value is used to create inline ``\n\n app.add_js_file('example.js', loading_method=\"async\")\n # => \n\n app.add_js_file(None, body=\"var myVariable = 'foo';\")\n # => \n\n .. list-table:: priority range for JavaScript files\n :widths: 20,80\n\n * - Priority\n - Main purpose in Sphinx\n * - 200\n - default priority for built-in JavaScript files\n * - 500\n - default priority for extensions\n * - 800\n - default priority for :confval:`html_js_files`\n\n A JavaScript file can be added to the specific HTML page when an extension\n calls this method on :event:`html-page-context` event.\n\n .. versionadded:: 0.5\n\n .. versionchanged:: 1.8\n Renamed from ``app.add_javascript()``.\n And it allows keyword arguments as attributes of script tag.\n\n .. versionchanged:: 3.5\n Take priority argument. Allow to add a JavaScript file to the specific page.\n .. versionchanged:: 4.4\n Take loading_method argument. Allow to change the loading method of the\n JavaScript file.\n \"\"\"\n if loading_method == 'async':\n kwargs['async'] = 'async'\n elif loading_method == 'defer':\n kwargs['defer'] = 'defer'\n\n self.registry.add_js_file(filename, priority=priority, **kwargs)\n if hasattr(self.builder, 'add_js_file'):\n self.builder.add_js_file(filename, priority=priority, **kwargs) # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_css_file_Sphinx.add_css_file.if_hasattr_self_builder_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_css_file_Sphinx.add_css_file.if_hasattr_self_builder_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 991, "end_line": 1050, "span_ids": ["Sphinx.add_css_file"], "tokens": 619}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_css_file(self, filename: str, priority: int = 500, **kwargs: Any) -> None:\n \"\"\"Register a stylesheet to include in the HTML output.\n\n :param filename: The filename of the CSS file. It must be relative to the HTML\n static path, or a full URI with scheme.\n :param priority: The priority to determine the order of ```` tag for the\n CSS files. See list of \"prority range for CSS files\" below.\n If the priority of the CSS files it the same as others, the\n CSS files will be loaded in order of registration.\n :param kwargs: Extra keyword arguments are included as attributes of the ````\n tag.\n\n Example::\n\n app.add_css_file('custom.css')\n # => \n\n app.add_css_file('print.css', media='print')\n # => \n\n app.add_css_file('fancy.css', rel='alternate stylesheet', title='fancy')\n # => \n\n .. list-table:: priority range for CSS files\n :widths: 20,80\n\n * - Priority\n - Main purpose in Sphinx\n * - 200\n - default priority for built-in CSS files\n * - 500\n - default priority for extensions\n * - 800\n - default priority for :confval:`html_css_files`\n\n A CSS file can be added to the specific HTML page when an extension calls\n this method on :event:`html-page-context` event.\n\n .. versionadded:: 1.0\n\n .. versionchanged:: 1.6\n Optional ``alternate`` and/or ``title`` attributes can be supplied\n with the arguments *alternate* (a Boolean) and *title* (a string).\n The default is no title and *alternate* = ``False``. For\n more information, refer to the `documentation\n `__.\n\n .. versionchanged:: 1.8\n Renamed from ``app.add_stylesheet()``.\n And it allows keyword arguments as attributes of link tag.\n\n .. versionchanged:: 3.5\n Take priority argument. Allow to add a CSS file to the specific page.\n \"\"\"\n logger.debug('[app] adding stylesheet: %r', filename)\n self.registry.add_css_files(filename, priority=priority, **kwargs)\n if hasattr(self.builder, 'add_css_file'):\n self.builder.add_css_file(filename, priority=priority, **kwargs) # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_latex_package_Sphinx.add_latex_package.self_registry_add_latex_p": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_latex_package_Sphinx.add_latex_package.self_registry_add_latex_p", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1072, "end_line": 1093, "span_ids": ["Sphinx.add_latex_package"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_latex_package(self, packagename: str, options: str = None,\n after_hyperref: bool = False) -> None:\n r\"\"\"Register a package to include in the LaTeX source code.\n\n Add *packagename* to the list of packages that LaTeX source code will\n include. If you provide *options*, it will be taken to the `\\usepackage`\n declaration. If you set *after_hyperref* truthy, the package will be\n loaded after ``hyperref`` package.\n\n .. code-block:: python\n\n app.add_latex_package('mypackage')\n # => \\usepackage{mypackage}\n app.add_latex_package('mypackage', 'foo,bar')\n # => \\usepackage[foo,bar]{mypackage}\n\n .. versionadded:: 1.3\n .. versionadded:: 3.1\n\n *after_hyperref* option.\n \"\"\"\n self.registry.add_latex_package(packagename, options, after_hyperref)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_autodocumenter_Sphinx.add_autodocumenter.self_add_directive_auto_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_autodocumenter_Sphinx.add_autodocumenter.self_add_directive_auto_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1108, "end_line": 1129, "span_ids": ["Sphinx.add_autodocumenter"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_autodocumenter(self, cls: Any, override: bool = False) -> None:\n \"\"\"Register a new documenter class for the autodoc extension.\n\n Add *cls* as a new documenter class for the :mod:`sphinx.ext.autodoc`\n extension. It must be a subclass of\n :class:`sphinx.ext.autodoc.Documenter`. This allows auto-documenting\n new types of objects. See the source of the autodoc module for\n examples on how to subclass :class:`Documenter`.\n\n If *override* is True, the given *cls* is forcedly installed even if\n a documenter having the same name is already installed.\n\n See :ref:`autodoc_ext_tutorial`.\n\n .. versionadded:: 0.6\n .. versionchanged:: 2.2\n Add *override* keyword.\n \"\"\"\n logger.debug('[app] adding autodocumenter: %r', cls)\n from sphinx.ext.autodoc.directive import AutodocDirective\n self.registry.add_documenter(cls.objtype, cls)\n self.add_directive('auto' + cls.objtype, AutodocDirective, override=override)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_autodoc_attrgetter_Sphinx.add_autodoc_attrgetter.self_registry_add_autodoc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_autodoc_attrgetter_Sphinx.add_autodoc_attrgetter.self_registry_add_autodoc", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1131, "end_line": 1144, "span_ids": ["Sphinx.add_autodoc_attrgetter"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_autodoc_attrgetter(self, typ: Type, getter: Callable[[Any, str, Any], Any]\n ) -> None:\n \"\"\"Register a new ``getattr``-like function for the autodoc extension.\n\n Add *getter*, which must be a function with an interface compatible to\n the :func:`getattr` builtin, as the autodoc attribute getter for\n objects that are instances of *typ*. All cases where autodoc needs to\n get an attribute of a type are then handled by this function instead of\n :func:`getattr`.\n\n .. versionadded:: 0.6\n \"\"\"\n logger.debug('[app] adding autodoc attrgetter: %r', (typ, getter))\n self.registry.add_autodoc_attrgetter(typ, getter)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_search_language_Sphinx.add_search_language.languages_cls_lang_cls": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_search_language_Sphinx.add_search_language.languages_cls_lang_cls", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1094, "end_line": 1108, "span_ids": ["Sphinx.add_search_language"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_search_language(self, cls: Any) -> None:\n \"\"\"Register a new language for the HTML search index.\n\n Add *cls*, which must be a subclass of\n :class:`sphinx.search.SearchLanguage`, as a support language for\n building the HTML full-text search index. The class must have a *lang*\n attribute that indicates the language it should be used for. See\n :confval:`html_search_language`.\n\n .. versionadded:: 1.1\n \"\"\"\n logger.debug('[app] adding search language: %r', cls)\n from sphinx.search import SearchLanguage, languages\n assert issubclass(cls, SearchLanguage)\n languages[cls.lang] = cls", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_html_math_renderer_Sphinx.add_html_math_renderer.self_registry_add_html_ma": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_html_math_renderer_Sphinx.add_html_math_renderer.self_registry_add_html_ma", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1102, "end_line": 1116, "span_ids": ["Sphinx.add_html_math_renderer"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_html_math_renderer(self, name: str,\n inline_renderers: Tuple[Callable, Callable] = None,\n block_renderers: Tuple[Callable, Callable] = None) -> None:\n \"\"\"Register a math renderer for HTML.\n\n The *name* is a name of math renderer. Both *inline_renderers* and\n *block_renderers* are used as visitor functions for the HTML writer:\n the former for inline math node (``nodes.math``), the latter for\n block math node (``nodes.math_block``). Regarding visitor functions,\n see :meth:`add_node` for details.\n\n .. versionadded:: 1.8\n\n \"\"\"\n self.registry.add_html_math_renderer(name, inline_renderers, block_renderers)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_message_catalog_Sphinx._other_methods_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_message_catalog_Sphinx._other_methods_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1227, "end_line": 1240, "span_ids": ["Sphinx.add_message_catalog"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_message_catalog(self, catalog: str, locale_dir: str) -> None:\n \"\"\"Register a message catalog.\n\n :param catalog: The name of the catalog\n :param locale_dir: The base path of the message catalog\n\n For more details, see :func:`sphinx.locale.get_translation()`.\n\n .. versionadded:: 1.8\n \"\"\"\n locale.init([locale_dir], self.config.language, catalog)\n locale.init_console(locale_dir, catalog)\n\n # ---- other methods -------------------------------------------------", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.is_parallel_allowed_Sphinx.is_parallel_allowed.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.is_parallel_allowed_Sphinx.is_parallel_allowed.return.True", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1241, "end_line": 1274, "span_ids": ["Sphinx.is_parallel_allowed"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n def is_parallel_allowed(self, typ: str) -> bool:\n \"\"\"Check whether parallel processing is allowed or not.\n\n :param typ: A type of processing; ``'read'`` or ``'write'``.\n \"\"\"\n if typ == 'read':\n attrname = 'parallel_read_safe'\n message_not_declared = __(\"the %s extension does not declare if it \"\n \"is safe for parallel reading, assuming \"\n \"it isn't - please ask the extension author \"\n \"to check and make it explicit\")\n message_not_safe = __(\"the %s extension is not safe for parallel reading\")\n elif typ == 'write':\n attrname = 'parallel_write_safe'\n message_not_declared = __(\"the %s extension does not declare if it \"\n \"is safe for parallel writing, assuming \"\n \"it isn't - please ask the extension author \"\n \"to check and make it explicit\")\n message_not_safe = __(\"the %s extension is not safe for parallel writing\")\n else:\n raise ValueError('parallel type %s is not supported' % typ)\n\n for ext in self.extensions.values():\n allowed = getattr(ext, attrname, None)\n if allowed is None:\n logger.warning(message_not_declared, ext.name)\n logger.warning(__('doing serial %s'), typ)\n return False\n elif not allowed:\n logger.warning(message_not_safe, ext.name)\n logger.warning(__('doing serial %s'), typ)\n return False\n\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_TemplateBridge_TemplateBridge.init.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_TemplateBridge_TemplateBridge.init.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1167, "end_line": 1182, "span_ids": ["TemplateBridge", "TemplateBridge.init"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TemplateBridge:\n \"\"\"\n This class defines the interface for a \"template bridge\", that is, a class\n that renders templates given a template name and a context.\n \"\"\"\n\n def init(self, builder: \"Builder\", theme: Theme = None, dirs: List[str] = None) -> None:\n \"\"\"Called by the builder to initialize the template system.\n\n *builder* is the builder object; you'll probably want to look at the\n value of ``builder.config.templates_path``.\n\n *theme* is a :class:`sphinx.theming.Theme` object or None; in the latter\n case, *dirs* can be list of fixed directories to look for templates.\n \"\"\"\n raise NotImplementedError('must be implemented in subclasses')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_TemplateBridge.newest_template_mtime_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_TemplateBridge.newest_template_mtime_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1184, "end_line": 1202, "span_ids": ["TemplateBridge.newest_template_mtime", "TemplateBridge.render", "TemplateBridge.render_string"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TemplateBridge:\n\n def newest_template_mtime(self) -> float:\n \"\"\"Called by the builder to determine if output files are outdated\n because of template changes. Return the mtime of the newest template\n file that was changed. The default implementation returns ``0``.\n \"\"\"\n return 0\n\n def render(self, template: str, context: Dict) -> None:\n \"\"\"Called by the builder to render a template given as a filename with\n a specified context (a Python dictionary).\n \"\"\"\n raise NotImplementedError('must be implemented in subclasses')\n\n def render_string(self, template: str, context: Dict) -> str:\n \"\"\"Called by the builder to render a template given as a string with a\n specified context (a Python dictionary).\n \"\"\"\n raise NotImplementedError('must be implemented in subclasses')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder_Builder.get_target_uri.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder_Builder.get_target_uri.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 144, "span_ids": ["Builder.get_target_uri", "Builder.create_template_bridge", "Builder.set_environment", "Builder.create_translator", "Builder.init", "Builder.get_translator_class", "Builder"], "tokens": 824}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n \"\"\"\n Builds target formats from the reST sources.\n \"\"\"\n\n #: The builder's name, for the -b command line option.\n name = ''\n #: The builder's output format, or '' if no document output is produced.\n format = ''\n #: The message emitted upon successful build completion. This can be a\n #: printf-style template string with the following keys: ``outdir``,\n #: ``project``\n epilog = ''\n\n #: default translator class for the builder. This can be overridden by\n #: :py:meth:`app.set_translator()`.\n default_translator_class: Type[nodes.NodeVisitor] = None\n # doctree versioning method\n versioning_method = 'none'\n versioning_compare = False\n #: allow parallel write_doc() calls\n allow_parallel = False\n # support translation\n use_message_catalog = True\n\n #: The list of MIME types of image formats supported by the builder.\n #: Image files are searched in the order in which they appear here.\n supported_image_types: List[str] = []\n #: The builder supports remote images or not.\n supported_remote_images = False\n #: The builder supports data URIs or not.\n supported_data_uri_images = False\n\n def __init__(self, app: \"Sphinx\") -> None:\n self.srcdir = app.srcdir\n self.confdir = app.confdir\n self.outdir = app.outdir\n self.doctreedir = app.doctreedir\n ensuredir(self.doctreedir)\n\n self.app: Sphinx = app\n self.env: Optional[BuildEnvironment] = None\n self.events: EventManager = app.events\n self.config: Config = app.config\n self.tags: Tags = app.tags\n self.tags.add(self.format)\n self.tags.add(self.name)\n self.tags.add(\"format_%s\" % self.format)\n self.tags.add(\"builder_%s\" % self.name)\n\n # images that need to be copied over (source -> dest)\n self.images: Dict[str, str] = {}\n # basename of images directory\n self.imagedir = \"\"\n # relative path to image directory from current docname (used at writing docs)\n self.imgpath = \"\"\n\n # these get set later\n self.parallel_ok = False\n self.finish_tasks: Any = None\n\n def set_environment(self, env: BuildEnvironment) -> None:\n \"\"\"Store BuildEnvironment object.\"\"\"\n self.env = env\n self.env.set_versioning_method(self.versioning_method,\n self.versioning_compare)\n\n def get_translator_class(self, *args: Any) -> Type[nodes.NodeVisitor]:\n \"\"\"Return a class of translator.\"\"\"\n return self.app.registry.get_translator_class(self)\n\n def create_translator(self, *args: Any) -> nodes.NodeVisitor:\n \"\"\"Return an instance of translator.\n\n This method returns an instance of ``default_translator_class`` by default.\n Users can replace the translator class with ``app.set_translator()`` API.\n \"\"\"\n return self.app.registry.create_translator(self, *args)\n\n # helper methods\n def init(self) -> None:\n \"\"\"Load necessary templates and perform initialization. The default\n implementation does nothing.\n \"\"\"\n pass\n\n def create_template_bridge(self) -> None:\n \"\"\"Return the template bridge configured.\"\"\"\n if self.config.template_bridge:\n self.templates = import_object(self.config.template_bridge,\n 'template_bridge setting')()\n else:\n from sphinx.jinja2glue import BuiltinTemplateLoader\n self.templates = BuiltinTemplateLoader()\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n \"\"\"Return the target URI for a document name.\n\n *typ* can be used to qualify the link characteristic for individual\n builders.\n \"\"\"\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.get_relative_uri_Builder.get_asset_paths.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.get_relative_uri_Builder.get_asset_paths.return._", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 157, "end_line": 177, "span_ids": ["Builder.get_asset_paths", "Builder.get_outdated_docs", "Builder.get_relative_uri"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def get_relative_uri(self, from_: str, to: str, typ: str = None) -> str:\n \"\"\"Return a relative URI between two source filenames.\n\n May raise environment.NoUri if there's no way to return a sensible URI.\n \"\"\"\n return relative_uri(self.get_target_uri(from_),\n self.get_target_uri(to, typ))\n\n def get_outdated_docs(self) -> Union[str, Iterable[str]]:\n \"\"\"Return an iterable of output files that are outdated, or a string\n describing what an update build will build.\n\n If the builder does not output individual files corresponding to\n source files, return a string here. If it does, return an iterable\n of those files that need to be written.\n \"\"\"\n raise NotImplementedError\n\n def get_asset_paths(self) -> List[str]:\n \"\"\"Return list of paths for assets (ex. templates, CSS, etc.).\"\"\"\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._compile_po_methods_Builder.compile_all_catalogs.self_compile_catalogs_set": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._compile_po_methods_Builder.compile_all_catalogs.self_compile_catalogs_set", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 199, "end_line": 219, "span_ids": ["Builder.post_process_images", "Builder.compile_all_catalogs", "Builder.compile_catalogs"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n # compile po methods\n\n def compile_catalogs(self, catalogs: Set[CatalogInfo], message: str) -> None:\n if not self.config.gettext_auto_build:\n return\n\n def cat2relpath(cat: CatalogInfo) -> str:\n return relpath(cat.mo_path, self.env.srcdir).replace(path.sep, SEP)\n\n logger.info(bold(__('building [mo]: ')) + message)\n for catalog in status_iterator(catalogs, __('writing output... '), \"darkgreen\",\n len(catalogs), self.app.verbosity,\n stringify_func=cat2relpath):\n catalog.write_mo(self.config.language,\n self.config.gettext_allow_fuzzy_translations)\n\n def compile_all_catalogs(self) -> None:\n repo = CatalogRepository(self.srcdir, self.config.locale_dirs,\n self.config.language, self.config.source_encoding)\n message = __('all of %d po files') % len(list(repo.catalogs))\n self.compile_catalogs(set(repo.catalogs), message)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.compile_specific_catalogs_Builder.compile_specific_catalogs.self_compile_catalogs_cat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.compile_specific_catalogs_Builder.compile_specific_catalogs.self_compile_catalogs_cat", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 221, "end_line": 237, "span_ids": ["Builder.compile_specific_catalogs"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def compile_specific_catalogs(self, specified_files: List[str]) -> None:\n def to_domain(fpath: str) -> Optional[str]:\n docname = self.env.path2doc(path.abspath(fpath))\n if docname:\n return docname_to_domain(docname, self.config.gettext_compact)\n else:\n return None\n\n catalogs = set()\n domains = set(map(to_domain, specified_files))\n repo = CatalogRepository(self.srcdir, self.config.locale_dirs,\n self.config.language, self.config.source_encoding)\n for catalog in repo.catalogs:\n if catalog.domain in domains and catalog.is_outdated():\n catalogs.add(catalog)\n message = __('targets for %d po files that are specified') % len(catalogs)\n self.compile_catalogs(catalogs, message)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.compile_update_catalogs_Builder.build_all.self_build_None_summary_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.compile_update_catalogs_Builder.build_all.self_build_None_summary_", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 249, "end_line": 260, "span_ids": ["Builder.build_all", "Builder.compile_update_catalogs"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def compile_update_catalogs(self) -> None:\n repo = CatalogRepository(self.srcdir, self.config.locale_dirs,\n self.config.language, self.config.source_encoding)\n catalogs = {c for c in repo.catalogs if c.is_outdated()}\n message = __('targets for %d po files that are out of date') % len(catalogs)\n self.compile_catalogs(catalogs, message)\n\n # build methods\n\n def build_all(self) -> None:\n \"\"\"Build all source files.\"\"\"\n self.build(None, summary=__('all source files'), method='all')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.build_specific_Builder.build_update.if_isinstance_to_build_s.else_.self_build_to_build_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.build_specific_Builder.build_update.if_isinstance_to_build_s.else_.self_build_to_build_", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 252, "end_line": 288, "span_ids": ["Builder.build_specific", "Builder.build_update"], "tokens": 349}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def build_specific(self, filenames: List[str]) -> None:\n \"\"\"Only rebuild as much as needed for changes in the *filenames*.\"\"\"\n # bring the filenames to the canonical format, that is,\n # relative to the source directory and without source_suffix.\n dirlen = len(self.srcdir) + 1\n to_write = []\n suffixes: Tuple[str] = tuple(self.config.source_suffix) # type: ignore\n for filename in filenames:\n filename = path.normpath(path.abspath(filename))\n if not filename.startswith(self.srcdir):\n logger.warning(__('file %r given on command line is not under the '\n 'source directory, ignoring'), filename)\n continue\n if not path.isfile(filename):\n logger.warning(__('file %r given on command line does not exist, '\n 'ignoring'), filename)\n continue\n filename = filename[dirlen:]\n for suffix in suffixes:\n if filename.endswith(suffix):\n filename = filename[:-len(suffix)]\n break\n filename = filename.replace(path.sep, SEP)\n to_write.append(filename)\n self.build(to_write, method='specific',\n summary=__('%d source files given on command line') % len(to_write))\n\n def build_update(self) -> None:\n \"\"\"Only rebuild what was changed or added since last build.\"\"\"\n to_build = self.get_outdated_docs()\n if isinstance(to_build, str):\n self.build(['__all__'], to_build)\n else:\n to_build = list(to_build)\n self.build(to_build,\n summary=__('targets for %d source files that are out of date') %\n len(to_build))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.build_Builder.build.self_finish_tasks_join_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.build_Builder.build.self_finish_tasks_join_", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 301, "end_line": 367, "span_ids": ["Builder.build"], "tokens": 570}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def build(self, docnames: Iterable[str], summary: str = None, method: str = 'update') -> None: # NOQA\n \"\"\"Main build method.\n\n First updates the environment, and then calls :meth:`write`.\n \"\"\"\n if summary:\n logger.info(bold(__('building [%s]: ') % self.name) + summary)\n\n # while reading, collect all warnings from docutils\n with logging.pending_warnings():\n updated_docnames = set(self.read())\n\n doccount = len(updated_docnames)\n logger.info(bold(__('looking for now-outdated files... ')), nonl=True)\n for docname in self.env.check_dependents(self.app, updated_docnames):\n updated_docnames.add(docname)\n outdated = len(updated_docnames) - doccount\n if outdated:\n logger.info(__('%d found'), outdated)\n else:\n logger.info(__('none found'))\n\n if updated_docnames:\n # save the environment\n from sphinx.application import ENV_PICKLE_FILENAME\n with progress_message(__('pickling environment')):\n with open(path.join(self.doctreedir, ENV_PICKLE_FILENAME), 'wb') as f:\n pickle.dump(self.env, f, pickle.HIGHEST_PROTOCOL)\n\n # global actions\n self.app.phase = BuildPhase.CONSISTENCY_CHECK\n with progress_message(__('checking consistency')):\n self.env.check_consistency()\n else:\n if method == 'update' and not docnames:\n logger.info(bold(__('no targets are out of date.')))\n return\n\n self.app.phase = BuildPhase.RESOLVING\n\n # filter \"docnames\" (list of outdated files) by the updated\n # found_docs of the environment; this will remove docs that\n # have since been removed\n if docnames and docnames != ['__all__']:\n docnames = set(docnames) & self.env.found_docs\n\n # determine if we can write in parallel\n if parallel_available and self.app.parallel > 1 and self.allow_parallel:\n self.parallel_ok = self.app.is_parallel_allowed('write')\n else:\n self.parallel_ok = False\n\n # create a task executor to use for misc. \"finish-up\" tasks\n # if self.parallel_ok:\n # self.finish_tasks = ParallelTasks(self.app.parallel)\n # else:\n # for now, just execute them serially\n self.finish_tasks = SerialTasks()\n\n # write all \"normal\" documents (or everything for some builders)\n self.write(docnames, list(updated_docnames), method)\n\n # finish (write static files etc.)\n self.finish()\n\n # wait for all tasks\n self.finish_tasks.join()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.read_Builder.read.return.sorted_docnames_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.read_Builder.read.return.sorted_docnames_", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 358, "end_line": 420, "span_ids": ["Builder.read"], "tokens": 564}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def read(self) -> List[str]:\n \"\"\"(Re-)read all files new or changed since last update.\n\n Store all environment docnames in the canonical format (ie using SEP as\n a separator in place of os.path.sep).\n \"\"\"\n logger.info(bold(__('updating environment: ')), nonl=True)\n\n self.env.find_files(self.config, self)\n updated = (self.env.config_status != CONFIG_OK)\n added, changed, removed = self.env.get_outdated_files(updated)\n\n # allow user intervention as well\n for docs in self.events.emit('env-get-outdated', self.env, added, changed, removed):\n changed.update(set(docs) & self.env.found_docs)\n\n # if files were added or removed, all documents with globbed toctrees\n # must be reread\n if added or removed:\n # ... but not those that already were removed\n changed.update(self.env.glob_toctrees & self.env.found_docs)\n\n if updated: # explain the change iff build config status was not ok\n reason = (CONFIG_CHANGED_REASON.get(self.env.config_status, '') +\n (self.env.config_status_extra or ''))\n logger.info('[%s] ', reason, nonl=True)\n\n logger.info(__('%s added, %s changed, %s removed'),\n len(added), len(changed), len(removed))\n\n # clear all files no longer present\n for docname in removed:\n self.events.emit('env-purge-doc', self.env, docname)\n self.env.clear_doc(docname)\n\n # read all new and changed files\n docnames = sorted(added | changed)\n # allow changing and reordering the list of docs to read\n self.events.emit('env-before-read-docs', self.env, docnames)\n\n # check if we should do parallel or serial read\n if parallel_available and len(docnames) > 5 and self.app.parallel > 1:\n par_ok = self.app.is_parallel_allowed('read')\n else:\n par_ok = False\n\n if par_ok:\n self._read_parallel(docnames, nproc=self.app.parallel)\n else:\n self._read_serial(docnames)\n\n if self.config.root_doc not in self.env.all_docs:\n raise SphinxError('root file %s not found' %\n self.env.doc2path(self.config.root_doc))\n\n for retval in self.events.emit('env-updated', self.env):\n if retval is not None:\n docnames.extend(retval)\n\n # workaround: marked as okay to call builder.read() twice in same process\n self.env.config_status = CONFIG_OK\n\n return sorted(docnames)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._read_serial_Builder._read_parallel.tasks_join_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._read_serial_Builder._read_parallel.tasks_join_", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 433, "end_line": 467, "span_ids": ["Builder._read_parallel", "Builder._read_serial"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def _read_serial(self, docnames: List[str]) -> None:\n for docname in status_iterator(docnames, __('reading sources... '), \"purple\",\n len(docnames), self.app.verbosity):\n # remove all inventory entries for that file\n self.events.emit('env-purge-doc', self.env, docname)\n self.env.clear_doc(docname)\n self.read_doc(docname)\n\n def _read_parallel(self, docnames: List[str], nproc: int) -> None:\n # clear all outdated docs at once\n for docname in docnames:\n self.events.emit('env-purge-doc', self.env, docname)\n self.env.clear_doc(docname)\n\n def read_process(docs: List[str]) -> bytes:\n self.env.app = self.app\n for docname in docs:\n self.read_doc(docname)\n # allow pickling self to send it back\n return pickle.dumps(self.env, pickle.HIGHEST_PROTOCOL)\n\n def merge(docs: List[str], otherenv: bytes) -> None:\n env = pickle.loads(otherenv)\n self.env.merge_info_from(docs, env, self.app)\n\n tasks = ParallelTasks(nproc)\n chunks = make_chunks(docnames, nproc)\n\n for chunk in status_iterator(chunks, __('reading sources... '), \"purple\",\n len(chunks), self.app.verbosity):\n tasks.add_task(read_process, chunk, merge)\n\n # make sure all threads have finished\n logger.info(bold(__('waiting for workers...')))\n tasks.join()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.read_doc_Builder.read_doc.self_write_doctree_docnam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.read_doc_Builder.read_doc.self_write_doctree_docnam", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 469, "end_line": 492, "span_ids": ["Builder.read_doc"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def read_doc(self, docname: str) -> None:\n \"\"\"Parse a file and add/update inventory entries for the doctree.\"\"\"\n self.env.prepare_settings(docname)\n\n # Add confdir/docutils.conf to dependencies list if exists\n docutilsconf = path.join(self.confdir, 'docutils.conf')\n if path.isfile(docutilsconf):\n self.env.note_dependency(docutilsconf)\n\n with sphinx_domains(self.env), rst.default_role(docname, self.config.default_role):\n doctree = read_doc(self.app, self.env, self.env.doc2path(docname))\n\n # store time of reading, for outdated files detection\n # (Some filesystems have coarse timestamp resolution;\n # therefore time.time() can be older than filesystem's timestamp.\n # For example, FAT32 has 2sec timestamp resolution.)\n self.env.all_docs[docname] = max(time.time(),\n path.getmtime(self.env.doc2path(docname)))\n\n # cleanup\n self.env.temp_data.clear()\n self.env.ref_context.clear()\n\n self.write_doctree(docname, doctree)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.write_doctree_Builder.write_doctree.with_open_doctree_filenam.pickle_dump_doctree_f_p": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.write_doctree_Builder.write_doctree.with_open_doctree_filenam.pickle_dump_doctree_f_p", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 494, "end_line": 506, "span_ids": ["Builder.write_doctree"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def write_doctree(self, docname: str, doctree: nodes.document) -> None:\n \"\"\"Write the doctree to a file.\"\"\"\n # make it picklable\n doctree.reporter = None\n doctree.transformer = None\n doctree.settings.warning_stream = None\n doctree.settings.env = None\n doctree.settings.record_dependencies = None\n\n doctree_filename = path.join(self.doctreedir, docname + '.doctree')\n ensuredir(path.dirname(doctree_filename))\n with open(doctree_filename, 'wb') as f:\n pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.write_Builder.write.if_self_parallel_ok_.else_.self__write_serial_sorted": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.write_Builder.write.if_self_parallel_ok_.else_.self__write_serial_sorted", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 497, "end_line": 524, "span_ids": ["Builder.write"], "tokens": 288}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def write(self, build_docnames: Iterable[str], updated_docnames: Sequence[str], method: str = 'update') -> None: # NOQA\n if build_docnames is None or build_docnames == ['__all__']:\n # build_all\n build_docnames = self.env.found_docs\n if method == 'update':\n # build updated ones as well\n docnames = set(build_docnames) | set(updated_docnames)\n else:\n docnames = set(build_docnames)\n logger.debug(__('docnames to write: %s'), ', '.join(sorted(docnames)))\n\n # add all toctree-containing files that may have changed\n for docname in list(docnames):\n for tocdocname in self.env.files_to_rebuild.get(docname, set()):\n if tocdocname in self.env.found_docs:\n docnames.add(tocdocname)\n docnames.add(self.config.root_doc)\n\n with progress_message(__('preparing documents')):\n self.prepare_writing(docnames)\n\n if self.parallel_ok:\n # number of subprocesses is parallel-1 because the main process\n # is busy loading doctrees and doing write_doc_serialized()\n self._write_parallel(sorted(docnames),\n nproc=self.app.parallel - 1)\n else:\n self._write_serial(sorted(docnames))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._write_serial_Builder._write_serial.with_logging_pending_warn.for_docname_in_status_ite.self_write_doc_docname_d": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._write_serial_Builder._write_serial.with_logging_pending_warn.for_docname_in_status_ite.self_write_doc_docname_d", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 537, "end_line": 545, "span_ids": ["Builder._write_serial"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def _write_serial(self, docnames: Sequence[str]) -> None:\n with logging.pending_warnings():\n for docname in status_iterator(docnames, __('writing output... '), \"darkgreen\",\n len(docnames), self.app.verbosity):\n self.app.phase = BuildPhase.RESOLVING\n doctree = self.env.get_and_resolve_doctree(docname, self)\n self.app.phase = BuildPhase.WRITING\n self.write_doc_serialized(docname, doctree)\n self.write_doc(docname, doctree)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._write_parallel_Builder._write_parallel.tasks_join_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder._write_parallel_Builder._write_parallel.tasks_join_", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 536, "end_line": 565, "span_ids": ["Builder._write_parallel"], "tokens": 315}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def _write_parallel(self, docnames: Sequence[str], nproc: int) -> None:\n def write_process(docs: List[Tuple[str, nodes.document]]) -> None:\n self.app.phase = BuildPhase.WRITING\n for docname, doctree in docs:\n self.write_doc(docname, doctree)\n\n # warm up caches/compile templates using the first document\n firstname, docnames = docnames[0], docnames[1:]\n self.app.phase = BuildPhase.RESOLVING\n doctree = self.env.get_and_resolve_doctree(firstname, self)\n self.app.phase = BuildPhase.WRITING\n self.write_doc_serialized(firstname, doctree)\n self.write_doc(firstname, doctree)\n\n tasks = ParallelTasks(nproc)\n chunks = make_chunks(docnames, nproc)\n\n self.app.phase = BuildPhase.RESOLVING\n for chunk in status_iterator(chunks, __('writing output... '), \"darkgreen\",\n len(chunks), self.app.verbosity):\n arg = []\n for docname in chunk:\n doctree = self.env.get_and_resolve_doctree(docname, self)\n self.write_doc_serialized(docname, doctree)\n arg.append((docname, doctree))\n tasks.add_task(write_process, arg)\n\n # make sure all threads have finished\n logger.info(bold(__('waiting for workers...')))\n tasks.join()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.prepare_writing_Builder.cleanup.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.prepare_writing_Builder.cleanup.pass", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 578, "end_line": 604, "span_ids": ["Builder.cleanup", "Builder.finish", "Builder.write_doc", "Builder.write_doc_serialized", "Builder.prepare_writing"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def prepare_writing(self, docnames: Set[str]) -> None:\n \"\"\"A place where you can add logic before :meth:`write_doc` is run\"\"\"\n raise NotImplementedError\n\n def write_doc(self, docname: str, doctree: nodes.document) -> None:\n \"\"\"Where you actually write something to the filesystem.\"\"\"\n raise NotImplementedError\n\n def write_doc_serialized(self, docname: str, doctree: nodes.document) -> None:\n \"\"\"Handle parts of write_doc that must be called in the main process\n if parallel build is active.\n \"\"\"\n pass\n\n def finish(self) -> None:\n \"\"\"Finish the building process.\n\n The default implementation does nothing.\n \"\"\"\n pass\n\n def cleanup(self) -> None:\n \"\"\"Cleanup any resources.\n\n The default implementation does nothing.\n \"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.get_builder_config_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.get_builder_config_", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 606, "end_line": 621, "span_ids": ["Builder.get_builder_config"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def get_builder_config(self, option: str, default: str) -> Any:\n \"\"\"Return a builder specific option.\n\n This method allows customization of common builder settings by\n inserting the name of the current builder in the option key.\n If the key does not exist, use default as builder name.\n \"\"\"\n # At the moment, only XXX_use_index is looked up this way.\n # Every new builder variant must be registered in Config.config_values.\n try:\n optname = '%s_%s' % (self.name, option)\n return getattr(self.config, optname)\n except AttributeError:\n optname = '%s_%s' % (default, option)\n return getattr(self.config, optname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py__The_epub_publisher_EpubBuilder.make_id.return.id": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py__The_epub_publisher_EpubBuilder.make_id.return.id", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 113, "end_line": 178, "span_ids": ["EpubBuilder.get_theme_config", "EpubBuilder.make_id", "EpubBuilder.create_build_info", "EpubBuilder", "impl:27", "EpubBuilder.init"], "tokens": 533}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# The epub publisher\n\nclass EpubBuilder(StandaloneHTMLBuilder):\n \"\"\"\n Builder that outputs epub files.\n\n It creates the metainfo files container.opf, toc.ncx, mimetype, and\n META-INF/container.xml. Afterwards, all necessary files are zipped to an\n epub file.\n \"\"\"\n\n # don't copy the reST source\n copysource = False\n supported_image_types = ['image/svg+xml', 'image/png', 'image/gif',\n 'image/jpeg']\n supported_remote_images = False\n\n # don't add links\n add_permalinks = False\n # don't use # as current path. ePub check reject it.\n allow_sharp_as_current_path = False\n # don't add sidebar etc.\n embedded = True\n # disable download role\n download_support = False\n # don't create links to original images from images\n html_scaled_image_link = False\n # don't generate search index or include search page\n search = False\n\n coverpage_name = COVERPAGE_NAME\n toctree_template = TOCTREE_TEMPLATE\n link_target_template = LINK_TARGET_TEMPLATE\n css_link_target_class = CSS_LINK_TARGET_CLASS\n guide_titles = GUIDE_TITLES\n media_types = MEDIA_TYPES\n refuri_re = REFURI_RE\n template_dir = \"\"\n doctype = \"\"\n\n def init(self) -> None:\n super().init()\n # the output files for epub must be .html only\n self.out_suffix = '.xhtml'\n self.link_suffix = '.xhtml'\n self.playorder = 0\n self.tocid = 0\n self.id_cache: Dict[str, str] = {}\n self.use_index = self.get_builder_config('use_index', 'epub')\n self.refnodes: List[Dict[str, Any]] = []\n\n def create_build_info(self) -> BuildInfo:\n return BuildInfo(self.config, self.tags, ['html', 'epub'])\n\n def get_theme_config(self) -> Tuple[str, Dict]:\n return self.config.epub_theme, self.config.epub_theme_options\n\n # generic support functions\n def make_id(self, name: str) -> str:\n # id_cache is intentionally mutable\n \"\"\"Return a unique id for name.\"\"\"\n id = self.id_cache.get(name)\n if not id:\n id = 'epub-%d' % self.env.new_serialno('epub')\n self.id_cache[name] = id\n return id", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.get_refnodes_EpubBuilder.get_refnodes.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.get_refnodes_EpubBuilder.get_refnodes.return.result", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 184, "end_line": 205, "span_ids": ["EpubBuilder.get_refnodes"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def get_refnodes(self, doctree: Node, result: List[Dict[str, Any]]) -> List[Dict[str, Any]]: # NOQA\n \"\"\"Collect section titles, their depth in the toc and the refuri.\"\"\"\n # XXX: is there a better way than checking the attribute\n # toctree-l[1-8] on the parent node?\n if isinstance(doctree, nodes.reference) and doctree.get('refuri'):\n refuri = doctree['refuri']\n if refuri.startswith('http://') or refuri.startswith('https://') \\\n or refuri.startswith('irc:') or refuri.startswith('mailto:'):\n return result\n classes = doctree.parent.attributes['classes']\n for level in range(8, 0, -1): # or range(1, 8)?\n if (self.toctree_template % level) in classes:\n result.append({\n 'level': level,\n 'refuri': html.escape(refuri),\n 'text': ssp(html.escape(doctree.astext()))\n })\n break\n elif isinstance(doctree, nodes.Element):\n for elem in doctree:\n result = self.get_refnodes(elem, result)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.check_refnodes_EpubBuilder.get_toc.self_toc_add_files_self_r": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.check_refnodes_EpubBuilder.get_toc.self_toc_add_files_self_r", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 203, "end_line": 229, "span_ids": ["EpubBuilder.check_refnodes", "EpubBuilder.get_toc"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def check_refnodes(self, nodes: List[Dict[str, Any]]) -> None:\n appeared: Set[str] = set()\n for node in nodes:\n if node['refuri'] in appeared:\n logger.warning(\n __('duplicated ToC entry found: %s'),\n node['refuri'],\n type=\"epub\",\n subtype=\"duplicated_toc_entry\",\n )\n else:\n appeared.add(node['refuri'])\n\n def get_toc(self) -> None:\n \"\"\"Get the total table of contents, containing the root_doc\n and pre and post files not managed by sphinx.\n \"\"\"\n doctree = self.env.get_and_resolve_doctree(self.config.root_doc,\n self, prune_toctrees=False,\n includehidden=True)\n self.refnodes = self.get_refnodes(doctree, [])\n master_dir = path.dirname(self.config.root_doc)\n if master_dir:\n master_dir += '/' # XXX or os.sep?\n for item in self.refnodes:\n item['refuri'] = master_dir + item['refuri']\n self.toc_add_files(self.refnodes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.toc_add_files_EpubBuilder.fix_fragment.return.prefix_fragment_replace": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.toc_add_files_EpubBuilder.fix_fragment.return.prefix_fragment_replace", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 231, "end_line": 255, "span_ids": ["EpubBuilder.fix_fragment", "EpubBuilder.toc_add_files"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def toc_add_files(self, refnodes: List[Dict[str, Any]]) -> None:\n \"\"\"Add the root_doc, pre and post files to a list of refnodes.\n \"\"\"\n refnodes.insert(0, {\n 'level': 1,\n 'refuri': html.escape(self.config.root_doc + self.out_suffix),\n 'text': ssp(html.escape(\n self.env.titles[self.config.root_doc].astext()))\n })\n for file, text in reversed(self.config.epub_pre_files):\n refnodes.insert(0, {\n 'level': 1,\n 'refuri': html.escape(file),\n 'text': ssp(html.escape(text))\n })\n for file, text in self.config.epub_post_files:\n refnodes.append({\n 'level': 1,\n 'refuri': html.escape(file),\n 'text': ssp(html.escape(text))\n })\n\n def fix_fragment(self, prefix: str, fragment: str) -> str:\n \"\"\"Return a href/id attribute with colons replaced by hyphens.\"\"\"\n return prefix + fragment.replace(':', '-')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.fix_ids_EpubBuilder.fix_ids.for_desc_signature_in_tre.update_node_id_desc_signa": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.fix_ids_EpubBuilder.fix_ids.for_desc_signature_in_tre.update_node_id_desc_signa", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 257, "end_line": 288, "span_ids": ["EpubBuilder.fix_ids"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def fix_ids(self, tree: nodes.document) -> None:\n \"\"\"Replace colons with hyphens in href and id attributes.\n\n Some readers crash because they interpret the part as a\n transport protocol specification.\n \"\"\"\n def update_node_id(node: Element) -> None:\n \"\"\"Update IDs of given *node*.\"\"\"\n new_ids: List[str] = []\n for node_id in node['ids']:\n new_id = self.fix_fragment('', node_id)\n if new_id not in new_ids:\n new_ids.append(new_id)\n node['ids'] = new_ids\n\n for reference in tree.findall(nodes.reference):\n if 'refuri' in reference:\n m = self.refuri_re.match(reference['refuri'])\n if m:\n reference['refuri'] = self.fix_fragment(m.group(1), m.group(2))\n if 'refid' in reference:\n reference['refid'] = self.fix_fragment('', reference['refid'])\n\n for target in tree.findall(nodes.target):\n update_node_id(target)\n\n next_node: Node = target.next_node(ascend=True)\n if isinstance(next_node, nodes.Element):\n update_node_id(next_node)\n\n for desc_signature in tree.findall(addnodes.desc_signature):\n update_node_id(desc_signature)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.add_visible_links_EpubBuilder.add_visible_links.make_footnote.return.footnote": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.add_visible_links_EpubBuilder.add_visible_links.make_footnote.return.footnote", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 289, "end_line": 307, "span_ids": ["EpubBuilder.add_visible_links"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def add_visible_links(self, tree: nodes.document, show_urls: str = 'inline') -> None:\n \"\"\"Add visible link targets for external links\"\"\"\n\n def make_footnote_ref(doc: nodes.document, label: str) -> nodes.footnote_reference:\n \"\"\"Create a footnote_reference node with children\"\"\"\n footnote_ref = nodes.footnote_reference('[#]_')\n footnote_ref.append(nodes.Text(label))\n doc.note_autofootnote_ref(footnote_ref)\n return footnote_ref\n\n def make_footnote(doc: nodes.document, label: str, uri: str) -> nodes.footnote:\n \"\"\"Create a footnote node with children\"\"\"\n footnote = nodes.footnote(uri)\n para = nodes.paragraph()\n para.append(nodes.Text(uri))\n footnote.append(para)\n footnote.insert(0, nodes.label('', label))\n doc.note_autofootnote(footnote)\n return footnote\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.add_visible_links.footnote_spot_EpubBuilder.add_visible_links.footnote_spot.return.doc_doc_index_rub_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.add_visible_links.footnote_spot_EpubBuilder.add_visible_links.footnote_spot.return.doc_doc_index_rub_1", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 310, "end_line": 329, "span_ids": ["EpubBuilder.add_visible_links"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def add_visible_links(self, tree: nodes.document, show_urls: str = 'inline') -> None:\n # ... other code\n\n def footnote_spot(tree: nodes.document) -> Tuple[Element, int]:\n \"\"\"Find or create a spot to place footnotes.\n\n The function returns the tuple (parent, index).\"\"\"\n # The code uses the following heuristic:\n # a) place them after the last existing footnote\n # b) place them after an (empty) Footnotes rubric\n # c) create an empty Footnotes rubric at the end of the document\n fns = list(tree.findall(nodes.footnote))\n if fns:\n fn = fns[-1]\n return fn.parent, fn.parent.index(fn) + 1\n for node in tree.findall(nodes.rubric):\n if len(node) == 1 and node.astext() == FOOTNOTES_RUBRIC_NAME:\n return node.parent, node.parent.index(node) + 1\n doc = next(tree.findall(nodes.document))\n rub = nodes.rubric()\n rub.append(nodes.Text(FOOTNOTES_RUBRIC_NAME))\n doc.append(rub)\n return doc, doc.index(rub) + 1\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.write_doc_EpubBuilder.is_vector_graphics.return.ext_in_VECTOR_GRAPHICS_EX": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.write_doc_EpubBuilder.is_vector_graphics.return.ext_in_VECTOR_GRAPHICS_EX", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 358, "end_line": 389, "span_ids": ["EpubBuilder.fix_genindex", "EpubBuilder.is_vector_graphics", "EpubBuilder.write_doc"], "tokens": 343}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def write_doc(self, docname: str, doctree: nodes.document) -> None:\n \"\"\"Write one document file.\n\n This method is overwritten in order to fix fragment identifiers\n and to add visible external links.\n \"\"\"\n self.fix_ids(doctree)\n self.add_visible_links(doctree, self.config.epub_show_urls)\n super().write_doc(docname, doctree)\n\n def fix_genindex(self, tree: List[Tuple[str, List[Tuple[str, Any]]]]) -> None:\n \"\"\"Fix href attributes for genindex pages.\"\"\"\n # XXX: modifies tree inline\n # Logic modeled from themes/basic/genindex.html\n for _key, columns in tree:\n for _entryname, (links, subitems, _key) in columns:\n for (i, (ismain, link)) in enumerate(links):\n m = self.refuri_re.match(link)\n if m:\n links[i] = (ismain,\n self.fix_fragment(m.group(1), m.group(2)))\n for _subentryname, subentrylinks in subitems:\n for (i, (ismain, link)) in enumerate(subentrylinks):\n m = self.refuri_re.match(link)\n if m:\n subentrylinks[i] = (ismain,\n self.fix_fragment(m.group(1), m.group(2)))\n\n def is_vector_graphics(self, filename: str) -> bool:\n \"\"\"Does the filename extension indicate a vector graphic format?\"\"\"\n ext = path.splitext(filename)[-1]\n return ext in VECTOR_GRAPHICS_EXTENSIONS", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.copy_image_files_pil_EpubBuilder.copy_image_files_pil.for_src_in_status_iterato.None_1.except_OSError_as_err_.logger_warning____cannot": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.copy_image_files_pil_EpubBuilder.copy_image_files_pil.for_src_in_status_iterato.None_1.except_OSError_as_err_.logger_warning____cannot", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 390, "end_line": 427, "span_ids": ["EpubBuilder.copy_image_files_pil"], "tokens": 401}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def copy_image_files_pil(self) -> None:\n \"\"\"Copy images using Pillow, the Python Imaging Library.\n The method tries to read and write the files with Pillow, converting\n the format and resizing the image if necessary/possible.\n \"\"\"\n ensuredir(path.join(self.outdir, self.imagedir))\n for src in status_iterator(self.images, __('copying images... '), \"brown\",\n len(self.images), self.app.verbosity):\n dest = self.images[src]\n try:\n img = Image.open(path.join(self.srcdir, src))\n except OSError:\n if not self.is_vector_graphics(src):\n logger.warning(__('cannot read image file %r: copying it instead'),\n path.join(self.srcdir, src))\n try:\n copyfile(path.join(self.srcdir, src),\n path.join(self.outdir, self.imagedir, dest))\n except OSError as err:\n logger.warning(__('cannot copy image file %r: %s'),\n path.join(self.srcdir, src), err)\n continue\n if self.config.epub_fix_images:\n if img.mode in ('P',):\n # See the Pillow documentation for Image.convert()\n # https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.convert\n img = img.convert()\n if self.config.epub_max_image_width > 0:\n (width, height) = img.size\n nw = self.config.epub_max_image_width\n if width > nw:\n nh = (height * nw) / width\n img = img.resize((nw, nh), Image.BICUBIC)\n try:\n img.save(path.join(self.outdir, self.imagedir, dest))\n except OSError as err:\n logger.warning(__('cannot write image file %r: %s'),\n path.join(self.srcdir, src), err)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.copy_image_files_EpubBuilder.copy_download_files.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.copy_image_files_EpubBuilder.copy_download_files.pass", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 429, "end_line": 444, "span_ids": ["EpubBuilder.copy_download_files", "EpubBuilder.copy_image_files"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def copy_image_files(self) -> None:\n \"\"\"Copy image files to destination directory.\n This overwritten method can use Pillow to convert image files.\n \"\"\"\n if self.images:\n if self.config.epub_fix_images or self.config.epub_max_image_width:\n if not Image:\n logger.warning(__('Pillow not found - copying image files'))\n super().copy_image_files()\n else:\n self.copy_image_files_pil()\n else:\n super().copy_image_files()\n\n def copy_download_files(self) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.handle_page_EpubBuilder.handle_page.super_handle_page_pagen": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.handle_page_EpubBuilder.handle_page.super_handle_page_pagen", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 446, "end_line": 458, "span_ids": ["EpubBuilder.handle_page"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def handle_page(self, pagename: str, addctx: Dict, templatename: str = 'page.html',\n outfilename: str = None, event_arg: Any = None) -> None:\n \"\"\"Create a rendered page.\n\n This method is overwritten for genindex pages in order to fix href link\n attributes.\n \"\"\"\n if pagename.startswith('genindex') and 'genindexentries' in addctx:\n if not self.use_index:\n return\n self.fix_genindex(addctx['genindexentries'])\n addctx['doctype'] = self.doctype\n super().handle_page(pagename, addctx, templatename, outfilename, event_arg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.content_metadata_EpubBuilder.content_metadata.return.metadata": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.content_metadata_EpubBuilder.content_metadata.return.metadata", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 473, "end_line": 490, "span_ids": ["EpubBuilder.content_metadata"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def content_metadata(self) -> Dict[str, Any]:\n \"\"\"Create a dictionary with all metadata for the content.opf\n file properly escaped.\n \"\"\"\n metadata: Dict[str, Any] = {}\n metadata['title'] = html.escape(self.config.epub_title)\n metadata['author'] = html.escape(self.config.epub_author)\n metadata['uid'] = html.escape(self.config.epub_uid)\n metadata['lang'] = html.escape(self.config.epub_language)\n metadata['publisher'] = html.escape(self.config.epub_publisher)\n metadata['copyright'] = html.escape(self.config.epub_copyright)\n metadata['scheme'] = html.escape(self.config.epub_scheme)\n metadata['id'] = html.escape(self.config.epub_identifier)\n metadata['date'] = html.escape(format_date(\"%Y-%m-%d\"))\n metadata['manifest_items'] = []\n metadata['spines'] = []\n metadata['guides'] = []\n return metadata", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_content_EpubBuilder.build_content.html_tmpl.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_content_EpubBuilder.build_content.html_tmpl.None", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 492, "end_line": 557, "span_ids": ["EpubBuilder.build_content"], "tokens": 641}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def build_content(self) -> None:\n \"\"\"Write the metainfo file content.opf It contains bibliographic data,\n a file list and the spine (the reading order).\n \"\"\"\n logger.info(__('writing content.opf file...'))\n metadata = self.content_metadata()\n\n # files\n if not self.outdir.endswith(os.sep):\n self.outdir += os.sep\n olen = len(self.outdir)\n self.files: List[str] = []\n self.ignored_files = ['.buildinfo', 'mimetype', 'content.opf',\n 'toc.ncx', 'META-INF/container.xml',\n 'Thumbs.db', 'ehthumbs.db', '.DS_Store',\n 'nav.xhtml', self.config.epub_basename + '.epub'] + \\\n self.config.epub_exclude_files\n if not self.use_index:\n self.ignored_files.append('genindex' + self.out_suffix)\n for root, dirs, files in os.walk(self.outdir):\n dirs.sort()\n for fn in sorted(files):\n filename = path.join(root, fn)[olen:]\n if filename in self.ignored_files:\n continue\n ext = path.splitext(filename)[-1]\n if ext not in self.media_types:\n # we always have JS and potentially OpenSearch files, don't\n # always warn about them\n if ext not in ('.js', '.xml'):\n logger.warning(__('unknown mimetype for %s, ignoring'), filename,\n type='epub', subtype='unknown_project_files')\n continue\n filename = filename.replace(os.sep, '/')\n item = ManifestItem(html.escape(filename),\n html.escape(self.make_id(filename)),\n html.escape(self.media_types[ext]))\n metadata['manifest_items'].append(item)\n self.files.append(filename)\n\n # spine\n spinefiles = set()\n for refnode in self.refnodes:\n if '#' in refnode['refuri']:\n continue\n if refnode['refuri'] in self.ignored_files:\n continue\n spine = Spine(html.escape(self.make_id(refnode['refuri'])), True)\n metadata['spines'].append(spine)\n spinefiles.add(refnode['refuri'])\n for info in self.domain_indices:\n spine = Spine(html.escape(self.make_id(info[0] + self.out_suffix)), True)\n metadata['spines'].append(spine)\n spinefiles.add(info[0] + self.out_suffix)\n if self.use_index:\n spine = Spine(html.escape(self.make_id('genindex' + self.out_suffix)), True)\n metadata['spines'].append(spine)\n spinefiles.add('genindex' + self.out_suffix)\n # add auto generated files\n for name in self.files:\n if name not in spinefiles and name.endswith(self.out_suffix):\n spine = Spine(html.escape(self.make_id(name)), False)\n metadata['spines'].append(spine)\n\n # add the optional cover\n html_tmpl = None\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_content.if_self_config_epub_cover_EpubBuilder.build_content.copy_asset_file_path_join": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_content.if_self_config_epub_cover_EpubBuilder.build_content.copy_asset_file_path_join", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 558, "end_line": 601, "span_ids": ["EpubBuilder.build_content"], "tokens": 446}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def build_content(self) -> None:\n # ... other code\n if self.config.epub_cover:\n image, html_tmpl = self.config.epub_cover\n image = image.replace(os.sep, '/')\n metadata['cover'] = html.escape(self.make_id(image))\n if html_tmpl:\n spine = Spine(html.escape(self.make_id(self.coverpage_name)), True)\n metadata['spines'].insert(0, spine)\n if self.coverpage_name not in self.files:\n ext = path.splitext(self.coverpage_name)[-1]\n self.files.append(self.coverpage_name)\n item = ManifestItem(html.escape(self.coverpage_name),\n html.escape(self.make_id(self.coverpage_name)),\n html.escape(self.media_types[ext]))\n metadata['manifest_items'].append(item)\n ctx = {'image': html.escape(image), 'title': self.config.project}\n self.handle_page(\n path.splitext(self.coverpage_name)[0], ctx, html_tmpl)\n spinefiles.add(self.coverpage_name)\n\n auto_add_cover = True\n auto_add_toc = True\n if self.config.epub_guide:\n for type, uri, title in self.config.epub_guide:\n file = uri.split('#')[0]\n if file not in self.files:\n self.files.append(file)\n if type == 'cover':\n auto_add_cover = False\n if type == 'toc':\n auto_add_toc = False\n metadata['guides'].append(Guide(html.escape(type),\n html.escape(title),\n html.escape(uri)))\n if auto_add_cover and html_tmpl:\n metadata['guides'].append(Guide('cover',\n self.guide_titles['cover'],\n html.escape(self.coverpage_name)))\n if auto_add_toc and self.refnodes:\n metadata['guides'].append(Guide('toc',\n self.guide_titles['toc'],\n html.escape(self.refnodes[0]['refuri'])))\n\n # write the project file\n copy_asset_file(path.join(self.template_dir, 'content.opf_t'), self.outdir, metadata)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.new_navpoint_EpubBuilder.build_navpoints.return.navstack_0_children": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.new_navpoint_EpubBuilder.build_navpoints.return.navstack_0_children", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 603, "end_line": 654, "span_ids": ["EpubBuilder.build_navpoints", "EpubBuilder.new_navpoint"], "tokens": 494}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def new_navpoint(self, node: Dict[str, Any], level: int, incr: bool = True) -> NavPoint:\n \"\"\"Create a new entry in the toc from the node at given level.\"\"\"\n # XXX Modifies the node\n if incr:\n self.playorder += 1\n self.tocid += 1\n return NavPoint('navPoint%d' % self.tocid, self.playorder,\n node['text'], node['refuri'], [])\n\n def build_navpoints(self, nodes: List[Dict[str, Any]]) -> List[NavPoint]:\n \"\"\"Create the toc navigation structure.\n\n Subelements of a node are nested inside the navpoint. For nested nodes\n the parent node is reinserted in the subnav.\n \"\"\"\n navstack: List[NavPoint] = []\n navstack.append(NavPoint('dummy', 0, '', '', []))\n level = 0\n lastnode = None\n for node in nodes:\n if not node['text']:\n continue\n file = node['refuri'].split('#')[0]\n if file in self.ignored_files:\n continue\n if node['level'] > self.config.epub_tocdepth:\n continue\n if node['level'] == level:\n navpoint = self.new_navpoint(node, level)\n navstack.pop()\n navstack[-1].children.append(navpoint)\n navstack.append(navpoint)\n elif node['level'] == level + 1:\n level += 1\n if lastnode and self.config.epub_tocdup:\n # Insert starting point in subtoc with same playOrder\n navstack[-1].children.append(self.new_navpoint(lastnode, level, False))\n navpoint = self.new_navpoint(node, level)\n navstack[-1].children.append(navpoint)\n navstack.append(navpoint)\n elif node['level'] < level:\n while node['level'] < len(navstack):\n navstack.pop()\n level = node['level']\n navpoint = self.new_navpoint(node, level)\n navstack[-1].children.append(navpoint)\n navstack.append(navpoint)\n else:\n raise\n lastnode = node\n\n return navstack[0].children", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.toc_metadata_EpubBuilder.build_toc.copy_asset_file_path_join": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.toc_metadata_EpubBuilder.build_toc.copy_asset_file_path_join", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 656, "end_line": 685, "span_ids": ["EpubBuilder.build_toc", "EpubBuilder.toc_metadata"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def toc_metadata(self, level: int, navpoints: List[NavPoint]) -> Dict[str, Any]:\n \"\"\"Create a dictionary with all metadata for the toc.ncx file\n properly escaped.\n \"\"\"\n metadata: Dict[str, Any] = {}\n metadata['uid'] = self.config.epub_uid\n metadata['title'] = html.escape(self.config.epub_title)\n metadata['level'] = level\n metadata['navpoints'] = navpoints\n return metadata\n\n def build_toc(self) -> None:\n \"\"\"Write the metainfo file toc.ncx.\"\"\"\n logger.info(__('writing toc.ncx file...'))\n\n if self.config.epub_tocscope == 'default':\n doctree = self.env.get_and_resolve_doctree(self.config.root_doc,\n self, prune_toctrees=False,\n includehidden=False)\n refnodes = self.get_refnodes(doctree, [])\n self.toc_add_files(refnodes)\n else:\n # 'includehidden'\n refnodes = self.refnodes\n self.check_refnodes(refnodes)\n navpoints = self.build_navpoints(refnodes)\n level = max(item['level'] for item in self.refnodes)\n level = min(level, self.config.epub_tocdepth)\n copy_asset_file(path.join(self.template_dir, 'toc.ncx_t'), self.outdir,\n self.toc_metadata(level, navpoints))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_epub_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_epub_", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 687, "end_line": 702, "span_ids": ["EpubBuilder.build_epub"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def build_epub(self) -> None:\n \"\"\"Write the epub file.\n\n It is a zip file with the mimetype file stored uncompressed as the first\n entry.\n \"\"\"\n outname = self.config.epub_basename + '.epub'\n logger.info(__('writing %s file...'), outname)\n epub_filename = path.join(self.outdir, outname)\n with ZipFile(epub_filename, 'w', ZIP_DEFLATED) as epub:\n epub.write(path.join(self.outdir, 'mimetype'), 'mimetype', ZIP_STORED)\n for filename in ('META-INF/container.xml', 'content.opf', 'toc.ncx'):\n epub.write(path.join(self.outdir, filename), filename, ZIP_DEFLATED)\n for filename in self.files:\n epub.write(path.join(self.outdir, filename), filename, ZIP_DEFLATED)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py_ChangesBuilder_ChangesBuilder.typemap._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py_ChangesBuilder_ChangesBuilder.typemap._", "embedding": null, "metadata": {"file_path": "sphinx/builders/changes.py", "file_name": "changes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 51, "span_ids": ["ChangesBuilder:7", "ChangesBuilder.get_outdated_docs", "ChangesBuilder", "ChangesBuilder.init"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ChangesBuilder(Builder):\n \"\"\"\n Write a summary with all versionadded/changed directives.\n \"\"\"\n name = 'changes'\n epilog = __('The overview file is in %(outdir)s.')\n\n def init(self) -> None:\n self.create_template_bridge()\n theme_factory = HTMLThemeFactory(self.app)\n self.theme = theme_factory.create('default')\n self.templates.init(self, self.theme)\n\n def get_outdated_docs(self) -> str:\n return self.outdir\n\n typemap = {\n 'versionadded': 'added',\n 'versionchanged': 'changed',\n 'deprecated': 'deprecated',\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py_ChangesBuilder.write_ChangesBuilder.write.logger_info_bold____copy": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py_ChangesBuilder.write_ChangesBuilder.write.logger_info_bold____copy", "embedding": null, "metadata": {"file_path": "sphinx/builders/changes.py", "file_name": "changes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 116, "span_ids": ["ChangesBuilder.write"], "tokens": 833}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ChangesBuilder(Builder):\n\n def write(self, *ignored: Any) -> None:\n version = self.config.version\n domain = cast(ChangeSetDomain, self.env.get_domain('changeset'))\n libchanges: Dict[str, List[Tuple[str, str, int]]] = {}\n apichanges: List[Tuple[str, str, int]] = []\n otherchanges: Dict[Tuple[str, str], List[Tuple[str, str, int]]] = {}\n\n changesets = domain.get_changesets_for(version)\n if not changesets:\n logger.info(bold(__('no changes in version %s.') % version))\n return\n logger.info(bold(__('writing summary file...')))\n for changeset in changesets:\n if isinstance(changeset.descname, tuple):\n descname = changeset.descname[0]\n else:\n descname = changeset.descname\n ttext = self.typemap[changeset.type]\n context = changeset.content.replace('\\n', ' ')\n if descname and changeset.docname.startswith('c-api'):\n if context:\n entry = '%s: %s: %s' % (descname, ttext,\n context)\n else:\n entry = '%s: %s.' % (descname, ttext)\n apichanges.append((entry, changeset.docname, changeset.lineno))\n elif descname or changeset.module:\n module = changeset.module or _('Builtins')\n if not descname:\n descname = _('Module level')\n if context:\n entry = '%s: %s: %s' % (descname, ttext,\n context)\n else:\n entry = '%s: %s.' % (descname, ttext)\n libchanges.setdefault(module, []).append((entry, changeset.docname,\n changeset.lineno))\n else:\n if not context:\n continue\n entry = '%s: %s' % (ttext.capitalize(), context)\n title = self.env.titles[changeset.docname].astext()\n otherchanges.setdefault((changeset.docname, title), []).append(\n (entry, changeset.docname, changeset.lineno))\n\n ctx = {\n 'project': self.config.project,\n 'version': version,\n 'docstitle': self.config.html_title,\n 'shorttitle': self.config.html_short_title,\n 'libchanges': sorted(libchanges.items()),\n 'apichanges': sorted(apichanges),\n 'otherchanges': sorted(otherchanges.items()),\n 'show_copyright': self.config.html_show_copyright,\n 'show_sphinx': self.config.html_show_sphinx,\n }\n with open(path.join(self.outdir, 'index.html'), 'w', encoding='utf8') as f:\n f.write(self.templates.render('changes/frameset.html', ctx))\n with open(path.join(self.outdir, 'changes.html'), 'w', encoding='utf8') as f:\n f.write(self.templates.render('changes/versionchanges.html', ctx))\n\n hltext = ['.. versionadded:: %s' % version,\n '.. versionchanged:: %s' % version,\n '.. deprecated:: %s' % version]\n\n def hl(no: int, line: str) -> str:\n line = ' ' % no + html.escape(line)\n for x in hltext:\n if x in line:\n line = '%s' % line\n break\n return line\n\n logger.info(bold(__('copying source files...')))\n # ... other code\n copy_asset_file(path.join(package_dir, 'themes', 'basic', 'static', 'basic.css'),\n self.outdir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py_ChangesBuilder.write.for_docname_in_self_env_a_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py_ChangesBuilder.write.for_docname_in_self_env_a_", "embedding": null, "metadata": {"file_path": "sphinx/builders/changes.py", "file_name": "changes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 160, "span_ids": ["ChangesBuilder.hl", "ChangesBuilder.write", "ChangesBuilder.finish", "setup"], "tokens": 474}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ChangesBuilder(Builder):\n\n def write(self, *ignored: Any) -> None:\n # ... other code\n with open(path.join(self.outdir, 'changes.html'), 'w', encoding='utf8') as f:\n # ... other code\n # ... other code\n for docname in self.env.all_docs:\n with open(self.env.doc2path(docname),\n encoding=self.env.config.source_encoding) as f:\n try:\n lines = f.readlines()\n except UnicodeDecodeError:\n logger.warning(__('could not read %r for changelog creation'), docname)\n continue\n targetfn = path.join(self.outdir, 'rst', os_path(docname)) + '.html'\n ensuredir(path.dirname(targetfn))\n with open(targetfn, 'w', encoding='utf-8') as f:\n text = ''.join(hl(i + 1, line) for (i, line) in enumerate(lines))\n ctx = {\n 'filename': self.env.doc2path(docname, None),\n 'text': text\n }\n f.write(self.templates.render('changes/rstsource.html', ctx))\n themectx = {'theme_' + key: val for (key, val) in\n self.theme.get_options({}).items()}\n copy_asset_file(path.join(package_dir, 'themes', 'default', 'static', 'default.css_t'),\n self.outdir, context=themectx, renderer=self.templates)\n copy_asset_file(path.join(package_dir, 'themes', 'basic', 'static', 'basic.css'),\n self.outdir)\n\n def hl(self, text: str, version: str) -> str:\n text = html.escape(text)\n for directive in ('versionchanged', 'versionadded', 'deprecated'):\n text = text.replace('.. %s:: %s' % (directive, version),\n '.. %s:: %s' % (directive, version))\n return text\n\n def finish(self) -> None:\n pass\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_builder(ChangesBuilder)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder.content_metadata_Epub3Builder.prepare_writing.self_globalcontext_skip_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder.content_metadata_Epub3Builder.prepare_writing.self_globalcontext_skip_", "embedding": null, "metadata": {"file_path": "sphinx/builders/epub3.py", "file_name": "epub3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 88, "end_line": 111, "span_ids": ["Epub3Builder.prepare_writing", "Epub3Builder.content_metadata"], "tokens": 284}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Epub3Builder(_epub_base.EpubBuilder):\n\n def content_metadata(self) -> Dict:\n \"\"\"Create a dictionary with all metadata for the content.opf\n file properly escaped.\n \"\"\"\n writing_mode = self.config.epub_writing_mode\n\n metadata = super().content_metadata()\n metadata['description'] = html.escape(self.config.epub_description)\n metadata['contributor'] = html.escape(self.config.epub_contributor)\n metadata['page_progression_direction'] = PAGE_PROGRESSION_DIRECTIONS.get(writing_mode)\n metadata['ibook_scroll_axis'] = IBOOK_SCROLL_AXIS.get(writing_mode)\n metadata['date'] = html.escape(format_date(\"%Y-%m-%dT%H:%M:%SZ\"))\n metadata['version'] = html.escape(self.config.version)\n metadata['epub_version'] = self.config.epub_version\n return metadata\n\n def prepare_writing(self, docnames: Set[str]) -> None:\n super().prepare_writing(docnames)\n\n writing_mode = self.config.epub_writing_mode\n self.globalcontext['theme_writing_mode'] = THEME_WRITING_MODES.get(writing_mode)\n self.globalcontext['html_tag'] = self.html_tag\n self.globalcontext['use_meta_charset'] = self.use_meta_charset\n self.globalcontext['skip_ua_compatible'] = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder.build_navlist_Epub3Builder.build_navlist.return.navstack_0_children": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder.build_navlist_Epub3Builder.build_navlist.return.navstack_0_children", "embedding": null, "metadata": {"file_path": "sphinx/builders/epub3.py", "file_name": "epub3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 105, "end_line": 145, "span_ids": ["Epub3Builder.build_navlist"], "tokens": 351}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Epub3Builder(_epub_base.EpubBuilder):\n\n def build_navlist(self, navnodes: List[Dict[str, Any]]) -> List[NavPoint]:\n \"\"\"Create the toc navigation structure.\n\n This method is almost same as build_navpoints method in epub.py.\n This is because the logical navigation structure of epub3 is not\n different from one of epub2.\n\n The difference from build_navpoints method is templates which are used\n when generating navigation documents.\n \"\"\"\n navstack: List[NavPoint] = []\n navstack.append(NavPoint('', '', []))\n level = 0\n for node in navnodes:\n if not node['text']:\n continue\n file = node['refuri'].split('#')[0]\n if file in self.ignored_files:\n continue\n if node['level'] > self.config.epub_tocdepth:\n continue\n\n navpoint = NavPoint(node['text'], node['refuri'], [])\n if node['level'] == level:\n navstack.pop()\n navstack[-1].children.append(navpoint)\n navstack.append(navpoint)\n elif node['level'] == level + 1:\n level += 1\n navstack[-1].children.append(navpoint)\n navstack.append(navpoint)\n elif node['level'] < level:\n while node['level'] < len(navstack):\n navstack.pop()\n level = node['level']\n navstack[-1].children.append(navpoint)\n navstack.append(navpoint)\n else:\n raise RuntimeError('Should never reach here. It might be a bug.')\n\n return navstack[0].children", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_validate_config_values_validate_config_values.if_not_app_config_version.logger_warning____conf_v": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_validate_config_values_validate_config_values.if_not_app_config_version.logger_warning____conf_v", "embedding": null, "metadata": {"file_path": "sphinx/builders/epub3.py", "file_name": "epub3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 194, "end_line": 230, "span_ids": ["validate_config_values"], "tokens": 415}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def validate_config_values(app: Sphinx) -> None:\n if app.builder.name != 'epub':\n return\n\n # lang attribute, dc:language\n if not app.config.epub_language:\n logger.warning(__('conf value \"epub_language\" (or \"language\") '\n 'should not be empty for EPUB3'))\n # unique-identifier attribute\n if not xmlname_checker().match(app.config.epub_uid):\n logger.warning(__('conf value \"epub_uid\" should be XML NAME for EPUB3'))\n # dc:title\n if not app.config.epub_title:\n logger.warning(__('conf value \"epub_title\" (or \"html_title\") '\n 'should not be empty for EPUB3'))\n # dc:creator\n if not app.config.epub_author:\n logger.warning(__('conf value \"epub_author\" should not be empty for EPUB3'))\n # dc:contributor\n if not app.config.epub_contributor:\n logger.warning(__('conf value \"epub_contributor\" should not be empty for EPUB3'))\n # dc:description\n if not app.config.epub_description:\n logger.warning(__('conf value \"epub_description\" should not be empty for EPUB3'))\n # dc:publisher\n if not app.config.epub_publisher:\n logger.warning(__('conf value \"epub_publisher\" should not be empty for EPUB3'))\n # dc:rights\n if not app.config.epub_copyright:\n logger.warning(__('conf value \"epub_copyright\" (or \"copyright\")'\n 'should not be empty for EPUB3'))\n # dc:identifier\n if not app.config.epub_identifier:\n logger.warning(__('conf value \"epub_identifier\" should not be empty for EPUB3'))\n # meta ibooks:version\n if not app.config.version:\n logger.warning(__('conf value \"version\" should not be empty for EPUB3'))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_convert_epub_css_files_convert_epub_css_files._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_convert_epub_css_files_convert_epub_css_files._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/builders/epub3.py", "file_name": "epub3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 218, "end_line": 232, "span_ids": ["convert_epub_css_files"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def convert_epub_css_files(app: Sphinx, config: Config) -> None:\n \"\"\"This converts string styled epub_css_files to tuple styled one.\"\"\"\n epub_css_files: List[Tuple[str, Dict]] = []\n for entry in config.epub_css_files:\n if isinstance(entry, str):\n epub_css_files.append((entry, {}))\n else:\n try:\n filename, attrs = entry\n epub_css_files.append((filename, attrs))\n except Exception:\n logger.warning(__('invalid css_file: %r, ignored'), entry)\n continue\n\n config.epub_css_files = epub_css_files # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/builders/epub3.py", "file_name": "epub3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 250, "end_line": 293, "span_ids": ["setup"], "tokens": 607}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_builder(Epub3Builder)\n\n # config values\n app.add_config_value('epub_basename', lambda self: make_filename(self.project), None)\n app.add_config_value('epub_version', 3.0, 'epub') # experimental\n app.add_config_value('epub_theme', 'epub', 'epub')\n app.add_config_value('epub_theme_options', {}, 'epub')\n app.add_config_value('epub_title', lambda self: self.project, 'epub')\n app.add_config_value('epub_author', lambda self: self.author, 'epub')\n app.add_config_value('epub_language', lambda self: self.language or 'en', 'epub')\n app.add_config_value('epub_publisher', lambda self: self.author, 'epub')\n app.add_config_value('epub_copyright', lambda self: self.copyright, 'epub')\n app.add_config_value('epub_identifier', 'unknown', 'epub')\n app.add_config_value('epub_scheme', 'unknown', 'epub')\n app.add_config_value('epub_uid', 'unknown', 'env')\n app.add_config_value('epub_cover', (), 'env')\n app.add_config_value('epub_guide', (), 'env')\n app.add_config_value('epub_pre_files', [], 'env')\n app.add_config_value('epub_post_files', [], 'env')\n app.add_config_value('epub_css_files', lambda config: config.html_css_files, 'epub')\n app.add_config_value('epub_exclude_files', [], 'env')\n app.add_config_value('epub_tocdepth', 3, 'env')\n app.add_config_value('epub_tocdup', True, 'env')\n app.add_config_value('epub_tocscope', 'default', 'env')\n app.add_config_value('epub_fix_images', False, 'env')\n app.add_config_value('epub_max_image_width', 0, 'env')\n app.add_config_value('epub_show_urls', 'inline', 'epub')\n app.add_config_value('epub_use_index', lambda self: self.html_use_index, 'epub')\n app.add_config_value('epub_description', 'unknown', 'epub')\n app.add_config_value('epub_contributor', 'unknown', 'epub')\n app.add_config_value('epub_writing_mode', 'horizontal', 'epub',\n ENUM('horizontal', 'vertical'))\n\n # event handlers\n app.connect('config-inited', convert_epub_css_files, priority=800)\n app.connect('builder-inited', validate_config_values)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_Catalog_Catalog.__iter__.for_message_in_self_messa.yield_Message_message_po": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_Catalog_Catalog.__iter__.for_message_in_self_messa.yield_Message_message_po", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 39, "end_line": 62, "span_ids": ["Catalog.add", "Catalog", "Catalog.__iter__"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Catalog:\n \"\"\"Catalog of translatable messages.\"\"\"\n\n def __init__(self) -> None:\n self.messages: List[str] = [] # retain insertion order, a la OrderedDict\n\n # msgid -> file, line, uid\n self.metadata: Dict[str, List[Tuple[str, int, str]]] = OrderedDict()\n\n def add(self, msg: str, origin: Union[Element, \"MsgOrigin\"]) -> None:\n if not hasattr(origin, 'uid'):\n # Nodes that are replicated like todo don't have a uid,\n # however i18n is also unnecessary.\n return\n if msg not in self.metadata: # faster lookup in hash\n self.messages.append(msg)\n self.metadata[msg] = []\n self.metadata[msg].append((origin.source, origin.line, origin.uid)) # type: ignore\n\n def __iter__(self) -> Generator[Message, None, None]:\n for message in self.messages:\n positions = [(source, line) for source, line, uuid in self.metadata[message]]\n uuids = [uuid for source, line, uuid in self.metadata[message]]\n yield Message(message, positions, uuids)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MsgOrigin_GettextRenderer.render.return.super_render_filename_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MsgOrigin_GettextRenderer.render.return.super_render_filename_", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 99, "end_line": 131, "span_ids": ["GettextRenderer.render", "MsgOrigin", "GettextRenderer.__init__.escape", "GettextRenderer"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MsgOrigin:\n \"\"\"\n Origin holder for Catalog message origin.\n \"\"\"\n\n def __init__(self, source: str, line: int) -> None:\n self.source = source\n self.line = line\n self.uid = uuid4().hex\n\n\nclass GettextRenderer(SphinxRenderer):\n def __init__(self, template_path: str = None, outdir: str = None) -> None:\n self.outdir = outdir\n if template_path is None:\n template_path = path.join(package_dir, 'templates', 'gettext')\n super().__init__(template_path)\n\n def escape(s: str) -> str:\n s = s.replace('\\\\', r'\\\\')\n s = s.replace('\"', r'\\\"')\n return s.replace('\\n', '\\\\n\"\\n\"')\n\n # use texescape as escape filter\n self.env.filters['e'] = escape\n self.env.filters['escape'] = escape\n\n def render(self, filename: str, context: Dict) -> str:\n def _relpath(s: str) -> str:\n return canon_path(relpath(s, self.outdir))\n\n context['relpath'] = _relpath\n return super().render(filename, context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_I18nTags_I18nBuilder.compile_catalogs.return": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_I18nTags_I18nBuilder.compile_catalogs.return", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 100, "end_line": 136, "span_ids": ["I18nBuilder.get_target_uri", "I18nBuilder.init", "I18nTags", "I18nBuilder.prepare_writing", "I18nBuilder.compile_catalogs", "I18nBuilder", "I18nBuilder.get_outdated_docs", "I18nTags.eval_condition"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class I18nTags(Tags):\n \"\"\"Dummy tags module for I18nBuilder.\n\n To translate all text inside of only nodes, this class\n always returns True value even if no tags are defined.\n \"\"\"\n def eval_condition(self, condition: Any) -> bool:\n return True\n\n\nclass I18nBuilder(Builder):\n \"\"\"\n General i18n builder.\n \"\"\"\n name = 'i18n'\n versioning_method = 'text'\n versioning_compare: bool = None # be set by `gettext_uuid`\n use_message_catalog = False\n\n def init(self) -> None:\n super().init()\n self.env.set_versioning_method(self.versioning_method,\n self.env.config.gettext_uuid)\n self.tags = I18nTags()\n self.catalogs: DefaultDict[str, Catalog] = defaultdict(Catalog)\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n return ''\n\n def get_outdated_docs(self) -> Set[str]:\n return self.env.found_docs\n\n def prepare_writing(self, docnames: Set[str]) -> None:\n return\n\n def compile_catalogs(self, catalogs: Set[CatalogInfo], message: str) -> None:\n return", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py__determine_tzoffset_once_ltz.LocalTimeZone_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py__determine_tzoffset_once_ltz.LocalTimeZone_", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 161, "end_line": 185, "span_ids": ["impl:14", "LocalTimeZone", "LocalTimeZone.utcoffset", "I18nBuilder.write_doc", "impl:3", "LocalTimeZone.dst"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# determine tzoffset once to remain unaffected by DST change during build\ntimestamp = time()\ntzdelta = datetime.fromtimestamp(timestamp) - \\\n datetime.utcfromtimestamp(timestamp)\n# set timestamp from SOURCE_DATE_EPOCH if set\n# see https://reproducible-builds.org/specs/source-date-epoch/\nsource_date_epoch = getenv('SOURCE_DATE_EPOCH')\nif source_date_epoch is not None:\n timestamp = float(source_date_epoch)\n tzdelta = timedelta(0)\n\n\nclass LocalTimeZone(tzinfo):\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n super().__init__(*args, **kwargs)\n self.tzdelta = tzdelta\n\n def utcoffset(self, dt: datetime) -> timedelta:\n return self.tzdelta\n\n def dst(self, dt: datetime) -> timedelta:\n return timedelta(0)\n\n\nltz = LocalTimeZone()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_should_write_should_write.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_should_write_should_write.return.True", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 223, "end_line": 238, "span_ids": ["should_write"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def should_write(filepath: str, new_content: str) -> bool:\n if not path.exists(filepath):\n return True\n try:\n with open(filepath, encoding='utf-8') as oldpot:\n old_content = oldpot.read()\n old_header_index = old_content.index('\"POT-Creation-Date:')\n new_header_index = new_content.index('\"POT-Creation-Date:')\n old_body_index = old_content.index('\"PO-Revision-Date:')\n new_body_index = new_content.index('\"PO-Revision-Date:')\n return ((old_content[:old_header_index] != new_content[:new_header_index]) or\n (new_content[new_body_index:] != old_content[old_body_index:]))\n except ValueError:\n pass\n\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MessageCatalogBuilder_MessageCatalogBuilder._collect_templates.return.template_files": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MessageCatalogBuilder_MessageCatalogBuilder._collect_templates.return.template_files", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 206, "end_line": 227, "span_ids": ["MessageCatalogBuilder.init", "MessageCatalogBuilder._collect_templates", "MessageCatalogBuilder"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MessageCatalogBuilder(I18nBuilder):\n \"\"\"\n Builds gettext-style message catalogs (.pot files).\n \"\"\"\n name = 'gettext'\n epilog = __('The message catalogs are in %(outdir)s.')\n\n def init(self) -> None:\n super().init()\n self.create_template_bridge()\n self.templates.init(self)\n\n def _collect_templates(self) -> Set[str]:\n template_files = set()\n for template_path in self.config.templates_path:\n tmpl_abs_path = path.join(self.app.srcdir, template_path)\n for dirpath, _dirs, files in walk(tmpl_abs_path):\n for fn in files:\n if fn.endswith('.html'):\n filename = canon_path(path.join(dirpath, fn))\n template_files.add(filename)\n return template_files", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MessageCatalogBuilder._extract_from_template_MessageCatalogBuilder.build.super_build_docnames_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MessageCatalogBuilder._extract_from_template_MessageCatalogBuilder.build.super_build_docnames_s", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 229, "end_line": 250, "span_ids": ["MessageCatalogBuilder._extract_from_template", "MessageCatalogBuilder.build"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MessageCatalogBuilder(I18nBuilder):\n\n def _extract_from_template(self) -> None:\n files = list(self._collect_templates())\n files.sort()\n logger.info(bold(__('building [%s]: ') % self.name), nonl=True)\n logger.info(__('targets for %d template files'), len(files))\n\n extract_translations = self.templates.environment.extract_translations\n\n for template in status_iterator(files, __('reading templates... '), \"purple\",\n len(files), self.app.verbosity):\n try:\n with open(template, encoding='utf-8') as f:\n context = f.read()\n for line, _meth, msg in extract_translations(context):\n origin = MsgOrigin(template, line)\n self.catalogs['sphinx'].add(msg, origin)\n except Exception as exc:\n raise ThemeError('%s: %r' % (template, exc)) from exc\n\n def build(self, docnames: Iterable[str], summary: str = None, method: str = 'update') -> None: # NOQA\n self._extract_from_template()\n super().build(docnames, summary, method)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MessageCatalogBuilder.finish_MessageCatalogBuilder.finish.for_textdomain_catalog_i.if_should_write_pofn_con.with_open_pofn_w_enco.pofile_write_content_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_MessageCatalogBuilder.finish_MessageCatalogBuilder.finish.for_textdomain_catalog_i.if_should_write_pofn_con.with_open_pofn_w_enco.pofile_write_content_", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 287, "end_line": 313, "span_ids": ["MessageCatalogBuilder.finish"], "tokens": 284}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MessageCatalogBuilder(I18nBuilder):\n\n def finish(self) -> None:\n super().finish()\n context = {\n 'version': self.config.version,\n 'copyright': self.config.copyright,\n 'project': self.config.project,\n 'last_translator': self.config.gettext_last_translator,\n 'language_team': self.config.gettext_language_team,\n 'ctime': datetime.fromtimestamp(timestamp, ltz).strftime('%Y-%m-%d %H:%M%z'),\n 'display_location': self.config.gettext_location,\n 'display_uuid': self.config.gettext_uuid,\n }\n for textdomain, catalog in status_iterator(self.catalogs.items(),\n __(\"writing message catalogs... \"),\n \"darkgreen\", len(self.catalogs),\n self.app.verbosity,\n lambda textdomain__: textdomain__[0]):\n # noop if config.gettext_compact is set\n ensuredir(path.join(self.outdir, path.dirname(textdomain)))\n\n context['messages'] = list(catalog)\n content = GettextRenderer(outdir=self.outdir).render('message.pot_t', context)\n\n pofn = path.join(self.outdir, textdomain + '.pot')\n if should_write(pofn, content):\n with open(pofn, 'w', encoding='utf-8') as pofile:\n pofile.write(content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 315, "end_line": 331, "span_ids": ["setup"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_builder(MessageCatalogBuilder)\n\n app.add_config_value('gettext_compact', True, 'gettext', {bool, str})\n app.add_config_value('gettext_location', True, 'gettext')\n app.add_config_value('gettext_uuid', False, 'gettext')\n app.add_config_value('gettext_auto_build', True, 'env')\n app.add_config_value('gettext_additional_targets', [], 'env')\n app.add_config_value('gettext_last_translator', 'FULL NAME ', 'gettext')\n app.add_config_value('gettext_language_team', 'LANGUAGE ', 'gettext')\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_BuildInfo_BuildInfo.load.try_.except_Exception_as_exc_.raise_ValueError____buil": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_BuildInfo_BuildInfo.load.try_.except_Exception_as_exc_.raise_ValueError____buil", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 124, "end_line": 144, "span_ids": ["BuildInfo", "BuildInfo.load"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildInfo:\n \"\"\"buildinfo file manipulator.\n\n HTMLBuilder and its family are storing their own envdata to ``.buildinfo``.\n This class is a manipulator for the file.\n \"\"\"\n\n @classmethod\n def load(cls, f: IO) -> \"BuildInfo\":\n try:\n lines = f.readlines()\n assert lines[0].rstrip() == '# Sphinx build info version 1'\n assert lines[2].startswith('config: ')\n assert lines[3].startswith('tags: ')\n\n build_info = BuildInfo()\n build_info.config_hash = lines[2].split()[1].strip()\n build_info.tags_hash = lines[3].split()[1].strip()\n return build_info\n except Exception as exc:\n raise ValueError(__('build info file is broken: %r') % exc) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_BuildInfo.__init___BuildInfo.dump.f_write_Sphinx_build_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_BuildInfo.__init___BuildInfo.dump.f_write_Sphinx_build_i", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 145, "end_line": 166, "span_ids": ["BuildInfo.dump", "BuildInfo.__init__", "BuildInfo.__eq__"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildInfo:\n\n def __init__(self, config: Config = None, tags: Tags = None, config_categories: List[str] = []) -> None: # NOQA\n self.config_hash = ''\n self.tags_hash = ''\n\n if config:\n values = {c.name: c.value for c in config.filter(config_categories)}\n self.config_hash = get_stable_hash(values)\n\n if tags:\n self.tags_hash = get_stable_hash(sorted(tags))\n\n def __eq__(self, other: \"BuildInfo\") -> bool: # type: ignore\n return (self.config_hash == other.config_hash and\n self.tags_hash == other.tags_hash)\n\n def dump(self, f: IO) -> None:\n f.write('# Sphinx build info version 1\\n'\n '# This file hashes the configuration used when building these files.'\n ' When it is not found, a full rebuild will be done.\\n'\n 'config: %s\\n'\n 'tags: %s\\n' %\n (self.config_hash, self.tags_hash))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_StandaloneHTMLBuilder.init.self.use_index.self_get_builder_config_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_StandaloneHTMLBuilder.init.self.use_index.self_get_builder_config_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 214, "end_line": 238, "span_ids": ["StandaloneHTMLBuilder.init"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def init(self) -> None:\n self.build_info = self.create_build_info()\n # basename of images directory\n self.imagedir = '_images'\n # section numbers for headings in the currently visited document\n self.secnumbers: Dict[str, Tuple[int, ...]] = {}\n # currently written docname\n self.current_docname: str = None\n\n self.init_templates()\n self.init_highlighter()\n self.init_css_files()\n self.init_js_files()\n\n html_file_suffix = self.get_builder_config('file_suffix', 'html')\n if html_file_suffix is not None:\n self.out_suffix = html_file_suffix\n\n html_link_suffix = self.get_builder_config('link_suffix', 'html')\n if html_link_suffix is not None:\n self.link_suffix = html_link_suffix\n else:\n self.link_suffix = self.out_suffix\n\n self.use_index = self.get_builder_config('use_index', 'html')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_highlighter_StandaloneHTMLBuilder.init_highlighter.if_dark_style_is_not_None.else_.self.dark_highlighter.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_highlighter_StandaloneHTMLBuilder.init_highlighter.if_dark_style_is_not_None.else_.self.dark_highlighter.None", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 276, "end_line": 297, "span_ids": ["StandaloneHTMLBuilder.init_highlighter"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def init_highlighter(self) -> None:\n # determine Pygments style and create the highlighter\n if self.config.pygments_style is not None:\n style = self.config.pygments_style\n elif self.theme:\n style = self.theme.get_config('theme', 'pygments_style', 'none')\n else:\n style = 'sphinx'\n self.highlighter = PygmentsBridge('html', style)\n\n if self.theme:\n dark_style = self.theme.get_config('theme', 'pygments_dark_style', None)\n else:\n dark_style = None\n\n if dark_style is not None:\n self.dark_highlighter = PygmentsBridge('html', dark_style)\n self.app.add_css_file('pygments_dark.css',\n media='(prefers-color-scheme: dark)',\n id='pygments_dark_css')\n else:\n self.dark_highlighter = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.get_outdated_docs_StandaloneHTMLBuilder.get_outdated_docs.for_docname_in_self_env_f.None_1.except_OSError_.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.get_outdated_docs_StandaloneHTMLBuilder.get_outdated_docs.for_docname_in_self_env_f.None_1.except_OSError_.pass", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 371, "end_line": 415, "span_ids": ["StandaloneHTMLBuilder.get_outdated_docs"], "tokens": 347}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def get_outdated_docs(self) -> Iterator[str]:\n try:\n with open(path.join(self.outdir, '.buildinfo')) as fp:\n buildinfo = BuildInfo.load(fp)\n\n if self.build_info != buildinfo:\n logger.debug('[build target] did not match: build_info ')\n yield from self.env.found_docs\n return\n except ValueError as exc:\n logger.warning(__('Failed to read build info file: %r'), exc)\n except OSError:\n # ignore errors on reading\n pass\n\n if self.templates:\n template_mtime = self.templates.newest_template_mtime()\n else:\n template_mtime = 0\n for docname in self.env.found_docs:\n if docname not in self.env.all_docs:\n logger.debug('[build target] did not in env: %r', docname)\n yield docname\n continue\n targetname = self.get_outfilename(docname)\n try:\n targetmtime = path.getmtime(targetname)\n except Exception:\n targetmtime = 0\n try:\n srcmtime = max(path.getmtime(self.env.doc2path(docname)),\n template_mtime)\n if srcmtime > targetmtime:\n logger.debug(\n '[build target] targetname %r(%s), template(%s), docname %r(%s)',\n targetname,\n datetime.utcfromtimestamp(targetmtime),\n datetime.utcfromtimestamp(template_mtime),\n docname,\n datetime.utcfromtimestamp(path.getmtime(self.env.doc2path(docname))),\n )\n yield docname\n except OSError:\n # source doesn't exist anymore\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.get_asset_paths_StandaloneHTMLBuilder.render_partial.return.publish_parts_reader_name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.get_asset_paths_StandaloneHTMLBuilder.render_partial.return.publish_parts_reader_name", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 383, "end_line": 398, "span_ids": ["StandaloneHTMLBuilder.render_partial", "StandaloneHTMLBuilder.get_asset_paths"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def get_asset_paths(self) -> List[str]:\n return self.config.html_extra_path + self.config.html_static_path\n\n def render_partial(self, node: Node) -> Dict[str, str]:\n \"\"\"Utility: Render a lone doctree node.\"\"\"\n if node is None:\n return {'fragment': ''}\n doc = new_document('')\n doc.append(node)\n\n writer = HTMLWriter(self)\n return publish_parts(reader_name='doctree',\n writer=writer,\n source_class=DocTreeInput,\n settings_overrides={'output_encoding': 'unicode'},\n source=doc)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.prepare_writing.self.globalcontext_StandaloneHTMLBuilder.prepare_writing.self_globalcontext_update": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.prepare_writing.self.globalcontext_StandaloneHTMLBuilder.prepare_writing.self_globalcontext_update", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 503, "end_line": 540, "span_ids": ["StandaloneHTMLBuilder.prepare_writing"], "tokens": 411}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def prepare_writing(self, docnames: Set[str]) -> None:\n # ... other code\n\n self.globalcontext = {\n 'embedded': self.embedded,\n 'project': self.config.project,\n 'release': return_codes_re.sub('', self.config.release),\n 'version': self.config.version,\n 'last_updated': self.last_updated,\n 'copyright': self.config.copyright,\n 'master_doc': self.config.root_doc,\n 'root_doc': self.config.root_doc,\n 'use_opensearch': self.config.html_use_opensearch,\n 'docstitle': self.config.html_title,\n 'shorttitle': self.config.html_short_title,\n 'show_copyright': self.config.html_show_copyright,\n 'show_search_summary': self.config.html_show_search_summary,\n 'show_sphinx': self.config.html_show_sphinx,\n 'has_source': self.config.html_copy_source,\n 'show_source': self.config.html_show_sourcelink,\n 'sourcelink_suffix': self.config.html_sourcelink_suffix,\n 'file_suffix': self.out_suffix,\n 'link_suffix': self.link_suffix,\n 'script_files': self.script_files,\n 'language': convert_locale_to_language_tag(self.config.language),\n 'css_files': self.css_files,\n 'sphinx_version': __display_version__,\n 'sphinx_version_tuple': sphinx_version,\n 'style': self._get_style_filename(),\n 'rellinks': rellinks,\n 'builder': self.name,\n 'parents': [],\n 'logo': logo,\n 'favicon': favicon,\n 'html5_doctype': html5_ready and not self.config.html4_writer,\n }\n if self.theme:\n self.globalcontext.update(\n ('theme_' + key, val) for (key, val) in\n self.theme.get_options(self.theme_options).items())\n self.globalcontext.update(self.config.html_context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.get_doc_context_StandaloneHTMLBuilder.get_doc_context.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.get_doc_context_StandaloneHTMLBuilder.get_doc_context.return._", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 507, "end_line": 585, "span_ids": ["StandaloneHTMLBuilder.get_doc_context"], "tokens": 689}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def get_doc_context(self, docname: str, body: str, metatags: str) -> Dict[str, Any]:\n \"\"\"Collect items for the template context of a page.\"\"\"\n # find out relations\n prev = next = None\n parents = []\n rellinks = self.globalcontext['rellinks'][:]\n related = self.relations.get(docname)\n titles = self.env.titles\n if related and related[2]:\n try:\n next = {\n 'link': self.get_relative_uri(docname, related[2]),\n 'title': self.render_partial(titles[related[2]])['title']\n }\n rellinks.append((related[2], next['title'], 'N', _('next')))\n except KeyError:\n next = None\n if related and related[1]:\n try:\n prev = {\n 'link': self.get_relative_uri(docname, related[1]),\n 'title': self.render_partial(titles[related[1]])['title']\n }\n rellinks.append((related[1], prev['title'], 'P', _('previous')))\n except KeyError:\n # the relation is (somehow) not in the TOC tree, handle\n # that gracefully\n prev = None\n while related and related[0]:\n try:\n parents.append(\n {'link': self.get_relative_uri(docname, related[0]),\n 'title': self.render_partial(titles[related[0]])['title']})\n except KeyError:\n pass\n related = self.relations.get(related[0])\n if parents:\n # remove link to the master file; we have a generic\n # \"back to index\" link already\n parents.pop()\n parents.reverse()\n\n # title rendered as HTML\n title_node = self.env.longtitles.get(docname)\n title = self.render_partial(title_node)['title'] if title_node else ''\n\n # Suffix for the document\n source_suffix = self.env.doc2path(docname, False)[len(docname):]\n\n # the name for the copied source\n if self.config.html_copy_source:\n sourcename = docname + source_suffix\n if source_suffix != self.config.html_sourcelink_suffix:\n sourcename += self.config.html_sourcelink_suffix\n else:\n sourcename = ''\n\n # metadata for the document\n meta = self.env.metadata.get(docname)\n\n # local TOC and global TOC tree\n self_toc = TocTree(self.env).get_toc_for(docname, self)\n toc = self.render_partial(self_toc)['fragment']\n\n return {\n 'parents': parents,\n 'prev': prev,\n 'next': next,\n 'title': title,\n 'meta': meta,\n 'body': body,\n 'metatags': metatags,\n 'rellinks': rellinks,\n 'sourcename': sourcename,\n 'toc': toc,\n # only display a TOC if there's more than one item to show\n 'display_toc': (self.env.toc_num_entries[docname] > 1),\n 'page_source_suffix': source_suffix,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_doc_StandaloneHTMLBuilder.write_doc.self_handle_page_docname_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_doc_StandaloneHTMLBuilder.write_doc.self_handle_page_docname_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 587, "end_line": 602, "span_ids": ["StandaloneHTMLBuilder.write_doc"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def write_doc(self, docname: str, doctree: nodes.document) -> None:\n destination = StringOutput(encoding='utf-8')\n doctree.settings = self.docsettings\n\n self.secnumbers = self.env.toc_secnumbers.get(docname, {})\n self.fignumbers = self.env.toc_fignumbers.get(docname, {})\n self.imgpath = relative_uri(self.get_target_uri(docname), '_images')\n self.dlpath = relative_uri(self.get_target_uri(docname), '_downloads')\n self.current_docname = docname\n self.docwriter.write(doctree, destination)\n self.docwriter.assemble_parts()\n body = self.docwriter.parts['fragment']\n metatags = self.docwriter.clean_meta\n\n ctx = self.get_doc_context(docname, body, metatags)\n self.handle_page(docname, ctx, event_arg=doctree)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_doc_serialized_StandaloneHTMLBuilder.gen_pages_from_extensions.for_pagelist_in_self_even.for_pagename_context_te.self_handle_page_pagename": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_doc_serialized_StandaloneHTMLBuilder.gen_pages_from_extensions.for_pagelist_in_self_even.for_pagename_context_te.self_handle_page_pagename", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 604, "end_line": 637, "span_ids": ["StandaloneHTMLBuilder.write_doc_serialized", "StandaloneHTMLBuilder.finish", "StandaloneHTMLBuilder.gen_pages_from_extensions", "StandaloneHTMLBuilder.gen_indices"], "tokens": 314}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def write_doc_serialized(self, docname: str, doctree: nodes.document) -> None:\n self.imgpath = relative_uri(self.get_target_uri(docname), self.imagedir)\n self.post_process_images(doctree)\n title_node = self.env.longtitles.get(docname)\n title = self.render_partial(title_node)['title'] if title_node else ''\n self.index_page(docname, doctree, title)\n\n def finish(self) -> None:\n self.finish_tasks.add_task(self.gen_indices)\n self.finish_tasks.add_task(self.gen_pages_from_extensions)\n self.finish_tasks.add_task(self.gen_additional_pages)\n self.finish_tasks.add_task(self.copy_image_files)\n self.finish_tasks.add_task(self.copy_download_files)\n self.finish_tasks.add_task(self.copy_static_files)\n self.finish_tasks.add_task(self.copy_extra_files)\n self.finish_tasks.add_task(self.write_buildinfo)\n\n # dump the search index\n self.handle_finish()\n\n @progress_message(__('generating indices'))\n def gen_indices(self) -> None:\n # the global general index\n if self.use_index:\n self.write_genindex()\n\n # the global domain-specific indices\n self.write_domain_indices()\n\n def gen_pages_from_extensions(self) -> None:\n # pages from extensions\n for pagelist in self.events.emit('html-collect-pages'):\n for pagename, context, template in pagelist:\n self.handle_page(pagename, context, template)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.gen_additional_pages_StandaloneHTMLBuilder.gen_additional_pages.if_self_config_html_use_o.self_handle_page_opensea": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.gen_additional_pages_StandaloneHTMLBuilder.gen_additional_pages.if_self_config_html_use_o.self_handle_page_opensea", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 640, "end_line": 656, "span_ids": ["StandaloneHTMLBuilder.gen_additional_pages"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n @progress_message(__('writing additional pages'))\n def gen_additional_pages(self) -> None:\n # additional pages from conf.py\n for pagename, template in self.config.html_additional_pages.items():\n logger.info(pagename + ' ', nonl=True)\n self.handle_page(pagename, {}, template)\n\n # the search page\n if self.search:\n logger.info('search ', nonl=True)\n self.handle_page('search', {}, 'search.html')\n\n # the opensearch xml file\n if self.config.html_use_opensearch and self.search:\n logger.info('opensearch ', nonl=True)\n fn = path.join(self.outdir, '_static', 'opensearch.xml')\n self.handle_page('opensearch', {}, 'opensearch.xml', outfilename=fn)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_genindex_StandaloneHTMLBuilder.write_genindex.if_self_config_html_split.else_.self_handle_page_geninde": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_genindex_StandaloneHTMLBuilder.write_genindex.if_self_config_html_split.else_.self_handle_page_geninde", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 658, "end_line": 685, "span_ids": ["StandaloneHTMLBuilder.write_genindex"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def write_genindex(self) -> None:\n # the total count of lines for each index letter, used to distribute\n # the entries into two columns\n genindex = IndexEntries(self.env).create_index(self)\n indexcounts = []\n for _k, entries in genindex:\n indexcounts.append(sum(1 + len(subitems)\n for _, (_, subitems, _) in entries))\n\n genindexcontext = {\n 'genindexentries': genindex,\n 'genindexcounts': indexcounts,\n 'split_index': self.config.html_split_index,\n }\n logger.info('genindex ', nonl=True)\n\n if self.config.html_split_index:\n self.handle_page('genindex', genindexcontext,\n 'genindex-split.html')\n self.handle_page('genindex-all', genindexcontext,\n 'genindex.html')\n for (key, entries), count in zip(genindex, indexcounts):\n ctx = {'key': key, 'entries': entries, 'count': count,\n 'genindexentries': genindex}\n self.handle_page('genindex-' + key, ctx,\n 'genindex-single.html')\n else:\n self.handle_page('genindex', genindexcontext, 'genindex.html')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_domain_indices_StandaloneHTMLBuilder.copy_image_files.if_self_images_.for_src_in_status_iterato.try_.except_Exception_as_err_.logger_warning____cannot": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.write_domain_indices_StandaloneHTMLBuilder.copy_image_files.if_self_images_.for_src_in_status_iterato.try_.except_Exception_as_err_.logger_warning____cannot", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 687, "end_line": 710, "span_ids": ["StandaloneHTMLBuilder.write_domain_indices", "StandaloneHTMLBuilder.copy_image_files"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def write_domain_indices(self) -> None:\n for indexname, indexcls, content, collapse in self.domain_indices:\n indexcontext = {\n 'indextitle': indexcls.localname,\n 'content': content,\n 'collapse_index': collapse,\n }\n logger.info(indexname + ' ', nonl=True)\n self.handle_page(indexname, indexcontext, 'domainindex.html')\n\n def copy_image_files(self) -> None:\n if self.images:\n stringify_func = ImageAdapter(self.app.env).get_original_image_uri\n ensuredir(path.join(self.outdir, self.imagedir))\n for src in status_iterator(self.images, __('copying images... '), \"brown\",\n len(self.images), self.app.verbosity,\n stringify_func=stringify_func):\n dest = self.images[src]\n try:\n copyfile(path.join(self.srcdir, src),\n path.join(self.outdir, self.imagedir, dest))\n except Exception as err:\n logger.warning(__('cannot copy image file %r: %s'),\n path.join(self.srcdir, src), err)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_download_files_StandaloneHTMLBuilder.copy_download_files.if_self_env_dlfiles_.for_src_in_status_iterato.try_.except_OSError_as_err_.logger_warning____cannot": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_download_files_StandaloneHTMLBuilder.copy_download_files.if_self_env_dlfiles_.for_src_in_status_iterato.try_.except_OSError_as_err_.logger_warning____cannot", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 711, "end_line": 727, "span_ids": ["StandaloneHTMLBuilder.copy_download_files"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def copy_download_files(self) -> None:\n def to_relpath(f: str) -> str:\n return relative_path(self.srcdir, f)\n\n # copy downloadable files\n if self.env.dlfiles:\n ensuredir(path.join(self.outdir, '_downloads'))\n for src in status_iterator(self.env.dlfiles, __('copying downloadable files... '),\n \"brown\", len(self.env.dlfiles), self.app.verbosity,\n stringify_func=to_relpath):\n try:\n dest = path.join(self.outdir, '_downloads', self.env.dlfiles[src][1])\n ensuredir(path.dirname(dest))\n copyfile(path.join(self.srcdir, src), dest)\n except OSError as err:\n logger.warning(__('cannot copy downloadable file %r: %s'),\n path.join(self.srcdir, src), err)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_static_files_StandaloneHTMLBuilder.copy_static_files.try_.except_OSError_as_err_.logger_warning____cannot": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_static_files_StandaloneHTMLBuilder.copy_static_files.try_.except_OSError_as_err_.logger_warning____cannot", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 786, "end_line": 804, "span_ids": ["StandaloneHTMLBuilder.copy_static_files"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def copy_static_files(self) -> None:\n try:\n with progress_message(__('copying static files')):\n ensuredir(path.join(self.outdir, '_static'))\n\n # prepare context for templates\n context = self.globalcontext.copy()\n if self.indexer is not None:\n context.update(self.indexer.context_for_searchtool())\n\n self.create_pygments_style_file()\n self.copy_translation_js()\n self.copy_stemmer_js()\n self.copy_theme_static_files(context)\n self.copy_html_static_files(context)\n self.copy_html_logo()\n self.copy_html_favicon()\n except OSError as err:\n logger.warning(__('cannot copy static file %r'), err)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_extra_files_StandaloneHTMLBuilder.cleanup.if_self_theme_.self_theme_cleanup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_extra_files_StandaloneHTMLBuilder.cleanup.if_self_theme_.self_theme_cleanup_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 796, "end_line": 817, "span_ids": ["StandaloneHTMLBuilder.write_buildinfo", "StandaloneHTMLBuilder.copy_extra_files", "StandaloneHTMLBuilder.cleanup"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def copy_extra_files(self) -> None:\n \"\"\"copy html_extra_path files.\"\"\"\n try:\n with progress_message(__('copying extra files')):\n excluded = Matcher(self.config.exclude_patterns)\n for extra_path in self.config.html_extra_path:\n entry = path.join(self.confdir, extra_path)\n copy_asset(entry, self.outdir, excluded)\n except OSError as err:\n logger.warning(__('cannot copy extra file %r'), err)\n\n def write_buildinfo(self) -> None:\n try:\n with open(path.join(self.outdir, '.buildinfo'), 'w') as fp:\n self.build_info.dump(fp)\n except OSError as exc:\n logger.warning(__('Failed to write build info file: %r'), exc)\n\n def cleanup(self) -> None:\n # clean up theme stuff\n if self.theme:\n self.theme.cleanup()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.load_indexer_StandaloneHTMLBuilder.load_indexer.self_indexer_prune_keep_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.load_indexer_StandaloneHTMLBuilder.load_indexer.self_indexer_prune_keep_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 848, "end_line": 864, "span_ids": ["StandaloneHTMLBuilder.load_indexer"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def load_indexer(self, docnames: Iterable[str]) -> None:\n keep = set(self.env.all_docs) - set(docnames)\n try:\n searchindexfn = path.join(self.outdir, self.searchindex_filename)\n if self.indexer_dumps_unicode:\n with open(searchindexfn, encoding='utf-8') as ft:\n self.indexer.load(ft, self.indexer_format)\n else:\n with open(searchindexfn, 'rb') as fb:\n self.indexer.load(fb, self.indexer_format)\n except (OSError, ValueError):\n if keep:\n logger.warning(__('search index couldn\\'t be loaded, but not all '\n 'documents will be built: the index will be '\n 'incomplete.'))\n # delete all entries for files that will be rebuilt\n self.indexer.prune(keep)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder._get_local_toctree_StandaloneHTMLBuilder.get_outfilename.return.path_join_self_outdir_os": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder._get_local_toctree_StandaloneHTMLBuilder.get_outfilename.return.path_join_self_outdir_os", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 887, "end_line": 896, "span_ids": ["StandaloneHTMLBuilder._get_local_toctree", "StandaloneHTMLBuilder.get_outfilename"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def _get_local_toctree(self, docname: str, collapse: bool = True, **kwargs: Any) -> str:\n if 'includehidden' not in kwargs:\n kwargs['includehidden'] = False\n if kwargs.get('maxdepth') == '':\n kwargs.pop('maxdepth')\n return self.render_partial(TocTree(self.env).get_toctree_for(\n docname, self, collapse, **kwargs))['fragment']\n\n def get_outfilename(self, pagename: str) -> str:\n return path.join(self.outdir, os_path(pagename) + self.out_suffix)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_convert_html_css_files_convert_html_css_files._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_convert_html_css_files_convert_html_css_files._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1114, "end_line": 1128, "span_ids": ["convert_html_css_files"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def convert_html_css_files(app: Sphinx, config: Config) -> None:\n \"\"\"This converts string styled html_css_files to tuple styled one.\"\"\"\n html_css_files: List[Tuple[str, Dict]] = []\n for entry in config.html_css_files:\n if isinstance(entry, str):\n html_css_files.append((entry, {}))\n else:\n try:\n filename, attrs = entry\n html_css_files.append((filename, attrs))\n except Exception:\n logger.warning(__('invalid css_file: %r, ignored'), entry)\n continue\n\n config.html_css_files = html_css_files # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_convert_html_js_files_convert_html_js_files._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_convert_html_js_files_convert_html_js_files._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1131, "end_line": 1145, "span_ids": ["convert_html_js_files"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def convert_html_js_files(app: Sphinx, config: Config) -> None:\n \"\"\"This converts string styled html_js_files to tuple styled one.\"\"\"\n html_js_files: List[Tuple[str, Dict]] = []\n for entry in config.html_js_files:\n if isinstance(entry, str):\n html_js_files.append((entry, {}))\n else:\n try:\n filename, attrs = entry\n html_js_files.append((filename, attrs))\n except Exception:\n logger.warning(__('invalid js_file: %r, ignored'), entry)\n continue\n\n config.html_js_files = html_js_files # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup_js_tag_helper_setup_js_tag_helper.context_js_tag_js_ta": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup_js_tag_helper_setup_js_tag_helper.context_js_tag_js_ta", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1168, "end_line": 1200, "span_ids": ["setup_js_tag_helper"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup_js_tag_helper(app: Sphinx, pagename: str, templatename: str,\n context: Dict, doctree: Node) -> None:\n \"\"\"Set up js_tag() template helper.\n\n .. note:: This set up function is added to keep compatibility with webhelper.\n \"\"\"\n pathto = context.get('pathto')\n\n def js_tag(js: JavaScript) -> str:\n attrs = []\n body = ''\n if isinstance(js, JavaScript):\n for key in sorted(js.attributes):\n value = js.attributes[key]\n if value is not None:\n if key == 'body':\n body = value\n elif key == 'data_url_root':\n attrs.append('data-url_root=\"%s\"' % pathto('', resource=True))\n else:\n attrs.append('%s=\"%s\"' % (key, html.escape(value, True)))\n if js.filename:\n attrs.append('src=\"%s\"' % pathto(js.filename, resource=True))\n else:\n # str value (old styled)\n attrs.append('src=\"%s\"' % pathto(js, resource=True))\n\n if attrs:\n return '' % (' '.join(attrs), body)\n else:\n return '' % body\n\n context['js_tag'] = js_tag", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_validate_math_renderer_validate_html_extra_path.for_entry_in_config_html_.if_not_path_exists_extra_.elif_path_splitdrive_app.config_html_extra_path_re": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_validate_math_renderer_validate_html_extra_path.for_entry_in_config_html_.if_not_path_exists_extra_.elif_path_splitdrive_app.config_html_extra_path_re", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1128, "end_line": 1150, "span_ids": ["validate_math_renderer", "validate_html_extra_path"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def validate_math_renderer(app: Sphinx) -> None:\n if app.builder.format != 'html':\n return\n\n name = app.builder.math_renderer_name # type: ignore\n if name is None:\n raise ConfigError(__('Many math_renderers are registered. '\n 'But no math_renderer is selected.'))\n elif name not in app.registry.html_inline_math_renderers:\n raise ConfigError(__('Unknown math_renderer %r is given.') % name)\n\n\ndef validate_html_extra_path(app: Sphinx, config: Config) -> None:\n \"\"\"Check html_extra_paths setting.\"\"\"\n for entry in config.html_extra_path[:]:\n extra_path = path.normpath(path.join(app.confdir, entry))\n if not path.exists(extra_path):\n logger.warning(__('html_extra_path entry %r does not exist'), entry)\n config.html_extra_path.remove(entry)\n elif (path.splitdrive(app.outdir)[0] == path.splitdrive(extra_path)[0] and\n path.commonpath([app.outdir, extra_path]) == app.outdir):\n logger.warning(__('html_extra_path entry %r is placed inside outdir'), entry)\n config.html_extra_path.remove(entry)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_validate_html_static_path_validate_html_static_path.for_entry_in_config_html_.if_not_path_exists_static.elif_path_splitdrive_app.config_html_static_path_r": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_validate_html_static_path_validate_html_static_path.for_entry_in_config_html_.if_not_path_exists_static.elif_path_splitdrive_app.config_html_static_path_r", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1153, "end_line": 1163, "span_ids": ["validate_html_static_path"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def validate_html_static_path(app: Sphinx, config: Config) -> None:\n \"\"\"Check html_static_paths setting.\"\"\"\n for entry in config.html_static_path[:]:\n static_path = path.normpath(path.join(app.confdir, entry))\n if not path.exists(static_path):\n logger.warning(__('html_static_path entry %r does not exist'), entry)\n config.html_static_path.remove(entry)\n elif (path.splitdrive(app.outdir)[0] == path.splitdrive(static_path)[0] and\n path.commonpath([app.outdir, static_path]) == app.outdir):\n logger.warning(__('html_static_path entry %r is placed inside outdir'), entry)\n config.html_static_path.remove(entry)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_XINDY_LANG_OPTIONS_XINDY_LANG_OPTIONS._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_XINDY_LANG_OPTIONS_XINDY_LANG_OPTIONS._", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 45, "end_line": 100, "span_ids": ["impl"], "tokens": 825}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "XINDY_LANG_OPTIONS = {\n # language codes from docutils.writers.latex2e.Babel\n # ! xindy language names may differ from those in use by LaTeX/babel\n # ! xindy does not support all Latin scripts as recognized by LaTeX/babel\n # ! not all xindy-supported languages appear in Babel.language_codes\n # cd /usr/local/texlive/2018/texmf-dist/xindy/modules/lang\n # find . -name '*utf8.xdy'\n # LATIN\n 'sq': '-L albanian -C utf8 ',\n 'hr': '-L croatian -C utf8 ',\n 'cs': '-L czech -C utf8 ',\n 'da': '-L danish -C utf8 ',\n 'nl': '-L dutch-ij-as-ij -C utf8 ',\n 'en': '-L english -C utf8 ',\n 'eo': '-L esperanto -C utf8 ',\n 'et': '-L estonian -C utf8 ',\n 'fi': '-L finnish -C utf8 ',\n 'fr': '-L french -C utf8 ',\n 'de': '-L german-din5007 -C utf8 ',\n 'is': '-L icelandic -C utf8 ',\n 'it': '-L italian -C utf8 ',\n 'la': '-L latin -C utf8 ',\n 'lv': '-L latvian -C utf8 ',\n 'lt': '-L lithuanian -C utf8 ',\n 'dsb': '-L lower-sorbian -C utf8 ',\n 'ds': '-L lower-sorbian -C utf8 ', # trick, no conflict\n 'nb': '-L norwegian -C utf8 ',\n 'no': '-L norwegian -C utf8 ', # and what about nynorsk?\n 'pl': '-L polish -C utf8 ',\n 'pt': '-L portuguese -C utf8 ',\n 'ro': '-L romanian -C utf8 ',\n 'sk': '-L slovak-small -C utf8 ', # there is also slovak-large\n 'sl': '-L slovenian -C utf8 ',\n 'es': '-L spanish-modern -C utf8 ', # there is also spanish-traditional\n 'sv': '-L swedish -C utf8 ',\n 'tr': '-L turkish -C utf8 ',\n 'hsb': '-L upper-sorbian -C utf8 ',\n 'hs': '-L upper-sorbian -C utf8 ', # trick, no conflict\n 'vi': '-L vietnamese -C utf8 ',\n # CYRILLIC\n # for usage with pdflatex, needs also cyrLICRutf8.xdy module\n 'be': '-L belarusian -C utf8 ',\n 'bg': '-L bulgarian -C utf8 ',\n 'mk': '-L macedonian -C utf8 ',\n 'mn': '-L mongolian-cyrillic -C utf8 ',\n 'ru': '-L russian -C utf8 ',\n 'sr': '-L serbian -C utf8 ',\n 'sh-cyrl': '-L serbian -C utf8 ',\n 'sh': '-L serbian -C utf8 ', # trick, no conflict\n 'uk': '-L ukrainian -C utf8 ',\n # GREEK\n # can work only with xelatex/lualatex, not supported by texindy+pdflatex\n 'el': '-L greek -C utf8 ',\n # FIXME, not compatible with [:2] slice but does Sphinx support Greek ?\n 'el-polyton': '-L greek-polytonic -C utf8 ',\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.init_document_data_LaTeXBuilder.init_document_data.for_entry_in_preliminary_.self_titles_append_docna": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.init_document_data_LaTeXBuilder.init_document_data.for_entry_in_preliminary_.self_titles_append_docna", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 139, "end_line": 156, "span_ids": ["LaTeXBuilder.init_document_data"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n def init_document_data(self) -> None:\n preliminary_document_data = [list(x) for x in self.config.latex_documents]\n if not preliminary_document_data:\n logger.warning(__('no \"latex_documents\" config value found; no documents '\n 'will be written'))\n return\n # assign subdirs to titles\n self.titles: List[Tuple[str, str]] = []\n for entry in preliminary_document_data:\n docname = entry[0]\n if docname not in self.env.all_docs:\n logger.warning(__('\"latex_documents\" config value references unknown '\n 'document %s'), docname)\n continue\n self.document_data.append(entry) # type: ignore\n if docname.endswith(SEP + 'index'):\n docname = docname[:-5]\n self.titles.append((docname, entry[2]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.init_multilingual_LaTeXBuilder.init_multilingual.if_self_context_babel_.elif_self_context_polygl.self_context_multilingua": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.init_multilingual_LaTeXBuilder.init_multilingual.if_self_context_babel_.elif_self_context_polygl.self_context_multilingua", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 203, "end_line": 239, "span_ids": ["LaTeXBuilder.init_multilingual"], "tokens": 482}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n def init_multilingual(self) -> None:\n if self.context['latex_engine'] == 'pdflatex':\n if not self.babel.uses_cyrillic():\n if 'X2' in self.context['fontenc']:\n self.context['substitutefont'] = '\\\\usepackage{substitutefont}'\n self.context['textcyrillic'] = ('\\\\usepackage[Xtwo]'\n '{sphinxpackagecyrillic}')\n elif 'T2A' in self.context['fontenc']:\n self.context['substitutefont'] = '\\\\usepackage{substitutefont}'\n self.context['textcyrillic'] = ('\\\\usepackage[TtwoA]'\n '{sphinxpackagecyrillic}')\n if 'LGR' in self.context['fontenc']:\n self.context['substitutefont'] = '\\\\usepackage{substitutefont}'\n else:\n self.context['textgreek'] = ''\n if self.context['substitutefont'] == '':\n self.context['fontsubstitution'] = ''\n\n # 'babel' key is public and user setting must be obeyed\n if self.context['babel']:\n self.context['classoptions'] += ',' + self.babel.get_language()\n # this branch is not taken for xelatex/lualatex if default settings\n self.context['multilingual'] = self.context['babel']\n self.context['shorthandoff'] = SHORTHANDOFF\n\n # Times fonts don't work with Cyrillic languages\n if self.babel.uses_cyrillic() and 'fontpkg' not in self.config.latex_elements:\n self.context['fontpkg'] = ''\n elif self.context['polyglossia']:\n self.context['classoptions'] += ',' + self.babel.get_language()\n options = self.babel.get_mainlanguage_options()\n if options:\n language = r'\\setmainlanguage[%s]{%s}' % (options, self.babel.get_language())\n else:\n language = r'\\setmainlanguage{%s}' % self.babel.get_language()\n\n self.context['multilingual'] = '%s\\n%s' % (self.context['polyglossia'], language)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.write_stylesheet_LaTeXBuilder.write_stylesheet.with_open_stylesheet_w_.f_write_highlighter_get_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.write_stylesheet_LaTeXBuilder.write_stylesheet.with_open_stylesheet_w_.f_write_highlighter_get_s", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 241, "end_line": 249, "span_ids": ["LaTeXBuilder.write_stylesheet"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n def write_stylesheet(self) -> None:\n highlighter = highlighting.PygmentsBridge('latex', self.config.pygments_style)\n stylesheet = path.join(self.outdir, 'sphinxhighlight.sty')\n with open(stylesheet, 'w') as f:\n f.write('\\\\NeedsTeXFormat{LaTeX2e}[1995/12/01]\\n')\n f.write('\\\\ProvidesPackage{sphinxhighlight}'\n '[2016/05/29 stylesheet for highlighting with pygments]\\n')\n f.write('% Its contents depend on pygments_style configuration variable.\\n\\n')\n f.write(highlighter.get_stylesheet())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.write_LaTeXBuilder.write.for_entry_in_self_documen.None_2.docwriter_write_doctree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.write_LaTeXBuilder.write.for_entry_in_self_documen.None_2.docwriter_write_doctree_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 251, "end_line": 296, "span_ids": ["LaTeXBuilder.write"], "tokens": 440}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n def write(self, *ignored: Any) -> None:\n docwriter = LaTeXWriter(self)\n docsettings: Any = OptionParser(\n defaults=self.env.settings,\n components=(docwriter,),\n read_config_files=True).get_default_values()\n\n self.init_document_data()\n self.write_stylesheet()\n\n for entry in self.document_data:\n docname, targetname, title, author, themename = entry[:5]\n theme = self.themes.get(themename)\n toctree_only = False\n if len(entry) > 5:\n toctree_only = entry[5]\n destination = SphinxFileOutput(destination_path=path.join(self.outdir, targetname),\n encoding='utf-8', overwrite_if_changed=True)\n with progress_message(__(\"processing %s\") % targetname):\n doctree = self.env.get_doctree(docname)\n toctree = next(doctree.findall(addnodes.toctree), None)\n if toctree and toctree.get('maxdepth') > 0:\n tocdepth = toctree.get('maxdepth')\n else:\n tocdepth = None\n\n doctree = self.assemble_doctree(\n docname, toctree_only,\n appendices=(self.config.latex_appendices if theme.name != 'howto' else []))\n doctree['docclass'] = theme.docclass\n doctree['contentsname'] = self.get_contentsname(docname)\n doctree['tocdepth'] = tocdepth\n self.post_process_images(doctree)\n self.update_doc_context(title, author, theme)\n self.update_context()\n\n with progress_message(__(\"writing\")):\n docsettings._author = author\n docsettings._title = title\n docsettings._contentsname = doctree['contentsname']\n docsettings._docname = docname\n docsettings._docclass = theme.name\n\n doctree.settings = docsettings\n docwriter.theme = theme\n docwriter.write(doctree, destination)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.get_contentsname_LaTeXBuilder.update_doc_context.self_context_wrapperclas": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.get_contentsname_LaTeXBuilder.update_doc_context.self_context_wrapperclas", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 298, "end_line": 314, "span_ids": ["LaTeXBuilder.update_doc_context", "LaTeXBuilder.get_contentsname"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n def get_contentsname(self, indexfile: str) -> str:\n tree = self.env.get_doctree(indexfile)\n contentsname = None\n for toctree in tree.findall(addnodes.toctree):\n if 'caption' in toctree:\n contentsname = toctree['caption']\n break\n\n return contentsname\n\n def update_doc_context(self, title: str, author: str, theme: Theme) -> None:\n self.context['title'] = title\n self.context['author'] = author\n self.context['docclass'] = theme.docclass\n self.context['papersize'] = theme.papersize\n self.context['pointsize'] = theme.pointsize\n self.context['wrapperclass'] = theme.wrapperclass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.assemble_doctree_LaTeXBuilder.assemble_doctree.return.largetree": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.assemble_doctree_LaTeXBuilder.assemble_doctree.return.largetree", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 316, "end_line": 357, "span_ids": ["LaTeXBuilder.assemble_doctree"], "tokens": 462}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n def assemble_doctree(self, indexfile: str, toctree_only: bool, appendices: List[str]) -> nodes.document: # NOQA\n self.docnames = set([indexfile] + appendices)\n logger.info(darkgreen(indexfile) + \" \", nonl=True)\n tree = self.env.get_doctree(indexfile)\n tree['docname'] = indexfile\n if toctree_only:\n # extract toctree nodes from the tree and put them in a\n # fresh document\n new_tree = new_document('')\n new_sect = nodes.section()\n new_sect += nodes.title('',\n '')\n new_tree += new_sect\n for node in tree.findall(addnodes.toctree):\n new_sect += node\n tree = new_tree\n largetree = inline_all_toctrees(self, self.docnames, indexfile, tree,\n darkgreen, [indexfile])\n largetree['docname'] = indexfile\n for docname in appendices:\n appendix = self.env.get_doctree(docname)\n appendix['docname'] = docname\n largetree.append(appendix)\n logger.info('')\n logger.info(__(\"resolving references...\"))\n self.env.resolve_references(largetree, indexfile, self)\n # resolve :ref:s to distant tex files -- we can't add a cross-reference,\n # but append the document name\n for pendingnode in largetree.findall(addnodes.pending_xref):\n docname = pendingnode['refdocname']\n sectname = pendingnode['refsectname']\n newnodes: List[Node] = [nodes.emphasis(sectname, sectname)]\n for subdir, title in self.titles:\n if docname.startswith(subdir):\n newnodes.append(nodes.Text(_(' (in '), _(' (in ')))\n newnodes.append(nodes.emphasis(title, title))\n newnodes.append(nodes.Text(')', ')'))\n break\n else:\n pass\n pendingnode.replace_self(newnodes)\n return largetree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.copy_latex_additional_files_LaTeXBuilder.copy_image_files.if_self_config_latex_logo.if_not_path_isfile_path_j.else_.copy_asset_file_path_join": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.copy_latex_additional_files_LaTeXBuilder.copy_image_files.if_self_config_latex_logo.if_not_path_isfile_path_j.else_.copy_asset_file_path_join", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 409, "end_line": 432, "span_ids": ["LaTeXBuilder.copy_latex_additional_files", "LaTeXBuilder.copy_image_files"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n @progress_message(__('copying additional files'))\n def copy_latex_additional_files(self) -> None:\n for filename in self.config.latex_additional_files:\n logger.info(' ' + filename, nonl=True)\n copy_asset_file(path.join(self.confdir, filename), self.outdir)\n\n def copy_image_files(self) -> None:\n if self.images:\n stringify_func = ImageAdapter(self.app.env).get_original_image_uri\n for src in status_iterator(self.images, __('copying images... '), \"brown\",\n len(self.images), self.app.verbosity,\n stringify_func=stringify_func):\n dest = self.images[src]\n try:\n copy_asset_file(path.join(self.srcdir, src),\n path.join(self.outdir, dest))\n except Exception as err:\n logger.warning(__('cannot copy image file %r: %s'),\n path.join(self.srcdir, src), err)\n if self.config.latex_logo:\n if not path.isfile(path.join(self.confdir, self.config.latex_logo)):\n raise SphinxError(__('logo file %r does not exist') % self.config.latex_logo)\n else:\n copy_asset_file(path.join(self.confdir, self.config.latex_logo), self.outdir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.write_message_catalog_LaTeXBuilder.write_message_catalog.copy_asset_file_filename_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.write_message_catalog_LaTeXBuilder.write_message_catalog.copy_asset_file_filename_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 434, "end_line": 447, "span_ids": ["LaTeXBuilder.write_message_catalog"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n def write_message_catalog(self) -> None:\n formats = self.config.numfig_format\n context = {\n 'addtocaptions': r'\\@iden',\n 'figurename': formats.get('figure', '').split('%s', 1),\n 'tablename': formats.get('table', '').split('%s', 1),\n 'literalblockname': formats.get('code-block', '').split('%s', 1)\n }\n\n if self.context['babel'] or self.context['polyglossia']:\n context['addtocaptions'] = r'\\addto\\captions%s' % self.babel.get_language()\n\n filename = path.join(package_dir, 'templates', 'latex', 'sphinxmessages.sty_t')\n copy_asset_file(filename, self.outdir, context=context, renderer=LaTeXRenderer())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 567, "end_line": 600, "span_ids": ["setup"], "tokens": 404}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.setup_extension('sphinx.builders.latex.transforms')\n\n app.add_builder(LaTeXBuilder)\n app.connect('config-inited', validate_config_values, priority=800)\n app.connect('config-inited', validate_latex_theme_options, priority=800)\n app.connect('builder-inited', install_packages_for_ja)\n\n app.add_config_value('latex_engine', default_latex_engine, None,\n ENUM('pdflatex', 'xelatex', 'lualatex', 'platex', 'uplatex'))\n app.add_config_value('latex_documents', default_latex_documents, None)\n app.add_config_value('latex_logo', None, None, [str])\n app.add_config_value('latex_appendices', [], None)\n app.add_config_value('latex_use_latex_multicolumn', False, None)\n app.add_config_value('latex_use_xindy', default_latex_use_xindy, None, [bool])\n app.add_config_value('latex_toplevel_sectioning', None, None,\n ENUM(None, 'part', 'chapter', 'section'))\n app.add_config_value('latex_domain_indices', True, None, [list])\n app.add_config_value('latex_show_urls', 'no', None)\n app.add_config_value('latex_show_pagerefs', False, None)\n app.add_config_value('latex_elements', {}, None)\n app.add_config_value('latex_additional_files', [], None)\n app.add_config_value('latex_theme', 'manual', None, [str])\n app.add_config_value('latex_theme_options', {}, None)\n app.add_config_value('latex_theme_path', [], None, [list])\n\n app.add_config_value('latex_docclass', default_latex_docclass, None)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/constants.py_ADDITIONAL_SETTINGS_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/constants.py_ADDITIONAL_SETTINGS_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/constants.py", "file_name": "constants.py", "file_type": "text/x-python", "category": "implementation", "start_line": 118, "end_line": 209, "span_ids": ["impl:15", "impl:13"], "tokens": 1040}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "ADDITIONAL_SETTINGS: Dict[Any, Dict[str, Any]] = {\n 'pdflatex': {\n 'inputenc': '\\\\usepackage[utf8]{inputenc}',\n 'utf8extra': ('\\\\ifdefined\\\\DeclareUnicodeCharacter\\n'\n '% support both utf8 and utf8x syntaxes\\n'\n ' \\\\ifdefined\\\\DeclareUnicodeCharacterAsOptional\\n'\n ' \\\\def\\\\sphinxDUC#1{\\\\DeclareUnicodeCharacter{\"#1}}\\n'\n ' \\\\else\\n'\n ' \\\\let\\\\sphinxDUC\\\\DeclareUnicodeCharacter\\n'\n ' \\\\fi\\n'\n ' \\\\sphinxDUC{00A0}{\\\\nobreakspace}\\n'\n ' \\\\sphinxDUC{2500}{\\\\sphinxunichar{2500}}\\n'\n ' \\\\sphinxDUC{2502}{\\\\sphinxunichar{2502}}\\n'\n ' \\\\sphinxDUC{2514}{\\\\sphinxunichar{2514}}\\n'\n ' \\\\sphinxDUC{251C}{\\\\sphinxunichar{251C}}\\n'\n ' \\\\sphinxDUC{2572}{\\\\textbackslash}\\n'\n '\\\\fi'),\n },\n 'xelatex': {\n 'latex_engine': 'xelatex',\n 'polyglossia': '\\\\usepackage{polyglossia}',\n 'babel': '',\n 'fontenc': ('\\\\usepackage{fontspec}\\n'\n '\\\\defaultfontfeatures[\\\\rmfamily,\\\\sffamily,\\\\ttfamily]{}'),\n 'fontpkg': XELATEX_DEFAULT_FONTPKG,\n 'fvset': '\\\\fvset{fontsize=\\\\small}',\n 'fontsubstitution': '',\n 'textgreek': '',\n 'utf8extra': ('\\\\catcode`^^^^00a0\\\\active\\\\protected\\\\def^^^^00a0'\n '{\\\\leavevmode\\\\nobreak\\\\ }'),\n },\n 'lualatex': {\n 'latex_engine': 'lualatex',\n 'polyglossia': '\\\\usepackage{polyglossia}',\n 'babel': '',\n 'fontenc': ('\\\\usepackage{fontspec}\\n'\n '\\\\defaultfontfeatures[\\\\rmfamily,\\\\sffamily,\\\\ttfamily]{}'),\n 'fontpkg': LUALATEX_DEFAULT_FONTPKG,\n 'fvset': '\\\\fvset{fontsize=\\\\small}',\n 'fontsubstitution': '',\n 'textgreek': '',\n 'utf8extra': ('\\\\catcode`^^^^00a0\\\\active\\\\protected\\\\def^^^^00a0'\n '{\\\\leavevmode\\\\nobreak\\\\ }'),\n },\n 'platex': {\n 'latex_engine': 'platex',\n 'babel': '',\n 'classoptions': ',dvipdfmx',\n 'fontpkg': PDFLATEX_DEFAULT_FONTPKG,\n 'fontsubstitution': '',\n 'textgreek': '',\n 'fncychap': '',\n 'geometry': '\\\\usepackage[dvipdfm]{geometry}',\n },\n 'uplatex': {\n 'latex_engine': 'uplatex',\n 'babel': '',\n 'classoptions': ',dvipdfmx',\n 'fontpkg': PDFLATEX_DEFAULT_FONTPKG,\n 'fontsubstitution': '',\n 'textgreek': '',\n 'fncychap': '',\n 'geometry': '\\\\usepackage[dvipdfm]{geometry}',\n },\n\n # special settings for latex_engine + language_code\n ('xelatex', 'fr'): {\n # use babel instead of polyglossia by default\n 'polyglossia': '',\n 'babel': '\\\\usepackage{babel}',\n },\n ('xelatex', 'zh'): {\n 'polyglossia': '',\n 'babel': '\\\\usepackage{babel}',\n 'fontenc': '\\\\usepackage{xeCJK}',\n # set formatcom=\\xeCJKVerbAddon to prevent xeCJK from adding extra spaces in\n # fancyvrb Verbatim environment.\n 'fvset': '\\\\fvset{fontsize=\\\\small,formatcom=\\\\xeCJKVerbAddon}',\n },\n ('xelatex', 'el'): {\n 'fontpkg': XELATEX_GREEK_DEFAULT_FONTPKG,\n },\n}\n\n\nSHORTHANDOFF = r'''\n\\ifdefined\\shorthandoff\n \\ifnum\\catcode`\\=\\string=\\active\\shorthandoff{=}\\fi\n \\ifnum\\catcode`\\\"=\\active\\shorthandoff{\"}\\fi\n\\fi\n'''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py_BuiltInTheme_BuiltInTheme.__init__.if_name_howto_and_no.else_.self.toplevel_sectioning._chapter_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py_BuiltInTheme_BuiltInTheme.__init__.if_name_howto_and_no.else_.self.toplevel_sectioning._chapter_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 72, "span_ids": ["BuiltInTheme"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuiltInTheme(Theme):\n \"\"\"A built-in LaTeX theme.\"\"\"\n\n def __init__(self, name: str, config: Config) -> None:\n super().__init__(name)\n\n if name == 'howto':\n self.docclass = config.latex_docclass.get('howto', 'article')\n else:\n self.docclass = config.latex_docclass.get('manual', 'report')\n\n if name in ('manual', 'howto'):\n self.wrapperclass = 'sphinx' + name\n else:\n self.wrapperclass = name\n\n # we assume LaTeX class provides \\chapter command except in case\n # of non-Japanese 'howto' case\n if name == 'howto' and not self.docclass.startswith('j'):\n self.toplevel_sectioning = 'section'\n else:\n self.toplevel_sectioning = 'chapter'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py_UserTheme_UserTheme.__init__.for_key_in_self_OPTIONAL_.try_.except_configparser_NoOpt.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py_UserTheme_UserTheme.__init__.for_key_in_self_OPTIONAL_.try_.except_configparser_NoOpt.pass", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 75, "end_line": 102, "span_ids": ["UserTheme"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class UserTheme(Theme):\n \"\"\"A user defined LaTeX theme.\"\"\"\n\n REQUIRED_CONFIG_KEYS = ['docclass', 'wrapperclass']\n OPTIONAL_CONFIG_KEYS = ['papersize', 'pointsize', 'toplevel_sectioning']\n\n def __init__(self, name: str, filename: str) -> None:\n super().__init__(name)\n self.config = configparser.RawConfigParser()\n self.config.read(path.join(filename))\n\n for key in self.REQUIRED_CONFIG_KEYS:\n try:\n value = self.config.get('theme', key)\n setattr(self, key, value)\n except configparser.NoSectionError as exc:\n raise ThemeError(__('%r doesn\\'t have \"theme\" setting') %\n filename) from exc\n except configparser.NoOptionError as exc:\n raise ThemeError(__('%r doesn\\'t have \"%s\" setting') %\n (filename, exc.args[0])) from exc\n\n for key in self.OPTIONAL_CONFIG_KEYS:\n try:\n value = self.config.get('theme', key)\n setattr(self, key, value)\n except configparser.NoOptionError:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py_ThemeFactory_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py_ThemeFactory_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 97, "end_line": 134, "span_ids": ["ThemeFactory.find_user_theme", "ThemeFactory.load_builtin_themes", "ThemeFactory", "ThemeFactory.get"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ThemeFactory:\n \"\"\"A factory class for LaTeX Themes.\"\"\"\n\n def __init__(self, app: Sphinx) -> None:\n self.themes: Dict[str, Theme] = {}\n self.theme_paths = [path.join(app.srcdir, p) for p in app.config.latex_theme_path]\n self.config = app.config\n self.load_builtin_themes(app.config)\n\n def load_builtin_themes(self, config: Config) -> None:\n \"\"\"Load built-in themes.\"\"\"\n self.themes['manual'] = BuiltInTheme('manual', config)\n self.themes['howto'] = BuiltInTheme('howto', config)\n\n def get(self, name: str) -> Theme:\n \"\"\"Get a theme for given *name*.\"\"\"\n if name in self.themes:\n theme = self.themes[name]\n else:\n theme = self.find_user_theme(name)\n if not theme:\n theme = Theme(name)\n\n theme.update(self.config)\n return theme\n\n def find_user_theme(self, name: str) -> Theme:\n \"\"\"Find a theme named as *name* from latex_theme_path.\"\"\"\n for theme_path in self.theme_paths:\n config_path = path.join(theme_path, name, 'theme.conf')\n if path.isfile(config_path):\n try:\n return UserTheme(name, config_path)\n except ThemeError as exc:\n logger.warning(exc)\n\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform_ShowUrlsTransform.run.try_.finally_.settings.id_prefix.id_prefix": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform_ShowUrlsTransform.run.try_.finally_.settings.id_prefix.id_prefix", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 44, "end_line": 69, "span_ids": ["ShowUrlsTransform.run", "ShowUrlsTransform"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ShowUrlsTransform(SphinxPostTransform):\n \"\"\"Expand references to inline text or footnotes.\n\n For more information, see :confval:`latex_show_urls`.\n\n .. note:: This transform is used for integrated doctree\n \"\"\"\n default_priority = 400\n formats = ('latex',)\n\n # references are expanded to footnotes (or not)\n expanded = False\n\n def run(self, **kwargs: Any) -> None:\n try:\n # replace id_prefix temporarily\n settings: Any = self.document.settings\n id_prefix = settings.id_prefix\n settings.id_prefix = 'show_urls'\n\n self.expand_show_urls()\n if self.expanded:\n self.renumber_footnotes()\n finally:\n # restore id_prefix\n settings.id_prefix = id_prefix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform.get_docname_for_node_ShowUrlsTransform.create_footnote.return.footnote_footnote_ref": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform.get_docname_for_node_ShowUrlsTransform.create_footnote.return.footnote_footnote_ref", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 91, "end_line": 116, "span_ids": ["ShowUrlsTransform.create_footnote", "ShowUrlsTransform.get_docname_for_node"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ShowUrlsTransform(SphinxPostTransform):\n\n def get_docname_for_node(self, node: Node) -> str:\n while node:\n if isinstance(node, nodes.document):\n return self.env.path2doc(node['source'])\n elif isinstance(node, addnodes.start_of_file):\n return node['docname']\n else:\n node = node.parent\n\n return None # never reached here. only for type hinting\n\n def create_footnote(self, uri: str, docname: str) -> Tuple[nodes.footnote, nodes.footnote_reference]: # NOQA\n reference = nodes.reference('', nodes.Text(uri), refuri=uri, nolinkurl=True)\n footnote = nodes.footnote(uri, auto=1, docname=docname)\n footnote['names'].append('#')\n footnote += nodes.label('', '#')\n footnote += nodes.paragraph('', '', reference)\n self.document.note_autofootnote(footnote)\n\n footnote_ref = nodes.footnote_reference('[#]_', auto=1,\n refid=footnote['ids'][0], docname=docname)\n footnote_ref += nodes.Text('#')\n self.document.note_autofootnote_ref(footnote_ref)\n footnote.add_backref(footnote_ref['ids'][0])\n\n return footnote, footnote_ref", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform.renumber_footnotes_ShowUrlsTransform.renumber_footnotes.for_footnote_in_collector.for_ref_in_collector_foot.if_docname_ref_docnam.ref_nodes_Text_str_num": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform.renumber_footnotes_ShowUrlsTransform.renumber_footnotes.for_footnote_in_collector.for_ref_in_collector_foot.if_docname_ref_docnam.ref_nodes_Text_str_num", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 118, "end_line": 142, "span_ids": ["ShowUrlsTransform.renumber_footnotes"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ShowUrlsTransform(SphinxPostTransform):\n\n def renumber_footnotes(self) -> None:\n collector = FootnoteCollector(self.document)\n self.document.walkabout(collector)\n\n num = 0\n for footnote in collector.auto_footnotes:\n # search unused footnote number\n while True:\n num += 1\n if str(num) not in collector.used_footnote_numbers:\n break\n\n # assign new footnote number\n old_label = cast(nodes.label, footnote[0])\n old_label.replace_self(nodes.label('', str(num)))\n if old_label in footnote['names']:\n footnote['names'].remove(old_label.astext())\n footnote['names'].append(str(num))\n\n # update footnote_references by new footnote number\n docname = footnote['docname']\n for ref in collector.footnote_refs:\n if docname == ref['docname'] and footnote['ids'][0] == ref['refid']:\n ref.remove(ref[0])\n ref += nodes.Text(str(num))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_FootnoteCollector_FootnoteCollector.visit_footnote_reference.self_footnote_refs_append": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_FootnoteCollector_FootnoteCollector.visit_footnote_reference.self_footnote_refs_append", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 148, "end_line": 171, "span_ids": ["FootnoteCollector.visit_footnote", "FootnoteCollector.unknown_departure", "FootnoteCollector", "FootnoteCollector.unknown_visit", "FootnoteCollector.visit_footnote_reference"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FootnoteCollector(nodes.NodeVisitor):\n \"\"\"Collect footnotes and footnote references on the document\"\"\"\n\n def __init__(self, document: nodes.document) -> None:\n self.auto_footnotes: List[nodes.footnote] = []\n self.used_footnote_numbers: Set[str] = set()\n self.footnote_refs: List[nodes.footnote_reference] = []\n super().__init__(document)\n\n def unknown_visit(self, node: Node) -> None:\n pass\n\n def unknown_departure(self, node: Node) -> None:\n pass\n\n def visit_footnote(self, node: nodes.footnote) -> None:\n if node.get('auto'):\n self.auto_footnotes.append(node)\n else:\n for name in node['names']:\n self.used_footnote_numbers.add(name)\n\n def visit_footnote_reference(self, node: nodes.footnote_reference) -> None:\n self.footnote_refs.append(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LaTeXFootnoteTransform_LaTeXFootnoteTransform.run.self_document_walkabout_v": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LaTeXFootnoteTransform_LaTeXFootnoteTransform.run.self_document_walkabout_v", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 174, "end_line": 349, "span_ids": ["LaTeXFootnoteTransform", "LaTeXFootnoteTransform.run"], "tokens": 849}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXFootnoteTransform(SphinxPostTransform):\n \"\"\"Convert footnote definitions and references to appropriate form to LaTeX.\n\n * Replace footnotes on restricted zone (e.g. headings) by footnotemark node.\n In addition, append a footnotetext node after the zone.\n\n Before::\n\n
\n \n headings having footnotes\n <footnote_reference>\n 1\n <footnote ids=\"id1\">\n <label>\n 1\n <paragraph>\n footnote body\n\n After::\n\n <section>\n <title>\n headings having footnotes\n <footnotemark refid=\"id1\">\n 1\n <footnotetext ids=\"id1\">\n <label>\n 1\n <paragraph>\n footnote body\n\n * Integrate footnote definitions and footnote references to single footnote node\n\n Before::\n\n blah blah blah\n <footnote_reference refid=\"id1\">\n 1\n blah blah blah ...\n\n <footnote ids=\"id1\">\n <label>\n 1\n <paragraph>\n footnote body\n\n After::\n\n blah blah blah\n <footnote ids=\"id1\">\n <label>\n 1\n <paragraph>\n footnote body\n blah blah blah ...\n\n * Replace second and subsequent footnote references which refers same footnote definition\n by footnotemark node. Additionally, the footnote definition node is marked as\n \"referred\".\n\n Before::\n\n blah blah blah\n <footnote_reference refid=\"id1\">\n 1\n blah blah blah\n <footnote_reference refid=\"id1\">\n 1\n blah blah blah ...\n\n <footnote ids=\"id1\">\n <label>\n 1\n <paragraph>\n footnote body\n\n After::\n\n blah blah blah\n <footnote ids=\"id1\" referred=True>\n <label>\n 1\n <paragraph>\n footnote body\n blah blah blah\n <footnotemark refid=\"id1\">\n 1\n blah blah blah ...\n\n * Remove unreferenced footnotes\n\n Before::\n\n <footnote ids=\"id1\">\n <label>\n 1\n <paragraph>\n Unreferenced footnote!\n\n After::\n\n <!-- nothing! -->\n\n * Move footnotes in a title of table or thead to head of tbody\n\n Before::\n\n <table>\n <title>\n title having footnote_reference\n <footnote_reference refid=\"id1\">\n 1\n <tgroup>\n <thead>\n <row>\n <entry>\n header having footnote_reference\n <footnote_reference refid=\"id2\">\n 2\n <tbody>\n <row>\n ...\n\n <footnote ids=\"id1\">\n <label>\n 1\n <paragraph>\n footnote body\n\n <footnote ids=\"id2\">\n <label>\n 2\n <paragraph>\n footnote body\n\n After::\n\n <table>\n <title>\n title having footnote_reference\n <footnotemark refid=\"id1\">\n 1\n <tgroup>\n <thead>\n <row>\n <entry>\n header having footnote_reference\n <footnotemark refid=\"id2\">\n 2\n <tbody>\n <footnotetext ids=\"id1\">\n <label>\n 1\n <paragraph>\n footnote body\n\n <footnotetext ids=\"id2\">\n <label>\n 2\n <paragraph>\n footnote body\n <row>\n ...\n \"\"\"\n\n default_priority = 600\n formats = ('latex',)\n\n def run(self, **kwargs: Any) -> None:\n footnotes = list(self.document.findall(nodes.footnote))\n for node in footnotes:\n node.parent.remove(node)\n\n visitor = LaTeXFootnoteVisitor(self.document, footnotes)\n self.document.walkabout(visitor)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LaTeXFootnoteVisitor_LaTeXFootnoteVisitor.depart_footnote.self_unrestrict_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LaTeXFootnoteVisitor_LaTeXFootnoteVisitor.depart_footnote.self_unrestrict_node_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 352, "end_line": 430, "span_ids": ["LaTeXFootnoteVisitor.unknown_visit", "LaTeXFootnoteVisitor.depart_thead", "LaTeXFootnoteVisitor.unknown_departure", "LaTeXFootnoteVisitor.restrict", "LaTeXFootnoteVisitor.depart_figure", "LaTeXFootnoteVisitor.visit_caption", "LaTeXFootnoteVisitor.depart_caption", "LaTeXFootnoteVisitor.visit_thead", "LaTeXFootnoteVisitor.visit_footnote", "LaTeXFootnoteVisitor", "LaTeXFootnoteVisitor.depart_term", "LaTeXFootnoteVisitor.depart_title", "LaTeXFootnoteVisitor.visit_title", "LaTeXFootnoteVisitor.depart_table", "LaTeXFootnoteVisitor.visit_figure", "LaTeXFootnoteVisitor.visit_term", "LaTeXFootnoteVisitor.depart_footnote", "LaTeXFootnoteVisitor.unrestrict"], "tokens": 666}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXFootnoteVisitor(nodes.NodeVisitor):\n def __init__(self, document: nodes.document, footnotes: List[nodes.footnote]) -> None:\n self.appeared: Dict[Tuple[str, str], nodes.footnote] = {}\n self.footnotes: List[nodes.footnote] = footnotes\n self.pendings: List[nodes.footnote] = []\n self.table_footnotes: List[nodes.footnote] = []\n self.restricted: Element = None\n super().__init__(document)\n\n def unknown_visit(self, node: Node) -> None:\n pass\n\n def unknown_departure(self, node: Node) -> None:\n pass\n\n def restrict(self, node: Element) -> None:\n if self.restricted is None:\n self.restricted = node\n\n def unrestrict(self, node: Element) -> None:\n if self.restricted == node:\n self.restricted = None\n pos = node.parent.index(node)\n for i, footnote, in enumerate(self.pendings):\n fntext = footnotetext('', *footnote.children, ids=footnote['ids'])\n node.parent.insert(pos + i + 1, fntext)\n self.pendings = []\n\n def visit_figure(self, node: nodes.figure) -> None:\n self.restrict(node)\n\n def depart_figure(self, node: nodes.figure) -> None:\n self.unrestrict(node)\n\n def visit_term(self, node: nodes.term) -> None:\n self.restrict(node)\n\n def depart_term(self, node: nodes.term) -> None:\n self.unrestrict(node)\n\n def visit_caption(self, node: nodes.caption) -> None:\n self.restrict(node)\n\n def depart_caption(self, node: nodes.caption) -> None:\n self.unrestrict(node)\n\n def visit_title(self, node: nodes.title) -> None:\n if isinstance(node.parent, (nodes.section, nodes.table)):\n self.restrict(node)\n\n def depart_title(self, node: nodes.title) -> None:\n if isinstance(node.parent, nodes.section):\n self.unrestrict(node)\n elif isinstance(node.parent, nodes.table):\n self.table_footnotes += self.pendings\n self.pendings = []\n self.unrestrict(node)\n\n def visit_thead(self, node: nodes.thead) -> None:\n self.restrict(node)\n\n def depart_thead(self, node: nodes.thead) -> None:\n self.table_footnotes += self.pendings\n self.pendings = []\n self.unrestrict(node)\n\n def depart_table(self, node: nodes.table) -> None:\n tbody = next(node.findall(nodes.tbody))\n for footnote in reversed(self.table_footnotes):\n fntext = footnotetext('', *footnote.children, ids=footnote['ids'])\n tbody.insert(0, fntext)\n\n self.table_footnotes = []\n\n def visit_footnote(self, node: nodes.footnote) -> None:\n self.restrict(node)\n\n def depart_footnote(self, node: nodes.footnote) -> None:\n self.unrestrict(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LaTeXFootnoteVisitor.visit_footnote_reference_LaTeXFootnoteVisitor.get_footnote_by_reference.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LaTeXFootnoteVisitor.visit_footnote_reference_LaTeXFootnoteVisitor.get_footnote_by_reference.return.None", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 432, "end_line": 461, "span_ids": ["LaTeXFootnoteVisitor.get_footnote_by_reference", "LaTeXFootnoteVisitor.visit_footnote_reference"], "tokens": 275}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXFootnoteVisitor(nodes.NodeVisitor):\n\n def visit_footnote_reference(self, node: nodes.footnote_reference) -> None:\n number = node.astext().strip()\n docname = node['docname']\n if (docname, number) in self.appeared:\n footnote = self.appeared.get((docname, number))\n footnote[\"referred\"] = True\n\n mark = footnotemark('', number, refid=node['refid'])\n node.replace_self(mark)\n else:\n footnote = self.get_footnote_by_reference(node)\n if self.restricted:\n mark = footnotemark('', number, refid=node['refid'])\n node.replace_self(mark)\n self.pendings.append(footnote)\n else:\n self.footnotes.remove(footnote)\n node.replace_self(footnote)\n footnote.walkabout(self)\n\n self.appeared[(docname, number)] = footnote\n raise nodes.SkipNode\n\n def get_footnote_by_reference(self, node: nodes.footnote_reference) -> nodes.footnote:\n docname = node['docname']\n for footnote in self.footnotes:\n if docname == footnote['docname'] and footnote['ids'][0] == node['refid']:\n return footnote\n\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_BibliographyTransform_BibliographyTransform.run.if_len_citations_0_.self_document_citation": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_BibliographyTransform_BibliographyTransform.run.if_len_citations_0_.self_document_citation", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 464, "end_line": 504, "span_ids": ["BibliographyTransform", "BibliographyTransform.run"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BibliographyTransform(SphinxPostTransform):\n \"\"\"Gather bibliography entries to tail of document.\n\n Before::\n\n <document>\n <paragraph>\n blah blah blah\n <citation>\n ...\n <paragraph>\n blah blah blah\n <citation>\n ...\n ...\n\n After::\n\n <document>\n <paragraph>\n blah blah blah\n <paragraph>\n blah blah blah\n ...\n <thebibliography>\n <citation>\n ...\n <citation>\n ...\n \"\"\"\n default_priority = 750\n formats = ('latex',)\n\n def run(self, **kwargs: Any) -> None:\n citations = thebibliography()\n for node in list(self.document.findall(nodes.citation)):\n node.parent.remove(node)\n citations += node\n\n if len(citations) > 0:\n self.document += citations", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_CitationReferenceTransform_CitationReferenceTransform.run.for_node_in_self_document.if_docname_.node_replace_self_citatio": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_CitationReferenceTransform_CitationReferenceTransform.run.for_node_in_self_document.if_docname_.node_replace_self_citatio", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 507, "end_line": 524, "span_ids": ["CitationReferenceTransform", "CitationReferenceTransform.run"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CitationReferenceTransform(SphinxPostTransform):\n \"\"\"Replace pending_xref nodes for citation by citation_reference.\n\n To handle citation reference easily on LaTeX writer, this converts\n pending_xref nodes to citation_reference.\n \"\"\"\n default_priority = 5 # before ReferencesResolver\n formats = ('latex',)\n\n def run(self, **kwargs: Any) -> None:\n domain = cast(CitationDomain, self.env.get_domain('citation'))\n matcher = NodeMatcher(addnodes.pending_xref, refdomain='citation', reftype='ref')\n for node in self.document.findall(matcher): # type: addnodes.pending_xref\n docname, labelid, _ = domain.citations.get(node['reftarget'], ('', '', 0))\n if docname:\n citation_ref = nodes.citation_reference('', '', *node.children,\n docname=docname, refname=labelid)\n node.replace_self(citation_ref)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_MathReferenceTransform_MathReferenceTransform.run.for_node_in_self_document.if_node_refdomain_.if_docname_.node_replace_self_refnode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_MathReferenceTransform_MathReferenceTransform.run.for_node_in_self_document.if_node_refdomain_.if_docname_.node_replace_self_refnode", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 527, "end_line": 543, "span_ids": ["MathReferenceTransform", "MathReferenceTransform.run"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MathReferenceTransform(SphinxPostTransform):\n \"\"\"Replace pending_xref nodes for math by math_reference.\n\n To handle math reference easily on LaTeX writer, this converts pending_xref\n nodes to math_reference.\n \"\"\"\n default_priority = 5 # before ReferencesResolver\n formats = ('latex',)\n\n def run(self, **kwargs: Any) -> None:\n equations = self.env.get_domain('math').data['objects']\n for node in self.document.findall(addnodes.pending_xref):\n if node['refdomain'] == 'math' and node['reftype'] in ('eq', 'numref'):\n docname, _ = equations.get(node['reftarget'], (None, None))\n if docname:\n refnode = math_reference('', docname=docname, target=node['reftarget'])\n node.replace_self(refnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LiteralBlockTransform_DocumentTargetTransform.run.for_node_in_self_document.if_section_._special_label_for_doc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_LiteralBlockTransform_DocumentTargetTransform.run.for_node_in_self_document.if_section_._special_label_for_doc_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 546, "end_line": 567, "span_ids": ["DocumentTargetTransform", "DocumentTargetTransform.run", "LiteralBlockTransform.run", "LiteralBlockTransform"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralBlockTransform(SphinxPostTransform):\n \"\"\"Replace container nodes for literal_block by captioned_literal_block.\"\"\"\n default_priority = 400\n formats = ('latex',)\n\n def run(self, **kwargs: Any) -> None:\n matcher = NodeMatcher(nodes.container, literal_block=True)\n for node in self.document.findall(matcher): # type: nodes.container\n newnode = captioned_literal_block('', *node.children, **node.attributes)\n node.replace_self(newnode)\n\n\nclass DocumentTargetTransform(SphinxPostTransform):\n \"\"\"Add :doc label to the first section of each document.\"\"\"\n default_priority = 400\n formats = ('latex',)\n\n def run(self, **kwargs: Any) -> None:\n for node in self.document.findall(addnodes.start_of_file):\n section = node.next_node(nodes.section)\n if section:\n section['ids'].append(':doc') # special label for :doc:", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 614, "end_line": 631, "span_ids": ["setup"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_transform(FootnoteDocnameUpdater)\n app.add_post_transform(SubstitutionDefinitionsRemover)\n app.add_post_transform(BibliographyTransform)\n app.add_post_transform(CitationReferenceTransform)\n app.add_post_transform(DocumentTargetTransform)\n app.add_post_transform(IndexInSectionTitleTransform)\n app.add_post_transform(LaTeXFootnoteTransform)\n app.add_post_transform(LiteralBlockTransform)\n app.add_post_transform(MathReferenceTransform)\n app.add_post_transform(ShowUrlsTransform)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/util.py_ExtBabel.language_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/util.py_ExtBabel.language_name_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/util.py", "file_name": "util.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 57, "span_ids": ["ExtBabel.language_name", "ExtBabel.get_mainlanguage_options"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExtBabel(Babel):\n\n def language_name(self, language_code: str) -> str:\n language = super().language_name(language_code)\n if language == 'ngerman' and self.use_polyglossia:\n # polyglossia calls new orthography (Neue Rechtschreibung) as\n # german (with new spelling option).\n return 'german'\n elif language:\n return language\n elif language_code.startswith('zh'):\n return 'english' # fallback to english (behaves like supported)\n else:\n self.supported = False\n return 'english' # fallback to english\n\n def get_mainlanguage_options(self) -> Optional[str]:\n \"\"\"Return options for polyglossia's ``\\\\setmainlanguage``.\"\"\"\n if self.use_polyglossia is False:\n return None\n elif self.language == 'german':\n language = super().language_name(self.language_code)\n if language == 'ngerman':\n return 'spelling=new'\n else:\n return 'spelling=old'\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_check_anchor_check_anchor.return.parser_found": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_check_anchor_check_anchor.return.parser_found", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 55, "end_line": 70, "span_ids": ["check_anchor"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check_anchor(response: requests.requests.Response, anchor: str) -> bool:\n \"\"\"Reads HTML data from a response object `response` searching for `anchor`.\n Returns True if anchor was found, False otherwise.\n \"\"\"\n parser = AnchorCheckParser(anchor)\n # Read file in chunks. If we find a matching anchor, we break\n # the loop early in hopes not to have to download the whole thing.\n for chunk in response.iter_content(chunk_size=4096, decode_unicode=True):\n if isinstance(chunk, bytes): # requests failed to decode\n chunk = chunk.decode() # manually try to decode it\n\n parser.feed(chunk)\n if parser.found:\n break\n parser.close()\n return parser.found", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 558, "end_line": 589, "span_ids": ["setup"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_builder(CheckExternalLinksBuilder)\n app.add_post_transform(HyperlinkCollector)\n\n app.add_config_value('linkcheck_ignore', [], None)\n app.add_config_value('linkcheck_exclude_documents', [], None)\n app.add_config_value('linkcheck_allowed_redirects', {}, None)\n app.add_config_value('linkcheck_auth', [], None)\n app.add_config_value('linkcheck_request_headers', {}, None)\n app.add_config_value('linkcheck_retries', 1, None)\n app.add_config_value('linkcheck_timeout', None, None, [int])\n app.add_config_value('linkcheck_workers', 5, None)\n app.add_config_value('linkcheck_anchors', True, None)\n # Anchors starting with ! are ignored since they are\n # commonly used for dynamic pages\n app.add_config_value('linkcheck_anchors_ignore', [\"^!\"], None)\n app.add_config_value('linkcheck_rate_limit_timeout', 300.0, None)\n\n app.add_event('linkcheck-process-uri')\n\n app.connect('config-inited', compile_linkcheck_allowed_redirects, priority=800)\n\n # FIXME: Disable URL rewrite handler for github.com temporarily.\n # ref: https://github.com/sphinx-doc/sphinx/issues/9435\n # app.connect('linkcheck-process-uri', rewrite_github_anchor)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py_ManualPageBuilder.write_ManualPageBuilder.finish.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py_ManualPageBuilder.write_ManualPageBuilder.finish.pass", "embedding": null, "metadata": {"file_path": "sphinx/builders/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 45, "end_line": 96, "span_ids": ["ManualPageBuilder.finish", "ManualPageBuilder.write"], "tokens": 425}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ManualPageBuilder(Builder):\n\n @progress_message(__('writing'))\n def write(self, *ignored: Any) -> None:\n docwriter = ManualPageWriter(self)\n docsettings: Any = OptionParser(\n defaults=self.env.settings,\n components=(docwriter,),\n read_config_files=True).get_default_values()\n\n for info in self.config.man_pages:\n docname, name, description, authors, section = info\n if docname not in self.env.all_docs:\n logger.warning(__('\"man_pages\" config value references unknown '\n 'document %s'), docname)\n continue\n if isinstance(authors, str):\n if authors:\n authors = [authors]\n else:\n authors = []\n\n docsettings.title = name\n docsettings.subtitle = description\n docsettings.authors = authors\n docsettings.section = section\n\n if self.config.man_make_section_directory:\n dirname = 'man%s' % section\n ensuredir(path.join(self.outdir, dirname))\n targetname = '%s/%s.%s' % (dirname, name, section)\n else:\n targetname = '%s.%s' % (name, section)\n\n logger.info(darkgreen(targetname) + ' { ', nonl=True)\n destination = FileOutput(\n destination_path=path.join(self.outdir, targetname),\n encoding='utf-8')\n\n tree = self.env.get_doctree(docname)\n docnames: Set[str] = set()\n largetree = inline_all_toctrees(self, docnames, docname, tree,\n darkgreen, [docname])\n largetree.settings = docsettings\n logger.info('} ', nonl=True)\n self.env.resolve_references(largetree, docname, self)\n # remove pending_xref nodes\n for pendingnode in largetree.findall(addnodes.pending_xref):\n pendingnode.replace_self(pendingnode.children)\n\n docwriter.write(largetree, destination)\n\n def finish(self) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py_default_man_pages_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py_default_man_pages_", "embedding": null, "metadata": {"file_path": "sphinx/builders/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 99, "end_line": 118, "span_ids": ["default_man_pages", "setup"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def default_man_pages(config: Config) -> List[Tuple[str, str, str, List[str], int]]:\n \"\"\" Better default man_pages settings. \"\"\"\n filename = make_filename_from_project(config.project)\n return [(config.root_doc, filename, '%s %s' % (config.project, config.release),\n [config.author], 1)]\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_builder(ManualPageBuilder)\n\n app.add_config_value('man_pages', default_man_pages, None)\n app.add_config_value('man_show_urls', False, None)\n app.add_config_value('man_make_section_directory', False, None)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder_SingleFileHTMLBuilder.get_relative_uri.return.self_get_target_uri_to_t": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder_SingleFileHTMLBuilder.get_relative_uri.return.self_get_target_uri_to_t", "embedding": null, "metadata": {"file_path": "sphinx/builders/singlehtml.py", "file_name": "singlehtml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 20, "end_line": 44, "span_ids": ["SingleFileHTMLBuilder", "SingleFileHTMLBuilder.get_outdated_docs", "SingleFileHTMLBuilder.get_target_uri", "SingleFileHTMLBuilder.get_relative_uri"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleFileHTMLBuilder(StandaloneHTMLBuilder):\n \"\"\"\n A StandaloneHTMLBuilder subclass that puts the whole document tree on one\n HTML page.\n \"\"\"\n name = 'singlehtml'\n epilog = __('The HTML page is in %(outdir)s.')\n\n copysource = False\n\n def get_outdated_docs(self) -> Union[str, List[str]]: # type: ignore\n return 'all documents'\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n if docname in self.env.all_docs:\n # all references are on the same page...\n return self.config.root_doc + self.out_suffix + \\\n '#document-' + docname\n else:\n # chances are this is a html_additional_page\n return docname + self.out_suffix\n\n def get_relative_uri(self, from_: str, to: str, typ: str = None) -> str:\n # ignore source\n return self.get_target_uri(to, typ)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder._get_local_toctree_SingleFileHTMLBuilder.assemble_doctree.return.tree": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder._get_local_toctree_SingleFileHTMLBuilder.assemble_doctree.return.tree", "embedding": null, "metadata": {"file_path": "sphinx/builders/singlehtml.py", "file_name": "singlehtml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 60, "end_line": 75, "span_ids": ["SingleFileHTMLBuilder._get_local_toctree", "SingleFileHTMLBuilder.assemble_doctree"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleFileHTMLBuilder(StandaloneHTMLBuilder):\n\n def _get_local_toctree(self, docname: str, collapse: bool = True, **kwargs: Any) -> str:\n if 'includehidden' not in kwargs:\n kwargs['includehidden'] = False\n toctree = TocTree(self.env).get_toctree_for(docname, self, collapse, **kwargs)\n if toctree is not None:\n self.fix_refuris(toctree)\n return self.render_partial(toctree)['fragment']\n\n def assemble_doctree(self) -> nodes.document:\n master = self.config.root_doc\n tree = self.env.get_doctree(master)\n tree = inline_all_toctrees(self, set(), master, tree, darkgreen, [master])\n tree['docname'] = master\n self.env.resolve_references(tree, master, self)\n self.fix_refuris(tree)\n return tree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.get_doc_context_SingleFileHTMLBuilder.get_doc_context.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.get_doc_context_SingleFileHTMLBuilder.get_doc_context.return._", "embedding": null, "metadata": {"file_path": "sphinx/builders/singlehtml.py", "file_name": "singlehtml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 116, "end_line": 140, "span_ids": ["SingleFileHTMLBuilder.get_doc_context"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleFileHTMLBuilder(StandaloneHTMLBuilder):\n\n def get_doc_context(self, docname: str, body: str, metatags: str) -> Dict:\n # no relation links...\n toctree = TocTree(self.env).get_toctree_for(self.config.root_doc, self, False)\n # if there is no toctree, toc is None\n if toctree:\n self.fix_refuris(toctree)\n toc = self.render_partial(toctree)['fragment']\n display_toc = True\n else:\n toc = ''\n display_toc = False\n return {\n 'parents': [],\n 'prev': None,\n 'next': None,\n 'docstitle': None,\n 'title': self.config.html_title,\n 'meta': None,\n 'body': body,\n 'metatags': metatags,\n 'rellinks': [],\n 'sourcename': '',\n 'toc': toc,\n 'display_toc': display_toc,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.write_SingleFileHTMLBuilder.write.None_2.self_write_doc_self_confi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.write_SingleFileHTMLBuilder.write.None_2.self_write_doc_self_confi", "embedding": null, "metadata": {"file_path": "sphinx/builders/singlehtml.py", "file_name": "singlehtml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 142, "end_line": 155, "span_ids": ["SingleFileHTMLBuilder.write"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleFileHTMLBuilder(StandaloneHTMLBuilder):\n\n def write(self, *ignored: Any) -> None:\n docnames = self.env.all_docs\n\n with progress_message(__('preparing documents')):\n self.prepare_writing(docnames) # type: ignore\n\n with progress_message(__('assembling single document')):\n doctree = self.assemble_doctree()\n self.env.toc_secnumbers = self.assemble_toc_secnumbers()\n self.env.toc_fignumbers = self.assemble_toc_fignumbers()\n\n with progress_message(__('writing')):\n self.write_doc_serialized(self.config.root_doc, doctree)\n self.write_doc(self.config.root_doc, doctree)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder_TexinfoBuilder.get_relative_uri.return.self_get_target_uri_to_t": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder_TexinfoBuilder.get_relative_uri.return.self_get_target_uri_to_t", "embedding": null, "metadata": {"file_path": "sphinx/builders/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 62, "span_ids": ["TexinfoBuilder.get_outdated_docs", "TexinfoBuilder.init", "TexinfoBuilder", "TexinfoBuilder.get_target_uri", "TexinfoBuilder.get_relative_uri"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoBuilder(Builder):\n \"\"\"\n Builds Texinfo output to create Info documentation.\n \"\"\"\n name = 'texinfo'\n format = 'texinfo'\n epilog = __('The Texinfo files are in %(outdir)s.')\n if os.name == 'posix':\n epilog += __(\"\\nRun 'make' in that directory to run these through \"\n \"makeinfo\\n\"\n \"(use 'make info' here to do that automatically).\")\n\n supported_image_types = ['image/png', 'image/jpeg',\n 'image/gif']\n default_translator_class = TexinfoTranslator\n\n def init(self) -> None:\n self.docnames: Iterable[str] = []\n self.document_data: List[Tuple[str, str, str, str, str, str, str, bool]] = []\n\n def get_outdated_docs(self) -> Union[str, List[str]]:\n return 'all documents' # for now\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n if docname not in self.docnames:\n raise NoUri(docname, typ)\n else:\n return '%' + docname\n\n def get_relative_uri(self, from_: str, to: str, typ: str = None) -> str:\n # ignore source path\n return self.get_target_uri(to, typ)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.init_document_data_TexinfoBuilder.init_document_data.for_entry_in_preliminary_.self_titles_append_docna": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.init_document_data_TexinfoBuilder.init_document_data.for_entry_in_preliminary_.self_titles_append_docna", "embedding": null, "metadata": {"file_path": "sphinx/builders/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 64, "end_line": 81, "span_ids": ["TexinfoBuilder.init_document_data"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoBuilder(Builder):\n\n def init_document_data(self) -> None:\n preliminary_document_data = [list(x) for x in self.config.texinfo_documents]\n if not preliminary_document_data:\n logger.warning(__('no \"texinfo_documents\" config value found; no documents '\n 'will be written'))\n return\n # assign subdirs to titles\n self.titles: List[Tuple[str, str]] = []\n for entry in preliminary_document_data:\n docname = entry[0]\n if docname not in self.env.all_docs:\n logger.warning(__('\"texinfo_documents\" config value references unknown '\n 'document %s'), docname)\n continue\n self.document_data.append(entry) # type: ignore\n if docname.endswith(SEP + 'index'):\n docname = docname[:-5]\n self.titles.append((docname, entry[2]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.write_TexinfoBuilder.write.for_entry_in_self_documen.None_3.self_copy_image_files_tar": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.write_TexinfoBuilder.write.for_entry_in_self_documen.None_3.self_copy_image_files_tar", "embedding": null, "metadata": {"file_path": "sphinx/builders/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 83, "end_line": 118, "span_ids": ["TexinfoBuilder.write"], "tokens": 358}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoBuilder(Builder):\n\n def write(self, *ignored: Any) -> None:\n self.init_document_data()\n for entry in self.document_data:\n docname, targetname, title, author = entry[:4]\n targetname += '.texi'\n direntry = description = category = ''\n if len(entry) > 6:\n direntry, description, category = entry[4:7]\n toctree_only = False\n if len(entry) > 7:\n toctree_only = entry[7]\n destination = FileOutput(\n destination_path=path.join(self.outdir, targetname),\n encoding='utf-8')\n with progress_message(__(\"processing %s\") % targetname):\n appendices = self.config.texinfo_appendices or []\n doctree = self.assemble_doctree(docname, toctree_only, appendices=appendices)\n\n with progress_message(__(\"writing\")):\n self.post_process_images(doctree)\n docwriter = TexinfoWriter(self)\n settings: Any = OptionParser(\n defaults=self.env.settings,\n components=(docwriter,),\n read_config_files=True).get_default_values()\n settings.author = author\n settings.title = title\n settings.texinfo_filename = targetname[:-5] + '.info'\n settings.texinfo_elements = self.config.texinfo_elements\n settings.texinfo_dir_entry = direntry or ''\n settings.texinfo_dir_category = category or ''\n settings.texinfo_dir_description = description or ''\n settings.docname = docname\n doctree.settings = settings\n docwriter.write(doctree, destination)\n self.copy_image_files(targetname[:-5])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.assemble_doctree_TexinfoBuilder.assemble_doctree.return.largetree": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.assemble_doctree_TexinfoBuilder.assemble_doctree.return.largetree", "embedding": null, "metadata": {"file_path": "sphinx/builders/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 120, "end_line": 160, "span_ids": ["TexinfoBuilder.assemble_doctree"], "tokens": 449}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoBuilder(Builder):\n\n def assemble_doctree(self, indexfile: str, toctree_only: bool, appendices: List[str]) -> nodes.document: # NOQA\n self.docnames = set([indexfile] + appendices)\n logger.info(darkgreen(indexfile) + \" \", nonl=True)\n tree = self.env.get_doctree(indexfile)\n tree['docname'] = indexfile\n if toctree_only:\n # extract toctree nodes from the tree and put them in a\n # fresh document\n new_tree = new_document('<texinfo output>')\n new_sect = nodes.section()\n new_sect += nodes.title('<Set title in conf.py>',\n '<Set title in conf.py>')\n new_tree += new_sect\n for node in tree.findall(addnodes.toctree):\n new_sect += node\n tree = new_tree\n largetree = inline_all_toctrees(self, self.docnames, indexfile, tree,\n darkgreen, [indexfile])\n largetree['docname'] = indexfile\n for docname in appendices:\n appendix = self.env.get_doctree(docname)\n appendix['docname'] = docname\n largetree.append(appendix)\n logger.info('')\n logger.info(__(\"resolving references...\"))\n self.env.resolve_references(largetree, indexfile, self)\n # TODO: add support for external :ref:s\n for pendingnode in largetree.findall(addnodes.pending_xref):\n docname = pendingnode['refdocname']\n sectname = pendingnode['refsectname']\n newnodes: List[Node] = [nodes.emphasis(sectname, sectname)]\n for subdir, title in self.titles:\n if docname.startswith(subdir):\n newnodes.append(nodes.Text(_(' (in '), _(' (in ')))\n newnodes.append(nodes.emphasis(title, title))\n newnodes.append(nodes.Text(')', ')'))\n break\n else:\n pass\n pendingnode.replace_self(newnodes)\n return largetree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.finish_TexinfoBuilder.copy_support_files.try_.except_OSError_as_err_.logger_warning____error_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_TexinfoBuilder.finish_TexinfoBuilder.copy_support_files.try_.except_OSError_as_err_.logger_warning____error_", "embedding": null, "metadata": {"file_path": "sphinx/builders/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 169, "end_line": 194, "span_ids": ["TexinfoBuilder.copy_image_files", "TexinfoBuilder.finish", "TexinfoBuilder.copy_support_files"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoBuilder(Builder):\n\n def finish(self) -> None:\n self.copy_support_files()\n\n def copy_image_files(self, targetname: str) -> None:\n if self.images:\n stringify_func = ImageAdapter(self.app.env).get_original_image_uri\n for src in status_iterator(self.images, __('copying images... '), \"brown\",\n len(self.images), self.app.verbosity,\n stringify_func=stringify_func):\n dest = self.images[src]\n try:\n imagedir = path.join(self.outdir, targetname + '-figures')\n ensuredir(imagedir)\n copy_asset_file(path.join(self.srcdir, src),\n path.join(imagedir, dest))\n except Exception as err:\n logger.warning(__('cannot copy image file %r: %s'),\n path.join(self.srcdir, src), err)\n\n def copy_support_files(self) -> None:\n try:\n with progress_message(__('copying Texinfo support files')):\n logger.info('Makefile ', nonl=True)\n copy_asset_file(os.path.join(template_dir, 'Makefile'), self.outdir)\n except OSError as err:\n logger.warning(__(\"error writing file Makefile: %s\"), err)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_default_texinfo_documents_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py_default_texinfo_documents_", "embedding": null, "metadata": {"file_path": "sphinx/builders/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 190, "end_line": 213, "span_ids": ["default_texinfo_documents", "setup"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def default_texinfo_documents(config: Config) -> List[Tuple[str, str, str, str, str, str, str]]: # NOQA\n \"\"\" Better default texinfo_documents settings. \"\"\"\n filename = make_filename_from_project(config.project)\n return [(config.root_doc, filename, config.project, config.author, filename,\n 'One line description of project', 'Miscellaneous')]\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_builder(TexinfoBuilder)\n\n app.add_config_value('texinfo_documents', default_texinfo_documents, None)\n app.add_config_value('texinfo_appendices', [], None)\n app.add_config_value('texinfo_elements', {}, None)\n app.add_config_value('texinfo_domain_indices', True, None, [list])\n app.add_config_value('texinfo_show_urls', 'footnote', None)\n app.add_config_value('texinfo_no_detailmenu', False, None)\n app.add_config_value('texinfo_cross_references', True, None)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/text.py_TextBuilder.get_target_uri_TextBuilder.finish.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/text.py_TextBuilder.get_target_uri_TextBuilder.finish.pass", "embedding": null, "metadata": {"file_path": "sphinx/builders/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 60, "end_line": 80, "span_ids": ["TextBuilder.write_doc", "TextBuilder.finish", "TextBuilder.get_target_uri", "TextBuilder.prepare_writing"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextBuilder(Builder):\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n return ''\n\n def prepare_writing(self, docnames: Set[str]) -> None:\n self.writer = TextWriter(self)\n\n def write_doc(self, docname: str, doctree: Node) -> None:\n self.current_docname = docname\n self.secnumbers = self.env.toc_secnumbers.get(docname, {})\n destination = StringOutput(encoding='utf-8')\n self.writer.write(doctree, destination)\n outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix)\n ensuredir(path.dirname(outfilename))\n try:\n with open(outfilename, 'w', encoding='utf-8') as f:\n f.write(self.writer.output)\n except OSError as err:\n logger.warning(__(\"error writing file %s: %s\"), outfilename, err)\n\n def finish(self) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/text.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/text.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/builders/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 83, "end_line": 96, "span_ids": ["setup"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_builder(TextBuilder)\n\n app.add_config_value('text_sectionchars', '*=-~\"+`', 'env')\n app.add_config_value('text_newlines', 'unix', 'env')\n app.add_config_value('text_add_secnumbers', True, 'env')\n app.add_config_value('text_secnumber_suffix', '. ', 'env')\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py_XMLBuilder_XMLBuilder.prepare_writing.self.writer.self__writer_class_self_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py_XMLBuilder_XMLBuilder.prepare_writing.self.writer.self__writer_class_self_", "embedding": null, "metadata": {"file_path": "sphinx/builders/xml.py", "file_name": "xml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 21, "end_line": 60, "span_ids": ["XMLBuilder.init", "XMLBuilder.get_outdated_docs", "XMLBuilder", "XMLBuilder.get_target_uri", "XMLBuilder.prepare_writing"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class XMLBuilder(Builder):\n \"\"\"\n Builds Docutils-native XML.\n \"\"\"\n name = 'xml'\n format = 'xml'\n epilog = __('The XML files are in %(outdir)s.')\n\n out_suffix = '.xml'\n allow_parallel = True\n\n _writer_class: Union[Type[XMLWriter], Type[PseudoXMLWriter]] = XMLWriter\n default_translator_class = XMLTranslator\n\n def init(self) -> None:\n pass\n\n def get_outdated_docs(self) -> Iterator[str]:\n for docname in self.env.found_docs:\n if docname not in self.env.all_docs:\n yield docname\n continue\n targetname = path.join(self.outdir, docname + self.out_suffix)\n try:\n targetmtime = path.getmtime(targetname)\n except Exception:\n targetmtime = 0\n try:\n srcmtime = path.getmtime(self.env.doc2path(docname))\n if srcmtime > targetmtime:\n yield docname\n except OSError:\n # source doesn't exist anymore\n pass\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n return docname\n\n def prepare_writing(self, docnames: Set[str]) -> None:\n self.writer = self._writer_class(self)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py_XMLBuilder.write_doc_XMLBuilder.finish.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py_XMLBuilder.write_doc_XMLBuilder.finish.pass", "embedding": null, "metadata": {"file_path": "sphinx/builders/xml.py", "file_name": "xml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 89, "span_ids": ["XMLBuilder.finish", "XMLBuilder.write_doc"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class XMLBuilder(Builder):\n\n def write_doc(self, docname: str, doctree: Node) -> None:\n # work around multiple string % tuple issues in docutils;\n # replace tuples in attribute values with lists\n doctree = doctree.deepcopy()\n for domain in self.env.domains.values():\n xmlns = \"xmlns:\" + domain.name\n doctree[xmlns] = \"https://www.sphinx-doc.org/\" # type: ignore\n for node in doctree.findall(nodes.Element):\n for att, value in node.attributes.items():\n if isinstance(value, tuple):\n node.attributes[att] = list(value)\n value = node.attributes[att]\n if isinstance(value, list):\n for i, val in enumerate(value):\n if isinstance(val, tuple):\n value[i] = list(val)\n destination = StringOutput(encoding='utf-8')\n self.writer.write(doctree, destination)\n outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix)\n ensuredir(path.dirname(outfilename))\n try:\n with open(outfilename, 'w', encoding='utf-8') as f:\n f.write(self.writer.output)\n except OSError as err:\n logger.warning(__(\"error writing file %s: %s\"), outfilename, err)\n\n def finish(self) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py_PseudoXMLBuilder_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py_PseudoXMLBuilder_", "embedding": null, "metadata": {"file_path": "sphinx/builders/xml.py", "file_name": "xml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 126, "span_ids": ["PseudoXMLBuilder", "setup"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PseudoXMLBuilder(XMLBuilder):\n \"\"\"\n Builds pseudo-XML for display purposes.\n \"\"\"\n name = 'pseudoxml'\n format = 'pseudoxml'\n epilog = __('The pseudo-XML files are in %(outdir)s.')\n\n out_suffix = '.pseudoxml'\n\n _writer_class = PseudoXMLWriter\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_builder(XMLBuilder)\n app.add_builder(PseudoXMLBuilder)\n\n app.add_config_value('xml_pretty', True, 'env')\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/__init__.py__", "embedding": null, "metadata": {"file_path": "sphinx/cmd/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 8}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Modules for command line executables.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_handle_exception_jobs_argument.if_value_auto_.else_.if_jobs_0_.else_.return.jobs": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_handle_exception_jobs_argument.if_value_auto_.else_.if_jobs_0_.else_.return.jobs", "embedding": null, "metadata": {"file_path": "sphinx/cmd/build.py", "file_name": "build.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 98, "span_ids": ["jobs_argument", "handle_exception"], "tokens": 647}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def handle_exception(app: Sphinx, args: Any, exception: BaseException, stderr: IO = sys.stderr) -> None: # NOQA\n if isinstance(exception, bdb.BdbQuit):\n return\n\n if args.pdb:\n print(red(__('Exception occurred while building, starting debugger:')),\n file=stderr)\n traceback.print_exc()\n pdb.post_mortem(sys.exc_info()[2])\n else:\n print(file=stderr)\n if args.verbosity or args.traceback:\n traceback.print_exc(None, stderr)\n print(file=stderr)\n if isinstance(exception, KeyboardInterrupt):\n print(__('Interrupted!'), file=stderr)\n elif isinstance(exception, SystemMessage):\n print(red(__('reST markup error:')), file=stderr)\n print(terminal_safe(exception.args[0]), file=stderr)\n elif isinstance(exception, SphinxError):\n print(red('%s:' % exception.category), file=stderr)\n print(str(exception), file=stderr)\n elif isinstance(exception, UnicodeError):\n print(red(__('Encoding error:')), file=stderr)\n print(terminal_safe(str(exception)), file=stderr)\n tbpath = save_traceback(app)\n print(red(__('The full traceback has been saved in %s, if you want '\n 'to report the issue to the developers.') % tbpath),\n file=stderr)\n elif isinstance(exception, RuntimeError) and 'recursion depth' in str(exception):\n print(red(__('Recursion error:')), file=stderr)\n print(terminal_safe(str(exception)), file=stderr)\n print(file=stderr)\n print(__('This can happen with very large or deeply nested source '\n 'files. You can carefully increase the default Python '\n 'recursion limit of 1000 in conf.py with e.g.:'), file=stderr)\n print(' import sys; sys.setrecursionlimit(1500)', file=stderr)\n else:\n print(red(__('Exception occurred:')), file=stderr)\n print(format_exception_cut_frames().rstrip(), file=stderr)\n tbpath = save_traceback(app)\n print(red(__('The full traceback has been saved in %s, if you '\n 'want to report the issue to the developers.') % tbpath),\n file=stderr)\n print(__('Please also report this if it was a user error, so '\n 'that a better error message can be provided next time.'),\n file=stderr)\n print(__('A bug report can be filed in the tracker at '\n '<https://github.com/sphinx-doc/sphinx/issues>. Thanks!'),\n file=stderr)\n\n\ndef jobs_argument(value: str) -> int:\n \"\"\"\n Special type to handle 'auto' flags passed to 'sphinx-build' via -j flag. Can\n be expanded to handle other special scaling requests, such as setting job count\n to cpu_count.\n \"\"\"\n if value == 'auto':\n return multiprocessing.cpu_count()\n else:\n jobs = int(value)\n if jobs <= 0:\n raise argparse.ArgumentTypeError(__('job number should be a positive number'))\n else:\n return jobs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_get_parser_get_parser.group_3.parser_add_argument_group": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_get_parser_get_parser.group_3.parser_add_argument_group", "embedding": null, "metadata": {"file_path": "sphinx/cmd/build.py", "file_name": "build.py", "file_type": "text/x-python", "category": "implementation", "start_line": 95, "end_line": 162, "span_ids": ["get_parser"], "tokens": 763}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_parser() -> argparse.ArgumentParser:\n parser = argparse.ArgumentParser(\n usage='%(prog)s [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]',\n epilog=__('For more information, visit <https://www.sphinx-doc.org/>.'),\n description=__(\"\"\"\nGenerate documentation from source files.\n\nsphinx-build generates documentation from the files in SOURCEDIR and places it\nin OUTPUTDIR. It looks for 'conf.py' in SOURCEDIR for the configuration\nsettings. The 'sphinx-quickstart' tool may be used to generate template files,\nincluding 'conf.py'\n\nsphinx-build can create documentation in different formats. A format is\nselected by specifying the builder name on the command line; it defaults to\nHTML. Builders can also perform other tasks related to documentation\nprocessing.\n\nBy default, everything that is outdated is built. Output only for selected\nfiles can be built by specifying individual filenames.\n\"\"\"))\n\n parser.add_argument('--version', action='version', dest='show_version',\n version='%%(prog)s %s' % __display_version__)\n\n parser.add_argument('sourcedir',\n help=__('path to documentation source files'))\n parser.add_argument('outputdir',\n help=__('path to output directory'))\n parser.add_argument('filenames', nargs='*',\n help=__('a list of specific files to rebuild. Ignored '\n 'if -a is specified'))\n\n group = parser.add_argument_group(__('general options'))\n group.add_argument('-b', metavar='BUILDER', dest='builder',\n default='html',\n help=__('builder to use (default: html)'))\n group.add_argument('-a', action='store_true', dest='force_all',\n help=__('write all files (default: only write new and '\n 'changed files)'))\n group.add_argument('-E', action='store_true', dest='freshenv',\n help=__('don\\'t use a saved environment, always read '\n 'all files'))\n group.add_argument('-d', metavar='PATH', dest='doctreedir',\n help=__('path for the cached environment and doctree '\n 'files (default: OUTPUTDIR/.doctrees)'))\n group.add_argument('-j', metavar='N', default=1, type=jobs_argument, dest='jobs',\n help=__('build in parallel with N processes where '\n 'possible (special value \"auto\" will set N to cpu-count)'))\n group = parser.add_argument_group('build configuration options')\n group.add_argument('-c', metavar='PATH', dest='confdir',\n help=__('path where configuration file (conf.py) is '\n 'located (default: same as SOURCEDIR)'))\n group.add_argument('-C', action='store_true', dest='noconfig',\n help=__('use no config file at all, only -D options'))\n group.add_argument('-D', metavar='setting=value', action='append',\n dest='define', default=[],\n help=__('override a setting in configuration file'))\n group.add_argument('-A', metavar='name=value', action='append',\n dest='htmldefine', default=[],\n help=__('pass a value into HTML templates'))\n group.add_argument('-t', metavar='TAG', action='append',\n dest='tags', default=[],\n help=__('define tag: include \"only\" blocks with TAG'))\n group.add_argument('-n', action='store_true', dest='nitpicky',\n help=__('nit-picky mode, warn about all missing '\n 'references'))\n\n group = parser.add_argument_group(__('console output options'))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_get_parser.group_add_argument_v__make_main.return.make_mode_run_make_mode_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_get_parser.group_add_argument_v__make_main.return.make_mode_run_make_mode_a", "embedding": null, "metadata": {"file_path": "sphinx/cmd/build.py", "file_name": "build.py", "file_type": "text/x-python", "category": "implementation", "start_line": 169, "end_line": 199, "span_ids": ["make_main", "get_parser"], "tokens": 383}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_parser() -> argparse.ArgumentParser:\n # ... other code\n group.add_argument('-v', action='count', dest='verbosity', default=0,\n help=__('increase verbosity (can be repeated)'))\n group.add_argument('-q', action='store_true', dest='quiet',\n help=__('no output on stdout, just warnings on stderr'))\n group.add_argument('-Q', action='store_true', dest='really_quiet',\n help=__('no output at all, not even warnings'))\n group.add_argument('--color', action='store_const', const='yes',\n default='auto',\n help=__('do emit colored output (default: auto-detect)'))\n group.add_argument('-N', '--no-color', dest='color', action='store_const',\n const='no',\n help=__('do not emit colored output (default: '\n 'auto-detect)'))\n group.add_argument('-w', metavar='FILE', dest='warnfile',\n help=__('write warnings (and errors) to given file'))\n group.add_argument('-W', action='store_true', dest='warningiserror',\n help=__('turn warnings into errors'))\n group.add_argument('--keep-going', action='store_true', dest='keep_going',\n help=__(\"with -W, keep going when getting warnings\"))\n group.add_argument('-T', action='store_true', dest='traceback',\n help=__('show full traceback on exception'))\n group.add_argument('-P', action='store_true', dest='pdb',\n help=__('run Pdb on exception'))\n\n return parser\n\n\ndef make_main(argv: List[str] = sys.argv[1:]) -> int:\n \"\"\"Sphinx build \"make mode\" entry.\"\"\"\n from sphinx.cmd import make_mode\n return make_mode.run_make_mode(argv[1:])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_build_main_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py_build_main_", "embedding": null, "metadata": {"file_path": "sphinx/cmd/build.py", "file_name": "build.py", "file_type": "text/x-python", "category": "implementation", "start_line": 196, "end_line": 295, "span_ids": ["main", "impl", "build_main"], "tokens": 720}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def build_main(argv: List[str] = sys.argv[1:]) -> int:\n \"\"\"Sphinx build \"main\" command-line entry.\"\"\"\n\n parser = get_parser()\n args = parser.parse_args(argv)\n\n if args.noconfig:\n args.confdir = None\n elif not args.confdir:\n args.confdir = args.sourcedir\n\n if not args.doctreedir:\n args.doctreedir = os.path.join(args.outputdir, '.doctrees')\n\n # handle remaining filename arguments\n filenames = args.filenames\n missing_files = []\n for filename in filenames:\n if not os.path.isfile(filename):\n missing_files.append(filename)\n if missing_files:\n parser.error(__('cannot find files %r') % missing_files)\n\n if args.force_all and filenames:\n parser.error(__('cannot combine -a option and filenames'))\n\n if args.color == 'no' or (args.color == 'auto' and not color_terminal()):\n nocolor()\n\n status = sys.stdout\n warning = sys.stderr\n error = sys.stderr\n\n if args.quiet:\n status = None\n\n if args.really_quiet:\n status = warning = None\n\n if warning and args.warnfile:\n try:\n warnfile = abspath(args.warnfile)\n ensuredir(path.dirname(warnfile))\n warnfp = open(args.warnfile, 'w')\n except Exception as exc:\n parser.error(__('cannot open warning file %r: %s') % (\n args.warnfile, exc))\n warning = Tee(warning, warnfp) # type: ignore\n error = warning\n\n confoverrides = {}\n for val in args.define:\n try:\n key, val = val.split('=', 1)\n except ValueError:\n parser.error(__('-D option argument must be in the form name=value'))\n confoverrides[key] = val\n\n for val in args.htmldefine:\n try:\n key, val = val.split('=')\n except ValueError:\n parser.error(__('-A option argument must be in the form name=value'))\n try:\n val = int(val)\n except ValueError:\n pass\n confoverrides['html_context.%s' % key] = val\n\n if args.nitpicky:\n confoverrides['nitpicky'] = True\n\n app = None\n try:\n confdir = args.confdir or args.sourcedir\n with patch_docutils(confdir), docutils_namespace():\n app = Sphinx(args.sourcedir, args.confdir, args.outputdir,\n args.doctreedir, args.builder, confoverrides, status,\n warning, args.freshenv, args.warningiserror,\n args.tags, args.verbosity, args.jobs, args.keep_going)\n app.build(args.force_all, filenames)\n return app.statuscode\n except (Exception, KeyboardInterrupt) as exc:\n handle_exception(app, args, exc, error)\n return 2\n\n\ndef main(argv: List[str] = sys.argv[1:]) -> int:\n sphinx.locale.setlocale(locale.LC_ALL, '')\n sphinx.locale.init_console(os.path.join(package_dir, 'locale'), 'sphinx')\n\n if argv[:1] == ['-M']:\n return make_main(argv)\n else:\n return build_main(argv)\n\n\nif __name__ == '__main__':\n sys.exit(main(sys.argv[1:]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make_Make.build_clean.return.0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make_Make.build_clean.return.0", "embedding": null, "metadata": {"file_path": "sphinx/cmd/make_mode.py", "file_name": "make_mode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 57, "end_line": 84, "span_ids": ["Make", "Make.build_clean", "Make.builddir_join"], "tokens": 318}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Make:\n def __init__(self, srcdir: str, builddir: str, opts: List[str]) -> None:\n self.srcdir = srcdir\n self.builddir = builddir\n self.opts = opts\n self.makecmd = os.environ.get('MAKE', 'make') # refer $MAKE to determine make command\n\n def builddir_join(self, *comps: str) -> str:\n return path.join(self.builddir, *comps)\n\n def build_clean(self) -> int:\n srcdir = path.abspath(self.srcdir)\n builddir = path.abspath(self.builddir)\n if not path.exists(self.builddir):\n return 0\n elif not path.isdir(self.builddir):\n print(\"Error: %r is not a directory!\" % self.builddir)\n return 1\n elif srcdir == builddir:\n print(\"Error: %r is same as source directory!\" % self.builddir)\n return 1\n elif path.commonpath([srcdir, builddir]) == builddir:\n print(\"Error: %r directory contains source directory!\" % self.builddir)\n return 1\n print(\"Removing everything under %r...\" % self.builddir)\n for item in os.listdir(self.builddir):\n rmtree(self.builddir_join(item))\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make.build_help_Make.build_help.for_osname_bname_descri.if_not_osname_or_os_name_.print_s_s_blue_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make.build_help_Make.build_help.for_osname_bname_descri.if_not_osname_or_os_name_.print_s_s_blue_", "embedding": null, "metadata": {"file_path": "sphinx/cmd/make_mode.py", "file_name": "make_mode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 86, "end_line": 94, "span_ids": ["Make.build_help"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Make:\n\n def build_help(self) -> None:\n if not color_terminal():\n nocolor()\n\n print(bold(\"Sphinx v%s\" % sphinx.__display_version__))\n print(\"Please use `make %s' where %s is one of\" % ((blue('target'),) * 2))\n for osname, bname, description in BUILDERS:\n if not osname or os.name == osname:\n print(' %s %s' % (blue(bname.ljust(10)), description))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make.build_latexpdf_Make.build_gettext.return.0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make.build_latexpdf_Make.build_gettext.return.0", "embedding": null, "metadata": {"file_path": "sphinx/cmd/make_mode.py", "file_name": "make_mode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 96, "end_line": 140, "span_ids": ["Make.build_latexpdfja", "Make.build_info", "Make.build_latexpdf", "Make.build_gettext"], "tokens": 375}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Make:\n\n def build_latexpdf(self) -> int:\n if self.run_generic_build('latex') > 0:\n return 1\n\n if sys.platform == 'win32':\n makecmd = os.environ.get('MAKE', 'make.bat')\n else:\n makecmd = self.makecmd\n try:\n with cd(self.builddir_join('latex')):\n return subprocess.call([makecmd, 'all-pdf'])\n except OSError:\n print('Error: Failed to run: %s' % makecmd)\n return 1\n\n def build_latexpdfja(self) -> int:\n if self.run_generic_build('latex') > 0:\n return 1\n\n if sys.platform == 'win32':\n makecmd = os.environ.get('MAKE', 'make.bat')\n else:\n makecmd = self.makecmd\n try:\n with cd(self.builddir_join('latex')):\n return subprocess.call([makecmd, 'all-pdf'])\n except OSError:\n print('Error: Failed to run: %s' % makecmd)\n return 1\n\n def build_info(self) -> int:\n if self.run_generic_build('texinfo') > 0:\n return 1\n try:\n with cd(self.builddir_join('texinfo')):\n return subprocess.call([self.makecmd, 'info'])\n except OSError:\n print('Error: Failed to run: %s' % self.makecmd)\n return 1\n\n def build_gettext(self) -> int:\n dtdir = self.builddir_join('gettext', '.doctrees')\n if self.run_generic_build('gettext', doctreedir=dtdir) > 0:\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make.run_generic_build_Make.run_generic_build.return.build_main_args_opts_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_Make.run_generic_build_Make.run_generic_build.return.build_main_args_opts_", "embedding": null, "metadata": {"file_path": "sphinx/cmd/make_mode.py", "file_name": "make_mode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 142, "end_line": 155, "span_ids": ["Make.run_generic_build"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Make:\n\n def run_generic_build(self, builder: str, doctreedir: str = None) -> int:\n # compatibility with old Makefile\n papersize = os.getenv('PAPER', '')\n opts = self.opts\n if papersize in ('a4', 'letter'):\n opts.extend(['-D', 'latex_elements.papersize=' + papersize + 'paper'])\n if doctreedir is None:\n doctreedir = self.builddir_join('doctrees')\n\n args = ['-b', builder,\n '-d', doctreedir,\n self.srcdir,\n self.builddir_join(builder)]\n return build_main(args + opts)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_run_make_mode_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py_run_make_mode_", "embedding": null, "metadata": {"file_path": "sphinx/cmd/make_mode.py", "file_name": "make_mode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 158, "end_line": 168, "span_ids": ["run_make_mode"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def run_make_mode(args: List[str]) -> int:\n if len(args) < 3:\n print('Error: at least 3 arguments (builder, source '\n 'dir, build dir) are required.', file=sys.stderr)\n return 1\n make = Make(args[1], args[2], args[3:])\n run_method = 'build_' + args[0]\n if hasattr(make, run_method):\n return getattr(make, run_method)()\n return make.run_generic_build(args[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_ask_user_ask_user.if_release_not_in_d_.d_release_do_prompt_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_ask_user_ask_user.if_release_not_in_d_.d_release_do_prompt_", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 183, "end_line": 258, "span_ids": ["ask_user"], "tokens": 675}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def ask_user(d: Dict) -> None:\n\n print(bold(__('Welcome to the Sphinx %s quickstart utility.')) % __display_version__)\n print()\n print(__('Please enter values for the following settings (just press Enter to\\n'\n 'accept a default value, if one is given in brackets).'))\n\n if 'path' in d:\n print()\n print(bold(__('Selected root path: %s')) % d['path'])\n else:\n print()\n print(__('Enter the root path for documentation.'))\n d['path'] = do_prompt(__('Root path for the documentation'), '.', is_path)\n\n while path.isfile(path.join(d['path'], 'conf.py')) or \\\n path.isfile(path.join(d['path'], 'source', 'conf.py')):\n print()\n print(bold(__('Error: an existing conf.py has been found in the '\n 'selected root path.')))\n print(__('sphinx-quickstart will not overwrite existing Sphinx projects.'))\n print()\n d['path'] = do_prompt(__('Please enter a new root path (or just Enter to exit)'),\n '', is_path_or_empty)\n if not d['path']:\n sys.exit(1)\n\n if 'sep' not in d:\n print()\n print(__('You have two options for placing the build directory for Sphinx output.\\n'\n 'Either, you use a directory \"_build\" within the root path, or you separate\\n'\n '\"source\" and \"build\" directories within the root path.'))\n d['sep'] = do_prompt(__('Separate source and build directories (y/n)'), 'n', boolean)\n\n if 'dot' not in d:\n print()\n print(__('Inside the root directory, two more directories will be created; \"_templates\"\\n' # NOQA\n 'for custom HTML templates and \"_static\" for custom stylesheets and other static\\n' # NOQA\n 'files. You can enter another prefix (such as \".\") to replace the underscore.')) # NOQA\n d['dot'] = do_prompt(__('Name prefix for templates and static dir'), '_', ok)\n\n if 'project' not in d:\n print()\n print(__('The project name will occur in several places in the built documentation.'))\n d['project'] = do_prompt(__('Project name'))\n if 'author' not in d:\n d['author'] = do_prompt(__('Author name(s)'))\n\n if 'version' not in d:\n print()\n print(__('Sphinx has the notion of a \"version\" and a \"release\" for the\\n'\n 'software. Each version can have multiple releases. For example, for\\n'\n 'Python the version is something like 2.5 or 3.0, while the release is\\n'\n 'something like 2.5.1 or 3.0a1. If you don\\'t need this dual structure,\\n'\n 'just set both to the same value.'))\n d['version'] = do_prompt(__('Project version'), '', allow_empty)\n if 'release' not in d:\n d['release'] = do_prompt(__('Project release'), d['version'], allow_empty)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_ask_user.if_language_not_in_d__ask_user.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_ask_user.if_language_not_in_d__ask_user.None_3", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 284, "end_line": 342, "span_ids": ["ask_user"], "tokens": 739}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def ask_user(d: Dict) -> None:\n # ... other code\n\n if 'language' not in d:\n print()\n print(__('If the documents are to be written in a language other than English,\\n'\n 'you can select a language here by its language code. Sphinx will then\\n'\n 'translate text that it generates into that language.\\n'\n '\\n'\n 'For a list of supported codes, see\\n'\n 'https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language.')) # NOQA\n d['language'] = do_prompt(__('Project language'), 'en')\n if d['language'] == 'en':\n d['language'] = None\n\n if 'suffix' not in d:\n print()\n print(__('The file name suffix for source files. Commonly, this is either \".txt\"\\n'\n 'or \".rst\". Only files with this suffix are considered documents.'))\n d['suffix'] = do_prompt(__('Source file suffix'), '.rst', suffix)\n\n if 'master' not in d:\n print()\n print(__('One document is special in that it is considered the top node of the\\n'\n '\"contents tree\", that is, it is the root of the hierarchical structure\\n'\n 'of the documents. Normally, this is \"index\", but if your \"index\"\\n'\n 'document is a custom template, you can also set this to another filename.'))\n d['master'] = do_prompt(__('Name of your master document (without suffix)'), 'index')\n\n while path.isfile(path.join(d['path'], d['master'] + d['suffix'])) or \\\n path.isfile(path.join(d['path'], 'source', d['master'] + d['suffix'])):\n print()\n print(bold(__('Error: the master file %s has already been found in the '\n 'selected root path.') % (d['master'] + d['suffix'])))\n print(__('sphinx-quickstart will not overwrite the existing file.'))\n print()\n d['master'] = do_prompt(__('Please enter a new file name, or rename the '\n 'existing file and press Enter'), d['master'])\n\n if 'extensions' not in d:\n print(__('Indicate which of the following Sphinx extensions should be enabled:'))\n d['extensions'] = []\n for name, description in EXTENSIONS.items():\n if do_prompt('%s: %s (y/n)' % (name, description), 'n', boolean):\n d['extensions'].append('sphinx.ext.%s' % name)\n\n # Handle conflicting options\n if {'sphinx.ext.imgmath', 'sphinx.ext.mathjax'}.issubset(d['extensions']):\n print(__('Note: imgmath and mathjax cannot be enabled at the same time. '\n 'imgmath has been deselected.'))\n d['extensions'].remove('sphinx.ext.imgmath')\n\n if 'makefile' not in d:\n print()\n print(__('A Makefile and a Windows command file can be generated for you so that you\\n'\n 'only have to run e.g. `make html\\' instead of invoking sphinx-build\\n'\n 'directly.'))\n d['makefile'] = do_prompt(__('Create Makefile? (y/n)'), 'y', boolean)\n\n if 'batchfile' not in d:\n d['batchfile'] = do_prompt(__('Create Windows command file? (y/n)'), 'y', boolean)\n print()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_valid_dir_valid_dir.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_valid_dir_valid_dir.return.True", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 439, "end_line": 465, "span_ids": ["valid_dir"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def valid_dir(d: Dict) -> bool:\n dir = d['path']\n if not path.exists(dir):\n return True\n if not path.isdir(dir):\n return False\n\n if {'Makefile', 'make.bat'} & set(os.listdir(dir)):\n return False\n\n if d['sep']:\n dir = os.path.join('source', dir)\n if not path.exists(dir):\n return True\n if not path.isdir(dir):\n return False\n\n reserved_names = [\n 'conf.py',\n d['dot'] + 'static',\n d['dot'] + 'templates',\n d['master'] + d['suffix'],\n ]\n if set(reserved_names) & set(os.listdir(dir)):\n return False\n\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_main_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_main_", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 536, "end_line": 603, "span_ids": ["main", "impl:27"], "tokens": 491}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def main(argv: List[str] = sys.argv[1:]) -> int:\n sphinx.locale.setlocale(locale.LC_ALL, '')\n sphinx.locale.init_console(os.path.join(package_dir, 'locale'), 'sphinx')\n\n if not color_terminal():\n nocolor()\n\n # parse options\n parser = get_parser()\n try:\n args = parser.parse_args(argv)\n except SystemExit as err:\n return err.code\n\n d = vars(args)\n # delete None or False value\n d = {k: v for k, v in d.items() if v is not None}\n\n # handle use of CSV-style extension values\n d.setdefault('extensions', [])\n for ext in d['extensions'][:]:\n if ',' in ext:\n d['extensions'].remove(ext)\n d['extensions'].extend(ext.split(','))\n\n try:\n if 'quiet' in d:\n if not {'project', 'author'}.issubset(d):\n print(__('\"quiet\" is specified, but any of \"project\" or '\n '\"author\" is not specified.'))\n return 1\n\n if {'quiet', 'project', 'author'}.issubset(d):\n # quiet mode with all required params satisfied, use default\n d.setdefault('version', '')\n d.setdefault('release', d['version'])\n d2 = DEFAULTS.copy()\n d2.update(d)\n d = d2\n\n if not valid_dir(d):\n print()\n print(bold(__('Error: specified path is not a directory, or sphinx'\n ' files already exist.')))\n print(__('sphinx-quickstart only generate into a empty directory.'\n ' Please specify a new root path.'))\n return 1\n else:\n ask_user(d)\n except (KeyboardInterrupt, EOFError):\n print()\n print('[Interrupted.]')\n return 130 # 128 + SIGINT\n\n for variable in d.get('variables', []):\n try:\n name, value = variable.split('=')\n d[name] = value\n except ValueError:\n print(__('Invalid template variable: %s') % variable)\n\n generate(d, overwrite=False, templatedir=args.templatedir)\n return 0\n\n\nif __name__ == '__main__':\n sys.exit(main(sys.argv[1:]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.__init___Config.read.return.cls_namespace_overrides_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.__init___Config.read.return.cls_namespace_overrides_", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 145, "end_line": 166, "span_ids": ["Config", "Config.read"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config:\n\n def __init__(self, config: Dict[str, Any] = {}, overrides: Dict[str, Any] = {}) -> None:\n self.overrides = dict(overrides)\n self.values = Config.config_values.copy()\n self._raw_config = config\n self.setup: Optional[Callable] = config.get('setup', None)\n\n if 'extensions' in self.overrides:\n if isinstance(self.overrides['extensions'], str):\n config['extensions'] = self.overrides.pop('extensions').split(',')\n else:\n config['extensions'] = self.overrides.pop('extensions')\n self.extensions: List[str] = config.get('extensions', [])\n\n @classmethod\n def read(cls, confdir: str, overrides: Dict = None, tags: Tags = None) -> \"Config\":\n \"\"\"Create a Config object from configuration file.\"\"\"\n filename = path.join(confdir, CONFIG_FILENAME)\n if not path.isfile(filename):\n raise ConfigError(__(\"config directory doesn't contain a conf.py file (%s)\") %\n confdir)\n namespace = eval_config_file(filename, tags)\n return cls(namespace, overrides or {})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.convert_overrides_Config.convert_overrides.if_not_isinstance_value_.else_.if_self_values_name_2_.else_.return.value": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.convert_overrides_Config.convert_overrides.if_not_isinstance_value_.else_.if_self_values_name_2_.else_.return.value", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 168, "end_line": 207, "span_ids": ["Config.convert_overrides"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config:\n\n def convert_overrides(self, name: str, value: Any) -> Any:\n if not isinstance(value, str):\n return value\n else:\n defvalue = self.values[name][0]\n if self.values[name][2] == Any:\n return value\n elif self.values[name][2] == {bool, str}:\n if value == '0':\n # given falsy string from command line option\n return False\n elif value == '1':\n return True\n else:\n return value\n elif type(defvalue) is bool or self.values[name][2] == [bool]:\n if value == '0':\n # given falsy string from command line option\n return False\n else:\n return bool(value)\n elif isinstance(defvalue, dict):\n raise ValueError(__('cannot override dictionary config setting %r, '\n 'ignoring (use %r to set individual elements)') %\n (name, name + '.key=value'))\n elif isinstance(defvalue, list):\n return value.split(',')\n elif isinstance(defvalue, int):\n try:\n return int(value)\n except ValueError as exc:\n raise ValueError(__('invalid number %r for config value %r, ignoring') %\n (value, name)) from exc\n elif callable(defvalue):\n return value\n elif defvalue is not None and not isinstance(defvalue, str):\n raise ValueError(__('cannot override config setting %r with unsupported '\n 'type, ignoring') % name)\n else:\n return value", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.pre_init_values_Config.pre_init_values.for_name_in_variables_.try_.except_ValueError_as_exc_.logger_warning_s_exc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.pre_init_values_Config.pre_init_values.for_name_in_variables_.try_.except_ValueError_as_exc_.logger_warning_s_exc_", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 209, "end_line": 222, "span_ids": ["Config.pre_init_values"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config:\n\n def pre_init_values(self) -> None:\n \"\"\"\n Initialize some limited config variables before initializing i18n and loading\n extensions.\n \"\"\"\n variables = ['needs_sphinx', 'suppress_warnings', 'language', 'locale_dirs']\n for name in variables:\n try:\n if name in self.overrides:\n self.__dict__[name] = self.convert_overrides(name, self.overrides[name])\n elif name in self._raw_config:\n self.__dict__[name] = self._raw_config[name]\n except ValueError as exc:\n logger.warning(\"%s\", exc)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.init_values_Config.init_values.for_name_in_config_.if_name_in_self_values_.self___dict___name_con": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.init_values_Config.init_values.for_name_in_config_.if_name_in_self_values_.self___dict___name_con", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 224, "end_line": 244, "span_ids": ["Config.init_values"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config:\n\n def init_values(self) -> None:\n config = self._raw_config\n for valname, value in self.overrides.items():\n try:\n if '.' in valname:\n realvalname, key = valname.split('.', 1)\n config.setdefault(realvalname, {})[key] = value\n continue\n elif valname not in self.values:\n logger.warning(__('unknown config value %r in override, ignoring'),\n valname)\n continue\n if isinstance(value, str):\n config[valname] = self.convert_overrides(valname, value)\n else:\n config[valname] = value\n except ValueError as exc:\n logger.warning(\"%s\", exc)\n for name in config:\n if name in self.values:\n self.__dict__[name] = config[name]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.__getstate___Config.__setstate__.self___dict___update_stat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.__getstate___Config.__setstate__.self___dict___update_stat", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 283, "end_line": 307, "span_ids": ["Config.__setstate__", "Config.__getstate__"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config:\n\n def __getstate__(self) -> Dict:\n \"\"\"Obtains serializable data for pickling.\"\"\"\n # remove potentially pickling-problematic values from config\n __dict__ = {}\n for key, value in self.__dict__.items():\n if key.startswith('_') or not is_serializable(value):\n pass\n else:\n __dict__[key] = value\n\n # create a picklable copy of values list\n __dict__['values'] = {}\n for key, value in self.values.items():\n real_value = getattr(self, key)\n if not is_serializable(real_value):\n # omit unserializable value\n real_value = None\n\n # types column is also omitted\n __dict__['values'][key] = (real_value, value[1], None)\n\n return __dict__\n\n def __setstate__(self, state: Dict) -> None:\n self.__dict__.update(state)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_eval_config_file_eval_config_file.return.namespace": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_eval_config_file_eval_config_file.return.namespace", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 321, "end_line": 347, "span_ids": ["eval_config_file"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def eval_config_file(filename: str, tags: Optional[Tags]) -> Dict[str, Any]:\n \"\"\"Evaluate a config file.\"\"\"\n namespace: Dict[str, Any] = {}\n namespace['__file__'] = filename\n namespace['tags'] = tags\n\n with cd(path.dirname(filename)):\n # during executing config file, current dir is changed to ``confdir``.\n try:\n with open(filename, 'rb') as f:\n code = compile(f.read(), filename.encode(fs_encoding), 'exec')\n exec(code, namespace)\n except SyntaxError as err:\n msg = __(\"There is a syntax error in your configuration file: %s\\n\")\n raise ConfigError(msg % err) from err\n except SystemExit as exc:\n msg = __(\"The configuration file (or one of the modules it imports) \"\n \"called sys.exit()\")\n raise ConfigError(msg) from exc\n except ConfigError:\n # pass through ConfigError from conf.py as is. It will be shown in console.\n raise\n except Exception as exc:\n msg = __(\"There is a programmable error in your configuration file:\\n\\n%s\")\n raise ConfigError(msg % traceback.format_exc()) from exc\n\n return namespace", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_convert_source_suffix_convert_source_suffix.if_isinstance_source_suff.else_.logger_warning____The_co": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_convert_source_suffix_convert_source_suffix.if_isinstance_source_suff.else_.logger_warning____The_co", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 350, "end_line": 372, "span_ids": ["convert_source_suffix"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def convert_source_suffix(app: \"Sphinx\", config: Config) -> None:\n \"\"\"Convert old styled source_suffix to new styled one.\n\n * old style: str or list\n * new style: a dict which maps from fileext to filetype\n \"\"\"\n source_suffix = config.source_suffix\n if isinstance(source_suffix, str):\n # if str, considers as default filetype (None)\n #\n # The default filetype is determined on later step.\n # By default, it is considered as restructuredtext.\n config.source_suffix = OrderedDict({source_suffix: None}) # type: ignore\n elif isinstance(source_suffix, (list, tuple)):\n # if list, considers as all of them are default filetype\n config.source_suffix = OrderedDict([(s, None) for s in source_suffix]) # type: ignore # NOQA\n elif isinstance(source_suffix, dict):\n # if dict, convert it to OrderedDict\n config.source_suffix = OrderedDict(config.source_suffix) # type: ignore\n else:\n logger.warning(__(\"The config value `source_suffix' expects \"\n \"a string, list of strings, or dictionary. \"\n \"But `%r' is given.\" % source_suffix))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_check_confval_types_check_confval_types.for_confval_in_config_.if_annotations_is_Any_.else_.if_annotations_.else_.logger_warning_msg_format": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_check_confval_types_check_confval_types.for_confval_in_config_.if_annotations_is_Any_.else_.if_annotations_.else_.logger_warning_msg_format", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 412, "end_line": 464, "span_ids": ["check_confval_types"], "tokens": 478}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check_confval_types(app: \"Sphinx\", config: Config) -> None:\n \"\"\"Check all values for deviation from the default value's type, since\n that can result in TypeErrors all over the place NB.\n \"\"\"\n for confval in config:\n default, rebuild, annotations = config.values[confval.name]\n\n if callable(default):\n default = default(config) # evaluate default value\n if default is None and not annotations:\n continue # neither inferable nor expliclitly annotated types\n\n if annotations is Any:\n # any type of value is accepted\n pass\n elif isinstance(annotations, ENUM):\n if not annotations.match(confval.value):\n msg = __(\"The config value `{name}` has to be a one of {candidates}, \"\n \"but `{current}` is given.\")\n logger.warning(msg.format(name=confval.name,\n current=confval.value,\n candidates=annotations.candidates), once=True)\n else:\n if type(confval.value) is type(default):\n continue\n if type(confval.value) in annotations:\n continue\n\n common_bases = (set(type(confval.value).__bases__ + (type(confval.value),)) &\n set(type(default).__bases__))\n common_bases.discard(object)\n if common_bases:\n continue # at least we share a non-trivial base class\n\n if annotations:\n msg = __(\"The config value `{name}' has type `{current.__name__}'; \"\n \"expected {permitted}.\")\n wrapped_annotations = [\"`{}'\".format(c.__name__) for c in annotations]\n if len(wrapped_annotations) > 2:\n permitted = \"{}, or {}\".format(\n \", \".join(wrapped_annotations[:-1]),\n wrapped_annotations[-1])\n else:\n permitted = \" or \".join(wrapped_annotations)\n logger.warning(msg.format(name=confval.name,\n current=type(confval.value),\n permitted=permitted), once=True)\n else:\n msg = __(\"The config value `{name}' has type `{current.__name__}', \"\n \"defaults to `{default.__name__}'.\")\n logger.warning(msg.format(name=confval.name,\n current=type(confval.value),\n default=type(default)), once=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 489, "end_line": 503, "span_ids": ["setup"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.connect('config-inited', convert_source_suffix, priority=800)\n app.connect('config-inited', convert_highlight_options, priority=800)\n app.connect('config-inited', init_numfig_format, priority=800)\n app.connect('config-inited', correct_copyright_year, priority=800)\n app.connect('config-inited', check_confval_types, priority=800)\n app.connect('config-inited', check_primary_domain, priority=800)\n app.connect('env-get-outdated', check_root_doc)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/deprecation.py_DeprecatedDict_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/deprecation.py_DeprecatedDict_", "embedding": null, "metadata": {"file_path": "sphinx/deprecation.py", "file_name": "deprecation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 59, "end_line": 86, "span_ids": ["DeprecatedDict", "DeprecatedDict.update", "DeprecatedDict.__setitem__", "DeprecatedDict.get", "DeprecatedDict.setdefault", "DeprecatedDict.__getitem__"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DeprecatedDict(dict):\n \"\"\"A deprecated dict which warns on each access.\"\"\"\n\n def __init__(self, data: Dict, message: str, warning: Type[Warning]) -> None:\n self.message = message\n self.warning = warning\n super().__init__(data)\n\n def __setitem__(self, key: str, value: Any) -> None:\n warnings.warn(self.message, self.warning, stacklevel=2)\n super().__setitem__(key, value)\n\n def setdefault(self, key: str, default: Any = None) -> Any:\n warnings.warn(self.message, self.warning, stacklevel=2)\n return super().setdefault(key, default)\n\n def __getitem__(self, key: str) -> None:\n warnings.warn(self.message, self.warning, stacklevel=2)\n return super().__getitem__(key)\n\n def get(self, key: str, default: Any = None) -> Any:\n warnings.warn(self.message, self.warning, stacklevel=2)\n return super().get(key, default)\n\n def update(self, other: Dict) -> None: # type: ignore\n warnings.warn(self.message, self.warning, stacklevel=2)\n super().update(other)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.get_field_type_map_ObjectDescription.get_field_type_map.return.self__doc_field_type_map": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.get_field_type_map_ObjectDescription.get_field_type_map.return.self__doc_field_type_map", "embedding": null, "metadata": {"file_path": "sphinx/directives/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 74, "end_line": 86, "span_ids": ["ObjectDescription.get_field_type_map"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjectDescription(SphinxDirective, Generic[T]):\n\n def get_field_type_map(self) -> Dict[str, Tuple[Field, bool]]:\n if self._doc_field_type_map == {}:\n self._doc_field_type_map = {}\n for field in self.doc_field_types:\n for name in field.names:\n self._doc_field_type_map[name] = (field, False)\n\n if field.is_typed:\n typed_field = cast(TypedField, field)\n for name in typed_field.typenames:\n self._doc_field_type_map[name] = (field, True)\n\n return self._doc_field_type_map", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.get_signatures_ObjectDescription.get_signatures.if_self_config_strip_sign.else_.return._line_strip_for_line_in": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.get_signatures_ObjectDescription.get_signatures.if_self_config_strip_sign.else_.return._line_strip_for_line_in", "embedding": null, "metadata": {"file_path": "sphinx/directives/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 88, "end_line": 98, "span_ids": ["ObjectDescription.get_signatures"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjectDescription(SphinxDirective, Generic[T]):\n\n def get_signatures(self) -> List[str]:\n \"\"\"\n Retrieve the signatures to document from the directive arguments. By\n default, signatures are given as arguments, one per line.\n \"\"\"\n lines = nl_escape_re.sub('', self.arguments[0]).split('\\n')\n if self.config.strip_signature_backslash:\n # remove backslashes to support (dummy) escapes; helps Vim highlighting\n return [strip_backslash_re.sub(r'\\1', line.strip()) for line in lines]\n else:\n return [line.strip() for line in lines]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.handle_signature_ObjectDescription.handle_signature.raise_ValueError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.handle_signature_ObjectDescription.handle_signature.raise_ValueError", "embedding": null, "metadata": {"file_path": "sphinx/directives/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 100, "end_line": 110, "span_ids": ["ObjectDescription.handle_signature"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjectDescription(SphinxDirective, Generic[T]):\n\n def handle_signature(self, sig: str, signode: desc_signature) -> T:\n \"\"\"\n Parse the signature *sig* into individual nodes and append them to\n *signode*. If ValueError is raised, parsing is aborted and the whole\n *sig* is put into a single desc_name node.\n\n The return value should be a value that identifies the object. It is\n passed to :meth:`add_target_and_index()` unchanged, and otherwise only\n used to skip duplicates.\n \"\"\"\n raise ValueError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.add_target_and_index_ObjectDescription.after_content.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.add_target_and_index_ObjectDescription.after_content.pass", "embedding": null, "metadata": {"file_path": "sphinx/directives/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 112, "end_line": 141, "span_ids": ["ObjectDescription.add_target_and_index", "ObjectDescription.transform_content", "ObjectDescription.after_content", "ObjectDescription.before_content"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjectDescription(SphinxDirective, Generic[T]):\n\n def add_target_and_index(self, name: T, sig: str, signode: desc_signature) -> None:\n \"\"\"\n Add cross-reference IDs and entries to self.indexnode, if applicable.\n\n *name* is whatever :meth:`handle_signature()` returned.\n \"\"\"\n return # do nothing by default\n\n def before_content(self) -> None:\n \"\"\"\n Called before parsing content. Used to set information about the current\n directive context on the build environment.\n \"\"\"\n pass\n\n def transform_content(self, contentnode: addnodes.desc_content) -> None:\n \"\"\"\n Called after creating the content through nested parsing,\n but before the ``object-description-transform`` event is emitted,\n and before the info-fields are transformed.\n Can be used to manipulate the content.\n \"\"\"\n pass\n\n def after_content(self) -> None:\n \"\"\"\n Called after parsing content. Used to reset information about the\n current directive context on the build environment.\n \"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.run_ObjectDescription.run.return._self_indexnode_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription.run_ObjectDescription.run.return._self_indexnode_node_", "embedding": null, "metadata": {"file_path": "sphinx/directives/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 134, "end_line": 206, "span_ids": ["ObjectDescription.run"], "tokens": 688}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjectDescription(SphinxDirective, Generic[T]):\n\n def run(self) -> List[Node]:\n \"\"\"\n Main directive entry function, called by docutils upon encountering the\n directive.\n\n This directive is meant to be quite easily subclassable, so it delegates\n to several additional methods. What it does:\n\n * find out if called as a domain-specific directive, set self.domain\n * create a `desc` node to fit all description inside\n * parse standard options, currently `noindex`\n * create an index node if needed as self.indexnode\n * parse all given signatures (as returned by self.get_signatures())\n using self.handle_signature(), which should either return a name\n or raise ValueError\n * add index entries using self.add_target_and_index()\n * parse the content and handle doc fields in it\n \"\"\"\n if ':' in self.name:\n self.domain, self.objtype = self.name.split(':', 1)\n else:\n self.domain, self.objtype = '', self.name\n self.indexnode = addnodes.index(entries=[])\n\n node = addnodes.desc()\n node.document = self.state.document\n node['domain'] = self.domain\n # 'desctype' is a backwards compatible attribute\n node['objtype'] = node['desctype'] = self.objtype\n node['noindex'] = noindex = ('noindex' in self.options)\n if self.domain:\n node['classes'].append(self.domain)\n node['classes'].append(node['objtype'])\n\n self.names: List[T] = []\n signatures = self.get_signatures()\n for sig in signatures:\n # add a signature node for each signature in the current unit\n # and add a reference target for it\n signode = addnodes.desc_signature(sig, '')\n self.set_source_info(signode)\n node.append(signode)\n try:\n # name can also be a tuple, e.g. (classname, objname);\n # this is strictly domain-specific (i.e. no assumptions may\n # be made in this base class)\n name = self.handle_signature(sig, signode)\n except ValueError:\n # signature parsing failed\n signode.clear()\n signode += addnodes.desc_name(sig, sig)\n continue # we don't want an index entry here\n if name not in self.names:\n self.names.append(name)\n if not noindex:\n # only add target and index entry if this is the first\n # description of the object with this name in this desc block\n self.add_target_and_index(name, sig, signode)\n\n contentnode = addnodes.desc_content()\n node.append(contentnode)\n if self.names:\n # needed for association of version{added,changed} directives\n self.env.temp_data['object'] = self.names[0]\n self.before_content()\n self.state.nested_parse(self.content, self.content_offset, contentnode)\n self.transform_content(contentnode)\n self.env.app.emit('object-description-transform',\n self.domain, self.objtype, contentnode)\n DocFieldTransformer(self).transform_all(contentnode)\n self.env.temp_data['object'] = None\n self.after_content()\n return [self.indexnode, node]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_DefaultRole_DefaultRole.run.return.cast_List_nodes_Node_me": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_DefaultRole_DefaultRole.run.return.cast_List_nodes_Node_me", "embedding": null, "metadata": {"file_path": "sphinx/directives/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 219, "end_line": 244, "span_ids": ["DefaultRole", "DefaultRole.run"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultRole(SphinxDirective):\n \"\"\"\n Set the default interpreted text role. Overridden from docutils.\n \"\"\"\n\n optional_arguments = 1\n final_argument_whitespace = False\n\n def run(self) -> List[Node]:\n if not self.arguments:\n docutils.unregister_role('')\n return []\n role_name = self.arguments[0]\n role, messages = roles.role(role_name, self.state_machine.language,\n self.lineno, self.state.reporter)\n if role:\n docutils.register_role('', role)\n self.env.temp_data['default_role'] = role_name\n else:\n literal_block = nodes.literal_block(self.block_text, self.block_text)\n reporter = self.state.reporter\n error = reporter.error('Unknown interpreted text role \"%s\".' % role_name,\n literal_block, line=self.lineno)\n messages += [error]\n\n return cast(List[nodes.Node], messages)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_DefaultDomain_DefaultDomain.run.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_DefaultDomain_DefaultDomain.run.return._", "embedding": null, "metadata": {"file_path": "sphinx/directives/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 237, "end_line": 257, "span_ids": ["DefaultDomain", "DefaultDomain.run"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultDomain(SphinxDirective):\n \"\"\"\n Directive to (re-)set the default domain for this source file.\n \"\"\"\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n domain_name = self.arguments[0].lower()\n # if domain_name not in env.domains:\n # # try searching by label\n # for domain in env.domains.values():\n # if domain.label.lower() == domain_name:\n # domain_name = domain.name\n # break\n self.env.temp_data['default_domain'] = self.env.domains.get(domain_name)\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_sys_logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_sys_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["impl:2", "impl", "imports", "imports:16"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import sys\nimport textwrap\nfrom difflib import unified_diff\nfrom typing import TYPE_CHECKING, Any, Dict, List, Tuple\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\nfrom docutils.parsers.rst import directives\nfrom docutils.statemachine import StringList\n\nfrom sphinx import addnodes\nfrom sphinx.config import Config\nfrom sphinx.directives import optional_int\nfrom sphinx.locale import __\nfrom sphinx.util import logging, parselinenos\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.typing import OptionSpec\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_Highlight_Highlight.run.return._addnodes_highlightlang_l": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_Highlight_Highlight.run.return._addnodes_highlightlang_l", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 25, "end_line": 48, "span_ids": ["Highlight", "Highlight.run"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Highlight(SphinxDirective):\n \"\"\"\n Directive to set the highlighting language for code blocks, as well\n as the threshold for line numbers.\n \"\"\"\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec: OptionSpec = {\n 'force': directives.flag,\n 'linenothreshold': directives.positive_int,\n }\n\n def run(self) -> List[Node]:\n language = self.arguments[0].strip()\n linenothreshold = self.options.get('linenothreshold', sys.maxsize)\n force = 'force' in self.options\n\n self.env.temp_data['highlight_language'] = language\n return [addnodes.highlightlang(lang=language,\n force=force,\n linenothreshold=linenothreshold)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_container_wrapper_container_wrapper.if_isinstance_parsed_0_.else_._never_reached": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_container_wrapper_container_wrapper.if_isinstance_parsed_0_.else_._never_reached", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 87, "end_line": 105, "span_ids": ["container_wrapper"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def container_wrapper(directive: SphinxDirective, literal_node: Node, caption: str) -> nodes.container: # NOQA\n container_node = nodes.container('', literal_block=True,\n classes=['literal-block-wrapper'])\n parsed = nodes.Element()\n directive.state.nested_parse(StringList([caption], source=''),\n directive.content_offset, parsed)\n if isinstance(parsed[0], nodes.system_message):\n msg = __('Invalid caption: %s' % parsed[0].astext())\n raise ValueError(msg)\n elif isinstance(parsed[0], nodes.Element):\n caption_node = nodes.caption(parsed[0].rawsource, '',\n *parsed[0].children)\n caption_node.source = literal_node.source\n caption_node.line = literal_node.line\n container_node += caption_node\n container_node += literal_node\n return container_node\n else:\n raise RuntimeError # never reached", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_CodeBlock_CodeBlock.option_spec._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_CodeBlock_CodeBlock.option_spec._", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 89, "end_line": 108, "span_ids": ["CodeBlock"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CodeBlock(SphinxDirective):\n \"\"\"\n Directive for a code block with special highlighting or line numbering\n settings.\n \"\"\"\n\n has_content = True\n required_arguments = 0\n optional_arguments = 1\n final_argument_whitespace = False\n option_spec: OptionSpec = {\n 'force': directives.flag,\n 'linenos': directives.flag,\n 'dedent': optional_int,\n 'lineno-start': int,\n 'emphasize-lines': directives.unchanged_required,\n 'caption': directives.unchanged_required,\n 'class': directives.class_option,\n 'name': directives.unchanged,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_CodeBlock.run_CodeBlock.run.return._literal_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_CodeBlock.run_CodeBlock.run.return._literal_", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 110, "end_line": 169, "span_ids": ["CodeBlock.run"], "tokens": 551}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CodeBlock(SphinxDirective):\n\n def run(self) -> List[Node]:\n document = self.state.document\n code = '\\n'.join(self.content)\n location = self.state_machine.get_source_and_line(self.lineno)\n\n linespec = self.options.get('emphasize-lines')\n if linespec:\n try:\n nlines = len(self.content)\n hl_lines = parselinenos(linespec, nlines)\n if any(i >= nlines for i in hl_lines):\n logger.warning(__('line number spec is out of range(1-%d): %r') %\n (nlines, self.options['emphasize-lines']),\n location=location)\n\n hl_lines = [x + 1 for x in hl_lines if x < nlines]\n except ValueError as err:\n return [document.reporter.warning(err, line=self.lineno)]\n else:\n hl_lines = None\n\n if 'dedent' in self.options:\n location = self.state_machine.get_source_and_line(self.lineno)\n lines = code.splitlines(True)\n lines = dedent_lines(lines, self.options['dedent'], location=location)\n code = ''.join(lines)\n\n literal: Element = nodes.literal_block(code, code)\n if 'linenos' in self.options or 'lineno-start' in self.options:\n literal['linenos'] = True\n literal['classes'] += self.options.get('class', [])\n literal['force'] = 'force' in self.options\n if self.arguments:\n # highlight language specified\n literal['language'] = self.arguments[0]\n else:\n # no highlight language specified. Then this directive refers the current\n # highlight setting via ``highlight`` directive or ``highlight_language``\n # configuration.\n literal['language'] = self.env.temp_data.get('highlight_language',\n self.config.highlight_language)\n extra_args = literal['highlight_args'] = {}\n if hl_lines is not None:\n extra_args['hl_lines'] = hl_lines\n if 'lineno-start' in self.options:\n extra_args['linenostart'] = self.options['lineno-start']\n self.set_source_info(literal)\n\n caption = self.options.get('caption')\n if caption:\n try:\n literal = container_wrapper(self, literal, caption)\n except ValueError as exc:\n return [document.reporter.warning(exc, line=self.lineno)]\n\n # literal will be note_implicit_target that is linked from caption and numref.\n # when options['name'] is provided, it should be primary ID.\n self.add_name(literal)\n\n return [literal]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader_LiteralIncludeReader.parse_options.for_option1_option2_in_s.if_option1_in_self_option.raise_ValueError____Cann": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader_LiteralIncludeReader.parse_options.for_option1_option2_in_s.if_option1_in_self_option.raise_ValueError____Cann", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 191, "end_line": 220, "span_ids": ["LiteralIncludeReader.parse_options", "LiteralIncludeReader"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralIncludeReader:\n INVALID_OPTIONS_PAIR = [\n ('lineno-match', 'lineno-start'),\n ('lineno-match', 'append'),\n ('lineno-match', 'prepend'),\n ('start-after', 'start-at'),\n ('end-before', 'end-at'),\n ('diff', 'pyobject'),\n ('diff', 'lineno-start'),\n ('diff', 'lineno-match'),\n ('diff', 'lines'),\n ('diff', 'start-after'),\n ('diff', 'end-before'),\n ('diff', 'start-at'),\n ('diff', 'end-at'),\n ]\n\n def __init__(self, filename: str, options: Dict, config: Config) -> None:\n self.filename = filename\n self.options = options\n self.encoding = options.get('encoding', config.source_encoding)\n self.lineno_start = self.options.get('lineno-start', 1)\n\n self.parse_options()\n\n def parse_options(self) -> None:\n for option1, option2 in self.INVALID_OPTIONS_PAIR:\n if option1 in self.options and option2 in self.options:\n raise ValueError(__('Cannot use both \"%s\" and \"%s\" options') %\n (option1, option2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.read_LiteralIncludeReader.show_diff.return.list_diff_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.read_LiteralIncludeReader.show_diff.return.list_diff_", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 219, "end_line": 241, "span_ids": ["LiteralIncludeReader.show_diff", "LiteralIncludeReader.read"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralIncludeReader:\n\n def read(self, location: Tuple[str, int] = None) -> Tuple[str, int]:\n if 'diff' in self.options:\n lines = self.show_diff()\n else:\n filters = [self.pyobject_filter,\n self.start_filter,\n self.end_filter,\n self.lines_filter,\n self.dedent_filter,\n self.prepend_filter,\n self.append_filter]\n lines = self.read_file(self.filename, location=location)\n for func in filters:\n lines = func(lines, location=location)\n\n return ''.join(lines), len(lines)\n\n def show_diff(self, location: Tuple[str, int] = None) -> List[str]:\n new_lines = self.read_file(self.filename)\n old_filename = self.options.get('diff')\n old_lines = self.read_file(old_filename)\n diff = unified_diff(old_lines, new_lines, old_filename, self.filename)\n return list(diff)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.pyobject_filter_LiteralIncludeReader.pyobject_filter.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.pyobject_filter_LiteralIncludeReader.pyobject_filter.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 261, "end_line": 277, "span_ids": ["LiteralIncludeReader.pyobject_filter"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralIncludeReader:\n\n def pyobject_filter(self, lines: List[str], location: Tuple[str, int] = None) -> List[str]:\n pyobject = self.options.get('pyobject')\n if pyobject:\n from sphinx.pycode import ModuleAnalyzer\n analyzer = ModuleAnalyzer.for_file(self.filename, '')\n tags = analyzer.find_tags()\n if pyobject not in tags:\n raise ValueError(__('Object named %r not found in include file %r') %\n (pyobject, self.filename))\n else:\n start = tags[pyobject][1]\n end = tags[pyobject][2]\n lines = lines[start - 1:end]\n if 'lineno-match' in self.options:\n self.lineno_start = start\n\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.lines_filter_LiteralIncludeReader.lines_filter.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.lines_filter_LiteralIncludeReader.lines_filter.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 279, "end_line": 301, "span_ids": ["LiteralIncludeReader.lines_filter"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralIncludeReader:\n\n def lines_filter(self, lines: List[str], location: Tuple[str, int] = None) -> List[str]:\n linespec = self.options.get('lines')\n if linespec:\n linelist = parselinenos(linespec, len(lines))\n if any(i >= len(lines) for i in linelist):\n logger.warning(__('line number spec is out of range(1-%d): %r') %\n (len(lines), linespec), location=location)\n\n if 'lineno-match' in self.options:\n # make sure the line list is not \"disjoint\".\n first = linelist[0]\n if all(first + i == n for i, n in enumerate(linelist)):\n self.lineno_start += linelist[0]\n else:\n raise ValueError(__('Cannot use \"lineno-match\" with a disjoint '\n 'set of \"lines\"'))\n\n lines = [lines[n] for n in linelist if n < len(lines)]\n if lines == []:\n raise ValueError(__('Line spec %r: no lines pulled from include file %r') %\n (linespec, self.filename))\n\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.start_filter_LiteralIncludeReader.start_filter.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.start_filter_LiteralIncludeReader.start_filter.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 303, "end_line": 332, "span_ids": ["LiteralIncludeReader.start_filter"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralIncludeReader:\n\n def start_filter(self, lines: List[str], location: Tuple[str, int] = None) -> List[str]:\n if 'start-at' in self.options:\n start = self.options.get('start-at')\n inclusive = False\n elif 'start-after' in self.options:\n start = self.options.get('start-after')\n inclusive = True\n else:\n start = None\n\n if start:\n for lineno, line in enumerate(lines):\n if start in line:\n if inclusive:\n if 'lineno-match' in self.options:\n self.lineno_start += lineno + 1\n\n return lines[lineno + 1:]\n else:\n if 'lineno-match' in self.options:\n self.lineno_start += lineno\n\n return lines[lineno:]\n\n if inclusive is True:\n raise ValueError('start-after pattern not found: %s' % start)\n else:\n raise ValueError('start-at pattern not found: %s' % start)\n\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.end_filter_LiteralIncludeReader.end_filter.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.end_filter_LiteralIncludeReader.end_filter.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 334, "end_line": 359, "span_ids": ["LiteralIncludeReader.end_filter"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralIncludeReader:\n\n def end_filter(self, lines: List[str], location: Tuple[str, int] = None) -> List[str]:\n if 'end-at' in self.options:\n end = self.options.get('end-at')\n inclusive = True\n elif 'end-before' in self.options:\n end = self.options.get('end-before')\n inclusive = False\n else:\n end = None\n\n if end:\n for lineno, line in enumerate(lines):\n if end in line:\n if inclusive:\n return lines[:lineno + 1]\n else:\n if lineno == 0:\n pass # end-before ignores first line\n else:\n return lines[:lineno]\n if inclusive is True:\n raise ValueError('end-at pattern not found: %s' % end)\n else:\n raise ValueError('end-before pattern not found: %s' % end)\n\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.prepend_filter_LiteralIncludeReader.dedent_filter.if_dedent_in_self_optio.else_.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.prepend_filter_LiteralIncludeReader.dedent_filter.if_dedent_in_self_optio.else_.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 361, "end_line": 379, "span_ids": ["LiteralIncludeReader.dedent_filter", "LiteralIncludeReader.prepend_filter", "LiteralIncludeReader.append_filter"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralIncludeReader:\n\n def prepend_filter(self, lines: List[str], location: Tuple[str, int] = None) -> List[str]:\n prepend = self.options.get('prepend')\n if prepend:\n lines.insert(0, prepend + '\\n')\n\n return lines\n\n def append_filter(self, lines: List[str], location: Tuple[str, int] = None) -> List[str]:\n append = self.options.get('append')\n if append:\n lines.append(append + '\\n')\n\n return lines\n\n def dedent_filter(self, lines: List[str], location: Tuple[str, int] = None) -> List[str]:\n if 'dedent' in self.options:\n return dedent_lines(lines, self.options.get('dedent'), location=location)\n else:\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralInclude_LiteralInclude.option_spec._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralInclude_LiteralInclude.option_spec._", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 364, "end_line": 397, "span_ids": ["LiteralInclude"], "tokens": 288}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralInclude(SphinxDirective):\n \"\"\"\n Like ``.. include:: :literal:``, but only warns if the include file is\n not found, and does not raise errors. Also has several options for\n selecting what to include.\n \"\"\"\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {\n 'dedent': optional_int,\n 'linenos': directives.flag,\n 'lineno-start': int,\n 'lineno-match': directives.flag,\n 'tab-width': int,\n 'language': directives.unchanged_required,\n 'force': directives.flag,\n 'encoding': directives.encoding,\n 'pyobject': directives.unchanged_required,\n 'lines': directives.unchanged_required,\n 'start-after': directives.unchanged_required,\n 'end-before': directives.unchanged_required,\n 'start-at': directives.unchanged_required,\n 'end-at': directives.unchanged_required,\n 'prepend': directives.unchanged_required,\n 'append': directives.unchanged_required,\n 'emphasize-lines': directives.unchanged_required,\n 'caption': directives.unchanged,\n 'class': directives.class_option,\n 'name': directives.unchanged,\n 'diff': directives.unchanged_required,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralInclude.run_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralInclude.run_", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 399, "end_line": 462, "span_ids": ["LiteralInclude.run", "setup"], "tokens": 642}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralInclude(SphinxDirective):\n\n def run(self) -> List[Node]:\n document = self.state.document\n if not document.settings.file_insertion_enabled:\n return [document.reporter.warning('File insertion disabled',\n line=self.lineno)]\n # convert options['diff'] to absolute path\n if 'diff' in self.options:\n _, path = self.env.relfn2path(self.options['diff'])\n self.options['diff'] = path\n\n try:\n location = self.state_machine.get_source_and_line(self.lineno)\n rel_filename, filename = self.env.relfn2path(self.arguments[0])\n self.env.note_dependency(rel_filename)\n\n reader = LiteralIncludeReader(filename, self.options, self.config)\n text, lines = reader.read(location=location)\n\n retnode: Element = nodes.literal_block(text, text, source=filename)\n retnode['force'] = 'force' in self.options\n self.set_source_info(retnode)\n if self.options.get('diff'): # if diff is set, set udiff\n retnode['language'] = 'udiff'\n elif 'language' in self.options:\n retnode['language'] = self.options['language']\n if ('linenos' in self.options or 'lineno-start' in self.options or\n 'lineno-match' in self.options):\n retnode['linenos'] = True\n retnode['classes'] += self.options.get('class', [])\n extra_args = retnode['highlight_args'] = {}\n if 'emphasize-lines' in self.options:\n hl_lines = parselinenos(self.options['emphasize-lines'], lines)\n if any(i >= lines for i in hl_lines):\n logger.warning(__('line number spec is out of range(1-%d): %r') %\n (lines, self.options['emphasize-lines']),\n location=location)\n extra_args['hl_lines'] = [x + 1 for x in hl_lines if x < lines]\n extra_args['linenostart'] = reader.lineno_start\n\n if 'caption' in self.options:\n caption = self.options['caption'] or self.arguments[0]\n retnode = container_wrapper(self, retnode, caption)\n\n # retnode will be note_implicit_target that is linked from caption and numref.\n # when options['name'] is provided, it should be primary ID.\n self.add_name(retnode)\n\n return [retnode]\n except Exception as exc:\n return [document.reporter.warning(exc, line=self.lineno)]\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n directives.register_directive('highlight', Highlight)\n directives.register_directive('code-block', CodeBlock)\n directives.register_directive('sourcecode', CodeBlock)\n directives.register_directive('literalinclude', LiteralInclude)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_re_int_or_nothing.return.int_argument_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_re_int_or_nothing.return.int_argument_", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["impl", "impl:2", "imports", "imports:17", "int_or_nothing"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import re\nfrom typing import TYPE_CHECKING, Any, Dict, List, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\nfrom docutils.parsers.rst import directives\nfrom docutils.parsers.rst.directives.admonitions import BaseAdmonition\nfrom docutils.parsers.rst.directives.misc import Class\nfrom docutils.parsers.rst.directives.misc import Include as BaseInclude\n\nfrom sphinx import addnodes\nfrom sphinx.domains.changeset import VersionChange # NOQA # for compatibility\nfrom sphinx.locale import _, __\nfrom sphinx.util import docname_join, logging, url_re\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.matching import Matcher, patfilter\nfrom sphinx.util.nodes import explicit_title_re\nfrom sphinx.util.typing import OptionSpec\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nglob_re = re.compile(r'.*[*?\\[].*')\nlogger = logging.getLogger(__name__)\n\n\ndef int_or_nothing(argument: str) -> int:\n if not argument:\n return 999\n return int(argument)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_TocTree_TocTree.option_spec._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_TocTree_TocTree.option_spec._", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 62, "span_ids": ["TocTree"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree(SphinxDirective):\n \"\"\"\n Directive to notify Sphinx about the hierarchical structure of the docs,\n and to include a table-of-contents like tree in the current document.\n \"\"\"\n has_content = True\n required_arguments = 0\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec = {\n 'maxdepth': int,\n 'name': directives.unchanged,\n 'caption': directives.unchanged_required,\n 'glob': directives.flag,\n 'hidden': directives.flag,\n 'includehidden': directives.flag,\n 'numbered': int_or_nothing,\n 'titlesonly': directives.flag,\n 'reversed': directives.flag,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_TocTree.run_TocTree.run.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_TocTree.run_TocTree.run.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 64, "end_line": 86, "span_ids": ["TocTree.run"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree(SphinxDirective):\n\n def run(self) -> List[Node]:\n subnode = addnodes.toctree()\n subnode['parent'] = self.env.docname\n\n # (title, ref) pairs, where ref may be a document, or an external link,\n # and title may be None if the document's title is to be used\n subnode['entries'] = []\n subnode['includefiles'] = []\n subnode['maxdepth'] = self.options.get('maxdepth', -1)\n subnode['caption'] = self.options.get('caption')\n subnode['glob'] = 'glob' in self.options\n subnode['hidden'] = 'hidden' in self.options\n subnode['includehidden'] = 'includehidden' in self.options\n subnode['numbered'] = self.options.get('numbered', 0)\n subnode['titlesonly'] = 'titlesonly' in self.options\n self.set_source_info(subnode)\n wrappernode = nodes.compound(classes=['toctree-wrapper'])\n wrappernode.append(subnode)\n self.add_name(wrappernode)\n\n ret = self.parse_content(subnode)\n ret.append(wrappernode)\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_TocTree.parse_content_TocTree.parse_content.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_TocTree.parse_content_TocTree.parse_content.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 147, "span_ids": ["TocTree.parse_content"], "tokens": 645}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree(SphinxDirective):\n\n def parse_content(self, toctree: addnodes.toctree) -> List[Node]:\n suffixes = self.config.source_suffix\n\n # glob target documents\n all_docnames = self.env.found_docs.copy()\n all_docnames.remove(self.env.docname) # remove current document\n\n ret: List[Node] = []\n excluded = Matcher(self.config.exclude_patterns)\n for entry in self.content:\n if not entry:\n continue\n # look for explicit titles (\"Some Title <document>\")\n explicit = explicit_title_re.match(entry)\n if (toctree['glob'] and glob_re.match(entry) and\n not explicit and not url_re.match(entry)):\n patname = docname_join(self.env.docname, entry)\n docnames = sorted(patfilter(all_docnames, patname))\n for docname in docnames:\n all_docnames.remove(docname) # don't include it again\n toctree['entries'].append((None, docname))\n toctree['includefiles'].append(docname)\n if not docnames:\n logger.warning(__('toctree glob pattern %r didn\\'t match any documents'),\n entry, location=toctree)\n else:\n if explicit:\n ref = explicit.group(2)\n title = explicit.group(1)\n docname = ref\n else:\n ref = docname = entry\n title = None\n # remove suffixes (backwards compatibility)\n for suffix in suffixes:\n if docname.endswith(suffix):\n docname = docname[:-len(suffix)]\n break\n # absolutize filenames\n docname = docname_join(self.env.docname, docname)\n if url_re.match(ref) or ref == 'self':\n toctree['entries'].append((title, ref))\n elif docname not in self.env.found_docs:\n if excluded(self.env.doc2path(docname, None)):\n message = __('toctree contains reference to excluded document %r')\n subtype = 'excluded'\n else:\n message = __('toctree contains reference to nonexisting document %r')\n subtype = 'not_readable'\n\n logger.warning(message, docname, type='toc', subtype=subtype,\n location=toctree)\n self.env.note_reread()\n else:\n if docname in all_docnames:\n all_docnames.remove(docname)\n else:\n logger.warning(__('duplicated entry found in toctree: %s'), docname,\n location=toctree)\n\n toctree['entries'].append((title, docname))\n toctree['includefiles'].append(docname)\n\n # entries contains all entries (self references, external links etc.)\n if 'reversed' in self.options:\n toctree['entries'] = list(reversed(toctree['entries']))\n toctree['includefiles'] = list(reversed(toctree['includefiles']))\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Author_Author.run.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Author_Author.run.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 150, "end_line": 181, "span_ids": ["Author", "Author.run"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Author(SphinxDirective):\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n if not self.config.show_authors:\n return []\n para: Element = nodes.paragraph(translatable=False)\n emph = nodes.emphasis()\n para += emph\n if self.name == 'sectionauthor':\n text = _('Section author: ')\n elif self.name == 'moduleauthor':\n text = _('Module author: ')\n elif self.name == 'codeauthor':\n text = _('Code author: ')\n else:\n text = _('Author: ')\n emph += nodes.Text(text, text)\n inodes, messages = self.state.inline_text(self.arguments[0], self.lineno)\n emph.extend(inodes)\n\n ret: List[Node] = [para]\n ret += messages\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_SeeAlso_TabularColumns.run.return._node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_SeeAlso_TabularColumns.run.return._node_", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 184, "end_line": 205, "span_ids": ["SeeAlso", "TabularColumns.run", "TabularColumns"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SeeAlso(BaseAdmonition):\n \"\"\"\n An admonition mentioning things to look at as reference.\n \"\"\"\n node_class = addnodes.seealso\n\n\nclass TabularColumns(SphinxDirective):\n \"\"\"\n Directive to give an explicit tabulary column definition to LaTeX.\n \"\"\"\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n node = addnodes.tabular_col_spec()\n node['spec'] = self.arguments[0]\n self.set_source_info(node)\n return [node]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Centered_Centered.run.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Centered_Centered.run.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 208, "end_line": 227, "span_ids": ["Centered", "Centered.run"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Centered(SphinxDirective):\n \"\"\"\n Directive to create a centered line of bold text.\n \"\"\"\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n if not self.arguments:\n return []\n subnode: Element = addnodes.centered()\n inodes, messages = self.state.inline_text(self.arguments[0], self.lineno)\n subnode.extend(inodes)\n\n ret: List[Node] = [subnode]\n ret += messages\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Acks_Acks.run.return._node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Acks_Acks.run.return._node_", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 230, "end_line": 249, "span_ids": ["Acks.run", "Acks"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Acks(SphinxDirective):\n \"\"\"\n Directive for a list of names.\n \"\"\"\n has_content = True\n required_arguments = 0\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n node = addnodes.acks()\n node.document = self.state.document\n self.state.nested_parse(self.content, self.content_offset, node)\n if len(node.children) != 1 or not isinstance(node.children[0],\n nodes.bullet_list):\n logger.warning(__('.. acks content is not a list'),\n location=(self.env.docname, self.lineno))\n return []\n return [node]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_HList_HList.run.return._newnode_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_HList_HList.run.return._newnode_", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 252, "end_line": 286, "span_ids": ["HList", "HList.run"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HList(SphinxDirective):\n \"\"\"\n Directive for a list that gets compacted horizontally.\n \"\"\"\n has_content = True\n required_arguments = 0\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec: OptionSpec = {\n 'columns': int,\n }\n\n def run(self) -> List[Node]:\n ncolumns = self.options.get('columns', 2)\n node = nodes.paragraph()\n node.document = self.state.document\n self.state.nested_parse(self.content, self.content_offset, node)\n if len(node.children) != 1 or not isinstance(node.children[0],\n nodes.bullet_list):\n logger.warning(__('.. hlist content is not a list'),\n location=(self.env.docname, self.lineno))\n return []\n fulllist = node.children[0]\n # create a hlist node where the items are distributed\n npercol, nmore = divmod(len(fulllist), ncolumns)\n index = 0\n newnode = addnodes.hlist()\n newnode['ncolumns'] = str(ncolumns)\n for column in range(ncolumns):\n endindex = index + ((npercol + 1) if column < nmore else npercol)\n bullet_list = nodes.bullet_list()\n bullet_list += fulllist.children[index:endindex]\n newnode += addnodes.hlistcol('', bullet_list)\n index = endindex\n return [newnode]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Only_Only.run.try_.finally_.memo.section_level.surrounding_section_level": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Only_Only.run.try_.finally_.memo.section_level.surrounding_section_level", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 289, "end_line": 344, "span_ids": ["Only.run", "Only"], "tokens": 449}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Only(SphinxDirective):\n \"\"\"\n Directive to only include text if the given tag(s) are enabled.\n \"\"\"\n has_content = True\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n node = addnodes.only()\n node.document = self.state.document\n self.set_source_info(node)\n node['expr'] = self.arguments[0]\n\n # Same as util.nested_parse_with_titles but try to handle nested\n # sections which should be raised higher up the doctree.\n memo: Any = self.state.memo\n surrounding_title_styles = memo.title_styles\n surrounding_section_level = memo.section_level\n memo.title_styles = []\n memo.section_level = 0\n try:\n self.state.nested_parse(self.content, self.content_offset,\n node, match_titles=True)\n title_styles = memo.title_styles\n if (not surrounding_title_styles or\n not title_styles or\n title_styles[0] not in surrounding_title_styles or\n not self.state.parent):\n # No nested sections so no special handling needed.\n return [node]\n # Calculate the depths of the current and nested sections.\n current_depth = 0\n parent = self.state.parent\n while parent:\n current_depth += 1\n parent = parent.parent\n current_depth -= 2\n title_style = title_styles[0]\n nested_depth = len(surrounding_title_styles)\n if title_style in surrounding_title_styles:\n nested_depth = surrounding_title_styles.index(title_style)\n # Use these depths to determine where the nested sections should\n # be placed in the doctree.\n n_sects_to_raise = current_depth - nested_depth + 1\n parent = cast(nodes.Element, self.state.parent)\n for _i in range(n_sects_to_raise):\n if parent.parent:\n parent = parent.parent\n parent.append(node)\n return []\n finally:\n memo.title_styles = surrounding_title_styles\n memo.section_level = surrounding_section_level", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 374, "end_line": 398, "span_ids": ["setup"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: \"Sphinx\") -> Dict[str, Any]:\n directives.register_directive('toctree', TocTree)\n directives.register_directive('sectionauthor', Author)\n directives.register_directive('moduleauthor', Author)\n directives.register_directive('codeauthor', Author)\n directives.register_directive('seealso', SeeAlso)\n directives.register_directive('tabularcolumns', TabularColumns)\n directives.register_directive('centered', Centered)\n directives.register_directive('acks', Acks)\n directives.register_directive('hlist', HList)\n directives.register_directive('only', Only)\n directives.register_directive('include', Include)\n\n # register the standard rst class directive under a different name\n # only for backwards compatibility now\n directives.register_directive('cssclass', Class)\n # new standard name when default-domain with \"class\" is in effect\n directives.register_directive('rst-class', Class)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_Figure_Figure.run.return._figure_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_Figure_Figure.run.return._figure_node_", "embedding": null, "metadata": {"file_path": "sphinx/directives/patches.py", "file_name": "patches.py", "file_type": "text/x-python", "category": "implementation", "start_line": 28, "end_line": 51, "span_ids": ["Figure.run", "Figure"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Figure(images.Figure):\n \"\"\"The figure directive which applies `:name:` option to the figure node\n instead of the image node.\n \"\"\"\n\n def run(self) -> List[Node]:\n name = self.options.pop('name', None)\n result = super().run()\n if len(result) == 2 or isinstance(result[0], nodes.system_message):\n return result\n\n assert len(result) == 1\n figure_node = cast(nodes.figure, result[0])\n if name:\n # set ``name`` to figure_node if given\n self.options['name'] = name\n self.add_name(figure_node)\n\n # copy lineno from image node\n if figure_node.line is None and len(figure_node) == 2:\n caption = cast(nodes.caption, figure_node[1])\n figure_node.line = caption.line\n\n return [figure_node]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_Meta_Meta.run.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_Meta_Meta.run.return.result", "embedding": null, "metadata": {"file_path": "sphinx/directives/patches.py", "file_name": "patches.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 78, "span_ids": ["Meta.run", "Meta"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Meta(MetaBase, SphinxDirective):\n def run(self) -> Sequence[Node]:\n result = super().run()\n for node in result:\n # for docutils-0.17 or older. Since docutils-0.18, patching is no longer needed\n # because it uses picklable node; ``docutils.nodes.meta``.\n if (isinstance(node, nodes.pending) and\n isinstance(node.details['nodes'][0], addnodes.docutils_meta)):\n meta = node.details['nodes'][0]\n meta.source = self.env.doc2path(self.env.docname)\n meta.line = self.lineno\n meta.rawcontent = meta['content']\n\n # docutils' meta nodes aren't picklable because the class is nested\n meta.__class__ = addnodes.meta\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_Code_Code.run.return._node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_Code_Code.run.return._node_", "embedding": null, "metadata": {"file_path": "sphinx/directives/patches.py", "file_name": "patches.py", "file_type": "text/x-python", "category": "implementation", "start_line": 139, "end_line": 182, "span_ids": ["Code.run", "Code"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Code(SphinxDirective):\n \"\"\"Parse and mark up content of a code block.\n\n This is compatible with docutils' :rst:dir:`code` directive.\n \"\"\"\n optional_arguments = 1\n option_spec: OptionSpec = {\n 'class': directives.class_option,\n 'force': directives.flag,\n 'name': directives.unchanged,\n 'number-lines': optional_int,\n }\n has_content = True\n\n def run(self) -> List[Node]:\n self.assert_has_content()\n\n set_classes(self.options)\n code = '\\n'.join(self.content)\n node = nodes.literal_block(code, code,\n classes=self.options.get('classes', []),\n force='force' in self.options,\n highlight_args={})\n self.add_name(node)\n set_source_info(self, node)\n\n if self.arguments:\n # highlight language specified\n node['language'] = self.arguments[0]\n else:\n # no highlight language specified. Then this directive refers the current\n # highlight setting via ``highlight`` directive or ``highlight_language``\n # configuration.\n node['language'] = self.env.temp_data.get('highlight_language',\n self.config.highlight_language)\n\n if 'number-lines' in self.options:\n node['linenos'] = True\n\n # if number given, treat as lineno-start.\n if self.options['number-lines']:\n node['highlight_args']['linenostart'] = self.options['number-lines']\n\n return [node]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_MathDirective_MathDirective.run.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_MathDirective_MathDirective.run.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/directives/patches.py", "file_name": "patches.py", "file_type": "text/x-python", "category": "implementation", "start_line": 185, "end_line": 213, "span_ids": ["MathDirective", "MathDirective.run"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MathDirective(SphinxDirective):\n has_content = True\n required_arguments = 0\n optional_arguments = 1\n final_argument_whitespace = True\n option_spec: OptionSpec = {\n 'label': directives.unchanged,\n 'name': directives.unchanged,\n 'class': directives.class_option,\n 'nowrap': directives.flag,\n }\n\n def run(self) -> List[Node]:\n latex = '\\n'.join(self.content)\n if self.arguments and self.arguments[0]:\n latex = self.arguments[0] + '\\n\\n' + latex\n label = self.options.get('label', self.options.get('name'))\n node = nodes.math_block(latex, latex,\n classes=self.options.get('class', []),\n docname=self.env.docname,\n number=None,\n label=label,\n nowrap='nowrap' in self.options)\n self.add_name(node)\n self.set_source_info(node)\n\n ret: List[Node] = [node]\n self.add_target(ret)\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Index_Index.__init__.self.domain.domain": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Index_Index.__init__.self.domain.domain", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 63, "end_line": 94, "span_ids": ["Index"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Index(ABC):\n \"\"\"\n An Index is the description for a domain-specific index. To add an index to\n a domain, subclass Index, overriding the three name attributes:\n\n * `name` is an identifier used for generating file names.\n It is also used for a hyperlink target for the index. Therefore, users can\n refer the index page using ``ref`` role and a string which is combined\n domain name and ``name`` attribute (ex. ``:ref:`py-modindex```).\n * `localname` is the section title for the index.\n * `shortname` is a short name for the index, for use in the relation bar in\n HTML output. Can be empty to disable entries in the relation bar.\n\n and providing a :meth:`generate()` method. Then, add the index class to\n your domain's `indices` list. Extensions can add indices to existing\n domains using :meth:`~sphinx.application.Sphinx.add_index_to_domain()`.\n\n .. versionchanged:: 3.0\n\n Index pages can be referred by domain name and index name via\n :rst:role:`ref` role.\n \"\"\"\n\n name: str = None\n localname: str = None\n shortname: str = None\n\n def __init__(self, domain: \"Domain\") -> None:\n if self.name is None or self.localname is None:\n raise SphinxError('Index subclass %s has no valid name or localname'\n % self.__class__.__name__)\n self.domain = domain", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Index.generate_Index.generate.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Index.generate_Index.generate.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 96, "end_line": 148, "span_ids": ["Index.generate"], "tokens": 347}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Index(ABC):\n\n @abstractmethod\n def generate(self, docnames: Iterable[str] = None\n ) -> Tuple[List[Tuple[str, List[IndexEntry]]], bool]:\n \"\"\"Get entries for the index.\n\n If ``docnames`` is given, restrict to entries referring to these\n docnames.\n\n The return value is a tuple of ``(content, collapse)``:\n\n ``collapse``\n A boolean that determines if sub-entries should start collapsed (for\n output formats that support collapsing sub-entries).\n\n ``content``:\n A sequence of ``(letter, entries)`` tuples, where ``letter`` is the\n \"heading\" for the given ``entries``, usually the starting letter, and\n ``entries`` is a sequence of single entries. Each entry is a sequence\n ``[name, subtype, docname, anchor, extra, qualifier, descr]``. The\n items in this sequence have the following meaning:\n\n ``name``\n The name of the index entry to be displayed.\n\n ``subtype``\n The sub-entry related type. One of:\n\n ``0``\n A normal entry.\n ``1``\n An entry with sub-entries.\n ``2``\n A sub-entry.\n\n ``docname``\n *docname* where the entry is located.\n\n ``anchor``\n Anchor for the entry within ``docname``\n\n ``extra``\n Extra info for the entry.\n\n ``qualifier``\n Qualifier for the description.\n\n ``descr``\n Description for the entry.\n\n Qualifier and description are not rendered for some output formats such\n as LaTeX.\n \"\"\"\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain_Domain.data_version.0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain_Domain.data_version.0", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 151, "end_line": 196, "span_ids": ["Domain"], "tokens": 496}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Domain:\n \"\"\"\n A Domain is meant to be a group of \"object\" description directives for\n objects of a similar nature, and corresponding roles to create references to\n them. Examples would be Python modules, classes, functions etc., elements\n of a templating language, Sphinx roles and directives, etc.\n\n Each domain has a separate storage for information about existing objects\n and how to reference them in `self.data`, which must be a dictionary. It\n also must implement several functions that expose the object information in\n a uniform way to parts of Sphinx that allow the user to reference or search\n for objects in a domain-agnostic way.\n\n About `self.data`: since all object and cross-referencing information is\n stored on a BuildEnvironment instance, the `domain.data` object is also\n stored in the `env.domaindata` dict under the key `domain.name`. Before the\n build process starts, every active domain is instantiated and given the\n environment object; the `domaindata` dict must then either be nonexistent or\n a dictionary whose 'version' key is equal to the domain class'\n :attr:`data_version` attribute. Otherwise, `OSError` is raised and the\n pickled environment is discarded.\n \"\"\"\n\n #: domain name: should be short, but unique\n name = ''\n #: domain label: longer, more descriptive (used in messages)\n label = ''\n #: type (usually directive) name -> ObjType instance\n object_types: Dict[str, ObjType] = {}\n #: directive name -> directive class\n directives: Dict[str, Any] = {}\n #: role name -> role callable\n roles: Dict[str, Union[RoleFunction, XRefRole]] = {}\n #: a list of Index subclasses\n indices: List[Type[Index]] = []\n #: role name -> a warning message if reference is missing\n dangling_warnings: Dict[str, str] = {}\n #: node_class -> (enum_node_type, title_getter)\n enumerable_nodes: Dict[Type[Node], Tuple[str, Callable]] = {}\n\n #: data value for a fresh environment\n initial_data: Dict = {}\n #: data value\n data: Dict\n #: data version, bump this when the format of `self.data` changes\n data_version = 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.__init___Domain.add_object_type.for_role_in_objtype_roles.self__role2type_setdefaul": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.__init___Domain.add_object_type.for_role_in_objtype_roles.self__role2type_setdefaul", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 198, "end_line": 247, "span_ids": ["Domain.setup", "Domain.add_object_type", "Domain"], "tokens": 524}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Domain:\n\n def __init__(self, env: \"BuildEnvironment\") -> None:\n self.env: BuildEnvironment = env\n self._role_cache: Dict[str, Callable] = {}\n self._directive_cache: Dict[str, Callable] = {}\n self._role2type: Dict[str, List[str]] = {}\n self._type2role: Dict[str, str] = {}\n\n # convert class variables to instance one (to enhance through API)\n self.object_types = dict(self.object_types)\n self.directives = dict(self.directives)\n self.roles = dict(self.roles)\n self.indices = list(self.indices)\n\n if self.name not in env.domaindata:\n assert isinstance(self.initial_data, dict)\n new_data = copy.deepcopy(self.initial_data)\n new_data['version'] = self.data_version\n self.data = env.domaindata[self.name] = new_data\n else:\n self.data = env.domaindata[self.name]\n if self.data['version'] != self.data_version:\n raise OSError('data of %r domain out of date' % self.label)\n for name, obj in self.object_types.items():\n for rolename in obj.roles:\n self._role2type.setdefault(rolename, []).append(name)\n self._type2role[name] = obj.roles[0] if obj.roles else ''\n self.objtypes_for_role: Callable[[str], List[str]] = self._role2type.get\n self.role_for_objtype: Callable[[str], str] = self._type2role.get\n\n def setup(self) -> None:\n \"\"\"Set up domain object.\"\"\"\n from sphinx.domains.std import StandardDomain\n\n # Add special hyperlink target for index pages (ex. py-modindex)\n std = cast(StandardDomain, self.env.get_domain('std'))\n for index in self.indices:\n if index.name and index.localname:\n docname = \"%s-%s\" % (self.name, index.name)\n std.note_hyperlink_target(docname, docname, '', index.localname)\n\n def add_object_type(self, name: str, objtype: ObjType) -> None:\n \"\"\"Add an object type.\"\"\"\n self.object_types[name] = objtype\n if objtype.roles:\n self._type2role[name] = objtype.roles[0]\n else:\n self._type2role[name] = ''\n\n for role in objtype.roles:\n self._role2type.setdefault(role, []).append(name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.role_Domain.role.return.role_adapter": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.role_Domain.role.return.role_adapter", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 249, "end_line": 265, "span_ids": ["Domain.role"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Domain:\n\n def role(self, name: str) -> Optional[RoleFunction]:\n \"\"\"Return a role adapter function that always gives the registered\n role its full name ('domain:name') as the first argument.\n \"\"\"\n if name in self._role_cache:\n return self._role_cache[name]\n if name not in self.roles:\n return None\n fullname = '%s:%s' % (self.name, name)\n\n def role_adapter(typ: str, rawtext: str, text: str, lineno: int,\n inliner: Inliner, options: Dict = {}, content: List[str] = []\n ) -> Tuple[List[Node], List[system_message]]:\n return self.roles[name](fullname, rawtext, text, lineno,\n inliner, options, content)\n self._role_cache[name] = role_adapter\n return role_adapter", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.directive_Domain.directive.return.DirectiveAdapter": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.directive_Domain.directive.return.DirectiveAdapter", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 267, "end_line": 283, "span_ids": ["Domain.directive.DirectiveAdapter:2", "Domain.directive", "Domain.directive.DirectiveAdapter"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Domain:\n\n def directive(self, name: str) -> Optional[Callable]:\n \"\"\"Return a directive adapter class that always gives the registered\n directive its full name ('domain:name') as ``self.name``.\n \"\"\"\n if name in self._directive_cache:\n return self._directive_cache[name]\n if name not in self.directives:\n return None\n fullname = '%s:%s' % (self.name, name)\n BaseDirective = self.directives[name]\n\n class DirectiveAdapter(BaseDirective): # type: ignore\n def run(self) -> List[Node]:\n self.name = fullname\n return super().run()\n self._directive_cache[name] = DirectiveAdapter\n return DirectiveAdapter", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain._methods_that_should_be__Domain.process_field_xref.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain._methods_that_should_be__Domain.process_field_xref.pass", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 289, "end_line": 316, "span_ids": ["Domain.clear_doc", "Domain.process_doc", "Domain.merge_domaindata", "Domain.process_field_xref", "Domain.directive.DirectiveAdapter:2", "Domain.check_consistency"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Domain:\n\n # methods that should be overwritten\n\n def clear_doc(self, docname: str) -> None:\n \"\"\"Remove traces of a document in the domain-specific inventories.\"\"\"\n pass\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:\n \"\"\"Merge in data regarding *docnames* from a different domaindata\n inventory (coming from a subprocess in parallel builds).\n \"\"\"\n raise NotImplementedError('merge_domaindata must be implemented in %s '\n 'to be able to do parallel builds!' %\n self.__class__)\n\n def process_doc(self, env: \"BuildEnvironment\", docname: str,\n document: nodes.document) -> None:\n \"\"\"Process a document after it is read by the environment.\"\"\"\n pass\n\n def check_consistency(self) -> None:\n \"\"\"Do consistency checks (**experimental**).\"\"\"\n pass\n\n def process_field_xref(self, pnode: pending_xref) -> None:\n \"\"\"Process a pending xref created in a doc field.\n For example, attach information about the current scope.\n \"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.resolve_xref_Domain.resolve_xref.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.resolve_xref_Domain.resolve_xref.pass", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 314, "end_line": 330, "span_ids": ["Domain.resolve_xref"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Domain:\n\n def resolve_xref(self, env: \"BuildEnvironment\", fromdocname: str, builder: \"Builder\",\n typ: str, target: str, node: pending_xref, contnode: Element\n ) -> Optional[Element]:\n \"\"\"Resolve the pending_xref *node* with the given *typ* and *target*.\n\n This method should return a new node, to replace the xref node,\n containing the *contnode* which is the markup content of the\n cross-reference.\n\n If no resolution can be found, None can be returned; the xref node will\n then given to the :event:`missing-reference` event, and if that yields no\n resolution, replaced by *contnode*.\n\n The method can also raise :exc:`sphinx.environment.NoUri` to suppress\n the :event:`missing-reference` event being emitted.\n \"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.resolve_any_xref_Domain.resolve_any_xref.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.resolve_any_xref_Domain.resolve_any_xref.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 336, "end_line": 352, "span_ids": ["Domain.resolve_any_xref"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Domain:\n\n def resolve_any_xref(self, env: \"BuildEnvironment\", fromdocname: str, builder: \"Builder\",\n target: str, node: pending_xref, contnode: Element\n ) -> List[Tuple[str, Element]]:\n \"\"\"Resolve the pending_xref *node* with the given *target*.\n\n The reference comes from an \"any\" or similar role, which means that we\n don't know the type. Otherwise, the arguments are the same as for\n :meth:`resolve_xref`.\n\n The method must return a list (potentially empty) of tuples\n ``('domain:role', newnode)``, where ``'domain:role'`` is the name of a\n role that could have created the same reference, e.g. ``'py:func'``.\n ``newnode`` is what :meth:`resolve_xref` would return.\n\n .. versionadded:: 1.3\n \"\"\"\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.get_objects_Domain.get_objects.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.get_objects_Domain.get_objects.return._", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 354, "end_line": 387, "span_ids": ["Domain.get_objects"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Domain:\n\n def get_objects(self) -> Iterable[Tuple[str, str, str, str, str, int]]:\n \"\"\"Return an iterable of \"object descriptions\".\n\n Object descriptions are tuples with six items:\n\n ``name``\n Fully qualified name.\n\n ``dispname``\n Name to display when searching/linking.\n\n ``type``\n Object type, a key in ``self.object_types``.\n\n ``docname``\n The document where it is to be found.\n\n ``anchor``\n The anchor name for the object.\n\n ``priority``\n How \"important\" the object is (determines placement in search\n results). One of:\n\n ``1``\n Default priority (placed before full-text matches).\n ``0``\n Object is important (placed before default-priority objects).\n ``2``\n Object is unimportant (placed after full-text matches).\n ``-1``\n Object should not show up in search at all.\n \"\"\"\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.get_type_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_Domain.get_type_name_", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 385, "end_line": 399, "span_ids": ["Domain.get_type_name", "Domain.get_enumerable_node_type", "Domain.get_full_qualified_name"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Domain:\n\n def get_type_name(self, type: ObjType, primary: bool = False) -> str:\n \"\"\"Return full name for given ObjType.\"\"\"\n if primary:\n return type.lname\n return _('%s %s') % (self.label, type.lname)\n\n def get_enumerable_node_type(self, node: Node) -> Optional[str]:\n \"\"\"Get type of enumerable nodes (experimental).\"\"\"\n enum_node_type, _ = self.enumerable_nodes.get(node.__class__, (None, None))\n return enum_node_type\n\n def get_full_qualified_name(self, node: Element) -> Optional[str]:\n \"\"\"Return full qualified name for given node.\"\"\"\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTNestedName_ASTNestedName._stringify.if_self_rooted_.else_.return.res": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTNestedName_ASTNestedName._stringify.if_self_rooted_.else_.return.res", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 151, "end_line": 169, "span_ids": ["ASTNestedName._stringify", "ASTNestedName.get_id", "ASTNestedName.name", "ASTNestedName"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTNestedName(ASTBase):\n def __init__(self, names: List[ASTIdentifier], rooted: bool) -> None:\n assert len(names) > 0\n self.names = names\n self.rooted = rooted\n\n @property\n def name(self) -> \"ASTNestedName\":\n return self\n\n def get_id(self, version: int) -> str:\n return '.'.join(str(n) for n in self.names)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = '.'.join(transform(n) for n in self.names)\n if self.rooted:\n return '.' + res\n else:\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTNestedName.describe_signature_ASTNestedName.describe_signature.if_mode_noneIsName_.else_.raise_Exception_Unknown_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTNestedName.describe_signature_ASTNestedName.describe_signature.if_mode_noneIsName_.else_.raise_Exception_Unknown_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 194, "end_line": 248, "span_ids": ["ASTNestedName.describe_signature"], "tokens": 562}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTNestedName(ASTBase):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n # just print the name part, with template args, not template params\n if mode == 'noneIsName':\n if self.rooted:\n assert False, \"Can this happen?\" # TODO\n signode += nodes.Text('.')\n for i in range(len(self.names)):\n if i != 0:\n assert False, \"Can this happen?\" # TODO\n signode += nodes.Text('.')\n n = self.names[i]\n n.describe_signature(signode, mode, env, '', symbol)\n elif mode == 'param':\n assert not self.rooted, str(self)\n assert len(self.names) == 1\n self.names[0].describe_signature(signode, 'noneIsName', env, '', symbol)\n elif mode in ('markType', 'lastIsName', 'markName'):\n # Each element should be a pending xref targeting the complete\n # prefix.\n prefix = ''\n first = True\n names = self.names[:-1] if mode == 'lastIsName' else self.names\n # If lastIsName, then wrap all of the prefix in a desc_addname,\n # else append directly to signode.\n # TODO: also for C?\n # NOTE: Breathe previously relied on the prefix being in the desc_addname node,\n # so it can remove it in inner declarations.\n dest = signode\n if mode == 'lastIsName':\n dest = addnodes.desc_addname()\n if self.rooted:\n prefix += '.'\n if mode == 'lastIsName' and len(names) == 0:\n signode += addnodes.desc_sig_punctuation('.', '.')\n else:\n dest += addnodes.desc_sig_punctuation('.', '.')\n for i in range(len(names)):\n ident = names[i]\n if not first:\n dest += addnodes.desc_sig_punctuation('.', '.')\n prefix += '.'\n first = False\n txt_ident = str(ident)\n if txt_ident != '':\n ident.describe_signature(dest, 'markType', env, prefix, symbol)\n prefix += txt_ident\n if mode == 'lastIsName':\n if len(self.names) > 1:\n dest += addnodes.desc_sig_punctuation('.', '.')\n signode += dest\n self.names[-1].describe_signature(signode, mode, env, '', symbol)\n else:\n raise Exception('Unknown description mode: %s' % mode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTStringLiteral_ASTIdExpression.describe_signature.self_name_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTStringLiteral_ASTIdExpression.describe_signature.self_name_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 317, "end_line": 343, "span_ids": ["ASTStringLiteral", "ASTIdExpression._stringify", "ASTIdExpression", "ASTIdExpression.describe_signature", "ASTStringLiteral.describe_signature", "ASTIdExpression.get_id", "ASTStringLiteral._stringify"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTStringLiteral(ASTLiteral):\n def __init__(self, data: str) -> None:\n self.data = data\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return self.data\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n txt = str(self)\n signode += addnodes.desc_sig_literal_string(txt, txt)\n\n\nclass ASTIdExpression(ASTExpression):\n def __init__(self, name: ASTNestedName):\n # note: this class is basically to cast a nested name as an expression\n self.name = name\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.name)\n\n def get_id(self, version: int) -> str:\n return self.name.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.name.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Postfix_expressions_ASTPostfixCallExpr.describe_signature.self_lst_describe_signatu": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Postfix_expressions_ASTPostfixCallExpr.describe_signature.self_lst_describe_signatu", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 330, "end_line": 346, "span_ids": ["ASTParenExpr.describe_signature", "ASTPostfixCallExpr.describe_signature", "ASTPostfixCallExpr._stringify", "ASTPostfixCallExpr", "ASTPostfixOp"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Postfix expressions\n################################################################################\n\nclass ASTPostfixOp(ASTBase):\n pass\n\n\nclass ASTPostfixCallExpr(ASTPostfixOp):\n def __init__(self, lst: Union[\"ASTParenExprList\", \"ASTBracedInitList\"]) -> None:\n self.lst = lst\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.lst)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.lst.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixMemberOfPointer_ASTPostfixMemberOfPointer.describe_signature.self_name_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixMemberOfPointer_ASTPostfixMemberOfPointer.describe_signature.self_name_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 414, "end_line": 424, "span_ids": ["ASTPostfixMemberOfPointer", "ASTPostfixMemberOfPointer._stringify", "ASTPostfixMemberOfPointer.describe_signature"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTPostfixMemberOfPointer(ASTPostfixOp):\n def __init__(self, name):\n self.name = name\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return '->' + transform(self.name)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_operator('->', '->')\n self.name.describe_signature(signode, 'noneIsName', env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixExpr_ASTPostfixExpr.describe_signature.for_p_in_self_postFixes_.p_describe_signature_sign": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixExpr_ASTPostfixExpr.describe_signature.for_p_in_self_postFixes_.p_describe_signature_sign", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 407, "end_line": 422, "span_ids": ["ASTPostfixExpr", "ASTPostfixExpr._stringify", "ASTPostfixExpr.describe_signature"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTPostfixExpr(ASTExpression):\n def __init__(self, prefix: ASTExpression, postFixes: List[ASTPostfixOp]):\n self.prefix = prefix\n self.postFixes = postFixes\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = [transform(self.prefix)]\n for p in self.postFixes:\n res.append(transform(p))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.prefix.describe_signature(signode, mode, env, symbol)\n for p in self.postFixes:\n p.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Unary_expressions_ASTUnaryOpExpr.describe_signature.self_expr_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Unary_expressions_ASTUnaryOpExpr.describe_signature.self_expr_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 445, "end_line": 466, "span_ids": ["ASTUnaryOpExpr.describe_signature", "ASTUnaryOpExpr._stringify", "ASTUnaryOpExpr", "ASTPostfixExpr.describe_signature"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Unary expressions\n################################################################################\n\nclass ASTUnaryOpExpr(ASTExpression):\n def __init__(self, op: str, expr: ASTExpression):\n self.op = op\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.op[0] in 'cn':\n return self.op + \" \" + transform(self.expr)\n else:\n return self.op + transform(self.expr)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n if self.op[0] in 'cn':\n signode += addnodes.desc_sig_keyword(self.op, self.op)\n signode += addnodes.desc_sig_space()\n else:\n signode += addnodes.desc_sig_operator(self.op, self.op)\n self.expr.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTSizeofType_ASTSizeofType.describe_signature.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTSizeofType_ASTSizeofType.describe_signature.None_2", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 469, "end_line": 481, "span_ids": ["ASTSizeofType", "ASTSizeofType.describe_signature", "ASTSizeofType._stringify"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTSizeofType(ASTExpression):\n def __init__(self, typ):\n self.typ = typ\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return \"sizeof(\" + transform(self.typ) + \")\"\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('sizeof', 'sizeof')\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.typ.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTSizeofExpr_ASTSizeofExpr.describe_signature.self_expr_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTSizeofExpr_ASTSizeofExpr.describe_signature.self_expr_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 484, "end_line": 495, "span_ids": ["ASTSizeofExpr._stringify", "ASTSizeofExpr", "ASTSizeofExpr.describe_signature"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTSizeofExpr(ASTExpression):\n def __init__(self, expr: ASTExpression):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return \"sizeof \" + transform(self.expr)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('sizeof', 'sizeof')\n signode += addnodes.desc_sig_space()\n self.expr.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTAlignofExpr_ASTAlignofExpr.describe_signature.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTAlignofExpr_ASTAlignofExpr.describe_signature.None_2", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 498, "end_line": 510, "span_ids": ["ASTAlignofExpr", "ASTAlignofExpr._stringify", "ASTAlignofExpr.describe_signature"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTAlignofExpr(ASTExpression):\n def __init__(self, typ: \"ASTType\"):\n self.typ = typ\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return \"alignof(\" + transform(self.typ) + \")\"\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('alignof', 'alignof')\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.typ.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Other_expressions_ASTCastExpr.describe_signature.self_expr_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Other_expressions_ASTCastExpr.describe_signature.self_expr_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 513, "end_line": 533, "span_ids": ["ASTCastExpr._stringify", "ASTCastExpr.describe_signature", "ASTCastExpr", "ASTAlignofExpr.describe_signature"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Other expressions\n################################################################################\n\nclass ASTCastExpr(ASTExpression):\n def __init__(self, typ: \"ASTType\", expr: ASTExpression):\n self.typ = typ\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ['(']\n res.append(transform(self.typ))\n res.append(')')\n res.append(transform(self.expr))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.typ.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n self.expr.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTBinOpExpr_ASTBinOpExpr._stringify.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTBinOpExpr_ASTBinOpExpr._stringify.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 511, "end_line": 526, "span_ids": ["ASTBinOpExpr", "ASTBinOpExpr._stringify"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTBinOpExpr(ASTBase):\n def __init__(self, exprs: List[ASTExpression], ops: List[str]):\n assert len(exprs) > 0\n assert len(exprs) == len(ops) + 1\n self.exprs = exprs\n self.ops = ops\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.exprs[0]))\n for i in range(1, len(self.exprs)):\n res.append(' ')\n res.append(self.ops[i - 1])\n res.append(' ')\n res.append(transform(self.exprs[i]))\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTBinOpExpr.describe_signature_ASTBinOpExpr.describe_signature.for_i_in_range_1_len_sel.self_exprs_i_describe_si": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTBinOpExpr.describe_signature_ASTBinOpExpr.describe_signature.for_i_in_range_1_len_sel.self_exprs_i_describe_si", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 553, "end_line": 564, "span_ids": ["ASTBinOpExpr.describe_signature"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTBinOpExpr(ASTBase):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.exprs[0].describe_signature(signode, mode, env, symbol)\n for i in range(1, len(self.exprs)):\n signode += addnodes.desc_sig_space()\n op = self.ops[i - 1]\n if ord(op[0]) >= ord('a') and ord(op[0]) <= ord('z'):\n signode += addnodes.desc_sig_keyword(op, op)\n else:\n signode += addnodes.desc_sig_operator(op, op)\n signode += addnodes.desc_sig_space()\n self.exprs[i].describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTAssignmentExpr_ASTAssignmentExpr._stringify.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTAssignmentExpr_ASTAssignmentExpr._stringify.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 538, "end_line": 553, "span_ids": ["ASTAssignmentExpr._stringify", "ASTAssignmentExpr"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTAssignmentExpr(ASTExpression):\n def __init__(self, exprs: List[ASTExpression], ops: List[str]):\n assert len(exprs) > 0\n assert len(exprs) == len(ops) + 1\n self.exprs = exprs\n self.ops = ops\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.exprs[0]))\n for i in range(1, len(self.exprs)):\n res.append(' ')\n res.append(self.ops[i - 1])\n res.append(' ')\n res.append(transform(self.exprs[i]))\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTAssignmentExpr.describe_signature_ASTAssignmentExpr.describe_signature.for_i_in_range_1_len_sel.self_exprs_i_describe_si": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTAssignmentExpr.describe_signature_ASTAssignmentExpr.describe_signature.for_i_in_range_1_len_sel.self_exprs_i_describe_si", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 584, "end_line": 595, "span_ids": ["ASTAssignmentExpr.describe_signature"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTAssignmentExpr(ASTExpression):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.exprs[0].describe_signature(signode, mode, env, symbol)\n for i in range(1, len(self.exprs)):\n signode += addnodes.desc_sig_space()\n op = self.ops[i - 1]\n if ord(op[0]) >= ord('a') and ord(op[0]) <= ord('z'):\n signode += addnodes.desc_sig_keyword(op, op)\n else:\n signode += addnodes.desc_sig_operator(op, op)\n signode += addnodes.desc_sig_space()\n self.exprs[i].describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTTrailingTypeSpecName_ASTTrailingTypeSpecName.describe_signature.self_nestedName_describe_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTTrailingTypeSpecName_ASTTrailingTypeSpecName.describe_signature.self_nestedName_describe_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 640, "end_line": 662, "span_ids": ["ASTTrailingTypeSpecName.describe_signature", "ASTTrailingTypeSpecName.name", "ASTTrailingTypeSpecName", "ASTTrailingTypeSpecName._stringify"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTTrailingTypeSpecName(ASTTrailingTypeSpec):\n def __init__(self, prefix: str, nestedName: ASTNestedName) -> None:\n self.prefix = prefix\n self.nestedName = nestedName\n\n @property\n def name(self) -> ASTNestedName:\n return self.nestedName\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.prefix:\n res.append(self.prefix)\n res.append(' ')\n res.append(transform(self.nestedName))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n if self.prefix:\n signode += addnodes.desc_sig_keyword(self.prefix, self.prefix)\n signode += addnodes.desc_sig_space()\n self.nestedName.describe_signature(signode, mode, env, symbol=symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTFunctionParameter_ASTFunctionParameter.describe_signature.if_self_ellipsis_.else_.self_arg_describe_signatu": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTFunctionParameter_ASTFunctionParameter.describe_signature.if_self_ellipsis_.else_.self_arg_describe_signatu", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 665, "end_line": 686, "span_ids": ["ASTFunctionParameter.get_id", "ASTFunctionParameter", "ASTFunctionParameter.describe_signature", "ASTFunctionParameter._stringify"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTFunctionParameter(ASTBase):\n def __init__(self, arg: \"ASTTypeWithInit\", ellipsis: bool = False) -> None:\n self.arg = arg\n self.ellipsis = ellipsis\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n # the anchor will be our parent\n return symbol.parent.declaration.get_id(version, prefixed=False)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.ellipsis:\n return '...'\n else:\n return transform(self.arg)\n\n def describe_signature(self, signode: Any, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.ellipsis:\n signode += addnodes.desc_sig_punctuation('...', '...')\n else:\n self.arg.describe_signature(signode, mode, env, symbol=symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecsSimple_ASTDeclSpecsSimple._stringify.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecsSimple_ASTDeclSpecsSimple._stringify.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 740, "end_line": 777, "span_ids": ["ASTDeclSpecsSimple._stringify", "ASTDeclSpecsSimple.mergeWith", "ASTDeclSpecsSimple"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclSpecsSimple(ASTBaseBase):\n def __init__(self, storage: str, threadLocal: str, inline: bool,\n restrict: bool, volatile: bool, const: bool, attrs: List[Any]) -> None:\n self.storage = storage\n self.threadLocal = threadLocal\n self.inline = inline\n self.restrict = restrict\n self.volatile = volatile\n self.const = const\n self.attrs = attrs\n\n def mergeWith(self, other: \"ASTDeclSpecsSimple\") -> \"ASTDeclSpecsSimple\":\n if not other:\n return self\n return ASTDeclSpecsSimple(self.storage or other.storage,\n self.threadLocal or other.threadLocal,\n self.inline or other.inline,\n self.volatile or other.volatile,\n self.const or other.const,\n self.restrict or other.restrict,\n self.attrs + other.attrs)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res: List[str] = []\n res.extend(transform(attr) for attr in self.attrs)\n if self.storage:\n res.append(self.storage)\n if self.threadLocal:\n res.append(self.threadLocal)\n if self.inline:\n res.append('inline')\n if self.restrict:\n res.append('restrict')\n if self.volatile:\n res.append('volatile')\n if self.const:\n res.append('const')\n return ' '.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecsSimple.describe_signature_ASTDeclSpecsSimple.describe_signature.if_self_const_._add_modifiers_const_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecsSimple.describe_signature_ASTDeclSpecsSimple.describe_signature.if_self_const_._add_modifiers_const_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 779, "end_line": 800, "span_ids": ["ASTDeclSpecsSimple.describe_signature"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclSpecsSimple(ASTBaseBase):\n\n def describe_signature(self, modifiers: List[Node]) -> None:\n def _add(modifiers: List[Node], text: str) -> None:\n if len(modifiers) > 0:\n modifiers.append(addnodes.desc_sig_space())\n modifiers.append(addnodes.desc_sig_keyword(text, text))\n\n for attr in self.attrs:\n if len(modifiers) > 0:\n modifiers.append(addnodes.desc_sig_space())\n modifiers.append(attr.describe_signature(modifiers))\n if self.storage:\n _add(modifiers, self.storage)\n if self.threadLocal:\n _add(modifiers, self.threadLocal)\n if self.inline:\n _add(modifiers, 'inline')\n if self.restrict:\n _add(modifiers, 'restrict')\n if self.volatile:\n _add(modifiers, 'volatile')\n if self.const:\n _add(modifiers, 'const')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecs_ASTDeclSpecs.__init__.self.trailingTypeSpec.trailing": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecs_ASTDeclSpecs.__init__.self.trailingTypeSpec.trailing", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 742, "end_line": 753, "span_ids": ["ASTDeclSpecs"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclSpecs(ASTBase):\n def __init__(self, outer: str,\n leftSpecs: ASTDeclSpecsSimple,\n rightSpecs: ASTDeclSpecsSimple,\n trailing: ASTTrailingTypeSpec) -> None:\n # leftSpecs and rightSpecs are used for output\n # allSpecs are used for id generation TODO: remove?\n self.outer = outer\n self.leftSpecs = leftSpecs\n self.rightSpecs = rightSpecs\n self.allSpecs = self.leftSpecs.mergeWith(self.rightSpecs)\n self.trailingTypeSpec = trailing", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecs._stringify_ASTDeclSpecs._stringify.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecs._stringify_ASTDeclSpecs._stringify.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 816, "end_line": 830, "span_ids": ["ASTDeclSpecs._stringify"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclSpecs(ASTBase):\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res: List[str] = []\n l = transform(self.leftSpecs)\n if len(l) > 0:\n res.append(l)\n if self.trailingTypeSpec:\n if len(res) > 0:\n res.append(\" \")\n res.append(transform(self.trailingTypeSpec))\n r = str(self.rightSpecs)\n if len(r) > 0:\n if len(res) > 0:\n res.append(\" \")\n res.append(r)\n return \"\".join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecs.describe_signature_ASTDeclSpecs.describe_signature.if_self_trailingTypeSpec_.for_m_in_modifiers_.signode_m": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclSpecs.describe_signature_ASTDeclSpecs.describe_signature.if_self_trailingTypeSpec_.for_m_in_modifiers_.signode_m", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 832, "end_line": 851, "span_ids": ["ASTDeclSpecs.describe_signature"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclSpecs(ASTBase):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n modifiers: List[Node] = []\n\n self.leftSpecs.describe_signature(modifiers)\n\n for m in modifiers:\n signode += m\n if self.trailingTypeSpec:\n if len(modifiers) > 0:\n signode += addnodes.desc_sig_space()\n self.trailingTypeSpec.describe_signature(signode, mode, env,\n symbol=symbol)\n modifiers = []\n self.rightSpecs.describe_signature(modifiers)\n if len(modifiers) > 0:\n signode += addnodes.desc_sig_space()\n for m in modifiers:\n signode += m", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Declarator_ASTArray._stringify.return._join_el_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Declarator_ASTArray._stringify.return._join_el_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 798, "end_line": 829, "span_ids": ["ASTArray", "ASTArray._stringify", "ASTDeclSpecs.describe_signature"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Declarator\n################################################################################\n\nclass ASTArray(ASTBase):\n def __init__(self, static: bool, const: bool, volatile: bool, restrict: bool,\n vla: bool, size: ASTExpression):\n self.static = static\n self.const = const\n self.volatile = volatile\n self.restrict = restrict\n self.vla = vla\n self.size = size\n if vla:\n assert size is None\n if size is not None:\n assert not vla\n\n def _stringify(self, transform: StringifyTransform) -> str:\n el = []\n if self.static:\n el.append('static')\n if self.restrict:\n el.append('restrict')\n if self.volatile:\n el.append('volatile')\n if self.const:\n el.append('const')\n if self.vla:\n return '[' + ' '.join(el) + '*]'\n elif self.size:\n el.append(transform(self.size))\n return '[' + ' '.join(el) + ']'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTArray.describe_signature_ASTDeclarator.require_space_after_declSpecs.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTArray.describe_signature_ASTDeclarator.require_space_after_declSpecs.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 887, "end_line": 926, "span_ids": ["ASTDeclarator.function_params", "ASTDeclarator.require_space_after_declSpecs", "ASTArray.describe_signature", "ASTDeclarator", "ASTDeclarator.name"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTArray(ASTBase):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('[', '[')\n addSpace = False\n\n def _add(signode: TextElement, text: str) -> bool:\n if addSpace:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_keyword(text, text)\n return True\n\n if self.static:\n addSpace = _add(signode, 'static')\n if self.restrict:\n addSpace = _add(signode, 'restrict')\n if self.volatile:\n addSpace = _add(signode, 'volatile')\n if self.const:\n addSpace = _add(signode, 'const')\n if self.vla:\n signode += addnodes.desc_sig_punctuation('*', '*')\n elif self.size:\n if addSpace:\n signode += addnodes.desc_sig_space()\n self.size.describe_signature(signode, 'markType', env, symbol)\n signode += addnodes.desc_sig_punctuation(']', ']')\n\n\nclass ASTDeclarator(ASTBase):\n @property\n def name(self) -> ASTNestedName:\n raise NotImplementedError(repr(self))\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n raise NotImplementedError(repr(self))\n\n def require_space_after_declSpecs(self) -> bool:\n raise NotImplementedError(repr(self))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorNameParam_ASTDeclaratorNameParam.describe_signature.if_self_param_.self_param_describe_signa": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorNameParam_ASTDeclaratorNameParam.describe_signature.if_self_param_.self_param_describe_signa", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 873, "end_line": 911, "span_ids": ["ASTDeclaratorNameParam", "ASTDeclaratorNameParam._stringify", "ASTDeclaratorNameParam.describe_signature", "ASTDeclaratorNameParam.require_space_after_declSpecs", "ASTDeclaratorNameParam.function_params", "ASTDeclaratorNameParam.name"], "tokens": 307}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaratorNameParam(ASTDeclarator):\n def __init__(self, declId: ASTNestedName,\n arrayOps: List[ASTArray], param: ASTParameters) -> None:\n self.declId = declId\n self.arrayOps = arrayOps\n self.param = param\n\n @property\n def name(self) -> ASTNestedName:\n return self.declId\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.param.function_params\n\n # ------------------------------------------------------------------------\n\n def require_space_after_declSpecs(self) -> bool:\n return self.declId is not None\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.declId:\n res.append(transform(self.declId))\n for op in self.arrayOps:\n res.append(transform(op))\n if self.param:\n res.append(transform(self.param))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.declId:\n self.declId.describe_signature(signode, mode, env, symbol)\n for op in self.arrayOps:\n op.describe_signature(signode, mode, env, symbol)\n if self.param:\n self.param.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorNameBitField_ASTDeclaratorNameBitField.describe_signature.self_size_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorNameBitField_ASTDeclaratorNameBitField.describe_signature.self_size_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 970, "end_line": 1000, "span_ids": ["ASTDeclaratorNameBitField._stringify", "ASTDeclaratorNameBitField.require_space_after_declSpecs", "ASTDeclaratorNameBitField.describe_signature", "ASTDeclaratorNameBitField.name", "ASTDeclaratorNameBitField"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaratorNameBitField(ASTDeclarator):\n def __init__(self, declId: ASTNestedName, size: ASTExpression):\n self.declId = declId\n self.size = size\n\n @property\n def name(self) -> ASTNestedName:\n return self.declId\n\n # ------------------------------------------------------------------------\n\n def require_space_after_declSpecs(self) -> bool:\n return self.declId is not None\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.declId:\n res.append(transform(self.declId))\n res.append(\" : \")\n res.append(transform(self.size))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.declId:\n self.declId.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation(':', ':')\n signode += addnodes.desc_sig_space()\n self.size.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorPtr_ASTDeclaratorPtr.require_space_after_declSpecs.return.self_const_or_self_volati": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorPtr_ASTDeclaratorPtr.require_space_after_declSpecs.return.self_const_or_self_volati", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 945, "end_line": 966, "span_ids": ["ASTDeclaratorPtr.function_params", "ASTDeclaratorPtr", "ASTDeclaratorPtr.name", "ASTDeclaratorPtr.require_space_after_declSpecs"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaratorPtr(ASTDeclarator):\n def __init__(self, next: ASTDeclarator, restrict: bool, volatile: bool, const: bool,\n attrs: Any) -> None:\n assert next\n self.next = next\n self.restrict = restrict\n self.volatile = volatile\n self.const = const\n self.attrs = attrs\n\n @property\n def name(self) -> ASTNestedName:\n return self.next.name\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.next.function_params\n\n def require_space_after_declSpecs(self) -> bool:\n return self.const or self.volatile or self.restrict or \\\n len(self.attrs) > 0 or \\\n self.next.require_space_after_declSpecs()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorPtr._stringify_ASTDeclaratorPtr._stringify.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorPtr._stringify_ASTDeclaratorPtr._stringify.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 968, "end_line": 988, "span_ids": ["ASTDeclaratorPtr._stringify"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaratorPtr(ASTDeclarator):\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ['*']\n for a in self.attrs:\n res.append(transform(a))\n if len(self.attrs) > 0 and (self.restrict or self.volatile or self.const):\n res.append(' ')\n if self.restrict:\n res.append('restrict')\n if self.volatile:\n if self.restrict:\n res.append(' ')\n res.append('volatile')\n if self.const:\n if self.restrict or self.volatile:\n res.append(' ')\n res.append('const')\n if self.const or self.volatile or self.restrict or len(self.attrs) > 0:\n if self.next.require_space_after_declSpecs():\n res.append(' ')\n res.append(transform(self.next))\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorPtr.describe_signature_ASTDeclaratorPtr.describe_signature.self_next_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorPtr.describe_signature_ASTDeclaratorPtr.describe_signature.self_next_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1048, "end_line": 1073, "span_ids": ["ASTDeclaratorPtr.describe_signature"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaratorPtr(ASTDeclarator):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('*', '*')\n for a in self.attrs:\n a.describe_signature(signode)\n if len(self.attrs) > 0 and (self.restrict or self.volatile or self.const):\n signode += addnodes.desc_sig_space()\n\n def _add_anno(signode: TextElement, text: str) -> None:\n signode += addnodes.desc_sig_keyword(text, text)\n\n if self.restrict:\n _add_anno(signode, 'restrict')\n if self.volatile:\n if self.restrict:\n signode += addnodes.desc_sig_space()\n _add_anno(signode, 'volatile')\n if self.const:\n if self.restrict or self.volatile:\n signode += addnodes.desc_sig_space()\n _add_anno(signode, 'const')\n if self.const or self.volatile or self.restrict or len(self.attrs) > 0:\n if self.next.require_space_after_declSpecs():\n signode += addnodes.desc_sig_space()\n self.next.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorParen_ASTDeclaratorParen.describe_signature.self_next_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaratorParen_ASTDeclaratorParen.describe_signature.self_next_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1076, "end_line": 1108, "span_ids": ["ASTDeclaratorParen._stringify", "ASTDeclaratorParen.name", "ASTDeclaratorParen.function_params", "ASTDeclaratorParen", "ASTDeclaratorParen.require_space_after_declSpecs", "ASTDeclaratorParen.describe_signature"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaratorParen(ASTDeclarator):\n def __init__(self, inner: ASTDeclarator, next: ASTDeclarator) -> None:\n assert inner\n assert next\n self.inner = inner\n self.next = next\n # TODO: we assume the name and params are in inner\n\n @property\n def name(self) -> ASTNestedName:\n return self.inner.name\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.inner.function_params\n\n def require_space_after_declSpecs(self) -> bool:\n return True\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ['(']\n res.append(transform(self.inner))\n res.append(')')\n res.append(transform(self.next))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.inner.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n self.next.describe_signature(signode, \"noneIsName\", env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTInitializer_ASTInitializer.describe_signature.self_value_describe_signa": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTInitializer_ASTInitializer.describe_signature.self_value_describe_signa", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1164, "end_line": 1184, "span_ids": ["ASTInitializer.describe_signature", "ASTInitializer", "ASTInitializer._stringify"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTInitializer(ASTBase):\n def __init__(self, value: Union[ASTBracedInitList, ASTExpression],\n hasAssign: bool = True) -> None:\n self.value = value\n self.hasAssign = hasAssign\n\n def _stringify(self, transform: StringifyTransform) -> str:\n val = transform(self.value)\n if self.hasAssign:\n return ' = ' + val\n else:\n return val\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.hasAssign:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation('=', '=')\n signode += addnodes.desc_sig_space()\n self.value.describe_signature(signode, 'markType', env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTType_ASTType.get_type_declaration_prefix.if_self_declSpecs_trailin.else_.return._type_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTType_ASTType.get_type_declaration_prefix.if_self_declSpecs_trailin.else_.return._type_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1149, "end_line": 1180, "span_ids": ["ASTType._stringify", "ASTType.name", "ASTType.get_id", "ASTType.get_type_declaration_prefix", "ASTType", "ASTType.function_params"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTType(ASTBase):\n def __init__(self, declSpecs: ASTDeclSpecs, decl: ASTDeclarator) -> None:\n assert declSpecs\n assert decl\n self.declSpecs = declSpecs\n self.decl = decl\n\n @property\n def name(self) -> ASTNestedName:\n return self.decl.name\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n return symbol.get_full_nested_name().get_id(version)\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.decl.function_params\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n declSpecs = transform(self.declSpecs)\n res.append(declSpecs)\n if self.decl.require_space_after_declSpecs() and len(declSpecs) > 0:\n res.append(' ')\n res.append(transform(self.decl))\n return ''.join(res)\n\n def get_type_declaration_prefix(self) -> str:\n if self.declSpecs.trailingTypeSpec:\n return 'typedef'\n else:\n return 'type'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTType.describe_signature_ASTType.describe_signature.self_decl_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTType.describe_signature_ASTType.describe_signature.self_decl_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1220, "end_line": 1231, "span_ids": ["ASTType.describe_signature"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTType(ASTBase):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.declSpecs.describe_signature(signode, 'markType', env, symbol)\n if (self.decl.require_space_after_declSpecs() and\n len(str(self.declSpecs)) > 0):\n signode += addnodes.desc_sig_space()\n # for parameters that don't really declare new names we get 'markType',\n # this should not be propagated, but be 'noneIsName'.\n if mode == 'markType':\n mode = 'noneIsName'\n self.decl.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTTypeWithInit_ASTTypeWithInit.describe_signature.if_self_init_.self_init_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTTypeWithInit_ASTTypeWithInit.describe_signature.if_self_init_.self_init_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1196, "end_line": 1220, "span_ids": ["ASTTypeWithInit.get_id", "ASTTypeWithInit.describe_signature", "ASTTypeWithInit.name", "ASTTypeWithInit._stringify", "ASTTypeWithInit"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTTypeWithInit(ASTBase):\n def __init__(self, type: ASTType, init: ASTInitializer) -> None:\n self.type = type\n self.init = init\n\n @property\n def name(self) -> ASTNestedName:\n return self.type.name\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n return self.type.get_id(version, objectType, symbol)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.type))\n if self.init:\n res.append(transform(self.init))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.type.describe_signature(signode, mode, env, symbol)\n if self.init:\n self.init.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTMacroParameter_ASTMacroParameter.describe_signature.if_self_ellipsis_.else_.self_arg_describe_signatu": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTMacroParameter_ASTMacroParameter.describe_signature.if_self_ellipsis_.else_.self_arg_describe_signatu", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1261, "end_line": 1285, "span_ids": ["ASTMacroParameter.describe_signature", "ASTMacroParameter", "ASTMacroParameter._stringify"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTMacroParameter(ASTBase):\n def __init__(self, arg: ASTNestedName, ellipsis: bool = False,\n variadic: bool = False) -> None:\n self.arg = arg\n self.ellipsis = ellipsis\n self.variadic = variadic\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.ellipsis:\n return '...'\n elif self.variadic:\n return transform(self.arg) + '...'\n else:\n return transform(self.arg)\n\n def describe_signature(self, signode: Any, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.ellipsis:\n signode += addnodes.desc_sig_punctuation('...', '...')\n elif self.variadic:\n name = str(self)\n signode += addnodes.desc_sig_name(name, name)\n else:\n self.arg.describe_signature(signode, mode, env, symbol=symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTMacro_ASTMacro._stringify.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTMacro_ASTMacro._stringify.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1250, "end_line": 1274, "span_ids": ["ASTMacro.get_id", "ASTMacro.name", "ASTMacro._stringify", "ASTMacro"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTMacro(ASTBase):\n def __init__(self, ident: ASTNestedName, args: List[ASTMacroParameter]) -> None:\n self.ident = ident\n self.args = args\n\n @property\n def name(self) -> ASTNestedName:\n return self.ident\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.ident))\n if self.args is not None:\n res.append('(')\n first = True\n for arg in self.args:\n if not first:\n res.append(', ')\n first = False\n res.append(transform(arg))\n res.append(')')\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTMacro.describe_signature_ASTMacro.describe_signature.signode_paramlist": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTMacro.describe_signature_ASTMacro.describe_signature.signode_paramlist", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1236, "end_line": 1247, "span_ids": ["ASTMacro.describe_signature"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTMacro(ASTBase):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.ident.describe_signature(signode, mode, env, symbol)\n if self.args is None:\n return\n paramlist = addnodes.desc_parameterlist()\n for arg in self.args:\n param = addnodes.desc_parameter('', '', noemph=True)\n arg.describe_signature(param, 'param', env, symbol=symbol)\n paramlist += param\n signode += paramlist", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTStruct_ASTStruct.describe_signature.self_name_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTStruct_ASTStruct.describe_signature.self_name_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1250, "end_line": 1263, "span_ids": ["ASTStruct.get_id", "ASTStruct.describe_signature", "ASTStruct", "ASTStruct._stringify"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTStruct(ASTBase):\n def __init__(self, name: ASTNestedName) -> None:\n self.name = name\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.name)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.name.describe_signature(signode, mode, env, symbol=symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTUnion_ASTUnion.describe_signature.self_name_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTUnion_ASTUnion.describe_signature.self_name_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1266, "end_line": 1279, "span_ids": ["ASTUnion", "ASTUnion.get_id", "ASTUnion._stringify", "ASTUnion.describe_signature"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTUnion(ASTBase):\n def __init__(self, name: ASTNestedName) -> None:\n self.name = name\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.name)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.name.describe_signature(signode, mode, env, symbol=symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTEnum_ASTEnum.describe_signature.self_name_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTEnum_ASTEnum.describe_signature.self_name_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1282, "end_line": 1295, "span_ids": ["ASTEnum._stringify", "ASTEnum.describe_signature", "ASTEnum", "ASTEnum.get_id"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTEnum(ASTBase):\n def __init__(self, name: ASTNestedName) -> None:\n self.name = name\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.name)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.name.describe_signature(signode, mode, env, symbol=symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTEnumerator_ASTEnumerator.describe_signature.if_self_init_.self_init_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTEnumerator_ASTEnumerator.describe_signature.if_self_init_.self_init_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1298, "end_line": 1318, "span_ids": ["ASTEnumerator._stringify", "ASTEnumerator", "ASTEnumerator.describe_signature", "ASTEnumerator.get_id"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTEnumerator(ASTBase):\n def __init__(self, name: ASTNestedName, init: ASTInitializer) -> None:\n self.name = name\n self.init = init\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.name))\n if self.init:\n res.append(transform(self.init))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.name.describe_signature(signode, mode, env, symbol)\n if self.init:\n self.init.describe_signature(signode, 'markType', env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaration_ASTDeclaration._stringify.return.res": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaration_ASTDeclaration._stringify.return.res", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1399, "end_line": 1444, "span_ids": ["ASTDeclaration.function_params", "ASTDeclaration", "ASTDeclaration.get_newest_id", "ASTDeclaration.name", "ASTDeclaration._stringify", "ASTDeclaration.clone", "ASTDeclaration.get_id"], "tokens": 373}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaration(ASTBaseBase):\n def __init__(self, objectType: str, directiveType: str,\n declaration: Union[DeclarationType, ASTFunctionParameter],\n semicolon: bool = False) -> None:\n self.objectType = objectType\n self.directiveType = directiveType\n self.declaration = declaration\n self.semicolon = semicolon\n\n self.symbol: Symbol = None\n # set by CObject._add_enumerator_to_parent\n self.enumeratorScopedSymbol: Symbol = None\n\n def clone(self) -> \"ASTDeclaration\":\n return ASTDeclaration(self.objectType, self.directiveType,\n self.declaration.clone(), self.semicolon)\n\n @property\n def name(self) -> ASTNestedName:\n decl = cast(DeclarationType, self.declaration)\n return decl.name\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n if self.objectType != 'function':\n return None\n decl = cast(ASTType, self.declaration)\n return decl.function_params\n\n def get_id(self, version: int, prefixed: bool = True) -> str:\n if self.objectType == 'enumerator' and self.enumeratorScopedSymbol:\n return self.enumeratorScopedSymbol.declaration.get_id(version, prefixed)\n id_ = self.declaration.get_id(version, self.objectType, self.symbol)\n if prefixed:\n return _id_prefix[version] + id_\n else:\n return id_\n\n def get_newest_id(self) -> str:\n return self.get_id(_max_id, True)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = transform(self.declaration)\n if self.semicolon:\n res += ';'\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_SymbolLookupResult_LookupKey.__str__.return._format_join_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_SymbolLookupResult_LookupKey.__str__.return._format_join_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1399, "end_line": 1413, "span_ids": ["LookupKey", "SymbolLookupResult", "LookupKey.__str__"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SymbolLookupResult:\n def __init__(self, symbols: Iterator[\"Symbol\"], parentSymbol: \"Symbol\",\n ident: ASTIdentifier) -> None:\n self.symbols = symbols\n self.parentSymbol = parentSymbol\n self.ident = ident\n\n\nclass LookupKey:\n def __init__(self, data: List[Tuple[ASTIdentifier, str]]) -> None:\n self.data = data\n\n def __str__(self) -> str:\n return '[{}]'.format(', '.join(\"({}, {})\".format(\n ident, id_) for ident, id_ in self.data))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._add_function_params_Symbol._add_function_params.None_2.Symbol_debug_indent_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._add_function_params_Symbol._add_function_params.None_2.Symbol_debug_indent_1", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1538, "end_line": 1559, "span_ids": ["Symbol._add_function_params"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def _add_function_params(self) -> None:\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"_add_function_params:\")\n # Note: we may be called from _fill_empty, so the symbols we want\n # to add may actually already be present (as empty symbols).\n\n # add symbols for function parameters, if any\n if self.declaration is not None and self.declaration.function_params is not None:\n for p in self.declaration.function_params:\n if p.arg is None:\n continue\n nn = p.arg.name\n if nn is None:\n continue\n # (comparing to the template params: we have checked that we are a declaration)\n decl = ASTDeclaration('functionParam', None, p)\n assert not nn.rooted\n assert len(nn.names) == 1\n self._add_symbols(nn, decl, self.docname, self.line)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.get_all_symbols_Symbol.get_lookup_key.return.LookupKey_key_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.get_all_symbols_Symbol.get_lookup_key.return.LookupKey_key_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1582, "end_line": 1617, "span_ids": ["Symbol.get_all_symbols", "Symbol.get_lookup_key", "Symbol.children", "Symbol.children_recurse_anon"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def get_all_symbols(self) -> Iterator[\"Symbol\"]:\n yield self\n for sChild in self._children:\n yield from sChild.get_all_symbols()\n\n @property\n def children(self) -> Iterator[\"Symbol\"]:\n yield from self._children\n\n @property\n def children_recurse_anon(self) -> Iterator[\"Symbol\"]:\n for c in self._children:\n yield c\n if not c.ident.is_anon():\n continue\n yield from c.children_recurse_anon\n\n def get_lookup_key(self) -> \"LookupKey\":\n # The pickle files for the environment and for each document are distinct.\n # The environment has all the symbols, but the documents has xrefs that\n # must know their scope. A lookup key is essentially a specification of\n # how to find a specific symbol.\n symbols = []\n s = self\n while s.parent:\n symbols.append(s)\n s = s.parent\n symbols.reverse()\n key = []\n for s in symbols:\n if s.declaration is not None:\n # TODO: do we need the ID?\n key.append((s.ident, s.declaration.get_newest_id()))\n else:\n key.append((s.ident, None))\n return LookupKey(key)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.get_full_nested_name_Symbol._find_first_named_symbol.try_.except_StopIteration_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.get_full_nested_name_Symbol._find_first_named_symbol.try_.except_StopIteration_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1559, "end_line": 1581, "span_ids": ["Symbol.get_full_nested_name", "Symbol._find_first_named_symbol"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def get_full_nested_name(self) -> ASTNestedName:\n symbols = []\n s = self\n while s.parent:\n symbols.append(s)\n s = s.parent\n symbols.reverse()\n names = []\n for s in symbols:\n names.append(s.ident)\n return ASTNestedName(names, rooted=False)\n\n def _find_first_named_symbol(self, ident: ASTIdentifier,\n matchSelf: bool, recurseInAnon: bool) -> \"Symbol\":\n # TODO: further simplification from C++ to C\n if Symbol.debug_lookup:\n Symbol.debug_print(\"_find_first_named_symbol ->\")\n res = self._find_named_symbols(ident, matchSelf, recurseInAnon,\n searchInSiblings=False)\n try:\n return next(res)\n except StopIteration:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._find_named_symbols_Symbol._find_named_symbols.if_Symbol_debug_lookup_.Symbol_debug_print_searc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._find_named_symbols_Symbol._find_named_symbols.if_Symbol_debug_lookup_.Symbol_debug_print_searc", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1583, "end_line": 1596, "span_ids": ["Symbol._find_named_symbols"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def _find_named_symbols(self, ident: ASTIdentifier,\n matchSelf: bool, recurseInAnon: bool,\n searchInSiblings: bool) -> Iterator[\"Symbol\"]:\n # TODO: further simplification from C++ to C\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"_find_named_symbols:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"self:\")\n print(self.to_string(Symbol.debug_indent + 1), end=\"\")\n Symbol.debug_print(\"ident: \", ident)\n Symbol.debug_print(\"matchSelf: \", matchSelf)\n Symbol.debug_print(\"recurseInAnon: \", recurseInAnon)\n Symbol.debug_print(\"searchInSiblings: \", searchInSiblings)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._find_named_symbols.candidates_Symbol._find_named_symbols.None_2.Symbol_debug_indent_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._find_named_symbols.candidates_Symbol._find_named_symbols.None_2.Symbol_debug_indent_2", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1598, "end_line": 1631, "span_ids": ["Symbol._find_named_symbols"], "tokens": 288}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def _find_named_symbols(self, ident: ASTIdentifier,\n matchSelf: bool, recurseInAnon: bool,\n searchInSiblings: bool) -> Iterator[\"Symbol\"]:\n # ... other code\n\n def candidates() -> Generator[\"Symbol\", None, None]:\n s = self\n if Symbol.debug_lookup:\n Symbol.debug_print(\"searching in self:\")\n print(s.to_string(Symbol.debug_indent + 1), end=\"\")\n while True:\n if matchSelf:\n yield s\n if recurseInAnon:\n yield from s.children_recurse_anon\n else:\n yield from s._children\n\n if s.siblingAbove is None:\n break\n s = s.siblingAbove\n if Symbol.debug_lookup:\n Symbol.debug_print(\"searching in sibling:\")\n print(s.to_string(Symbol.debug_indent + 1), end=\"\")\n\n for s in candidates():\n if Symbol.debug_lookup:\n Symbol.debug_print(\"candidate:\")\n print(s.to_string(Symbol.debug_indent + 1), end=\"\")\n if s.ident == ident:\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"matches\")\n Symbol.debug_indent -= 3\n yield s\n if Symbol.debug_lookup:\n Symbol.debug_indent += 2\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._symbol_lookup_Symbol._symbol_lookup.return.SymbolLookupResult_symbol": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._symbol_lookup_Symbol._symbol_lookup.return.SymbolLookupResult_symbol", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1633, "end_line": 1703, "span_ids": ["Symbol._symbol_lookup"], "tokens": 657}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def _symbol_lookup(self, nestedName: ASTNestedName,\n onMissingQualifiedSymbol: Callable[[\"Symbol\", ASTIdentifier], \"Symbol\"], # NOQA\n ancestorLookupType: str, matchSelf: bool,\n recurseInAnon: bool, searchInSiblings: bool) -> SymbolLookupResult:\n # TODO: further simplification from C++ to C\n # ancestorLookupType: if not None, specifies the target type of the lookup\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"_symbol_lookup:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"self:\")\n print(self.to_string(Symbol.debug_indent + 1), end=\"\")\n Symbol.debug_print(\"nestedName: \", nestedName)\n Symbol.debug_print(\"ancestorLookupType:\", ancestorLookupType)\n Symbol.debug_print(\"matchSelf: \", matchSelf)\n Symbol.debug_print(\"recurseInAnon: \", recurseInAnon)\n Symbol.debug_print(\"searchInSiblings: \", searchInSiblings)\n\n names = nestedName.names\n\n # find the right starting point for lookup\n parentSymbol = self\n if nestedName.rooted:\n while parentSymbol.parent:\n parentSymbol = parentSymbol.parent\n if ancestorLookupType is not None:\n # walk up until we find the first identifier\n firstName = names[0]\n while parentSymbol.parent:\n if parentSymbol.find_identifier(firstName,\n matchSelf=matchSelf,\n recurseInAnon=recurseInAnon,\n searchInSiblings=searchInSiblings):\n break\n parentSymbol = parentSymbol.parent\n\n if Symbol.debug_lookup:\n Symbol.debug_print(\"starting point:\")\n print(parentSymbol.to_string(Symbol.debug_indent + 1), end=\"\")\n\n # and now the actual lookup\n for ident in names[:-1]:\n symbol = parentSymbol._find_first_named_symbol(\n ident, matchSelf=matchSelf, recurseInAnon=recurseInAnon)\n if symbol is None:\n symbol = onMissingQualifiedSymbol(parentSymbol, ident)\n if symbol is None:\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n return None\n # We have now matched part of a nested name, and need to match more\n # so even if we should matchSelf before, we definitely shouldn't\n # even more. (see also issue #2666)\n matchSelf = False\n parentSymbol = symbol\n\n if Symbol.debug_lookup:\n Symbol.debug_print(\"handle last name from:\")\n print(parentSymbol.to_string(Symbol.debug_indent + 1), end=\"\")\n\n # handle the last name\n ident = names[-1]\n\n symbols = parentSymbol._find_named_symbols(\n ident, matchSelf=matchSelf,\n recurseInAnon=recurseInAnon,\n searchInSiblings=searchInSiblings)\n if Symbol.debug_lookup:\n symbols = list(symbols) # type: ignore\n Symbol.debug_indent -= 2\n return SymbolLookupResult(symbols, parentSymbol, ident)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.merge_with_Symbol.merge_with.None_2.Symbol_debug_indent_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.merge_with_Symbol.merge_with.None_2.Symbol_debug_indent_1", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1927, "end_line": 1961, "span_ids": ["Symbol.merge_with"], "tokens": 347}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def merge_with(self, other: \"Symbol\", docnames: List[str],\n env: \"BuildEnvironment\") -> None:\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"merge_with:\")\n assert other is not None\n for otherChild in other._children:\n ourChild = self._find_first_named_symbol(\n ident=otherChild.ident, matchSelf=False,\n recurseInAnon=False)\n if ourChild is None:\n # TODO: hmm, should we prune by docnames?\n self._children.append(otherChild)\n otherChild.parent = self\n otherChild._assert_invariants()\n continue\n if otherChild.declaration and otherChild.docname in docnames:\n if not ourChild.declaration:\n ourChild._fill_empty(otherChild.declaration,\n otherChild.docname, otherChild.line)\n elif ourChild.docname != otherChild.docname:\n name = str(ourChild.declaration)\n msg = __(\"Duplicate C declaration, also defined at %s:%s.\\n\"\n \"Declaration is '.. c:%s:: %s'.\")\n msg = msg % (ourChild.docname, ourChild.line,\n ourChild.declaration.directiveType, name)\n logger.warning(msg, location=(otherChild.docname, otherChild.line))\n else:\n # Both have declarations, and in the same docname.\n # This can apparently happen, it should be safe to\n # just ignore it, right?\n pass\n ourChild.merge_with(otherChild, docnames, env)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.add_name_Symbol.add_declaration.return.res": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.add_name_Symbol.add_declaration.return.res", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1963, "end_line": 1984, "span_ids": ["Symbol.add_declaration", "Symbol.add_name"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def add_name(self, nestedName: ASTNestedName) -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"add_name:\")\n res = self._add_symbols(nestedName, declaration=None, docname=None, line=None)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1\n return res\n\n def add_declaration(self, declaration: ASTDeclaration,\n docname: str, line: int) -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"add_declaration:\")\n assert declaration is not None\n assert docname is not None\n assert line is not None\n nestedName = declaration.name\n res = self._add_symbols(nestedName, declaration, docname, line)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.find_identifier_Symbol.find_identifier.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.find_identifier_Symbol.find_identifier.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1920, "end_line": 1949, "span_ids": ["Symbol.find_identifier"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def find_identifier(self, ident: ASTIdentifier,\n matchSelf: bool, recurseInAnon: bool, searchInSiblings: bool\n ) -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"find_identifier:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"ident: \", ident)\n Symbol.debug_print(\"matchSelf: \", matchSelf)\n Symbol.debug_print(\"recurseInAnon: \", recurseInAnon)\n Symbol.debug_print(\"searchInSiblings:\", searchInSiblings)\n print(self.to_string(Symbol.debug_indent + 1), end=\"\")\n Symbol.debug_indent -= 2\n current = self\n while current is not None:\n if Symbol.debug_lookup:\n Symbol.debug_indent += 2\n Symbol.debug_print(\"trying:\")\n print(current.to_string(Symbol.debug_indent + 1), end=\"\")\n Symbol.debug_indent -= 2\n if matchSelf and current.ident == ident:\n return current\n children = current.children_recurse_anon if recurseInAnon else current._children\n for s in children:\n if s.ident == ident:\n return s\n if not searchInSiblings:\n break\n current = current.siblingAbove\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.direct_lookup_Symbol.direct_lookup.return.s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.direct_lookup_Symbol.direct_lookup.return.s", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1951, "end_line": 1977, "span_ids": ["Symbol.direct_lookup"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def direct_lookup(self, key: \"LookupKey\") -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"direct_lookup:\")\n Symbol.debug_indent += 1\n s = self\n for name, id_ in key.data:\n res = None\n for cand in s._children:\n if cand.ident == name:\n res = cand\n break\n s = res\n if Symbol.debug_lookup:\n Symbol.debug_print(\"name: \", name)\n Symbol.debug_print(\"id: \", id_)\n if s is not None:\n print(s.to_string(Symbol.debug_indent + 1), end=\"\")\n else:\n Symbol.debug_print(\"not found\")\n if s is None:\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n return None\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n return s", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.find_declaration_Symbol.find_declaration.return.symbols_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.find_declaration_Symbol.find_declaration.return.symbols_0_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1979, "end_line": 2004, "span_ids": ["Symbol.find_declaration"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def find_declaration(self, nestedName: ASTNestedName, typ: str,\n matchSelf: bool, recurseInAnon: bool) -> \"Symbol\":\n # templateShorthand: missing template parameter lists for templates is ok\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"find_declaration:\")\n\n def onMissingQualifiedSymbol(parentSymbol: \"Symbol\",\n ident: ASTIdentifier) -> \"Symbol\":\n return None\n\n lookupResult = self._symbol_lookup(nestedName,\n onMissingQualifiedSymbol,\n ancestorLookupType=typ,\n matchSelf=matchSelf,\n recurseInAnon=recurseInAnon,\n searchInSiblings=False)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1\n if lookupResult is None:\n return None\n\n symbols = list(lookupResult.symbols)\n if len(symbols) == 0:\n return None\n return symbols[0]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.to_string_Symbol.dump.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.to_string_Symbol.dump.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2006, "end_line": 2031, "span_ids": ["Symbol.dump", "Symbol.to_string"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def to_string(self, indent: int) -> str:\n res = [Symbol.debug_indent_string * indent]\n if not self.parent:\n res.append('::')\n else:\n if self.ident:\n res.append(str(self.ident))\n else:\n res.append(str(self.declaration))\n if self.declaration:\n res.append(\": \")\n if self.isRedeclaration:\n res.append('!!duplicate!! ')\n res.append(str(self.declaration))\n if self.docname:\n res.append('\\t(')\n res.append(self.docname)\n res.append(')')\n res.append('\\n')\n return ''.join(res)\n\n def dump(self, indent: int) -> str:\n res = [self.to_string(indent)]\n for c in self._children:\n res.append(c.dump(indent + 1))\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser_DefinitionParser._parse_string.return.self_definition_startPos_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser_DefinitionParser._parse_string.return.self_definition_startPos_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2143, "end_line": 2173, "span_ids": ["DefinitionParser", "DefinitionParser.id_attributes", "DefinitionParser.paren_attributes", "DefinitionParser._parse_string", "DefinitionParser.language"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n @property\n def language(self) -> str:\n return 'C'\n\n @property\n def id_attributes(self):\n return self.config.c_id_attributes\n\n @property\n def paren_attributes(self):\n return self.config.c_paren_attributes\n\n def _parse_string(self) -> str:\n if self.current_char != '\"':\n return None\n startPos = self.pos\n self.pos += 1\n escape = False\n while True:\n if self.eof:\n self.fail(\"Unexpected end during inside string.\")\n elif self.current_char == '\"' and not escape:\n self.pos += 1\n break\n elif self.current_char == '\\\\':\n escape = True\n else:\n escape = False\n self.pos += 1\n return self.definition[startPos:self.pos]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_literal_DefinitionParser._parse_literal.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_literal_DefinitionParser._parse_literal.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2175, "end_line": 2211, "span_ids": ["DefinitionParser._parse_literal"], "tokens": 314}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_literal(self) -> ASTLiteral:\n # -> integer-literal\n # | character-literal\n # | floating-literal\n # | string-literal\n # | boolean-literal -> \"false\" | \"true\"\n self.skip_ws()\n if self.skip_word('true'):\n return ASTBooleanLiteral(True)\n if self.skip_word('false'):\n return ASTBooleanLiteral(False)\n pos = self.pos\n if self.match(float_literal_re):\n self.match(float_literal_suffix_re)\n return ASTNumberLiteral(self.definition[pos:self.pos])\n for regex in [binary_literal_re, hex_literal_re,\n integer_literal_re, octal_literal_re]:\n if self.match(regex):\n self.match(integers_literal_suffix_re)\n return ASTNumberLiteral(self.definition[pos:self.pos])\n\n string = self._parse_string()\n if string is not None:\n return ASTStringLiteral(string)\n\n # character-literal\n if self.match(char_literal_re):\n prefix = self.last_match.group(1) # may be None when no prefix\n data = self.last_match.group(2)\n try:\n return ASTCharLiteral(prefix, data)\n except UnicodeDecodeError as e:\n self.fail(\"Can not handle character literal. Internal error was: %s\" % e)\n except UnsupportedMultiCharacterCharLiteral:\n self.fail(\"Can not handle character literal\"\n \" resulting in multiple decoded characters.\")\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_paren_expression_DefinitionParser._parse_primary_expression.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_paren_expression_DefinitionParser._parse_primary_expression.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2213, "end_line": 2238, "span_ids": ["DefinitionParser._parse_primary_expression", "DefinitionParser._parse_paren_expression"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_paren_expression(self) -> ASTExpression:\n # \"(\" expression \")\"\n if self.current_char != '(':\n return None\n self.pos += 1\n res = self._parse_expression()\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expected ')' in end of parenthesized expression.\")\n return ASTParenExpr(res)\n\n def _parse_primary_expression(self) -> ASTExpression:\n # literal\n # \"(\" expression \")\"\n # id-expression -> we parse this with _parse_nested_name\n self.skip_ws()\n res: ASTExpression = self._parse_literal()\n if res is not None:\n return res\n res = self._parse_paren_expression()\n if res is not None:\n return res\n nn = self._parse_nested_name()\n if nn is not None:\n return ASTIdExpression(nn)\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_initializer_list_DefinitionParser._parse_initializer_list.return.exprs_trailingComma": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_initializer_list_DefinitionParser._parse_initializer_list.return.exprs_trailingComma", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2240, "end_line": 2268, "span_ids": ["DefinitionParser._parse_initializer_list"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_initializer_list(self, name: str, open: str, close: str\n ) -> Tuple[List[ASTExpression], bool]:\n # Parse open and close with the actual initializer-list in between\n # -> initializer-clause '...'[opt]\n # | initializer-list ',' initializer-clause '...'[opt]\n # TODO: designators\n self.skip_ws()\n if not self.skip_string_and_ws(open):\n return None, None\n if self.skip_string(close):\n return [], False\n\n exprs = []\n trailingComma = False\n while True:\n self.skip_ws()\n expr = self._parse_expression()\n self.skip_ws()\n exprs.append(expr)\n self.skip_ws()\n if self.skip_string(close):\n break\n if not self.skip_string_and_ws(','):\n self.fail(\"Error in %s, expected ',' or '%s'.\" % (name, close))\n if self.current_char == close and close == '}':\n self.pos += 1\n trailingComma = True\n break\n return exprs, trailingComma", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_paren_expression_list_DefinitionParser._parse_braced_init_list.return.ASTBracedInitList_exprs_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_paren_expression_list_DefinitionParser._parse_braced_init_list.return.ASTBracedInitList_exprs_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2270, "end_line": 2289, "span_ids": ["DefinitionParser._parse_braced_init_list", "DefinitionParser._parse_paren_expression_list"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_paren_expression_list(self) -> ASTParenExprList:\n # -> '(' expression-list ')'\n # though, we relax it to also allow empty parens\n # as it's needed in some cases\n #\n # expression-list\n # -> initializer-list\n exprs, trailingComma = self._parse_initializer_list(\"parenthesized expression-list\",\n '(', ')')\n if exprs is None:\n return None\n return ASTParenExprList(exprs)\n\n def _parse_braced_init_list(self) -> ASTBracedInitList:\n # -> '{' initializer-list ','[opt] '}'\n # | '{' '}'\n exprs, trailingComma = self._parse_initializer_list(\"braced-init-list\", '{', '}')\n if exprs is None:\n return None\n return ASTBracedInitList(exprs, trailingComma)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_postfix_expression_DefinitionParser._parse_postfix_expression.return.ASTPostfixExpr_prefix_po": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_postfix_expression_DefinitionParser._parse_postfix_expression.return.ASTPostfixExpr_prefix_po", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2291, "end_line": 2333, "span_ids": ["DefinitionParser._parse_postfix_expression"], "tokens": 357}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_postfix_expression(self) -> ASTPostfixExpr:\n # -> primary\n # | postfix \"[\" expression \"]\"\n # | postfix \"[\" braced-init-list [opt] \"]\"\n # | postfix \"(\" expression-list [opt] \")\"\n # | postfix \".\" id-expression // taken care of in primary by nested name\n # | postfix \"->\" id-expression\n # | postfix \"++\"\n # | postfix \"--\"\n\n prefix = self._parse_primary_expression()\n\n # and now parse postfixes\n postFixes: List[ASTPostfixOp] = []\n while True:\n self.skip_ws()\n if self.skip_string_and_ws('['):\n expr = self._parse_expression()\n self.skip_ws()\n if not self.skip_string(']'):\n self.fail(\"Expected ']' in end of postfix expression.\")\n postFixes.append(ASTPostfixArray(expr))\n continue\n if self.skip_string('->'):\n if self.skip_string('*'):\n # don't steal the arrow\n self.pos -= 3\n else:\n name = self._parse_nested_name()\n postFixes.append(ASTPostfixMemberOfPointer(name))\n continue\n if self.skip_string('++'):\n postFixes.append(ASTPostfixInc())\n continue\n if self.skip_string('--'):\n postFixes.append(ASTPostfixDec())\n continue\n lst = self._parse_paren_expression_list()\n if lst is not None:\n postFixes.append(ASTPostfixCallExpr(lst))\n continue\n break\n return ASTPostfixExpr(prefix, postFixes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_unary_expression_DefinitionParser._parse_unary_expression.return.self__parse_postfix_expre": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_unary_expression_DefinitionParser._parse_unary_expression.return.self__parse_postfix_expre", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2335, "end_line": 2371, "span_ids": ["DefinitionParser._parse_unary_expression"], "tokens": 352}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_unary_expression(self) -> ASTExpression:\n # -> postfix\n # | \"++\" cast\n # | \"--\" cast\n # | unary-operator cast -> (* | & | + | - | ! | ~) cast\n # The rest:\n # | \"sizeof\" unary\n # | \"sizeof\" \"(\" type-id \")\"\n # | \"alignof\" \"(\" type-id \")\"\n self.skip_ws()\n for op in _expression_unary_ops:\n # TODO: hmm, should we be able to backtrack here?\n if op[0] in 'cn':\n res = self.skip_word(op)\n else:\n res = self.skip_string(op)\n if res:\n expr = self._parse_cast_expression()\n return ASTUnaryOpExpr(op, expr)\n if self.skip_word_and_ws('sizeof'):\n if self.skip_string_and_ws('('):\n typ = self._parse_type(named=False)\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expecting ')' to end 'sizeof'.\")\n return ASTSizeofType(typ)\n expr = self._parse_unary_expression()\n return ASTSizeofExpr(expr)\n if self.skip_word_and_ws('alignof'):\n if not self.skip_string_and_ws('('):\n self.fail(\"Expecting '(' after 'alignof'.\")\n typ = self._parse_type(named=False)\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expecting ')' to end 'alignof'.\")\n return ASTAlignofExpr(typ)\n return self._parse_postfix_expression()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_cast_expression_DefinitionParser._parse_cast_expression.if_self_skip_string_.else_.return.self__parse_unary_express": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_cast_expression_DefinitionParser._parse_cast_expression.if_self_skip_string_.else_.return.self__parse_unary_express", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2373, "end_line": 2395, "span_ids": ["DefinitionParser._parse_cast_expression"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_cast_expression(self) -> ASTExpression:\n # -> unary | \"(\" type-id \")\" cast\n pos = self.pos\n self.skip_ws()\n if self.skip_string('('):\n try:\n typ = self._parse_type(False)\n if not self.skip_string(')'):\n self.fail(\"Expected ')' in cast expression.\")\n expr = self._parse_cast_expression()\n return ASTCastExpr(typ, expr)\n except DefinitionError as exCast:\n self.pos = pos\n try:\n return self._parse_unary_expression()\n except DefinitionError as exUnary:\n errs = []\n errs.append((exCast, \"If type cast expression\"))\n errs.append((exUnary, \"If unary expression\"))\n raise self._make_multi_error(errs,\n \"Error in cast expression.\") from exUnary\n else:\n return self._parse_unary_expression()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_logical_or_expression_DefinitionParser._parse_logical_or_expression._pm_cast_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_logical_or_expression_DefinitionParser._parse_logical_or_expression._pm_cast_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2397, "end_line": 2408, "span_ids": ["DefinitionParser._parse_logical_or_expression"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_logical_or_expression(self) -> ASTExpression:\n # logical-or = logical-and ||\n # logical-and = inclusive-or &&\n # inclusive-or = exclusive-or |\n # exclusive-or = and ^\n # and = equality &\n # equality = relational ==, !=\n # relational = shift <, >, <=, >=\n # shift = additive <<, >>\n # additive = multiplicative +, -\n # multiplicative = pm *, /, %\n # pm = cast .*, ->*\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_logical_or_expression._parse_bin_op_expr_DefinitionParser._parse_logical_or_expression.return._parse_bin_op_expr_self_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_logical_or_expression._parse_bin_op_expr_DefinitionParser._parse_logical_or_expression.return._parse_bin_op_expr_self_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2409, "end_line": 2446, "span_ids": ["DefinitionParser._parse_logical_or_expression"], "tokens": 288}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_logical_or_expression(self) -> ASTExpression:\n def _parse_bin_op_expr(self, opId):\n if opId + 1 == len(_expression_bin_ops):\n def parser() -> ASTExpression:\n return self._parse_cast_expression()\n else:\n def parser() -> ASTExpression:\n return _parse_bin_op_expr(self, opId + 1)\n exprs = []\n ops = []\n exprs.append(parser())\n while True:\n self.skip_ws()\n pos = self.pos\n oneMore = False\n for op in _expression_bin_ops[opId]:\n if op[0] in 'abcnox':\n if not self.skip_word(op):\n continue\n else:\n if not self.skip_string(op):\n continue\n if op == '&' and self.current_char == '&':\n # don't split the && 'token'\n self.pos -= 1\n # and btw. && has lower precedence, so we are done\n break\n try:\n expr = parser()\n exprs.append(expr)\n ops.append(op)\n oneMore = True\n break\n except DefinitionError:\n self.pos = pos\n if not oneMore:\n break\n return ASTBinOpExpr(exprs, ops)\n return _parse_bin_op_expr(self, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_conditional_expression_tail_DefinitionParser._parse_expression.return.self__parse_assignment_ex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_conditional_expression_tail_DefinitionParser._parse_expression.return.self__parse_assignment_ex", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2448, "end_line": 2492, "span_ids": ["DefinitionParser._parse_assignment_expression", "DefinitionParser._parse_expression", "DefinitionParser._parse_conditional_expression_tail", "DefinitionParser._parse_constant_expression"], "tokens": 347}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_conditional_expression_tail(self, orExprHead: Any) -> ASTExpression:\n # -> \"?\" expression \":\" assignment-expression\n return None\n\n def _parse_assignment_expression(self) -> ASTExpression:\n # -> conditional-expression\n # | logical-or-expression assignment-operator initializer-clause\n # -> conditional-expression ->\n # logical-or-expression\n # | logical-or-expression \"?\" expression \":\" assignment-expression\n # | logical-or-expression assignment-operator initializer-clause\n exprs = []\n ops = []\n orExpr = self._parse_logical_or_expression()\n exprs.append(orExpr)\n # TODO: handle ternary with _parse_conditional_expression_tail\n while True:\n oneMore = False\n self.skip_ws()\n for op in _expression_assignment_ops:\n if op[0] in 'abcnox':\n if not self.skip_word(op):\n continue\n else:\n if not self.skip_string(op):\n continue\n expr = self._parse_logical_or_expression()\n exprs.append(expr)\n ops.append(op)\n oneMore = True\n if not oneMore:\n break\n return ASTAssignmentExpr(exprs, ops)\n\n def _parse_constant_expression(self) -> ASTExpression:\n # -> conditional-expression\n orExpr = self._parse_logical_or_expression()\n # TODO: use _parse_conditional_expression_tail\n return orExpr\n\n def _parse_expression(self) -> ASTExpression:\n # -> assignment-expression\n # | expression \",\" assignment-expression\n # TODO: actually parse the second production\n return self._parse_assignment_expression()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_expression_fallback_DefinitionParser._parse_expression_fallback.return.ASTFallbackExpr_value_str": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_expression_fallback_DefinitionParser._parse_expression_fallback.return.ASTFallbackExpr_value_str", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2494, "end_line": 2535, "span_ids": ["DefinitionParser._parse_expression_fallback"], "tokens": 387}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_expression_fallback(\n self, end: List[str],\n parser: Callable[[], ASTExpression],\n allow: bool = True) -> ASTExpression:\n # Stupidly \"parse\" an expression.\n # 'end' should be a list of characters which ends the expression.\n\n # first try to use the provided parser\n prevPos = self.pos\n try:\n return parser()\n except DefinitionError as e:\n # some places (e.g., template parameters) we really don't want to use fallback,\n # and for testing we may want to globally disable it\n if not allow or not self.allowFallbackExpressionParsing:\n raise\n self.warn(\"Parsing of expression failed. Using fallback parser.\"\n \" Error was:\\n%s\" % e)\n self.pos = prevPos\n # and then the fallback scanning\n assert end is not None\n self.skip_ws()\n startPos = self.pos\n if self.match(_string_re):\n value = self.matched_text\n else:\n # TODO: add handling of more bracket-like things, and quote handling\n brackets = {'(': ')', '{': '}', '[': ']'}\n symbols: List[str] = []\n while not self.eof:\n if (len(symbols) == 0 and self.current_char in end):\n break\n if self.current_char in brackets.keys():\n symbols.append(brackets[self.current_char])\n elif len(symbols) > 0 and self.current_char == symbols[-1]:\n symbols.pop()\n self.pos += 1\n if len(end) > 0 and self.eof:\n self.fail(\"Could not find end of expression starting at %d.\"\n % startPos)\n value = self.definition[startPos:self.pos].strip()\n return ASTFallbackExpr(value.strip())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_nested_name_DefinitionParser._parse_nested_name.return.ASTNestedName_names_root": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_nested_name_DefinitionParser._parse_nested_name.return.ASTNestedName_names_root", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2537, "end_line": 2565, "span_ids": ["DefinitionParser._parse_nested_name"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_nested_name(self) -> ASTNestedName:\n names: List[Any] = []\n\n self.skip_ws()\n rooted = False\n if self.skip_string('.'):\n rooted = True\n while 1:\n self.skip_ws()\n if not self.match(identifier_re):\n self.fail(\"Expected identifier in nested name.\")\n identifier = self.matched_text\n # make sure there isn't a keyword\n if identifier in _keywords:\n self.fail(\"Expected identifier in nested name, \"\n \"got keyword: %s\" % identifier)\n if self.matched_text in self.config.c_extra_keywords:\n msg = \"Expected identifier, got user-defined keyword: %s.\" \\\n + \" Remove it from c_extra_keywords to allow it as identifier.\\n\" \\\n + \"Currently c_extra_keywords is %s.\"\n self.fail(msg % (self.matched_text,\n str(self.config.c_extra_keywords)))\n ident = ASTIdentifier(identifier)\n names.append(ident)\n\n self.skip_ws()\n if not self.skip_string('.'):\n break\n return ASTNestedName(names, rooted)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_trailing_type_spec_DefinitionParser._parse_trailing_type_spec.return.ASTTrailingTypeSpecName_p": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_trailing_type_spec_DefinitionParser._parse_trailing_type_spec.return.ASTTrailingTypeSpecName_p", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2590, "end_line": 2607, "span_ids": ["DefinitionParser._parse_trailing_type_spec"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_trailing_type_spec(self) -> ASTTrailingTypeSpec:\n # fundamental types, https://en.cppreference.com/w/c/language/type\n # and extensions\n self.skip_ws()\n res = self._parse_simple_type_specifiers()\n if res is not None:\n return res\n\n # prefixed\n prefix = None\n self.skip_ws()\n for k in ('struct', 'enum', 'union'):\n if self.skip_word_and_ws(k):\n prefix = k\n break\n\n nestedName = self._parse_nested_name()\n return ASTTrailingTypeSpecName(prefix, nestedName)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_decl_specs_simple_DefinitionParser._parse_decl_specs_simple.return.ASTDeclSpecsSimple_storag": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_decl_specs_simple_DefinitionParser._parse_decl_specs_simple.return.ASTDeclSpecsSimple_storag", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2653, "end_line": 2709, "span_ids": ["DefinitionParser._parse_decl_specs_simple"], "tokens": 381}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_decl_specs_simple(self, outer: str, typed: bool) -> ASTDeclSpecsSimple:\n \"\"\"Just parse the simple ones.\"\"\"\n storage = None\n threadLocal = None\n inline = None\n restrict = None\n volatile = None\n const = None\n attrs = []\n while 1: # accept any permutation of a subset of some decl-specs\n self.skip_ws()\n if not storage:\n if outer == 'member':\n if self.skip_word('auto'):\n storage = 'auto'\n continue\n if self.skip_word('register'):\n storage = 'register'\n continue\n if outer in ('member', 'function'):\n if self.skip_word('static'):\n storage = 'static'\n continue\n if self.skip_word('extern'):\n storage = 'extern'\n continue\n if outer == 'member' and not threadLocal:\n if self.skip_word('thread_local'):\n threadLocal = 'thread_local'\n continue\n if self.skip_word('_Thread_local'):\n threadLocal = '_Thread_local'\n continue\n if outer == 'function' and not inline:\n inline = self.skip_word('inline')\n if inline:\n continue\n\n if not restrict and typed:\n restrict = self.skip_word('restrict')\n if restrict:\n continue\n if not volatile and typed:\n volatile = self.skip_word('volatile')\n if volatile:\n continue\n if not const and typed:\n const = self.skip_word('const')\n if const:\n continue\n attr = self._parse_attribute()\n if attr:\n attrs.append(attr)\n continue\n break\n return ASTDeclSpecsSimple(storage, threadLocal, inline,\n restrict, volatile, const, attrs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_decl_specs_DefinitionParser._parse_decl_specs.return.ASTDeclSpecs_outer_leftS": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_decl_specs_DefinitionParser._parse_decl_specs.return.ASTDeclSpecs_outer_leftS", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2711, "end_line": 2723, "span_ids": ["DefinitionParser._parse_decl_specs"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_decl_specs(self, outer: str, typed: bool = True) -> ASTDeclSpecs:\n if outer:\n if outer not in ('type', 'member', 'function'):\n raise Exception('Internal error, unknown outer \"%s\".' % outer)\n leftSpecs = self._parse_decl_specs_simple(outer, typed)\n rightSpecs = None\n\n if typed:\n trailing = self._parse_trailing_type_spec()\n rightSpecs = self._parse_decl_specs_simple(outer, typed)\n else:\n trailing = None\n return ASTDeclSpecs(outer, leftSpecs, rightSpecs, trailing)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_declarator_name_suffix_DefinitionParser._parse_declarator_name_suffix.return.ASTDeclaratorNameParam_de": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_declarator_name_suffix_DefinitionParser._parse_declarator_name_suffix.return.ASTDeclaratorNameParam_de", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2725, "end_line": 2804, "span_ids": ["DefinitionParser._parse_declarator_name_suffix"], "tokens": 650}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_declarator_name_suffix(\n self, named: Union[bool, str], paramMode: str, typed: bool\n ) -> ASTDeclarator:\n assert named in (True, False, 'single')\n # now we should parse the name, and then suffixes\n if named == 'single':\n if self.match(identifier_re):\n if self.matched_text in _keywords:\n self.fail(\"Expected identifier, \"\n \"got keyword: %s\" % self.matched_text)\n if self.matched_text in self.config.c_extra_keywords:\n msg = \"Expected identifier, got user-defined keyword: %s.\" \\\n + \" Remove it from c_extra_keywords to allow it as identifier.\\n\" \\\n + \"Currently c_extra_keywords is %s.\"\n self.fail(msg % (self.matched_text,\n str(self.config.c_extra_keywords)))\n identifier = ASTIdentifier(self.matched_text)\n declId = ASTNestedName([identifier], rooted=False)\n else:\n declId = None\n elif named:\n declId = self._parse_nested_name()\n else:\n declId = None\n arrayOps = []\n while 1:\n self.skip_ws()\n if typed and self.skip_string('['):\n self.skip_ws()\n static = False\n const = False\n volatile = False\n restrict = False\n while True:\n if not static:\n if self.skip_word_and_ws('static'):\n static = True\n continue\n if not const:\n if self.skip_word_and_ws('const'):\n const = True\n continue\n if not volatile:\n if self.skip_word_and_ws('volatile'):\n volatile = True\n continue\n if not restrict:\n if self.skip_word_and_ws('restrict'):\n restrict = True\n continue\n break\n vla = False if static else self.skip_string_and_ws('*')\n if vla:\n if not self.skip_string(']'):\n self.fail(\"Expected ']' in end of array operator.\")\n size = None\n else:\n if self.skip_string(']'):\n size = None\n else:\n\n def parser():\n return self._parse_expression()\n size = self._parse_expression_fallback([']'], parser)\n self.skip_ws()\n if not self.skip_string(']'):\n self.fail(\"Expected ']' in end of array operator.\")\n arrayOps.append(ASTArray(static, const, volatile, restrict, vla, size))\n else:\n break\n param = self._parse_parameters(paramMode)\n if param is None and len(arrayOps) == 0:\n # perhaps a bit-field\n if named and paramMode == 'type' and typed:\n self.skip_ws()\n if self.skip_string(':'):\n size = self._parse_constant_expression()\n return ASTDeclaratorNameBitField(declId=declId, size=size)\n return ASTDeclaratorNameParam(declId=declId, arrayOps=arrayOps,\n param=param)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_declarator_DefinitionParser._parse_declarator.try_.except_DefinitionError_as.raise_self__make_multi_er": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_declarator_DefinitionParser._parse_declarator.try_.except_DefinitionError_as.raise_self__make_multi_er", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2806, "end_line": 2885, "span_ids": ["DefinitionParser._parse_declarator"], "tokens": 734}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_declarator(self, named: Union[bool, str], paramMode: str,\n typed: bool = True) -> ASTDeclarator:\n # 'typed' here means 'parse return type stuff'\n if paramMode not in ('type', 'function'):\n raise Exception(\n \"Internal error, unknown paramMode '%s'.\" % paramMode)\n prevErrors = []\n self.skip_ws()\n if typed and self.skip_string('*'):\n self.skip_ws()\n restrict = False\n volatile = False\n const = False\n attrs = []\n while 1:\n if not restrict:\n restrict = self.skip_word_and_ws('restrict')\n if restrict:\n continue\n if not volatile:\n volatile = self.skip_word_and_ws('volatile')\n if volatile:\n continue\n if not const:\n const = self.skip_word_and_ws('const')\n if const:\n continue\n attr = self._parse_attribute()\n if attr is not None:\n attrs.append(attr)\n continue\n break\n next = self._parse_declarator(named, paramMode, typed)\n return ASTDeclaratorPtr(next=next,\n restrict=restrict, volatile=volatile, const=const,\n attrs=attrs)\n if typed and self.current_char == '(': # note: peeking, not skipping\n # maybe this is the beginning of params, try that first,\n # otherwise assume it's noptr->declarator > ( ptr-declarator )\n pos = self.pos\n try:\n # assume this is params\n res = self._parse_declarator_name_suffix(named, paramMode,\n typed)\n return res\n except DefinitionError as exParamQual:\n msg = \"If declarator-id with parameters\"\n if paramMode == 'function':\n msg += \" (e.g., 'void f(int arg)')\"\n prevErrors.append((exParamQual, msg))\n self.pos = pos\n try:\n assert self.current_char == '('\n self.skip_string('(')\n # TODO: hmm, if there is a name, it must be in inner, right?\n # TODO: hmm, if there must be parameters, they must b\n # inside, right?\n inner = self._parse_declarator(named, paramMode, typed)\n if not self.skip_string(')'):\n self.fail(\"Expected ')' in \\\"( ptr-declarator )\\\"\")\n next = self._parse_declarator(named=False,\n paramMode=\"type\",\n typed=typed)\n return ASTDeclaratorParen(inner=inner, next=next)\n except DefinitionError as exNoPtrParen:\n self.pos = pos\n msg = \"If parenthesis in noptr-declarator\"\n if paramMode == 'function':\n msg += \" (e.g., 'void (*f(int arg))(double)')\"\n prevErrors.append((exNoPtrParen, msg))\n header = \"Error in declarator\"\n raise self._make_multi_error(prevErrors, header) from exNoPtrParen\n pos = self.pos\n try:\n return self._parse_declarator_name_suffix(named, paramMode, typed)\n except DefinitionError as e:\n self.pos = pos\n prevErrors.append((e, \"If declarator-id\"))\n header = \"Error in declarator or parameters\"\n raise self._make_multi_error(prevErrors, header) from e", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_initializer_DefinitionParser._parse_initializer.return.ASTInitializer_value_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_initializer_DefinitionParser._parse_initializer.return.ASTInitializer_value_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2887, "end_line": 2914, "span_ids": ["DefinitionParser._parse_initializer"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_initializer(self, outer: str = None, allowFallback: bool = True\n ) -> ASTInitializer:\n self.skip_ws()\n if outer == 'member' and False: # TODO\n bracedInit = self._parse_braced_init_list()\n if bracedInit is not None:\n return ASTInitializer(bracedInit, hasAssign=False)\n\n if not self.skip_string('='):\n return None\n\n bracedInit = self._parse_braced_init_list()\n if bracedInit is not None:\n return ASTInitializer(bracedInit)\n\n if outer == 'member':\n fallbackEnd: List[str] = []\n elif outer is None: # function parameter\n fallbackEnd = [',', ')']\n else:\n self.fail(\"Internal error, initializer for outer '%s' not \"\n \"implemented.\" % outer)\n\n def parser():\n return self._parse_assignment_expression()\n\n value = self._parse_expression_fallback(fallbackEnd, parser, allow=allowFallback)\n return ASTInitializer(value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_type_DefinitionParser._parse_type.return.ASTType_declSpecs_decl_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_type_DefinitionParser._parse_type.return.ASTType_declSpecs_decl_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2916, "end_line": 2973, "span_ids": ["DefinitionParser._parse_type"], "tokens": 589}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_type(self, named: Union[bool, str], outer: str = None) -> ASTType:\n \"\"\"\n named=False|'single'|True: 'single' is e.g., for function objects which\n doesn't need to name the arguments, but otherwise is a single name\n \"\"\"\n if outer: # always named\n if outer not in ('type', 'member', 'function'):\n raise Exception('Internal error, unknown outer \"%s\".' % outer)\n assert named\n\n if outer == 'type':\n # We allow type objects to just be a name.\n prevErrors = []\n startPos = self.pos\n # first try without the type\n try:\n declSpecs = self._parse_decl_specs(outer=outer, typed=False)\n decl = self._parse_declarator(named=True, paramMode=outer,\n typed=False)\n self.assert_end(allowSemicolon=True)\n except DefinitionError as exUntyped:\n desc = \"If just a name\"\n prevErrors.append((exUntyped, desc))\n self.pos = startPos\n try:\n declSpecs = self._parse_decl_specs(outer=outer)\n decl = self._parse_declarator(named=True, paramMode=outer)\n except DefinitionError as exTyped:\n self.pos = startPos\n desc = \"If typedef-like declaration\"\n prevErrors.append((exTyped, desc))\n # Retain the else branch for easier debugging.\n # TODO: it would be nice to save the previous stacktrace\n # and output it here.\n if True:\n header = \"Type must be either just a name or a \"\n header += \"typedef-like declaration.\"\n raise self._make_multi_error(prevErrors, header) from exTyped\n else:\n # For testing purposes.\n # do it again to get the proper traceback (how do you\n # reliably save a traceback when an exception is\n # constructed?)\n self.pos = startPos\n typed = True\n declSpecs = self._parse_decl_specs(outer=outer, typed=typed)\n decl = self._parse_declarator(named=True, paramMode=outer,\n typed=typed)\n elif outer == 'function':\n declSpecs = self._parse_decl_specs(outer=outer)\n decl = self._parse_declarator(named=True, paramMode=outer)\n else:\n paramMode = 'type'\n if outer == 'member': # i.e., member\n named = True\n declSpecs = self._parse_decl_specs(outer=outer)\n decl = self._parse_declarator(named=named, paramMode=paramMode)\n return ASTType(declSpecs, decl)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_type_with_init_DefinitionParser._parse_macro.return.ASTMacro_ident_args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_type_with_init_DefinitionParser._parse_macro.return.ASTMacro_ident_args_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2975, "end_line": 3020, "span_ids": ["DefinitionParser._parse_type_with_init", "DefinitionParser._parse_macro"], "tokens": 411}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_type_with_init(self, named: Union[bool, str], outer: str) -> ASTTypeWithInit:\n if outer:\n assert outer in ('type', 'member', 'function')\n type = self._parse_type(outer=outer, named=named)\n init = self._parse_initializer(outer=outer)\n return ASTTypeWithInit(type, init)\n\n def _parse_macro(self) -> ASTMacro:\n self.skip_ws()\n ident = self._parse_nested_name()\n if ident is None:\n self.fail(\"Expected identifier in macro definition.\")\n self.skip_ws()\n if not self.skip_string_and_ws('('):\n return ASTMacro(ident, None)\n if self.skip_string(')'):\n return ASTMacro(ident, [])\n args = []\n while 1:\n self.skip_ws()\n if self.skip_string('...'):\n args.append(ASTMacroParameter(None, True))\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail('Expected \")\" after \"...\" in macro parameters.')\n break\n if not self.match(identifier_re):\n self.fail(\"Expected identifier in macro parameters.\")\n nn = ASTNestedName([ASTIdentifier(self.matched_text)], rooted=False)\n # Allow named variadic args:\n # https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html\n self.skip_ws()\n if self.skip_string_and_ws('...'):\n args.append(ASTMacroParameter(nn, False, True))\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail('Expected \")\" after \"...\" in macro parameters.')\n break\n args.append(ASTMacroParameter(nn))\n if self.skip_string_and_ws(','):\n continue\n elif self.skip_string_and_ws(')'):\n break\n else:\n self.fail(\"Expected identifier, ')', or ',' in macro parameter list.\")\n return ASTMacro(ident, args)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_struct_DefinitionParser._parse_enumerator.return.ASTEnumerator_name_init_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_struct_DefinitionParser._parse_enumerator.return.ASTEnumerator_name_init_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3022, "end_line": 3046, "span_ids": ["DefinitionParser._parse_enumerator", "DefinitionParser._parse_union", "DefinitionParser._parse_struct", "DefinitionParser._parse_enum"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_struct(self) -> ASTStruct:\n name = self._parse_nested_name()\n return ASTStruct(name)\n\n def _parse_union(self) -> ASTUnion:\n name = self._parse_nested_name()\n return ASTUnion(name)\n\n def _parse_enum(self) -> ASTEnum:\n name = self._parse_nested_name()\n return ASTEnum(name)\n\n def _parse_enumerator(self) -> ASTEnumerator:\n name = self._parse_nested_name()\n self.skip_ws()\n init = None\n if self.skip_string('='):\n self.skip_ws()\n\n def parser() -> ASTExpression:\n return self._parse_constant_expression()\n\n initVal = self._parse_expression_fallback([], parser)\n init = ASTInitializer(initVal)\n return ASTEnumerator(name, init)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser.parse_declaration_DefinitionParser.parse_declaration.return.ASTDeclaration_objectType": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser.parse_declaration_DefinitionParser.parse_declaration.return.ASTDeclaration_objectType", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3065, "end_line": 3097, "span_ids": ["DefinitionParser.parse_declaration"], "tokens": 324}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def parse_declaration(self, objectType: str, directiveType: str) -> ASTDeclaration:\n if objectType not in ('function', 'member',\n 'macro', 'struct', 'union', 'enum', 'enumerator', 'type'):\n raise Exception('Internal error, unknown objectType \"%s\".' % objectType)\n if directiveType not in ('function', 'member', 'var',\n 'macro', 'struct', 'union', 'enum', 'enumerator', 'type'):\n raise Exception('Internal error, unknown directiveType \"%s\".' % directiveType)\n\n declaration: DeclarationType = None\n if objectType == 'member':\n declaration = self._parse_type_with_init(named=True, outer='member')\n elif objectType == 'function':\n declaration = self._parse_type(named=True, outer='function')\n elif objectType == 'macro':\n declaration = self._parse_macro()\n elif objectType == 'struct':\n declaration = self._parse_struct()\n elif objectType == 'union':\n declaration = self._parse_union()\n elif objectType == 'enum':\n declaration = self._parse_enum()\n elif objectType == 'enumerator':\n declaration = self._parse_enumerator()\n elif objectType == 'type':\n declaration = self._parse_type(named=True, outer='type')\n else:\n assert False\n if objectType != 'macro':\n self.skip_ws()\n semicolon = self.skip_string(';')\n else:\n semicolon = False\n return ASTDeclaration(objectType, directiveType, declaration, semicolon)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.object_type_CObject.describe_signature.ast_describe_signature_si": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.object_type_CObject.describe_signature.ast_describe_signature_si", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3189, "end_line": 3208, "span_ids": ["CObject.parse_definition", "CObject.object_type", "CObject.parse_pre_v3_type_definition", "CObject.describe_signature", "CObject.display_object_type", "CObject.get_index_text"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CObject(ObjectDescription[ASTDeclaration]):\n\n @property\n def object_type(self) -> str:\n raise NotImplementedError()\n\n @property\n def display_object_type(self) -> str:\n return self.object_type\n\n def get_index_text(self, name: str) -> str:\n return _('%s (C %s)') % (name, self.display_object_type)\n\n def parse_definition(self, parser: DefinitionParser) -> ASTDeclaration:\n return parser.parse_declaration(self.object_type, self.objtype)\n\n def parse_pre_v3_type_definition(self, parser: DefinitionParser) -> ASTDeclaration:\n return parser.parse_pre_v3_type_definition()\n\n def describe_signature(self, signode: TextElement, ast: ASTDeclaration,\n options: Dict) -> None:\n ast.describe_signature(signode, 'lastIsName', self.env, options)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.run_CObject.run.return.super_run_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.run_CObject.run.return.super_run_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3210, "end_line": 3221, "span_ids": ["CObject.run"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CObject(ObjectDescription[ASTDeclaration]):\n\n def run(self) -> List[Node]:\n env = self.state.document.settings.env # from ObjectDescription.run\n if 'c:parent_symbol' not in env.temp_data:\n root = env.domaindata['c']['root_symbol']\n env.temp_data['c:parent_symbol'] = root\n env.ref_context['c:parent_key'] = root.get_lookup_key()\n\n # When multiple declarations are made in the same directive\n # they need to know about each other to provide symbol lookup for function parameters.\n # We use last_symbol to store the latest added declaration in a directive.\n env.temp_data['c:last_symbol'] = None\n return super().run()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.handle_signature_CObject.handle_signature.return.ast": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.handle_signature_CObject.handle_signature.return.ast", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3248, "end_line": 3310, "span_ids": ["CObject.handle_signature"], "tokens": 631}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CObject(ObjectDescription[ASTDeclaration]):\n\n def handle_signature(self, sig: str, signode: TextElement) -> ASTDeclaration:\n parentSymbol: Symbol = self.env.temp_data['c:parent_symbol']\n\n parser = DefinitionParser(sig, location=signode, config=self.env.config)\n try:\n try:\n ast = self.parse_definition(parser)\n parser.assert_end()\n except DefinitionError as eOrig:\n if not self.env.config['c_allow_pre_v3']:\n raise\n if self.objtype != 'type':\n raise\n try:\n ast = self.parse_pre_v3_type_definition(parser)\n parser.assert_end()\n except DefinitionError:\n raise eOrig\n self.object_type = ast.objectType # type: ignore\n if self.env.config['c_warn_on_allowed_pre_v3']:\n msg = \"{}: Pre-v3 C type directive '.. c:type:: {}' converted to \" \\\n \"'.. c:{}:: {}'.\" \\\n \"\\nThe original parsing error was:\\n{}\"\n msg = msg.format(RemovedInSphinx60Warning.__name__,\n sig, ast.objectType, ast, eOrig)\n logger.warning(msg, location=signode)\n except DefinitionError as e:\n logger.warning(e, location=signode)\n # It is easier to assume some phony name than handling the error in\n # the possibly inner declarations.\n name = _make_phony_error_name()\n symbol = parentSymbol.add_name(name)\n self.env.temp_data['c:last_symbol'] = symbol\n raise ValueError from e\n\n try:\n symbol = parentSymbol.add_declaration(\n ast, docname=self.env.docname, line=self.get_source_info()[1])\n # append the new declaration to the sibling list\n assert symbol.siblingAbove is None\n assert symbol.siblingBelow is None\n symbol.siblingAbove = self.env.temp_data['c:last_symbol']\n if symbol.siblingAbove is not None:\n assert symbol.siblingAbove.siblingBelow is None\n symbol.siblingAbove.siblingBelow = symbol\n self.env.temp_data['c:last_symbol'] = symbol\n except _DuplicateSymbolError as e:\n # Assume we are actually in the old symbol,\n # instead of the newly created duplicate.\n self.env.temp_data['c:last_symbol'] = e.symbol\n msg = __(\"Duplicate C declaration, also defined at %s:%s.\\n\"\n \"Declaration is '.. c:%s:: %s'.\")\n msg = msg % (e.symbol.docname, e.symbol.line, self.display_object_type, sig)\n logger.warning(msg, location=signode)\n\n if ast.objectType == 'enumerator':\n self._add_enumerator_to_parent(ast)\n\n # note: handle_signature may be called multiple time per directive,\n # if it has multiple signatures, so don't mess with the original options.\n options = dict(self.options)\n self.describe_signature(signode, ast, options)\n return ast", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.before_content_CObject.make_old_id.return._c_name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.before_content_CObject.make_old_id.return._c_name", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3312, "end_line": 3330, "span_ids": ["CObject.before_content", "CObject.make_old_id", "CObject.after_content"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CObject(ObjectDescription[ASTDeclaration]):\n\n def before_content(self) -> None:\n lastSymbol: Symbol = self.env.temp_data['c:last_symbol']\n assert lastSymbol\n self.oldParentSymbol = self.env.temp_data['c:parent_symbol']\n self.oldParentKey: LookupKey = self.env.ref_context['c:parent_key']\n self.env.temp_data['c:parent_symbol'] = lastSymbol\n self.env.ref_context['c:parent_key'] = lastSymbol.get_lookup_key()\n\n def after_content(self) -> None:\n self.env.temp_data['c:parent_symbol'] = self.oldParentSymbol\n self.env.ref_context['c:parent_key'] = self.oldParentKey\n\n def make_old_id(self, name: str) -> str:\n \"\"\"Generate old styled node_id for C objects.\n\n .. note:: Old Styled node_id was used until Sphinx-3.0.\n This will be removed in Sphinx-5.0.\n \"\"\"\n return 'c.' + name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CMemberObject_CTypeObject.object_type._type_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CMemberObject_CTypeObject.object_type._type_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3333, "end_line": 3386, "span_ids": ["CEnumeratorObject", "CFunctionObject", "CMemberObject", "CMacroObject", "CTypeObject", "CEnumObject", "impl:25", "CStructObject", "CMemberObject.display_object_type", "CUnionObject"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CMemberObject(CObject):\n object_type = 'member'\n\n @property\n def display_object_type(self) -> str:\n # the distinction between var and member is only cosmetic\n assert self.objtype in ('member', 'var')\n return self.objtype\n\n\n_function_doc_field_types = [\n TypedField('parameter', label=_('Parameters'),\n names=('param', 'parameter', 'arg', 'argument'),\n typerolename='expr', typenames=('type',)),\n GroupedField('retval', label=_('Return values'),\n names=('retvals', 'retval'),\n can_collapse=True),\n Field('returnvalue', label=_('Returns'), has_arg=False,\n names=('returns', 'return')),\n Field('returntype', label=_('Return type'), has_arg=False,\n names=('rtype',)),\n]\n\n\nclass CFunctionObject(CObject):\n object_type = 'function'\n\n doc_field_types = _function_doc_field_types.copy()\n\n\nclass CMacroObject(CObject):\n object_type = 'macro'\n\n doc_field_types = _function_doc_field_types.copy()\n\n\nclass CStructObject(CObject):\n object_type = 'struct'\n\n\nclass CUnionObject(CObject):\n object_type = 'union'\n\n\nclass CEnumObject(CObject):\n object_type = 'enum'\n\n\nclass CEnumeratorObject(CObject):\n object_type = 'enumerator'\n\n\nclass CTypeObject(CObject):\n object_type = 'type'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CNamespaceObject_CNamespaceObject.run.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CNamespaceObject_CNamespaceObject.run.return._", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3389, "end_line": 3421, "span_ids": ["CNamespaceObject.run", "CNamespaceObject"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CNamespaceObject(SphinxDirective):\n \"\"\"\n This directive is just to tell Sphinx that we're documenting stuff in\n namespace foo.\n \"\"\"\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n rootSymbol = self.env.domaindata['c']['root_symbol']\n if self.arguments[0].strip() in ('NULL', '0', 'nullptr'):\n symbol = rootSymbol\n stack: List[Symbol] = []\n else:\n parser = DefinitionParser(self.arguments[0],\n location=self.get_location(),\n config=self.env.config)\n try:\n name = parser.parse_namespace_object()\n parser.assert_end()\n except DefinitionError as e:\n logger.warning(e, location=self.get_location())\n name = _make_phony_error_name()\n symbol = rootSymbol.add_name(name)\n stack = [symbol]\n self.env.temp_data['c:parent_symbol'] = symbol\n self.env.temp_data['c:namespace_stack'] = stack\n self.env.ref_context['c:parent_key'] = symbol.get_lookup_key()\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CNamespacePushObject_CNamespacePushObject.run.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CNamespacePushObject_CNamespacePushObject.run.return._", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3424, "end_line": 3452, "span_ids": ["CNamespacePushObject", "CNamespacePushObject.run"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CNamespacePushObject(SphinxDirective):\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n if self.arguments[0].strip() in ('NULL', '0', 'nullptr'):\n return []\n parser = DefinitionParser(self.arguments[0],\n location=self.get_location(),\n config=self.env.config)\n try:\n name = parser.parse_namespace_object()\n parser.assert_end()\n except DefinitionError as e:\n logger.warning(e, location=self.get_location())\n name = _make_phony_error_name()\n oldParent = self.env.temp_data.get('c:parent_symbol', None)\n if not oldParent:\n oldParent = self.env.domaindata['c']['root_symbol']\n symbol = oldParent.add_name(name)\n stack = self.env.temp_data.get('c:namespace_stack', [])\n stack.append(symbol)\n self.env.temp_data['c:parent_symbol'] = symbol\n self.env.temp_data['c:namespace_stack'] = stack\n self.env.ref_context['c:parent_key'] = symbol.get_lookup_key()\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CNamespacePopObject_CNamespacePopObject.run.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CNamespacePopObject_CNamespacePopObject.run.return._", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3455, "end_line": 3477, "span_ids": ["CNamespacePopObject.run", "CNamespacePopObject"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CNamespacePopObject(SphinxDirective):\n has_content = False\n required_arguments = 0\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n stack = self.env.temp_data.get('c:namespace_stack', None)\n if not stack or len(stack) == 0:\n logger.warning(\"C namespace pop on empty stack. Defaulting to global scope.\",\n location=self.get_location())\n stack = []\n else:\n stack.pop()\n if len(stack) > 0:\n symbol = stack[-1]\n else:\n symbol = self.env.domaindata['c']['root_symbol']\n self.env.temp_data['c:parent_symbol'] = symbol\n self.env.temp_data['c:namespace_stack'] = stack\n self.env.ref_context['cp:parent_key'] = symbol.get_lookup_key()\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CXRefRole_CXRefRole.process_link.return.title_target": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CXRefRole_CXRefRole.process_link.return.title_target", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3312, "end_line": 3331, "span_ids": ["CXRefRole", "CXRefRole.process_link"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CXRefRole(XRefRole):\n def process_link(self, env: BuildEnvironment, refnode: Element,\n has_explicit_title: bool, title: str, target: str) -> Tuple[str, str]:\n refnode.attributes.update(env.ref_context)\n\n if not has_explicit_title:\n # major hax: replace anon names via simple string manipulation.\n # Can this actually fail?\n title = anon_identifier_re.sub(\"[anonymous]\", str(title))\n\n if not has_explicit_title:\n target = target.lstrip('~') # only has a meaning for the title\n # if the first character is a tilde, don't display the module/class\n # parts of the contents\n if title[0:1] == '~':\n title = title[1:]\n dot = title.rfind('.')\n if dot != -1:\n title = title[dot + 1:]\n return title, target", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CExprRole_CExprRole.run.return._signode_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CExprRole_CExprRole.run.return._signode_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3709, "end_line": 3738, "span_ids": ["CExprRole", "CExprRole.run"], "tokens": 305}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CExprRole(SphinxRole):\n def __init__(self, asCode: bool) -> None:\n super().__init__()\n if asCode:\n # render the expression as inline code\n self.class_type = 'c-expr'\n else:\n # render the expression as inline text\n self.class_type = 'c-texpr'\n\n def run(self) -> Tuple[List[Node], List[system_message]]:\n text = self.text.replace('\\n', ' ')\n parser = DefinitionParser(text, location=self.get_location(),\n config=self.env.config)\n # attempt to mimic XRefRole classes, except that...\n try:\n ast = parser.parse_expression()\n except DefinitionError as ex:\n logger.warning('Unparseable C expression: %r\\n%s', text, ex,\n location=self.get_location())\n # see below\n return [addnodes.desc_inline('c', text, text, classes=[self.class_type])], []\n parentSymbol = self.env.temp_data.get('c:parent_symbol', None)\n if parentSymbol is None:\n parentSymbol = self.env.domaindata['c']['root_symbol']\n # ...most if not all of these classes should really apply to the individual references,\n # not the container node\n signode = addnodes.desc_inline('c', classes=[self.class_type])\n ast.describe_signature(signode, 'markType', self.env, parentSymbol)\n return [signode], []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.clear_doc_CDomain.process_field_xref.pnode_attributes_update_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.clear_doc_CDomain.process_field_xref.pnode_attributes_update_s", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3701, "end_line": 3725, "span_ids": ["CDomain.process_field_xref", "CDomain.clear_doc", "CDomain.process_doc"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CDomain(Domain):\n\n def clear_doc(self, docname: str) -> None:\n if Symbol.debug_show_tree:\n print(\"clear_doc:\", docname)\n print(\"\\tbefore:\")\n print(self.data['root_symbol'].dump(1))\n print(\"\\tbefore end\")\n\n rootSymbol = self.data['root_symbol']\n rootSymbol.clear_doc(docname)\n\n if Symbol.debug_show_tree:\n print(\"\\tafter:\")\n print(self.data['root_symbol'].dump(1))\n print(\"\\tafter end\")\n print(\"clear_doc end:\", docname)\n\n def process_doc(self, env: BuildEnvironment, docname: str,\n document: nodes.document) -> None:\n if Symbol.debug_show_tree:\n print(\"process_doc:\", docname)\n print(self.data['root_symbol'].dump(0))\n print(\"process_doc end:\", docname)\n\n def process_field_xref(self, pnode: pending_xref) -> None:\n pnode.attributes.update(self.env.ref_context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain._resolve_xref_inner_CDomain._resolve_xref_inner.return.make_refnode_builder_fro": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain._resolve_xref_inner_CDomain._resolve_xref_inner.return.make_refnode_builder_fro", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3842, "end_line": 3877, "span_ids": ["CDomain._resolve_xref_inner"], "tokens": 333}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CDomain(Domain):\n\n def _resolve_xref_inner(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n typ: str, target: str, node: pending_xref,\n contnode: Element) -> Tuple[Optional[Element], Optional[str]]:\n parser = DefinitionParser(target, location=node, config=env.config)\n try:\n name = parser.parse_xref_object()\n except DefinitionError as e:\n logger.warning('Unparseable C cross-reference: %r\\n%s', target, e,\n location=node)\n return None, None\n parentKey: LookupKey = node.get(\"c:parent_key\", None)\n rootSymbol = self.data['root_symbol']\n if parentKey:\n parentSymbol: Symbol = rootSymbol.direct_lookup(parentKey)\n if not parentSymbol:\n print(\"Target: \", target)\n print(\"ParentKey: \", parentKey)\n print(rootSymbol.dump(1))\n assert parentSymbol # should be there\n else:\n parentSymbol = rootSymbol\n s = parentSymbol.find_declaration(name, typ,\n matchSelf=True, recurseInAnon=True)\n if s is None or s.declaration is None:\n return None, None\n\n # TODO: check role type vs. object type\n\n declaration = s.declaration\n displayName = name.get_display_string()\n docname = s.docname\n assert docname\n\n return make_refnode(builder, fromdocname, docname,\n declaration.get_newest_id(), contnode, displayName\n ), declaration.objectType", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/changeset.py_VersionChange_VersionChange.run.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/changeset.py_VersionChange_VersionChange.run.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/domains/changeset.py", "file_name": "changeset.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 99, "span_ids": ["VersionChange.run", "VersionChange"], "tokens": 516}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VersionChange(SphinxDirective):\n \"\"\"\n Directive to describe a change/addition/deprecation in a specific version.\n \"\"\"\n has_content = True\n required_arguments = 1\n optional_arguments = 1\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n node = addnodes.versionmodified()\n node.document = self.state.document\n self.set_source_info(node)\n node['type'] = self.name\n node['version'] = self.arguments[0]\n text = versionlabels[self.name] % self.arguments[0]\n if len(self.arguments) == 2:\n inodes, messages = self.state.inline_text(self.arguments[1],\n self.lineno + 1)\n para = nodes.paragraph(self.arguments[1], '', *inodes, translatable=False)\n self.set_source_info(para)\n node.append(para)\n else:\n messages = []\n if self.content:\n self.state.nested_parse(self.content, self.content_offset, node)\n classes = ['versionmodified', versionlabel_classes[self.name]]\n if len(node) > 0 and isinstance(node[0], nodes.paragraph):\n # the contents start with a paragraph\n if node[0].rawsource:\n # make the first paragraph translatable\n content = nodes.inline(node[0].rawsource, translatable=True)\n content.source = node[0].source\n content.line = node[0].line\n content += node[0].children\n node[0].replace_self(nodes.paragraph('', '', content, translatable=False))\n\n para = cast(nodes.paragraph, node[0])\n para.insert(0, nodes.inline('', '%s: ' % text, classes=classes))\n elif len(node) > 0:\n # the contents do not starts with a paragraph\n para = nodes.paragraph('', '',\n nodes.inline('', '%s: ' % text, classes=classes),\n translatable=False)\n node.insert(0, para)\n else:\n # the contents are empty\n para = nodes.paragraph('', '',\n nodes.inline('', '%s.' % text, classes=classes),\n translatable=False)\n node.append(para)\n\n domain = cast(ChangeSetDomain, self.env.get_domain('changeset'))\n domain.note_changeset(node)\n\n ret: List[Node] = [node]\n ret += messages\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/changeset.py_ChangeSetDomain_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/changeset.py_ChangeSetDomain_", "embedding": null, "metadata": {"file_path": "sphinx/domains/changeset.py", "file_name": "changeset.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 157, "span_ids": ["ChangeSetDomain", "ChangeSetDomain.changesets", "setup", "ChangeSetDomain.note_changeset", "ChangeSetDomain.clear_doc", "ChangeSetDomain.merge_domaindata", "ChangeSetDomain.process_doc", "ChangeSetDomain.get_changesets_for"], "tokens": 472}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ChangeSetDomain(Domain):\n \"\"\"Domain for changesets.\"\"\"\n\n name = 'changeset'\n label = 'changeset'\n\n initial_data: Dict = {\n 'changes': {}, # version -> list of ChangeSet\n }\n\n @property\n def changesets(self) -> Dict[str, List[ChangeSet]]:\n return self.data.setdefault('changes', {}) # version -> list of ChangeSet\n\n def note_changeset(self, node: addnodes.versionmodified) -> None:\n version = node['version']\n module = self.env.ref_context.get('py:module')\n objname = self.env.temp_data.get('object')\n changeset = ChangeSet(node['type'], self.env.docname, node.line,\n module, objname, node.astext())\n self.changesets.setdefault(version, []).append(changeset)\n\n def clear_doc(self, docname: str) -> None:\n for changes in self.changesets.values():\n for changeset in changes[:]:\n if changeset.docname == docname:\n changes.remove(changeset)\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:\n # XXX duplicates?\n for version, otherchanges in otherdata['changes'].items():\n changes = self.changesets.setdefault(version, [])\n for changeset in otherchanges:\n if changeset.docname in docnames:\n changes.append(changeset)\n\n def process_doc(self, env: \"BuildEnvironment\", docname: str, document: nodes.document) -> None: # NOQA\n pass # nothing to do here. All changesets are registered on calling directive.\n\n def get_changesets_for(self, version: str) -> List[ChangeSet]:\n return self.changesets.get(version, [])\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_domain(ChangeSetDomain)\n app.add_directive('deprecated', VersionChange)\n app.add_directive('versionadded', VersionChange)\n app.add_directive('versionchanged', VersionChange)\n\n return {\n 'version': 'builtin',\n 'env_version': 1,\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py_CitationDomain_CitationDomain.resolve_any_xref.if_refnode_is_None_.else_.return._ref_refnode_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py_CitationDomain_CitationDomain.resolve_any_xref.if_refnode_is_None_.else_.return._ref_refnode_", "embedding": null, "metadata": {"file_path": "sphinx/domains/citation.py", "file_name": "citation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 98, "span_ids": ["CitationDomain.resolve_xref", "CitationDomain", "CitationDomain.note_citation", "CitationDomain.check_consistency", "CitationDomain.citation_refs", "CitationDomain.note_citation_reference", "CitationDomain.citations", "CitationDomain.clear_doc", "CitationDomain.merge_domaindata", "CitationDomain.resolve_any_xref"], "tokens": 724}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CitationDomain(Domain):\n \"\"\"Domain for citations.\"\"\"\n\n name = 'citation'\n label = 'citation'\n\n dangling_warnings = {\n 'ref': 'citation not found: %(target)s',\n }\n\n @property\n def citations(self) -> Dict[str, Tuple[str, str, int]]:\n return self.data.setdefault('citations', {})\n\n @property\n def citation_refs(self) -> Dict[str, Set[str]]:\n return self.data.setdefault('citation_refs', {})\n\n def clear_doc(self, docname: str) -> None:\n for key, (fn, _l, _lineno) in list(self.citations.items()):\n if fn == docname:\n del self.citations[key]\n for key, docnames in list(self.citation_refs.items()):\n if docnames == {docname}:\n del self.citation_refs[key]\n elif docname in docnames:\n docnames.remove(docname)\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:\n # XXX duplicates?\n for key, data in otherdata['citations'].items():\n if data[0] in docnames:\n self.citations[key] = data\n for key, data in otherdata['citation_refs'].items():\n citation_refs = self.citation_refs.setdefault(key, set())\n for docname in data:\n if docname in docnames:\n citation_refs.add(docname)\n\n def note_citation(self, node: nodes.citation) -> None:\n label = node[0].astext()\n if label in self.citations:\n path = self.env.doc2path(self.citations[label][0])\n logger.warning(__('duplicate citation %s, other instance in %s'), label, path,\n location=node, type='ref', subtype='citation')\n self.citations[label] = (node['docname'], node['ids'][0], node.line)\n\n def note_citation_reference(self, node: pending_xref) -> None:\n docnames = self.citation_refs.setdefault(node['reftarget'], set())\n docnames.add(self.env.docname)\n\n def check_consistency(self) -> None:\n for name, (docname, _labelid, lineno) in self.citations.items():\n if name not in self.citation_refs:\n logger.warning(__('Citation [%s] is not referenced.'), name,\n type='ref', subtype='citation', location=(docname, lineno))\n\n def resolve_xref(self, env: \"BuildEnvironment\", fromdocname: str, builder: \"Builder\",\n typ: str, target: str, node: pending_xref, contnode: Element\n ) -> Optional[Element]:\n docname, labelid, lineno = self.citations.get(target, ('', '', 0))\n if not docname:\n return None\n\n return make_refnode(builder, fromdocname, docname,\n labelid, contnode)\n\n def resolve_any_xref(self, env: \"BuildEnvironment\", fromdocname: str, builder: \"Builder\",\n target: str, node: pending_xref, contnode: Element\n ) -> List[Tuple[str, Element]]:\n refnode = self.resolve_xref(env, fromdocname, builder, 'ref', target, node, contnode)\n if refnode is None:\n return []\n else:\n return [('ref', refnode)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py_CitationDefinitionTransform_CitationDefinitionTransform.apply.for_node_in_self_document.label_support_smartquote": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py_CitationDefinitionTransform_CitationDefinitionTransform.apply.for_node_in_self_document.label_support_smartquote", "embedding": null, "metadata": {"file_path": "sphinx/domains/citation.py", "file_name": "citation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 101, "end_line": 114, "span_ids": ["CitationDefinitionTransform.apply", "CitationDefinitionTransform"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CitationDefinitionTransform(SphinxTransform):\n \"\"\"Mark citation definition labels as not smartquoted.\"\"\"\n default_priority = 619\n\n def apply(self, **kwargs: Any) -> None:\n domain = cast(CitationDomain, self.env.get_domain('citation'))\n for node in self.document.findall(nodes.citation):\n # register citation node to domain\n node['docname'] = self.env.docname\n domain.note_citation(node)\n\n # mark citation labels as not smartquoted\n label = cast(nodes.label, node[0])\n label['support_smartquotes'] = False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py_CitationReferenceTransform_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py_CitationReferenceTransform_", "embedding": null, "metadata": {"file_path": "sphinx/domains/citation.py", "file_name": "citation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 152, "span_ids": ["CitationReferenceTransform.apply", "CitationReferenceTransform", "setup"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CitationReferenceTransform(SphinxTransform):\n \"\"\"\n Replace citation references by pending_xref nodes before the default\n docutils transform tries to resolve them.\n \"\"\"\n default_priority = 619\n\n def apply(self, **kwargs: Any) -> None:\n domain = cast(CitationDomain, self.env.get_domain('citation'))\n for node in self.document.findall(nodes.citation_reference):\n target = node.astext()\n ref = pending_xref(target, refdomain='citation', reftype='ref',\n reftarget=target, refwarn=True,\n support_smartquotes=False,\n ids=node[\"ids\"],\n classes=node.get('classes', []))\n ref += nodes.inline(target, '[%s]' % target)\n copy_source_info(node, ref)\n node.replace_self(ref)\n\n # register reference node to domain\n domain.note_citation_reference(ref)\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_domain(CitationDomain)\n app.add_transform(CitationDefinitionTransform)\n app.add_transform(CitationReferenceTransform)\n\n return {\n 'version': 'builtin',\n 'env_version': 1,\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__string_re__id_fundamental_v2._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__string_re__id_fundamental_v2._", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 294, "end_line": 481, "span_ids": ["impl:17", "impl:29", "impl:5"], "tokens": 1799}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_string_re = re.compile(r\"[LuU8]?('([^'\\\\]*(?:\\\\.[^'\\\\]*)*)'\"\n r'|\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")', re.S)\n_visibility_re = re.compile(r'\\b(public|private|protected)\\b')\n_operator_re = re.compile(r'''(?x)\n \\[\\s*\\]\n | \\(\\s*\\)\n | \\+\\+ | --\n | ->\\*? | \\,\n | (<<|>>)=? | && | \\|\\|\n | <=>\n | [!<>=/*%+|&^~-]=?\n | (\\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|xor|xor_eq)\\b)\n''')\n_fold_operator_re = re.compile(r'''(?x)\n ->\\* | \\.\\* | \\,\n | (<<|>>)=? | && | \\|\\|\n | !=\n | [<>=/*%+|&^~-]=?\n''')\n# see https://en.cppreference.com/w/cpp/keyword\n_keywords = [\n 'alignas', 'alignof', 'and', 'and_eq', 'asm', 'auto', 'bitand', 'bitor',\n 'bool', 'break', 'case', 'catch', 'char', 'char8_t', 'char16_t', 'char32_t',\n 'class', 'compl', 'concept', 'const', 'consteval', 'constexpr', 'constinit',\n 'const_cast', 'continue',\n 'decltype', 'default', 'delete', 'do', 'double', 'dynamic_cast', 'else',\n 'enum', 'explicit', 'export', 'extern', 'false', 'float', 'for', 'friend',\n 'goto', 'if', 'inline', 'int', 'long', 'mutable', 'namespace', 'new',\n 'noexcept', 'not', 'not_eq', 'nullptr', 'operator', 'or', 'or_eq',\n 'private', 'protected', 'public', 'register', 'reinterpret_cast',\n 'requires', 'return', 'short', 'signed', 'sizeof', 'static',\n 'static_assert', 'static_cast', 'struct', 'switch', 'template', 'this',\n 'thread_local', 'throw', 'true', 'try', 'typedef', 'typeid', 'typename',\n 'union', 'unsigned', 'using', 'virtual', 'void', 'volatile', 'wchar_t',\n 'while', 'xor', 'xor_eq'\n]\n\n\n_simple_type_specifiers_re = re.compile(r\"\"\"(?x)\n \\b(\n auto|void|bool\n |signed|unsigned\n |short|long\n |char|wchar_t|char(8|16|32)_t\n |int\n |__int(64|128) # extension\n |float|double\n |__float80|_Float64x|__float128|_Float128 # extension\n |_Complex|_Imaginary # extension\n )\\b\n\"\"\")\n\n_max_id = 4\n_id_prefix = [None, '', '_CPPv2', '_CPPv3', '_CPPv4']\n# Ids are used in lookup keys which are used across pickled files,\n# so when _max_id changes, make sure to update the ENV_VERSION.\n\n# ------------------------------------------------------------------------------\n# Id v1 constants\n# ------------------------------------------------------------------------------\n\n_id_fundamental_v1 = {\n 'char': 'c',\n 'signed char': 'c',\n 'unsigned char': 'C',\n 'int': 'i',\n 'signed int': 'i',\n 'unsigned int': 'U',\n 'long': 'l',\n 'signed long': 'l',\n 'unsigned long': 'L',\n 'bool': 'b'\n}\n_id_shorthands_v1 = {\n 'std::string': 'ss',\n 'std::ostream': 'os',\n 'std::istream': 'is',\n 'std::iostream': 'ios',\n 'std::vector': 'v',\n 'std::map': 'm'\n}\n_id_operator_v1 = {\n 'new': 'new-operator',\n 'new[]': 'new-array-operator',\n 'delete': 'delete-operator',\n 'delete[]': 'delete-array-operator',\n # the arguments will make the difference between unary and binary\n # '+(unary)' : 'ps',\n # '-(unary)' : 'ng',\n # '&(unary)' : 'ad',\n # '*(unary)' : 'de',\n '~': 'inv-operator',\n '+': 'add-operator',\n '-': 'sub-operator',\n '*': 'mul-operator',\n '/': 'div-operator',\n '%': 'mod-operator',\n '&': 'and-operator',\n '|': 'or-operator',\n '^': 'xor-operator',\n '=': 'assign-operator',\n '+=': 'add-assign-operator',\n '-=': 'sub-assign-operator',\n '*=': 'mul-assign-operator',\n '/=': 'div-assign-operator',\n '%=': 'mod-assign-operator',\n '&=': 'and-assign-operator',\n '|=': 'or-assign-operator',\n '^=': 'xor-assign-operator',\n '<<': 'lshift-operator',\n '>>': 'rshift-operator',\n '<<=': 'lshift-assign-operator',\n '>>=': 'rshift-assign-operator',\n '==': 'eq-operator',\n '!=': 'neq-operator',\n '<': 'lt-operator',\n '>': 'gt-operator',\n '<=': 'lte-operator',\n '>=': 'gte-operator',\n '!': 'not-operator',\n '&&': 'sand-operator',\n '||': 'sor-operator',\n '++': 'inc-operator',\n '--': 'dec-operator',\n ',': 'comma-operator',\n '->*': 'pointer-by-pointer-operator',\n '->': 'pointer-operator',\n '()': 'call-operator',\n '[]': 'subscript-operator'\n}\n\n# ------------------------------------------------------------------------------\n# Id v > 1 constants\n# ------------------------------------------------------------------------------\n\n_id_fundamental_v2 = {\n # not all of these are actually parsed as fundamental types, TODO: do that\n 'void': 'v',\n 'bool': 'b',\n 'char': 'c',\n 'signed char': 'a',\n 'unsigned char': 'h',\n 'wchar_t': 'w',\n 'char32_t': 'Di',\n 'char16_t': 'Ds',\n 'char8_t': 'Du',\n 'short': 's',\n 'short int': 's',\n 'signed short': 's',\n 'signed short int': 's',\n 'unsigned short': 't',\n 'unsigned short int': 't',\n 'int': 'i',\n 'signed': 'i',\n 'signed int': 'i',\n 'unsigned': 'j',\n 'unsigned int': 'j',\n 'long': 'l',\n 'long int': 'l',\n 'signed long': 'l',\n 'signed long int': 'l',\n 'unsigned long': 'm',\n 'unsigned long int': 'm',\n 'long long': 'x',\n 'long long int': 'x',\n 'signed long long': 'x',\n 'signed long long int': 'x',\n '__int64': 'x',\n 'unsigned long long': 'y',\n 'unsigned long long int': 'y',\n '__int128': 'n',\n 'signed __int128': 'n',\n 'unsigned __int128': 'o',\n 'float': 'f',\n 'double': 'd',\n 'long double': 'e',\n '__float80': 'e', '_Float64x': 'e',\n '__float128': 'g', '_Float128': 'g',\n '_Complex float': 'Cf',\n '_Complex double': 'Cd',\n '_Complex long double': 'Ce',\n '_Imaginary float': 'f',\n '_Imaginary double': 'd',\n '_Imaginary long double': 'e',\n 'auto': 'Da',\n 'decltype(auto)': 'Dc',\n 'std::nullptr_t': 'Dn'\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__id_operator_v2_ASTNestedName.num_templates.return.count": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__id_operator_v2_ASTNestedName.num_templates.return.count", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 482, "end_line": 718, "span_ids": ["ASTNestedNameElement._stringify", "ASTNestedName.name", "ASTIdentifier.get_display_string", "ASTIdentifier.__str__", "_DuplicateSymbolError.__str__", "ASTNestedName.num_templates", "_DuplicateSymbolError", "ASTNestedName", "ASTIdentifier.is_anon", "ASTNestedNameElement", "ASTBase", "ASTNestedNameElement.describe_signature", "ASTIdentifier.describe_signature", "ASTNestedNameElement.get_id", "impl:29", "ASTIdentifier", "ASTIdentifier.get_id", "impl:33", "ASTNestedNameElement.is_operator"], "tokens": 1949}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_id_operator_v2 = {\n 'new': 'nw',\n 'new[]': 'na',\n 'delete': 'dl',\n 'delete[]': 'da',\n # the arguments will make the difference between unary and binary\n # in operator definitions\n # '+(unary)' : 'ps',\n # '-(unary)' : 'ng',\n # '&(unary)' : 'ad',\n # '*(unary)' : 'de',\n '~': 'co', 'compl': 'co',\n '+': 'pl',\n '-': 'mi',\n '*': 'ml',\n '/': 'dv',\n '%': 'rm',\n '&': 'an', 'bitand': 'an',\n '|': 'or', 'bitor': 'or',\n '^': 'eo', 'xor': 'eo',\n '=': 'aS',\n '+=': 'pL',\n '-=': 'mI',\n '*=': 'mL',\n '/=': 'dV',\n '%=': 'rM',\n '&=': 'aN', 'and_eq': 'aN',\n '|=': 'oR', 'or_eq': 'oR',\n '^=': 'eO', 'xor_eq': 'eO',\n '<<': 'ls',\n '>>': 'rs',\n '<<=': 'lS',\n '>>=': 'rS',\n '==': 'eq',\n '!=': 'ne', 'not_eq': 'ne',\n '<': 'lt',\n '>': 'gt',\n '<=': 'le',\n '>=': 'ge',\n '<=>': 'ss',\n '!': 'nt', 'not': 'nt',\n '&&': 'aa', 'and': 'aa',\n '||': 'oo', 'or': 'oo',\n '++': 'pp',\n '--': 'mm',\n ',': 'cm',\n '->*': 'pm',\n '->': 'pt',\n '()': 'cl',\n '[]': 'ix',\n '.*': 'ds' # this one is not overloadable, but we need it for expressions\n}\n_id_operator_unary_v2 = {\n '++': 'pp_',\n '--': 'mm_',\n '*': 'de',\n '&': 'ad',\n '+': 'ps',\n '-': 'ng',\n '!': 'nt', 'not': 'nt',\n '~': 'co', 'compl': 'co'\n}\n_id_char_from_prefix: Dict[Optional[str], str] = {\n None: 'c', 'u8': 'c',\n 'u': 'Ds', 'U': 'Di', 'L': 'w'\n}\n# these are ordered by preceedence\n_expression_bin_ops = [\n ['||', 'or'],\n ['&&', 'and'],\n ['|', 'bitor'],\n ['^', 'xor'],\n ['&', 'bitand'],\n ['==', '!=', 'not_eq'],\n ['<=>', '<=', '>=', '<', '>'],\n ['<<', '>>'],\n ['+', '-'],\n ['*', '/', '%'],\n ['.*', '->*']\n]\n_expression_unary_ops = [\"++\", \"--\", \"*\", \"&\", \"+\", \"-\", \"!\", \"not\", \"~\", \"compl\"]\n_expression_assignment_ops = [\"=\", \"*=\", \"/=\", \"%=\", \"+=\", \"-=\",\n \">>=\", \"<<=\", \"&=\", \"and_eq\", \"^=\", \"|=\", \"xor_eq\", \"or_eq\"]\n_id_explicit_cast = {\n 'dynamic_cast': 'dc',\n 'static_cast': 'sc',\n 'const_cast': 'cc',\n 'reinterpret_cast': 'rc'\n}\n\n\nclass _DuplicateSymbolError(Exception):\n def __init__(self, symbol: \"Symbol\", declaration: \"ASTDeclaration\") -> None:\n assert symbol\n assert declaration\n self.symbol = symbol\n self.declaration = declaration\n\n def __str__(self) -> str:\n return \"Internal C++ duplicate symbol error:\\n%s\" % self.symbol.dump(0)\n\n\nclass ASTBase(ASTBaseBase):\n pass\n\n\n# Names\n################################################################################\n\nclass ASTIdentifier(ASTBase):\n def __init__(self, identifier: str) -> None:\n assert identifier is not None\n assert len(identifier) != 0\n self.identifier = identifier\n\n def is_anon(self) -> bool:\n return self.identifier[0] == '@'\n\n def get_id(self, version: int) -> str:\n if self.is_anon() and version < 3:\n raise NoOldIdError()\n if version == 1:\n if self.identifier == 'size_t':\n return 's'\n else:\n return self.identifier\n if self.identifier == \"std\":\n return 'St'\n elif self.identifier[0] == \"~\":\n # a destructor, just use an arbitrary version of dtors\n return 'D0'\n else:\n if self.is_anon():\n return 'Ut%d_%s' % (len(self.identifier) - 1, self.identifier[1:])\n else:\n return str(len(self.identifier)) + self.identifier\n\n # and this is where we finally make a difference between __str__ and the display string\n\n def __str__(self) -> str:\n return self.identifier\n\n def get_display_string(self) -> str:\n return \"[anonymous]\" if self.is_anon() else self.identifier\n\n def describe_signature(self, signode: TextElement, mode: str, env: \"BuildEnvironment\",\n prefix: str, templateArgs: str, symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.is_anon():\n node = addnodes.desc_sig_name(text=\"[anonymous]\")\n else:\n node = addnodes.desc_sig_name(self.identifier, self.identifier)\n if mode == 'markType':\n targetText = prefix + self.identifier + templateArgs\n pnode = addnodes.pending_xref('', refdomain='cpp',\n reftype='identifier',\n reftarget=targetText, modname=None,\n classname=None)\n pnode['cpp:parent_key'] = symbol.get_lookup_key()\n pnode += node\n signode += pnode\n elif mode == 'lastIsName':\n nameNode = addnodes.desc_name()\n nameNode += node\n signode += nameNode\n elif mode == 'noneIsName':\n signode += node\n elif mode == 'param':\n node['classes'].append('sig-param')\n signode += node\n elif mode == 'udl':\n # the target is 'operator\"\"id' instead of just 'id'\n assert len(prefix) == 0\n assert len(templateArgs) == 0\n assert not self.is_anon()\n targetText = 'operator\"\"' + self.identifier\n pnode = addnodes.pending_xref('', refdomain='cpp',\n reftype='identifier',\n reftarget=targetText, modname=None,\n classname=None)\n pnode['cpp:parent_key'] = symbol.get_lookup_key()\n pnode += node\n signode += pnode\n else:\n raise Exception('Unknown description mode: %s' % mode)\n\n\nclass ASTNestedNameElement(ASTBase):\n def __init__(self, identOrOp: Union[ASTIdentifier, \"ASTOperator\"],\n templateArgs: \"ASTTemplateArgs\") -> None:\n self.identOrOp = identOrOp\n self.templateArgs = templateArgs\n\n def is_operator(self) -> bool:\n return False\n\n def get_id(self, version: int) -> str:\n res = self.identOrOp.get_id(version)\n if self.templateArgs:\n res += self.templateArgs.get_id(version)\n return res\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = transform(self.identOrOp)\n if self.templateArgs:\n res += transform(self.templateArgs)\n return res\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", prefix: str, symbol: \"Symbol\") -> None:\n tArgs = str(self.templateArgs) if self.templateArgs is not None else ''\n self.identOrOp.describe_signature(signode, mode, env, prefix, tArgs, symbol)\n if self.templateArgs is not None:\n self.templateArgs.describe_signature(signode, 'markType', env, symbol)\n\n\nclass ASTNestedName(ASTBase):\n def __init__(self, names: List[ASTNestedNameElement],\n templates: List[bool], rooted: bool) -> None:\n assert len(names) > 0\n self.names = names\n self.templates = templates\n assert len(self.names) == len(self.templates)\n self.rooted = rooted\n\n @property\n def name(self) -> \"ASTNestedName\":\n return self\n\n def num_templates(self) -> int:\n count = 0\n for n in self.names:\n if n.is_operator():\n continue\n if n.templateArgs:\n count += 1\n return count", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol.merge_with_Symbol.find_name.onMissingQualifiedSymbol.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol.merge_with_Symbol.find_name.onMissingQualifiedSymbol.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4408, "end_line": 4645, "span_ids": ["Symbol.add_declaration", "Symbol.find_identifier", "Symbol.find_name", "Symbol.direct_lookup", "Symbol.find_name.QualifiedSymbolIsTemplateParam:2", "Symbol.add_name", "Symbol.find_name.QualifiedSymbolIsTemplateParam", "Symbol.merge_with"], "tokens": 2104}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def merge_with(self, other: \"Symbol\", docnames: List[str],\n env: \"BuildEnvironment\") -> None:\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"merge_with:\")\n assert other is not None\n\n def unconditionalAdd(self, otherChild):\n # TODO: hmm, should we prune by docnames?\n self._children.append(otherChild)\n otherChild.parent = self\n otherChild._assert_invariants()\n\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n for otherChild in other._children:\n if Symbol.debug_lookup:\n Symbol.debug_print(\"otherChild:\\n\", otherChild.to_string(Symbol.debug_indent))\n Symbol.debug_indent += 1\n if otherChild.isRedeclaration:\n unconditionalAdd(self, otherChild)\n if Symbol.debug_lookup:\n Symbol.debug_print(\"isRedeclaration\")\n Symbol.debug_indent -= 1\n continue\n candiateIter = self._find_named_symbols(\n identOrOp=otherChild.identOrOp,\n templateParams=otherChild.templateParams,\n templateArgs=otherChild.templateArgs,\n templateShorthand=False, matchSelf=False,\n recurseInAnon=False, correctPrimaryTemplateArgs=False,\n searchInSiblings=False)\n candidates = list(candiateIter)\n\n if Symbol.debug_lookup:\n Symbol.debug_print(\"raw candidate symbols:\", len(candidates))\n symbols = [s for s in candidates if not s.isRedeclaration]\n if Symbol.debug_lookup:\n Symbol.debug_print(\"non-duplicate candidate symbols:\", len(symbols))\n\n if len(symbols) == 0:\n unconditionalAdd(self, otherChild)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1\n continue\n\n ourChild = None\n if otherChild.declaration is None:\n if Symbol.debug_lookup:\n Symbol.debug_print(\"no declaration in other child\")\n ourChild = symbols[0]\n else:\n queryId = otherChild.declaration.get_newest_id()\n if Symbol.debug_lookup:\n Symbol.debug_print(\"queryId: \", queryId)\n for symbol in symbols:\n if symbol.declaration is None:\n if Symbol.debug_lookup:\n Symbol.debug_print(\"empty candidate\")\n # if in the end we have non matching, but have an empty one,\n # then just continue with that\n ourChild = symbol\n continue\n candId = symbol.declaration.get_newest_id()\n if Symbol.debug_lookup:\n Symbol.debug_print(\"candidate:\", candId)\n if candId == queryId:\n ourChild = symbol\n break\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1\n if ourChild is None:\n unconditionalAdd(self, otherChild)\n continue\n if otherChild.declaration and otherChild.docname in docnames:\n if not ourChild.declaration:\n ourChild._fill_empty(otherChild.declaration,\n otherChild.docname, otherChild.line)\n elif ourChild.docname != otherChild.docname:\n name = str(ourChild.declaration)\n msg = __(\"Duplicate C++ declaration, also defined at %s:%s.\\n\"\n \"Declaration is '.. cpp:%s:: %s'.\")\n msg = msg % (ourChild.docname, ourChild.line,\n ourChild.declaration.directiveType, name)\n logger.warning(msg, location=(otherChild.docname, otherChild.line))\n else:\n # Both have declarations, and in the same docname.\n # This can apparently happen, it should be safe to\n # just ignore it, right?\n # Hmm, only on duplicate declarations, right?\n msg = \"Internal C++ domain error during symbol merging.\\n\"\n msg += \"ourChild:\\n\" + ourChild.to_string(1)\n msg += \"\\notherChild:\\n\" + otherChild.to_string(1)\n logger.warning(msg, location=otherChild.docname)\n ourChild.merge_with(otherChild, docnames, env)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n\n def add_name(self, nestedName: ASTNestedName,\n templatePrefix: ASTTemplateDeclarationPrefix = None) -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"add_name:\")\n if templatePrefix:\n templateDecls = templatePrefix.templates\n else:\n templateDecls = []\n res = self._add_symbols(nestedName, templateDecls,\n declaration=None, docname=None, line=None)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1\n return res\n\n def add_declaration(self, declaration: ASTDeclaration,\n docname: str, line: int) -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"add_declaration:\")\n assert declaration is not None\n assert docname is not None\n assert line is not None\n nestedName = declaration.name\n if declaration.templatePrefix:\n templateDecls = declaration.templatePrefix.templates\n else:\n templateDecls = []\n res = self._add_symbols(nestedName, templateDecls, declaration, docname, line)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1\n return res\n\n def find_identifier(self, identOrOp: Union[ASTIdentifier, ASTOperator],\n matchSelf: bool, recurseInAnon: bool, searchInSiblings: bool\n ) -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"find_identifier:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"identOrOp: \", identOrOp)\n Symbol.debug_print(\"matchSelf: \", matchSelf)\n Symbol.debug_print(\"recurseInAnon: \", recurseInAnon)\n Symbol.debug_print(\"searchInSiblings:\", searchInSiblings)\n print(self.to_string(Symbol.debug_indent + 1), end=\"\")\n Symbol.debug_indent -= 2\n current = self\n while current is not None:\n if Symbol.debug_lookup:\n Symbol.debug_indent += 2\n Symbol.debug_print(\"trying:\")\n print(current.to_string(Symbol.debug_indent + 1), end=\"\")\n Symbol.debug_indent -= 2\n if matchSelf and current.identOrOp == identOrOp:\n return current\n children = current.children_recurse_anon if recurseInAnon else current._children\n for s in children:\n if s.identOrOp == identOrOp:\n return s\n if not searchInSiblings:\n break\n current = current.siblingAbove\n return None\n\n def direct_lookup(self, key: \"LookupKey\") -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"direct_lookup:\")\n Symbol.debug_indent += 1\n s = self\n for name, templateParams, id_ in key.data:\n if id_ is not None:\n res = None\n for cand in s._children:\n if cand.declaration is None:\n continue\n if cand.declaration.get_newest_id() == id_:\n res = cand\n break\n s = res\n else:\n identOrOp = name.identOrOp\n templateArgs = name.templateArgs\n s = s._find_first_named_symbol(identOrOp,\n templateParams, templateArgs,\n templateShorthand=False,\n matchSelf=False,\n recurseInAnon=False,\n correctPrimaryTemplateArgs=False)\n if Symbol.debug_lookup:\n Symbol.debug_print(\"name: \", name)\n Symbol.debug_print(\"templateParams:\", templateParams)\n Symbol.debug_print(\"id: \", id_)\n if s is not None:\n print(s.to_string(Symbol.debug_indent + 1), end=\"\")\n else:\n Symbol.debug_print(\"not found\")\n if s is None:\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n return None\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n return s\n\n def find_name(self, nestedName: ASTNestedName, templateDecls: List[Any],\n typ: str, templateShorthand: bool, matchSelf: bool,\n recurseInAnon: bool, searchInSiblings: bool) -> Tuple[List[\"Symbol\"], str]:\n # templateShorthand: missing template parameter lists for templates is ok\n # If the first component is None,\n # then the second component _may_ be a string explaining why.\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"find_name:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"self:\")\n print(self.to_string(Symbol.debug_indent + 1), end=\"\")\n Symbol.debug_print(\"nestedName: \", nestedName)\n Symbol.debug_print(\"templateDecls: \", templateDecls)\n Symbol.debug_print(\"typ: \", typ)\n Symbol.debug_print(\"templateShorthand:\", templateShorthand)\n Symbol.debug_print(\"matchSelf: \", matchSelf)\n Symbol.debug_print(\"recurseInAnon: \", recurseInAnon)\n Symbol.debug_print(\"searchInSiblings: \", searchInSiblings)\n\n class QualifiedSymbolIsTemplateParam(Exception):\n pass\n\n def onMissingQualifiedSymbol(parentSymbol: \"Symbol\",\n identOrOp: Union[ASTIdentifier, ASTOperator],\n templateParams: Any,\n templateArgs: ASTTemplateArgs) -> \"Symbol\":\n # TODO: Maybe search without template args?\n # Though, the correctPrimaryTemplateArgs does\n # that for primary templates.\n # Is there another case where it would be good?\n if parentSymbol.declaration is not None:\n if parentSymbol.declaration.objectType == 'templateParam':\n raise QualifiedSymbolIsTemplateParam()\n return None\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol.find_name.try__DefinitionParser._parse_fold_or_paren_expression.return.ASTFoldExpr_leftExpr_op_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol.find_name.try__DefinitionParser._parse_fold_or_paren_expression.return.ASTFoldExpr_leftExpr_op_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4922, "end_line": 5200, "span_ids": ["DefinitionParser", "DefinitionParser._parse_fold_or_paren_expression", "Symbol.find_declaration", "DefinitionParser.id_attributes", "DefinitionParser.paren_attributes", "DefinitionParser._parse_literal", "Symbol.find_name.QualifiedSymbolIsTemplateParam:2", "Symbol.dump", "DefinitionParser._parse_string", "Symbol.to_string", "DefinitionParser.language"], "tokens": 2240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def find_name(self, nestedName: ASTNestedName, templateDecls: List[Any],\n typ: str, templateShorthand: bool, matchSelf: bool,\n recurseInAnon: bool, searchInSiblings: bool) -> Tuple[List[\"Symbol\"], str]:\n # ... other code\n\n try:\n lookupResult = self._symbol_lookup(nestedName, templateDecls,\n onMissingQualifiedSymbol,\n strictTemplateParamArgLists=False,\n ancestorLookupType=typ,\n templateShorthand=templateShorthand,\n matchSelf=matchSelf,\n recurseInAnon=recurseInAnon,\n correctPrimaryTemplateArgs=False,\n searchInSiblings=searchInSiblings)\n except QualifiedSymbolIsTemplateParam:\n return None, \"templateParamInQualified\"\n\n if lookupResult is None:\n # if it was a part of the qualification that could not be found\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n return None, None\n\n res = list(lookupResult.symbols)\n if len(res) != 0:\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n return res, None\n\n if lookupResult.parentSymbol.declaration is not None:\n if lookupResult.parentSymbol.declaration.objectType == 'templateParam':\n return None, \"templateParamInQualified\"\n\n # try without template params and args\n symbol = lookupResult.parentSymbol._find_first_named_symbol(\n lookupResult.identOrOp, None, None,\n templateShorthand=templateShorthand, matchSelf=matchSelf,\n recurseInAnon=recurseInAnon, correctPrimaryTemplateArgs=False)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n if symbol is not None:\n return [symbol], None\n else:\n return None, None\n\n def find_declaration(self, declaration: ASTDeclaration, typ: str, templateShorthand: bool,\n matchSelf: bool, recurseInAnon: bool) -> \"Symbol\":\n # templateShorthand: missing template parameter lists for templates is ok\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"find_declaration:\")\n nestedName = declaration.name\n if declaration.templatePrefix:\n templateDecls = declaration.templatePrefix.templates\n else:\n templateDecls = []\n\n def onMissingQualifiedSymbol(parentSymbol: \"Symbol\",\n identOrOp: Union[ASTIdentifier, ASTOperator],\n templateParams: Any,\n templateArgs: ASTTemplateArgs) -> \"Symbol\":\n return None\n\n lookupResult = self._symbol_lookup(nestedName, templateDecls,\n onMissingQualifiedSymbol,\n strictTemplateParamArgLists=False,\n ancestorLookupType=typ,\n templateShorthand=templateShorthand,\n matchSelf=matchSelf,\n recurseInAnon=recurseInAnon,\n correctPrimaryTemplateArgs=False,\n searchInSiblings=False)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1\n if lookupResult is None:\n return None\n\n symbols = list(lookupResult.symbols)\n if len(symbols) == 0:\n return None\n\n querySymbol = Symbol(parent=lookupResult.parentSymbol,\n identOrOp=lookupResult.identOrOp,\n templateParams=lookupResult.templateParams,\n templateArgs=lookupResult.templateArgs,\n declaration=declaration,\n docname='fakeDocnameForQuery',\n line=42)\n queryId = declaration.get_newest_id()\n for symbol in symbols:\n if symbol.declaration is None:\n continue\n candId = symbol.declaration.get_newest_id()\n if candId == queryId:\n querySymbol.remove()\n return symbol\n querySymbol.remove()\n return None\n\n def to_string(self, indent: int) -> str:\n res = [Symbol.debug_indent_string * indent]\n if not self.parent:\n res.append('::')\n else:\n if self.templateParams:\n res.append(str(self.templateParams))\n res.append('\\n')\n res.append(Symbol.debug_indent_string * indent)\n if self.identOrOp:\n res.append(str(self.identOrOp))\n else:\n res.append(str(self.declaration))\n if self.templateArgs:\n res.append(str(self.templateArgs))\n if self.declaration:\n res.append(\": \")\n if self.isRedeclaration:\n res.append('!!duplicate!! ')\n res.append(str(self.declaration))\n if self.docname:\n res.append('\\t(')\n res.append(self.docname)\n res.append(')')\n res.append('\\n')\n return ''.join(res)\n\n def dump(self, indent: int) -> str:\n res = [self.to_string(indent)]\n for c in self._children:\n res.append(c.dump(indent + 1))\n return ''.join(res)\n\n\nclass DefinitionParser(BaseParser):\n @property\n def language(self) -> str:\n return 'C++'\n\n @property\n def id_attributes(self):\n return self.config.cpp_id_attributes\n\n @property\n def paren_attributes(self):\n return self.config.cpp_paren_attributes\n\n def _parse_string(self) -> str:\n if self.current_char != '\"':\n return None\n startPos = self.pos\n self.pos += 1\n escape = False\n while True:\n if self.eof:\n self.fail(\"Unexpected end during inside string.\")\n elif self.current_char == '\"' and not escape:\n self.pos += 1\n break\n elif self.current_char == '\\\\':\n escape = True\n else:\n escape = False\n self.pos += 1\n return self.definition[startPos:self.pos]\n\n def _parse_literal(self) -> ASTLiteral:\n # -> integer-literal\n # | character-literal\n # | floating-literal\n # | string-literal\n # | boolean-literal -> \"false\" | \"true\"\n # | pointer-literal -> \"nullptr\"\n # | user-defined-literal\n\n def _udl(literal: ASTLiteral) -> ASTLiteral:\n if not self.match(udl_identifier_re):\n return literal\n # hmm, should we care if it's a keyword?\n # it looks like GCC does not disallow keywords\n ident = ASTIdentifier(self.matched_text)\n return ASTUserDefinedLiteral(literal, ident)\n\n self.skip_ws()\n if self.skip_word('nullptr'):\n return ASTPointerLiteral()\n if self.skip_word('true'):\n return ASTBooleanLiteral(True)\n if self.skip_word('false'):\n return ASTBooleanLiteral(False)\n pos = self.pos\n if self.match(float_literal_re):\n hasSuffix = self.match(float_literal_suffix_re)\n floatLit = ASTNumberLiteral(self.definition[pos:self.pos])\n if hasSuffix:\n return floatLit\n else:\n return _udl(floatLit)\n for regex in [binary_literal_re, hex_literal_re,\n integer_literal_re, octal_literal_re]:\n if self.match(regex):\n hasSuffix = self.match(integers_literal_suffix_re)\n intLit = ASTNumberLiteral(self.definition[pos:self.pos])\n if hasSuffix:\n return intLit\n else:\n return _udl(intLit)\n\n string = self._parse_string()\n if string is not None:\n return _udl(ASTStringLiteral(string))\n\n # character-literal\n if self.match(char_literal_re):\n prefix = self.last_match.group(1) # may be None when no prefix\n data = self.last_match.group(2)\n try:\n charLit = ASTCharLiteral(prefix, data)\n except UnicodeDecodeError as e:\n self.fail(\"Can not handle character literal. Internal error was: %s\" % e)\n except UnsupportedMultiCharacterCharLiteral:\n self.fail(\"Can not handle character literal\"\n \" resulting in multiple decoded characters.\")\n return _udl(charLit)\n return None\n\n def _parse_fold_or_paren_expression(self) -> ASTExpression:\n # \"(\" expression \")\"\n # fold-expression\n # -> ( cast-expression fold-operator ... )\n # | ( ... fold-operator cast-expression )\n # | ( cast-expression fold-operator ... fold-operator cast-expression\n if self.current_char != '(':\n return None\n self.pos += 1\n self.skip_ws()\n if self.skip_string_and_ws(\"...\"):\n # ( ... fold-operator cast-expression )\n if not self.match(_fold_operator_re):\n self.fail(\"Expected fold operator after '...' in fold expression.\")\n op = self.matched_text\n rightExpr = self._parse_cast_expression()\n if not self.skip_string(')'):\n self.fail(\"Expected ')' in end of fold expression.\")\n return ASTFoldExpr(None, op, rightExpr)\n # try first parsing a unary right fold, or a binary fold\n pos = self.pos\n try:\n self.skip_ws()\n leftExpr = self._parse_cast_expression()\n self.skip_ws()\n if not self.match(_fold_operator_re):\n self.fail(\"Expected fold operator after left expression in fold expression.\")\n op = self.matched_text\n self.skip_ws()\n if not self.skip_string_and_ws('...'):\n self.fail(\"Expected '...' after fold operator in fold expression.\")\n except DefinitionError as eFold:\n self.pos = pos\n # fall back to a paren expression\n try:\n res = self._parse_expression()\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expected ')' in end of parenthesized expression.\")\n except DefinitionError as eExpr:\n raise self._make_multi_error([\n (eFold, \"If fold expression\"),\n (eExpr, \"If parenthesized expression\")\n ], \"Error in fold expression or parenthesized expression.\") from eExpr\n return ASTParenExpr(res)\n # now it definitely is a fold expression\n if self.skip_string(')'):\n return ASTFoldExpr(leftExpr, op, None)\n if not self.match(_fold_operator_re):\n self.fail(\"Expected fold operator or ')' after '...' in fold expression.\")\n if op != self.matched_text:\n self.fail(\"Operators are different in binary fold: '%s' and '%s'.\"\n % (op, self.matched_text))\n rightExpr = self._parse_cast_expression()\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expected ')' to end binary fold expression.\")\n return ASTFoldExpr(leftExpr, op, rightExpr)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_primary_expression_DefinitionParser._parse_postfix_expression.return.ASTPostfixExpr_prefix_po": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_primary_expression_DefinitionParser._parse_postfix_expression.return.ASTPostfixExpr_prefix_po", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 5202, "end_line": 5441, "span_ids": ["DefinitionParser._parse_primary_expression", "DefinitionParser._parse_paren_expression_list", "DefinitionParser._parse_postfix_expression", "DefinitionParser._parse_initializer_clause", "DefinitionParser._parse_braced_init_list", "DefinitionParser._parse_expression_list_or_braced_init_list", "DefinitionParser._parse_initializer_list"], "tokens": 2093}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_primary_expression(self) -> ASTExpression:\n # literal\n # \"this\"\n # lambda-expression\n # \"(\" expression \")\"\n # fold-expression\n # id-expression -> we parse this with _parse_nested_name\n self.skip_ws()\n res: ASTExpression = self._parse_literal()\n if res is not None:\n return res\n self.skip_ws()\n if self.skip_word(\"this\"):\n return ASTThisLiteral()\n # TODO: try lambda expression\n res = self._parse_fold_or_paren_expression()\n if res is not None:\n return res\n nn = self._parse_nested_name()\n if nn is not None:\n return ASTIdExpression(nn)\n return None\n\n def _parse_initializer_list(self, name: str, open: str, close: str\n ) -> Tuple[List[Union[ASTExpression,\n ASTBracedInitList]],\n bool]:\n # Parse open and close with the actual initializer-list in between\n # -> initializer-clause '...'[opt]\n # | initializer-list ',' initializer-clause '...'[opt]\n self.skip_ws()\n if not self.skip_string_and_ws(open):\n return None, None\n if self.skip_string(close):\n return [], False\n\n exprs: List[Union[ASTExpression, ASTBracedInitList]] = []\n trailingComma = False\n while True:\n self.skip_ws()\n expr = self._parse_initializer_clause()\n self.skip_ws()\n if self.skip_string('...'):\n exprs.append(ASTPackExpansionExpr(expr))\n else:\n exprs.append(expr)\n self.skip_ws()\n if self.skip_string(close):\n break\n if not self.skip_string_and_ws(','):\n self.fail(\"Error in %s, expected ',' or '%s'.\" % (name, close))\n if self.current_char == close and close == '}':\n self.pos += 1\n trailingComma = True\n break\n return exprs, trailingComma\n\n def _parse_paren_expression_list(self) -> ASTParenExprList:\n # -> '(' expression-list ')'\n # though, we relax it to also allow empty parens\n # as it's needed in some cases\n #\n # expression-list\n # -> initializer-list\n exprs, trailingComma = self._parse_initializer_list(\"parenthesized expression-list\",\n '(', ')')\n if exprs is None:\n return None\n return ASTParenExprList(exprs)\n\n def _parse_initializer_clause(self) -> Union[ASTExpression, ASTBracedInitList]:\n bracedInitList = self._parse_braced_init_list()\n if bracedInitList is not None:\n return bracedInitList\n return self._parse_assignment_expression(inTemplate=False)\n\n def _parse_braced_init_list(self) -> ASTBracedInitList:\n # -> '{' initializer-list ','[opt] '}'\n # | '{' '}'\n exprs, trailingComma = self._parse_initializer_list(\"braced-init-list\", '{', '}')\n if exprs is None:\n return None\n return ASTBracedInitList(exprs, trailingComma)\n\n def _parse_expression_list_or_braced_init_list(\n self\n ) -> Union[ASTParenExprList, ASTBracedInitList]:\n paren = self._parse_paren_expression_list()\n if paren is not None:\n return paren\n return self._parse_braced_init_list()\n\n def _parse_postfix_expression(self) -> ASTPostfixExpr:\n # -> primary\n # | postfix \"[\" expression \"]\"\n # | postfix \"[\" braced-init-list [opt] \"]\"\n # | postfix \"(\" expression-list [opt] \")\"\n # | postfix \".\" \"template\" [opt] id-expression\n # | postfix \"->\" \"template\" [opt] id-expression\n # | postfix \".\" pseudo-destructor-name\n # | postfix \"->\" pseudo-destructor-name\n # | postfix \"++\"\n # | postfix \"--\"\n # | simple-type-specifier \"(\" expression-list [opt] \")\"\n # | simple-type-specifier braced-init-list\n # | typename-specifier \"(\" expression-list [opt] \")\"\n # | typename-specifier braced-init-list\n # | \"dynamic_cast\" \"<\" type-id \">\" \"(\" expression \")\"\n # | \"static_cast\" \"<\" type-id \">\" \"(\" expression \")\"\n # | \"reinterpret_cast\" \"<\" type-id \">\" \"(\" expression \")\"\n # | \"const_cast\" \"<\" type-id \">\" \"(\" expression \")\"\n # | \"typeid\" \"(\" expression \")\"\n # | \"typeid\" \"(\" type-id \")\"\n\n prefixType = None\n prefix: Any = None\n self.skip_ws()\n\n cast = None\n for c in _id_explicit_cast:\n if self.skip_word_and_ws(c):\n cast = c\n break\n if cast is not None:\n prefixType = \"cast\"\n if not self.skip_string(\"<\"):\n self.fail(\"Expected '<' after '%s'.\" % cast)\n typ = self._parse_type(False)\n self.skip_ws()\n if not self.skip_string_and_ws(\">\"):\n self.fail(\"Expected '>' after type in '%s'.\" % cast)\n if not self.skip_string(\"(\"):\n self.fail(\"Expected '(' in '%s'.\" % cast)\n\n def parser() -> ASTExpression:\n return self._parse_expression()\n expr = self._parse_expression_fallback([')'], parser)\n self.skip_ws()\n if not self.skip_string(\")\"):\n self.fail(\"Expected ')' to end '%s'.\" % cast)\n prefix = ASTExplicitCast(cast, typ, expr)\n elif self.skip_word_and_ws(\"typeid\"):\n prefixType = \"typeid\"\n if not self.skip_string_and_ws('('):\n self.fail(\"Expected '(' after 'typeid'.\")\n pos = self.pos\n try:\n typ = self._parse_type(False)\n prefix = ASTTypeId(typ, isType=True)\n if not self.skip_string(')'):\n self.fail(\"Expected ')' to end 'typeid' of type.\")\n except DefinitionError as eType:\n self.pos = pos\n try:\n\n def parser() -> ASTExpression:\n return self._parse_expression()\n expr = self._parse_expression_fallback([')'], parser)\n prefix = ASTTypeId(expr, isType=False)\n if not self.skip_string(')'):\n self.fail(\"Expected ')' to end 'typeid' of expression.\")\n except DefinitionError as eExpr:\n self.pos = pos\n header = \"Error in 'typeid(...)'.\"\n header += \" Expected type or expression.\"\n errors = []\n errors.append((eType, \"If type\"))\n errors.append((eExpr, \"If expression\"))\n raise self._make_multi_error(errors, header) from eExpr\n else: # a primary expression or a type\n pos = self.pos\n try:\n prefix = self._parse_primary_expression()\n prefixType = 'expr'\n except DefinitionError as eOuter:\n self.pos = pos\n try:\n # we are potentially casting, so save parens for us\n # TODO: hmm, would we need to try both with operatorCast and with None?\n prefix = self._parse_type(False, 'operatorCast')\n prefixType = 'typeOperatorCast'\n # | simple-type-specifier \"(\" expression-list [opt] \")\"\n # | simple-type-specifier braced-init-list\n # | typename-specifier \"(\" expression-list [opt] \")\"\n # | typename-specifier braced-init-list\n self.skip_ws()\n if self.current_char != '(' and self.current_char != '{':\n self.fail(\"Expecting '(' or '{' after type in cast expression.\")\n except DefinitionError as eInner:\n self.pos = pos\n header = \"Error in postfix expression,\"\n header += \" expected primary expression or type.\"\n errors = []\n errors.append((eOuter, \"If primary expression\"))\n errors.append((eInner, \"If type\"))\n raise self._make_multi_error(errors, header) from eInner\n\n # and now parse postfixes\n postFixes: List[ASTPostfixOp] = []\n while True:\n self.skip_ws()\n if prefixType in ('expr', 'cast', 'typeid'):\n if self.skip_string_and_ws('['):\n expr = self._parse_expression()\n self.skip_ws()\n if not self.skip_string(']'):\n self.fail(\"Expected ']' in end of postfix expression.\")\n postFixes.append(ASTPostfixArray(expr))\n continue\n if self.skip_string('.'):\n if self.skip_string('*'):\n # don't steal the dot\n self.pos -= 2\n elif self.skip_string('..'):\n # don't steal the dot\n self.pos -= 3\n else:\n name = self._parse_nested_name()\n postFixes.append(ASTPostfixMember(name))\n continue\n if self.skip_string('->'):\n if self.skip_string('*'):\n # don't steal the arrow\n self.pos -= 3\n else:\n name = self._parse_nested_name()\n postFixes.append(ASTPostfixMemberOfPointer(name))\n continue\n if self.skip_string('++'):\n postFixes.append(ASTPostfixInc())\n continue\n if self.skip_string('--'):\n postFixes.append(ASTPostfixDec())\n continue\n lst = self._parse_expression_list_or_braced_init_list()\n if lst is not None:\n postFixes.append(ASTPostfixCallExpr(lst))\n continue\n break\n return ASTPostfixExpr(prefix, postFixes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_unary_expression_DefinitionParser._parse_expression.if_len_exprs_1_.else_.return.ASTCommaExpr_exprs_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_unary_expression_DefinitionParser._parse_expression.if_len_exprs_1_.else_.return.ASTCommaExpr_exprs_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 5443, "end_line": 5674, "span_ids": ["DefinitionParser._parse_assignment_expression", "DefinitionParser._parse_conditional_expression_tail", "DefinitionParser._parse_unary_expression", "DefinitionParser._parse_constant_expression", "DefinitionParser._parse_logical_or_expression", "DefinitionParser._parse_cast_expression", "DefinitionParser._parse_expression"], "tokens": 2051}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_unary_expression(self) -> ASTExpression:\n # -> postfix\n # | \"++\" cast\n # | \"--\" cast\n # | unary-operator cast -> (* | & | + | - | ! | ~) cast\n # The rest:\n # | \"sizeof\" unary\n # | \"sizeof\" \"(\" type-id \")\"\n # | \"sizeof\" \"...\" \"(\" identifier \")\"\n # | \"alignof\" \"(\" type-id \")\"\n # | noexcept-expression -> noexcept \"(\" expression \")\"\n # | new-expression\n # | delete-expression\n self.skip_ws()\n for op in _expression_unary_ops:\n # TODO: hmm, should we be able to backtrack here?\n if op[0] in 'cn':\n res = self.skip_word(op)\n else:\n res = self.skip_string(op)\n if res:\n expr = self._parse_cast_expression()\n return ASTUnaryOpExpr(op, expr)\n if self.skip_word_and_ws('sizeof'):\n if self.skip_string_and_ws('...'):\n if not self.skip_string_and_ws('('):\n self.fail(\"Expecting '(' after 'sizeof...'.\")\n if not self.match(identifier_re):\n self.fail(\"Expecting identifier for 'sizeof...'.\")\n ident = ASTIdentifier(self.matched_text)\n self.skip_ws()\n if not self.skip_string(\")\"):\n self.fail(\"Expecting ')' to end 'sizeof...'.\")\n return ASTSizeofParamPack(ident)\n if self.skip_string_and_ws('('):\n typ = self._parse_type(named=False)\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expecting ')' to end 'sizeof'.\")\n return ASTSizeofType(typ)\n expr = self._parse_unary_expression()\n return ASTSizeofExpr(expr)\n if self.skip_word_and_ws('alignof'):\n if not self.skip_string_and_ws('('):\n self.fail(\"Expecting '(' after 'alignof'.\")\n typ = self._parse_type(named=False)\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expecting ')' to end 'alignof'.\")\n return ASTAlignofExpr(typ)\n if self.skip_word_and_ws('noexcept'):\n if not self.skip_string_and_ws('('):\n self.fail(\"Expecting '(' after 'noexcept'.\")\n expr = self._parse_expression()\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expecting ')' to end 'noexcept'.\")\n return ASTNoexceptExpr(expr)\n # new-expression\n pos = self.pos\n rooted = self.skip_string('::')\n self.skip_ws()\n if not self.skip_word_and_ws('new'):\n self.pos = pos\n else:\n # new-placement[opt] new-type-id new-initializer[opt]\n # new-placement[opt] ( type-id ) new-initializer[opt]\n isNewTypeId = True\n if self.skip_string_and_ws('('):\n # either this is a new-placement or it's the second production\n # without placement, and it's actually the ( type-id ) part\n self.fail(\"Sorry, neither new-placement nor parenthesised type-id \"\n \"in new-epression is supported yet.\")\n # set isNewTypeId = False if it's (type-id)\n if isNewTypeId:\n declSpecs = self._parse_decl_specs(outer=None)\n decl = self._parse_declarator(named=False, paramMode=\"new\")\n else:\n self.fail(\"Sorry, parenthesised type-id in new expression not yet supported.\")\n lst = self._parse_expression_list_or_braced_init_list()\n return ASTNewExpr(rooted, isNewTypeId, ASTType(declSpecs, decl), lst)\n # delete-expression\n pos = self.pos\n rooted = self.skip_string('::')\n self.skip_ws()\n if not self.skip_word_and_ws('delete'):\n self.pos = pos\n else:\n array = self.skip_string_and_ws('[')\n if array and not self.skip_string_and_ws(']'):\n self.fail(\"Expected ']' in array delete-expression.\")\n expr = self._parse_cast_expression()\n return ASTDeleteExpr(rooted, array, expr)\n return self._parse_postfix_expression()\n\n def _parse_cast_expression(self) -> ASTExpression:\n # -> unary | \"(\" type-id \")\" cast\n pos = self.pos\n self.skip_ws()\n if self.skip_string('('):\n try:\n typ = self._parse_type(False)\n if not self.skip_string(')'):\n self.fail(\"Expected ')' in cast expression.\")\n expr = self._parse_cast_expression()\n return ASTCastExpr(typ, expr)\n except DefinitionError as exCast:\n self.pos = pos\n try:\n return self._parse_unary_expression()\n except DefinitionError as exUnary:\n errs = []\n errs.append((exCast, \"If type cast expression\"))\n errs.append((exUnary, \"If unary expression\"))\n raise self._make_multi_error(errs,\n \"Error in cast expression.\") from exUnary\n else:\n return self._parse_unary_expression()\n\n def _parse_logical_or_expression(self, inTemplate: bool) -> ASTExpression:\n # logical-or = logical-and ||\n # logical-and = inclusive-or &&\n # inclusive-or = exclusive-or |\n # exclusive-or = and ^\n # and = equality &\n # equality = relational ==, !=\n # relational = shift <, >, <=, >=, <=>\n # shift = additive <<, >>\n # additive = multiplicative +, -\n # multiplicative = pm *, /, %\n # pm = cast .*, ->*\n def _parse_bin_op_expr(self: DefinitionParser,\n opId: int, inTemplate: bool) -> ASTExpression:\n if opId + 1 == len(_expression_bin_ops):\n def parser(inTemplate: bool) -> ASTExpression:\n return self._parse_cast_expression()\n else:\n def parser(inTemplate: bool) -> ASTExpression:\n return _parse_bin_op_expr(self, opId + 1, inTemplate=inTemplate)\n exprs = []\n ops = []\n exprs.append(parser(inTemplate=inTemplate))\n while True:\n self.skip_ws()\n if inTemplate and self.current_char == '>':\n break\n pos = self.pos\n oneMore = False\n for op in _expression_bin_ops[opId]:\n if op[0] in 'abcnox':\n if not self.skip_word(op):\n continue\n else:\n if not self.skip_string(op):\n continue\n if op == '&' and self.current_char == '&':\n # don't split the && 'token'\n self.pos -= 1\n # and btw. && has lower precedence, so we are done\n break\n try:\n expr = parser(inTemplate=inTemplate)\n exprs.append(expr)\n ops.append(op)\n oneMore = True\n break\n except DefinitionError:\n self.pos = pos\n if not oneMore:\n break\n return ASTBinOpExpr(exprs, ops)\n return _parse_bin_op_expr(self, 0, inTemplate=inTemplate)\n\n def _parse_conditional_expression_tail(self, orExprHead: Any) -> None:\n # -> \"?\" expression \":\" assignment-expression\n return None\n\n def _parse_assignment_expression(self, inTemplate: bool) -> ASTExpression:\n # -> conditional-expression\n # | logical-or-expression assignment-operator initializer-clause\n # | throw-expression\n # TODO: parse throw-expression: \"throw\" assignment-expression [opt]\n # if not a throw expression, then:\n # -> conditional-expression ->\n # logical-or-expression\n # | logical-or-expression \"?\" expression \":\" assignment-expression\n # | logical-or-expression assignment-operator initializer-clause\n exprs: List[Union[ASTExpression, ASTBracedInitList]] = []\n ops = []\n orExpr = self._parse_logical_or_expression(inTemplate=inTemplate)\n exprs.append(orExpr)\n # TODO: handle ternary with _parse_conditional_expression_tail\n while True:\n oneMore = False\n self.skip_ws()\n for op in _expression_assignment_ops:\n if op[0] in 'anox':\n if not self.skip_word(op):\n continue\n else:\n if not self.skip_string(op):\n continue\n expr = self._parse_initializer_clause()\n exprs.append(expr)\n ops.append(op)\n oneMore = True\n if not oneMore:\n break\n if len(ops) == 0:\n return orExpr\n else:\n return ASTAssignmentExpr(exprs, ops)\n\n def _parse_constant_expression(self, inTemplate: bool) -> ASTExpression:\n # -> conditional-expression\n orExpr = self._parse_logical_or_expression(inTemplate=inTemplate)\n # TODO: use _parse_conditional_expression_tail\n return orExpr\n\n def _parse_expression(self) -> ASTExpression:\n # -> assignment-expression\n # | expression \",\" assignment-expression\n exprs = [self._parse_assignment_expression(inTemplate=False)]\n while True:\n self.skip_ws()\n if not self.skip_string(','):\n break\n exprs.append(self._parse_assignment_expression(inTemplate=False))\n if len(exprs) == 1:\n return exprs[0]\n else:\n return ASTCommaExpr(exprs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_expression_fallback_DefinitionParser._parse_operator.return.ASTOperatorType_type_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_expression_fallback_DefinitionParser._parse_operator.return.ASTOperatorType_type_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 5676, "end_line": 5750, "span_ids": ["DefinitionParser._parse_expression_fallback", "DefinitionParser._parse_operator"], "tokens": 628}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_expression_fallback(self, end: List[str],\n parser: Callable[[], ASTExpression],\n allow: bool = True) -> ASTExpression:\n # Stupidly \"parse\" an expression.\n # 'end' should be a list of characters which ends the expression.\n\n # first try to use the provided parser\n prevPos = self.pos\n try:\n return parser()\n except DefinitionError as e:\n # some places (e.g., template parameters) we really don't want to use fallback,\n # and for testing we may want to globally disable it\n if not allow or not self.allowFallbackExpressionParsing:\n raise\n self.warn(\"Parsing of expression failed. Using fallback parser.\"\n \" Error was:\\n%s\" % e)\n self.pos = prevPos\n # and then the fallback scanning\n assert end is not None\n self.skip_ws()\n startPos = self.pos\n if self.match(_string_re):\n value = self.matched_text\n else:\n # TODO: add handling of more bracket-like things, and quote handling\n brackets = {'(': ')', '{': '}', '[': ']', '<': '>'}\n symbols: List[str] = []\n while not self.eof:\n if (len(symbols) == 0 and self.current_char in end):\n break\n if self.current_char in brackets.keys():\n symbols.append(brackets[self.current_char])\n elif len(symbols) > 0 and self.current_char == symbols[-1]:\n symbols.pop()\n self.pos += 1\n if len(end) > 0 and self.eof:\n self.fail(\"Could not find end of expression starting at %d.\"\n % startPos)\n value = self.definition[startPos:self.pos].strip()\n return ASTFallbackExpr(value.strip())\n\n # ==========================================================================\n\n def _parse_operator(self) -> ASTOperator:\n self.skip_ws()\n # adapted from the old code\n # yay, a regular operator definition\n if self.match(_operator_re):\n return ASTOperatorBuildIn(self.matched_text)\n\n # new/delete operator?\n for op in 'new', 'delete':\n if not self.skip_word(op):\n continue\n self.skip_ws()\n if self.skip_string('['):\n self.skip_ws()\n if not self.skip_string(']'):\n self.fail('Expected \"]\" after \"operator ' + op + '[\"')\n op += '[]'\n return ASTOperatorBuildIn(op)\n\n # user-defined literal?\n if self.skip_string('\"\"'):\n self.skip_ws()\n if not self.match(identifier_re):\n self.fail(\"Expected user-defined literal suffix.\")\n identifier = ASTIdentifier(self.matched_text)\n return ASTOperatorLiteral(identifier)\n\n # oh well, looks like a cast operator definition.\n # In that case, eat another type.\n type = self._parse_type(named=False, outer=\"operatorCast\")\n return ASTOperatorType(type)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_declarator_DefinitionParser._parse_type.return.ASTType_declSpecs_decl_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_declarator_DefinitionParser._parse_type.return.ASTType_declSpecs_decl_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 6276, "end_line": 6523, "span_ids": ["DefinitionParser._parse_declarator", "DefinitionParser._parse_initializer", "DefinitionParser._parse_type"], "tokens": 2219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_declarator(self, named: Union[bool, str], paramMode: str,\n typed: bool = True\n ) -> ASTDeclarator:\n # 'typed' here means 'parse return type stuff'\n if paramMode not in ('type', 'function', 'operatorCast', 'new'):\n raise Exception(\n \"Internal error, unknown paramMode '%s'.\" % paramMode)\n prevErrors = []\n self.skip_ws()\n if typed and self.skip_string('*'):\n self.skip_ws()\n volatile = False\n const = False\n attrs = []\n while 1:\n if not volatile:\n volatile = self.skip_word_and_ws('volatile')\n if volatile:\n continue\n if not const:\n const = self.skip_word_and_ws('const')\n if const:\n continue\n attr = self._parse_attribute()\n if attr is not None:\n attrs.append(attr)\n continue\n break\n next = self._parse_declarator(named, paramMode, typed)\n return ASTDeclaratorPtr(next=next, volatile=volatile, const=const, attrs=attrs)\n # TODO: shouldn't we parse an R-value ref here first?\n if typed and self.skip_string(\"&\"):\n attrs = []\n while 1:\n attr = self._parse_attribute()\n if attr is None:\n break\n attrs.append(attr)\n next = self._parse_declarator(named, paramMode, typed)\n return ASTDeclaratorRef(next=next, attrs=attrs)\n if typed and self.skip_string(\"...\"):\n next = self._parse_declarator(named, paramMode, False)\n return ASTDeclaratorParamPack(next=next)\n if typed and self.current_char == '(': # note: peeking, not skipping\n if paramMode == \"operatorCast\":\n # TODO: we should be able to parse cast operators which return\n # function pointers. For now, just hax it and ignore.\n return ASTDeclaratorNameParamQual(declId=None, arrayOps=[],\n paramQual=None)\n # maybe this is the beginning of params and quals,try that first,\n # otherwise assume it's noptr->declarator > ( ptr-declarator )\n pos = self.pos\n try:\n # assume this is params and quals\n res = self._parse_declarator_name_suffix(named, paramMode,\n typed)\n return res\n except DefinitionError as exParamQual:\n prevErrors.append((exParamQual,\n \"If declarator-id with parameters-and-qualifiers\"))\n self.pos = pos\n try:\n assert self.current_char == '('\n self.skip_string('(')\n # TODO: hmm, if there is a name, it must be in inner, right?\n # TODO: hmm, if there must be parameters, they must be\n # inside, right?\n inner = self._parse_declarator(named, paramMode, typed)\n if not self.skip_string(')'):\n self.fail(\"Expected ')' in \\\"( ptr-declarator )\\\"\")\n next = self._parse_declarator(named=False,\n paramMode=\"type\",\n typed=typed)\n return ASTDeclaratorParen(inner=inner, next=next)\n except DefinitionError as exNoPtrParen:\n self.pos = pos\n prevErrors.append((exNoPtrParen, \"If parenthesis in noptr-declarator\"))\n header = \"Error in declarator\"\n raise self._make_multi_error(prevErrors, header) from exNoPtrParen\n if typed: # pointer to member\n pos = self.pos\n try:\n name = self._parse_nested_name(memberPointer=True)\n self.skip_ws()\n if not self.skip_string('*'):\n self.fail(\"Expected '*' in pointer to member declarator.\")\n self.skip_ws()\n except DefinitionError as e:\n self.pos = pos\n prevErrors.append((e, \"If pointer to member declarator\"))\n else:\n volatile = False\n const = False\n while 1:\n if not volatile:\n volatile = self.skip_word_and_ws('volatile')\n if volatile:\n continue\n if not const:\n const = self.skip_word_and_ws('const')\n if const:\n continue\n break\n next = self._parse_declarator(named, paramMode, typed)\n return ASTDeclaratorMemPtr(name, const, volatile, next=next)\n pos = self.pos\n try:\n res = self._parse_declarator_name_suffix(named, paramMode, typed)\n # this is a heuristic for error messages, for when there is a < after a\n # nested name, but it was not a successful template argument list\n if self.current_char == '<':\n self.otherErrors.append(self._make_multi_error(prevErrors, \"\"))\n return res\n except DefinitionError as e:\n self.pos = pos\n prevErrors.append((e, \"If declarator-id\"))\n header = \"Error in declarator or parameters-and-qualifiers\"\n raise self._make_multi_error(prevErrors, header) from e\n\n def _parse_initializer(self, outer: str = None, allowFallback: bool = True\n ) -> ASTInitializer:\n # initializer # global vars\n # -> brace-or-equal-initializer\n # | '(' expression-list ')'\n #\n # brace-or-equal-initializer # member vars\n # -> '=' initializer-clause\n # | braced-init-list\n #\n # initializer-clause # function params, non-type template params (with '=' in front)\n # -> assignment-expression\n # | braced-init-list\n #\n # we don't distinguish between global and member vars, so disallow paren:\n #\n # -> braced-init-list # var only\n # | '=' assignment-expression\n # | '=' braced-init-list\n self.skip_ws()\n if outer == 'member':\n bracedInit = self._parse_braced_init_list()\n if bracedInit is not None:\n return ASTInitializer(bracedInit, hasAssign=False)\n\n if not self.skip_string('='):\n return None\n\n bracedInit = self._parse_braced_init_list()\n if bracedInit is not None:\n return ASTInitializer(bracedInit)\n\n if outer == 'member':\n fallbackEnd: List[str] = []\n elif outer == 'templateParam':\n fallbackEnd = [',', '>']\n elif outer is None: # function parameter\n fallbackEnd = [',', ')']\n else:\n self.fail(\"Internal error, initializer for outer '%s' not \"\n \"implemented.\" % outer)\n\n inTemplate = outer == 'templateParam'\n\n def parser() -> ASTExpression:\n return self._parse_assignment_expression(inTemplate=inTemplate)\n value = self._parse_expression_fallback(fallbackEnd, parser, allow=allowFallback)\n return ASTInitializer(value)\n\n def _parse_type(self, named: Union[bool, str], outer: str = None) -> ASTType:\n \"\"\"\n named=False|'maybe'|True: 'maybe' is e.g., for function objects which\n doesn't need to name the arguments\n\n outer == operatorCast: annoying case, we should not take the params\n \"\"\"\n if outer: # always named\n if outer not in ('type', 'member', 'function',\n 'operatorCast', 'templateParam'):\n raise Exception('Internal error, unknown outer \"%s\".' % outer)\n if outer != 'operatorCast':\n assert named\n if outer in ('type', 'function'):\n # We allow type objects to just be a name.\n # Some functions don't have normal return types: constructors,\n # destructors, cast operators\n prevErrors = []\n startPos = self.pos\n # first try without the type\n try:\n declSpecs = self._parse_decl_specs(outer=outer, typed=False)\n decl = self._parse_declarator(named=True, paramMode=outer,\n typed=False)\n self.assert_end(allowSemicolon=True)\n except DefinitionError as exUntyped:\n if outer == 'type':\n desc = \"If just a name\"\n elif outer == 'function':\n desc = \"If the function has no return type\"\n else:\n assert False\n prevErrors.append((exUntyped, desc))\n self.pos = startPos\n try:\n declSpecs = self._parse_decl_specs(outer=outer)\n decl = self._parse_declarator(named=True, paramMode=outer)\n except DefinitionError as exTyped:\n self.pos = startPos\n if outer == 'type':\n desc = \"If typedef-like declaration\"\n elif outer == 'function':\n desc = \"If the function has a return type\"\n else:\n assert False\n prevErrors.append((exTyped, desc))\n # Retain the else branch for easier debugging.\n # TODO: it would be nice to save the previous stacktrace\n # and output it here.\n if True:\n if outer == 'type':\n header = \"Type must be either just a name or a \"\n header += \"typedef-like declaration.\"\n elif outer == 'function':\n header = \"Error when parsing function declaration.\"\n else:\n assert False\n raise self._make_multi_error(prevErrors, header) from exTyped\n else:\n # For testing purposes.\n # do it again to get the proper traceback (how do you\n # reliably save a traceback when an exception is\n # constructed?)\n self.pos = startPos\n typed = True\n declSpecs = self._parse_decl_specs(outer=outer, typed=typed)\n decl = self._parse_declarator(named=True, paramMode=outer,\n typed=typed)\n else:\n paramMode = 'type'\n if outer == 'member':\n named = True\n elif outer == 'operatorCast':\n paramMode = 'operatorCast'\n outer = None\n elif outer == 'templateParam':\n named = 'single'\n declSpecs = self._parse_decl_specs(outer=outer)\n decl = self._parse_declarator(named=named, paramMode=paramMode)\n return ASTType(declSpecs, decl)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexDomain_IndexDomain.merge_domaindata.for_docname_in_docnames_.self_entries_docname_o": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexDomain_IndexDomain.merge_domaindata.for_docname_in_docnames_.self_entries_docname_o", "embedding": null, "metadata": {"file_path": "sphinx/domains/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 47, "span_ids": ["IndexDomain.clear_doc", "IndexDomain.entries", "IndexDomain", "IndexDomain.merge_domaindata"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexDomain(Domain):\n \"\"\"Mathematics domain.\"\"\"\n name = 'index'\n label = 'index'\n\n @property\n def entries(self) -> Dict[str, List[Tuple[str, str, str, str, str]]]:\n return self.data.setdefault('entries', {})\n\n def clear_doc(self, docname: str) -> None:\n self.entries.pop(docname, None)\n\n def merge_domaindata(self, docnames: Iterable[str], otherdata: Dict) -> None:\n for docname in docnames:\n self.entries[docname] = otherdata['entries'][docname]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexDirective_IndexDirective.run.return._indexnode_targetnode_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexDirective_IndexDirective.run.return._indexnode_targetnode_", "embedding": null, "metadata": {"file_path": "sphinx/domains/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 55, "end_line": 84, "span_ids": ["IndexDirective.run", "IndexDirective"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexDirective(SphinxDirective):\n \"\"\"\n Directive to add entries to the index.\n \"\"\"\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {\n 'name': directives.unchanged,\n }\n\n def run(self) -> List[Node]:\n arguments = self.arguments[0].split('\\n')\n\n if 'name' in self.options:\n targetname = self.options['name']\n targetnode = nodes.target('', '', names=[targetname])\n else:\n targetid = 'index-%s' % self.env.new_serialno('index')\n targetnode = nodes.target('', '', ids=[targetid])\n\n self.state.document.note_explicit_target(targetnode)\n indexnode = addnodes.index()\n indexnode['entries'] = []\n indexnode['inline'] = False\n self.set_source_info(indexnode)\n for entry in arguments:\n indexnode['entries'].extend(process_index_entry(entry, targetnode['ids'][0]))\n return [indexnode, targetnode]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexRole_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexRole_", "embedding": null, "metadata": {"file_path": "sphinx/domains/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 96, "end_line": 130, "span_ids": ["IndexRole", "IndexRole.run", "setup"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexRole(ReferenceRole):\n def run(self) -> Tuple[List[Node], List[system_message]]:\n target_id = 'index-%s' % self.env.new_serialno('index')\n if self.has_explicit_title:\n # if an explicit target is given, process it as a full entry\n title = self.title\n entries = process_index_entry(self.target, target_id)\n else:\n # otherwise we just create a single entry\n if self.target.startswith('!'):\n title = self.title[1:]\n entries = [('single', self.target[1:], target_id, 'main', None)]\n else:\n title = self.title\n entries = [('single', self.target, target_id, '', None)]\n\n index = addnodes.index(entries=entries)\n target = nodes.target('', '', ids=[target_id])\n text = nodes.Text(title, title)\n self.set_source_info(index)\n return [index, target, text], []\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_domain(IndexDomain)\n app.add_directive('index', IndexDirective)\n app.add_role('index', IndexRole())\n\n return {\n 'version': 'builtin',\n 'env_version': 1,\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.get_index_text_JSObject.get_index_text.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.get_index_text_JSObject.get_index_text.return._", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 131, "end_line": 143, "span_ids": ["JSObject.get_index_text"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JSObject(ObjectDescription[Tuple[str, str]]):\n\n def get_index_text(self, objectname: str, name_obj: Tuple[str, str]) -> str:\n name, obj = name_obj\n if self.objtype == 'function':\n if not obj:\n return _('%s() (built-in function)') % name\n return _('%s() (%s method)') % (name, obj)\n elif self.objtype == 'class':\n return _('%s() (class)') % name\n elif self.objtype == 'data':\n return _('%s (global variable or constant)') % name\n elif self.objtype == 'attribute':\n return _('%s (%s attribute)') % (name, obj)\n return ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.before_content_JSObject.before_content.if_prefix_.if_self_allow_nesting_.objects_append_prefix_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.before_content_JSObject.before_content.if_prefix_.if_self_allow_nesting_.objects_append_prefix_", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 145, "end_line": 179, "span_ids": ["JSObject.before_content"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JSObject(ObjectDescription[Tuple[str, str]]):\n\n def before_content(self) -> None:\n \"\"\"Handle object nesting before content\n\n :py:class:`JSObject` represents JavaScript language constructs. For\n constructs that are nestable, this method will build up a stack of the\n nesting hierarchy so that it can be later de-nested correctly, in\n :py:meth:`after_content`.\n\n For constructs that aren't nestable, the stack is bypassed, and instead\n only the most recent object is tracked. This object prefix name will be\n removed with :py:meth:`after_content`.\n\n The following keys are used in ``self.env.ref_context``:\n\n js:objects\n Stores the object prefix history. With each nested element, we\n add the object prefix to this list. When we exit that object's\n nesting level, :py:meth:`after_content` is triggered and the\n prefix is removed from the end of the list.\n\n js:object\n Current object prefix. This should generally reflect the last\n element in the prefix history\n \"\"\"\n prefix = None\n if self.names:\n (obj_name, obj_name_prefix) = self.names.pop()\n prefix = obj_name_prefix.strip('.') if obj_name_prefix else None\n if self.allow_nesting:\n prefix = obj_name\n if prefix:\n self.env.ref_context['js:object'] = prefix\n if self.allow_nesting:\n objects = self.env.ref_context.setdefault('js:objects', [])\n objects.append(prefix)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.after_content_JSObject.make_old_id.return.fullname_replace__S": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.after_content_JSObject.make_old_id.return.fullname_replace__S", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 181, "end_line": 206, "span_ids": ["JSObject.after_content", "JSObject.make_old_id"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JSObject(ObjectDescription[Tuple[str, str]]):\n\n def after_content(self) -> None:\n \"\"\"Handle object de-nesting after content\n\n If this class is a nestable object, removing the last nested class prefix\n ends further nesting in the object.\n\n If this class is not a nestable object, the list of classes should not\n be altered as we didn't affect the nesting levels in\n :py:meth:`before_content`.\n \"\"\"\n objects = self.env.ref_context.setdefault('js:objects', [])\n if self.allow_nesting:\n try:\n objects.pop()\n except IndexError:\n pass\n self.env.ref_context['js:object'] = (objects[-1] if len(objects) > 0\n else None)\n\n def make_old_id(self, fullname: str) -> str:\n \"\"\"Generate old styled node_id for JS objects.\n\n .. note:: Old Styled node_id was used until Sphinx-3.0.\n This will be removed in Sphinx-5.0.\n \"\"\"\n return fullname.replace('$', '_S_')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSModule_JSModule.option_spec._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSModule_JSModule.option_spec._", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 240, "end_line": 265, "span_ids": ["JSModule"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JSModule(SphinxDirective):\n \"\"\"\n Directive to mark description of a new JavaScript module.\n\n This directive specifies the module name that will be used by objects that\n follow this directive.\n\n Options\n -------\n\n noindex\n If the ``noindex`` option is specified, no linkable elements will be\n created, and the module won't be added to the global module index. This\n is useful for splitting up the module definition across multiple\n sections or files.\n\n :param mod_name: Module name\n \"\"\"\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec: OptionSpec = {\n 'noindex': directives.flag\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSModule.run_JSModule.make_old_id.return._module_modname": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSModule.run_JSModule.make_old_id.return._module_modname", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 267, "end_line": 303, "span_ids": ["JSModule.run", "JSModule.make_old_id"], "tokens": 388}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JSModule(SphinxDirective):\n\n def run(self) -> List[Node]:\n mod_name = self.arguments[0].strip()\n self.env.ref_context['js:module'] = mod_name\n noindex = 'noindex' in self.options\n ret: List[Node] = []\n if not noindex:\n domain = cast(JavaScriptDomain, self.env.get_domain('js'))\n\n node_id = make_id(self.env, self.state.document, 'module', mod_name)\n domain.note_module(mod_name, node_id)\n # Make a duplicate entry in 'objects' to facilitate searching for\n # the module in JavaScriptDomain.find_obj()\n domain.note_object(mod_name, 'module', node_id,\n location=(self.env.docname, self.lineno))\n\n target = nodes.target('', '', ids=[node_id], ismod=True)\n\n # Assign old styled node_id not to break old hyperlinks (if possible)\n # Note: Will be removed in Sphinx-5.0 (RemovedInSphinx50Warning)\n old_node_id = self.make_old_id(mod_name)\n if old_node_id not in self.state.document.ids and old_node_id not in target['ids']:\n target['ids'].append(old_node_id)\n\n self.state.document.note_explicit_target(target)\n ret.append(target)\n indextext = _('%s (module)') % mod_name\n inode = addnodes.index(entries=[('single', indextext, node_id, '', None)])\n ret.append(inode)\n return ret\n\n def make_old_id(self, modname: str) -> str:\n \"\"\"Generate old styled node_id for JS modules.\n\n .. note:: Old Styled node_id was used until Sphinx-3.0.\n This will be removed in Sphinx-5.0.\n \"\"\"\n return 'module-' + modname", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSXRefRole_JSXRefRole.process_link.return.title_target": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSXRefRole_JSXRefRole.process_link.return.title_target", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 295, "end_line": 312, "span_ids": ["JSXRefRole.process_link", "JSXRefRole"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JSXRefRole(XRefRole):\n def process_link(self, env: BuildEnvironment, refnode: Element,\n has_explicit_title: bool, title: str, target: str) -> Tuple[str, str]:\n # basically what sphinx.domains.python.PyXRefRole does\n refnode['js:object'] = env.ref_context.get('js:object')\n refnode['js:module'] = env.ref_context.get('js:module')\n if not has_explicit_title:\n title = title.lstrip('.')\n target = target.lstrip('~')\n if title[0:1] == '~':\n title = title[1:]\n dot = title.rfind('.')\n if dot != -1:\n title = title[dot + 1:]\n if target[0:1] == '.':\n target = target[1:]\n refnode['refspecific'] = True\n return title, target", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain_JavaScriptDomain.clear_doc.for_modname_pkg_docname.if_pkg_docname_docname.del_self_modules_modname_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain_JavaScriptDomain.clear_doc.for_modname_pkg_docname.if_pkg_docname_docname.del_self_modules_modname_", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 326, "end_line": 385, "span_ids": ["JavaScriptDomain.objects", "JavaScriptDomain.clear_doc", "JavaScriptDomain.note_object", "JavaScriptDomain", "JavaScriptDomain.modules", "JavaScriptDomain.note_module"], "tokens": 628}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JavaScriptDomain(Domain):\n \"\"\"JavaScript language domain.\"\"\"\n name = 'js'\n label = 'JavaScript'\n # if you add a new object type make sure to edit JSObject.get_index_string\n object_types = {\n 'function': ObjType(_('function'), 'func'),\n 'method': ObjType(_('method'), 'meth'),\n 'class': ObjType(_('class'), 'class'),\n 'data': ObjType(_('data'), 'data'),\n 'attribute': ObjType(_('attribute'), 'attr'),\n 'module': ObjType(_('module'), 'mod'),\n }\n directives = {\n 'function': JSCallable,\n 'method': JSCallable,\n 'class': JSConstructor,\n 'data': JSObject,\n 'attribute': JSObject,\n 'module': JSModule,\n }\n roles = {\n 'func': JSXRefRole(fix_parens=True),\n 'meth': JSXRefRole(fix_parens=True),\n 'class': JSXRefRole(fix_parens=True),\n 'data': JSXRefRole(),\n 'attr': JSXRefRole(),\n 'mod': JSXRefRole(),\n }\n initial_data: Dict[str, Dict[str, Tuple[str, str]]] = {\n 'objects': {}, # fullname -> docname, node_id, objtype\n 'modules': {}, # modname -> docname, node_id\n }\n\n @property\n def objects(self) -> Dict[str, Tuple[str, str, str]]:\n return self.data.setdefault('objects', {}) # fullname -> docname, node_id, objtype\n\n def note_object(self, fullname: str, objtype: str, node_id: str,\n location: Any = None) -> None:\n if fullname in self.objects:\n docname = self.objects[fullname][0]\n logger.warning(__('duplicate %s description of %s, other %s in %s'),\n objtype, fullname, objtype, docname, location=location)\n self.objects[fullname] = (self.env.docname, node_id, objtype)\n\n @property\n def modules(self) -> Dict[str, Tuple[str, str]]:\n return self.data.setdefault('modules', {}) # modname -> docname, node_id\n\n def note_module(self, modname: str, node_id: str) -> None:\n self.modules[modname] = (self.env.docname, node_id)\n\n def clear_doc(self, docname: str) -> None:\n for fullname, (pkg_docname, _node_id, _l) in list(self.objects.items()):\n if pkg_docname == docname:\n del self.objects[fullname]\n for modname, (pkg_docname, _node_id) in list(self.modules.items()):\n if pkg_docname == docname:\n del self.modules[modname]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.merge_domaindata_JavaScriptDomain.merge_domaindata.for_mod_name_pkg_docnam.if_pkg_docname_in_docname.self_modules_mod_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.merge_domaindata_JavaScriptDomain.merge_domaindata.for_mod_name_pkg_docnam.if_pkg_docname_in_docname.self_modules_mod_name_", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 376, "end_line": 383, "span_ids": ["JavaScriptDomain.merge_domaindata"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JavaScriptDomain(Domain):\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:\n # XXX check duplicates\n for fullname, (fn, node_id, objtype) in otherdata['objects'].items():\n if fn in docnames:\n self.objects[fullname] = (fn, node_id, objtype)\n for mod_name, (pkg_docname, node_id) in otherdata['modules'].items():\n if pkg_docname in docnames:\n self.modules[mod_name] = (pkg_docname, node_id)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.find_obj_JavaScriptDomain.find_obj.return.newname_self_objects_get": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.find_obj_JavaScriptDomain.find_obj.return.newname_self_objects_get", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 385, "end_line": 407, "span_ids": ["JavaScriptDomain.find_obj"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JavaScriptDomain(Domain):\n\n def find_obj(self, env: BuildEnvironment, mod_name: str, prefix: str, name: str,\n typ: str, searchorder: int = 0) -> Tuple[str, Tuple[str, str, str]]:\n if name[-2:] == '()':\n name = name[:-2]\n\n searches = []\n if mod_name and prefix:\n searches.append('.'.join([mod_name, prefix, name]))\n if mod_name:\n searches.append('.'.join([mod_name, name]))\n if prefix:\n searches.append('.'.join([prefix, name]))\n searches.append(name)\n\n if searchorder == 0:\n searches.reverse()\n\n newname = None\n for search_name in searches:\n if search_name in self.objects:\n newname = search_name\n\n return newname, self.objects.get(newname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.resolve_xref_JavaScriptDomain.resolve_xref.return.make_refnode_builder_fro": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.resolve_xref_JavaScriptDomain.resolve_xref.return.make_refnode_builder_fro", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 420, "end_line": 429, "span_ids": ["JavaScriptDomain.resolve_xref"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JavaScriptDomain(Domain):\n\n def resolve_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n typ: str, target: str, node: pending_xref, contnode: Element\n ) -> Optional[Element]:\n mod_name = node.get('js:module')\n prefix = node.get('js:object')\n searchorder = 1 if node.hasattr('refspecific') else 0\n name, obj = self.find_obj(env, mod_name, prefix, target, typ, searchorder)\n if not obj:\n return None\n return make_refnode(builder, fromdocname, obj[0], obj[1], contnode, name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.resolve_any_xref_JavaScriptDomain.resolve_any_xref.return._js_self_role_for_o": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.resolve_any_xref_JavaScriptDomain.resolve_any_xref.return._js_self_role_for_o", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 420, "end_line": 429, "span_ids": ["JavaScriptDomain.resolve_any_xref"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JavaScriptDomain(Domain):\n\n def resolve_any_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n target: str, node: pending_xref, contnode: Element\n ) -> List[Tuple[str, Element]]:\n mod_name = node.get('js:module')\n prefix = node.get('js:object')\n name, obj = self.find_obj(env, mod_name, prefix, target, None, 1)\n if not obj:\n return []\n return [('js:' + self.role_for_objtype(obj[2]),\n make_refnode(builder, fromdocname, obj[0], obj[1], contnode, name))]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.get_objects_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JavaScriptDomain.get_objects_", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 431, "end_line": 454, "span_ids": ["JavaScriptDomain.get_full_qualified_name", "setup", "JavaScriptDomain.get_objects"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JavaScriptDomain(Domain):\n\n def get_objects(self) -> Iterator[Tuple[str, str, str, str, str, int]]:\n for refname, (docname, node_id, typ) in list(self.objects.items()):\n yield refname, refname, typ, docname, node_id, 1\n\n def get_full_qualified_name(self, node: Element) -> str:\n modname = node.get('js:module')\n prefix = node.get('js:object')\n target = node.get('reftarget')\n if target is None:\n return None\n else:\n return '.'.join(filter(None, [modname, prefix, target]))\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_domain(JavaScriptDomain)\n\n return {\n 'version': 'builtin',\n 'env_version': 2,\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py_MathDomain_MathDomain.merge_domaindata.for_docname_in_docnames_.self_data_has_equations_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py_MathDomain_MathDomain.merge_domaindata.for_docname_in_docnames_.self_data_has_equations_", "embedding": null, "metadata": {"file_path": "sphinx/domains/math.py", "file_name": "math.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 88, "span_ids": ["MathDomain.merge_domaindata", "MathDomain.clear_doc", "MathDomain.process_doc", "MathDomain", "MathDomain.note_equation", "MathDomain.equations", "MathDomain.get_equation_number_for"], "tokens": 536}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MathDomain(Domain):\n \"\"\"Mathematics domain.\"\"\"\n name = 'math'\n label = 'mathematics'\n\n initial_data: Dict = {\n 'objects': {}, # labelid -> (docname, eqno)\n 'has_equations': {}, # docname -> bool\n }\n dangling_warnings = {\n 'eq': 'equation not found: %(target)s',\n }\n enumerable_nodes = { # node_class -> (figtype, title_getter)\n nodes.math_block: ('displaymath', None),\n }\n roles = {\n 'numref': MathReferenceRole(),\n }\n\n @property\n def equations(self) -> Dict[str, Tuple[str, int]]:\n return self.data.setdefault('objects', {}) # labelid -> (docname, eqno)\n\n def note_equation(self, docname: str, labelid: str, location: Any = None) -> None:\n if labelid in self.equations:\n other = self.equations[labelid][0]\n logger.warning(__('duplicate label of equation %s, other instance in %s') %\n (labelid, other), location=location)\n\n self.equations[labelid] = (docname, self.env.new_serialno('eqno') + 1)\n\n def get_equation_number_for(self, labelid: str) -> int:\n if labelid in self.equations:\n return self.equations[labelid][1]\n else:\n return None\n\n def process_doc(self, env: BuildEnvironment, docname: str,\n document: nodes.document) -> None:\n def math_node(node: Node) -> bool:\n return isinstance(node, (nodes.math, nodes.math_block))\n\n self.data['has_equations'][docname] = any(document.findall(math_node))\n\n def clear_doc(self, docname: str) -> None:\n for equation_id, (doc, _eqno) in list(self.equations.items()):\n if doc == docname:\n del self.equations[equation_id]\n\n self.data['has_equations'].pop(docname, None)\n\n def merge_domaindata(self, docnames: Iterable[str], otherdata: Dict) -> None:\n for labelid, (doc, eqno) in otherdata['objects'].items():\n if doc in docnames:\n self.equations[labelid] = (doc, eqno)\n\n for docname in docnames:\n self.data['has_equations'][docname] = otherdata['has_equations'][docname]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py_MathDomain.resolve_xref_MathDomain.resolve_xref.if_docname_.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py_MathDomain.resolve_xref_MathDomain.resolve_xref.if_docname_.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/math.py", "file_name": "math.py", "file_type": "text/x-python", "category": "implementation", "start_line": 90, "end_line": 117, "span_ids": ["MathDomain.resolve_xref"], "tokens": 300}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MathDomain(Domain):\n\n def resolve_xref(self, env: BuildEnvironment, fromdocname: str, builder: \"Builder\",\n typ: str, target: str, node: pending_xref, contnode: Element\n ) -> Optional[Element]:\n assert typ in ('eq', 'numref')\n docname, number = self.equations.get(target, (None, None))\n if docname:\n # TODO: perhaps use rather a sphinx-core provided prefix here?\n node_id = make_id('equation-%s' % target)\n if env.config.math_numfig and env.config.numfig:\n if docname in env.toc_fignumbers:\n numbers = env.toc_fignumbers[docname]['displaymath'].get(node_id, ())\n eqno = '.'.join(map(str, numbers))\n else:\n eqno = ''\n else:\n eqno = str(number)\n\n try:\n eqref_format = env.config.math_eqref_format or \"({number})\"\n title = nodes.Text(eqref_format.format(number=eqno))\n except KeyError as exc:\n logger.warning(__('Invalid math_eqref_format: %r'), exc,\n location=node)\n title = nodes.Text(\"(%d)\" % number)\n title = nodes.Text(\"(%d)\" % number)\n return make_refnode(builder, fromdocname, docname, node_id, title)\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__parse_arglist__parse_arglist.return.params": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__parse_arglist__parse_arglist.return.params", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 242, "end_line": 289, "span_ids": ["_parse_arglist"], "tokens": 473}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _parse_arglist(arglist: str, env: BuildEnvironment = None) -> addnodes.desc_parameterlist:\n \"\"\"Parse a list of arguments using AST parser\"\"\"\n params = addnodes.desc_parameterlist(arglist)\n sig = signature_from_str('(%s)' % arglist)\n last_kind = None\n for param in sig.parameters.values():\n if param.kind != param.POSITIONAL_ONLY and last_kind == param.POSITIONAL_ONLY:\n # PEP-570: Separator for Positional Only Parameter: /\n params += addnodes.desc_parameter('', '', addnodes.desc_sig_operator('', '/'))\n if param.kind == param.KEYWORD_ONLY and last_kind in (param.POSITIONAL_OR_KEYWORD,\n param.POSITIONAL_ONLY,\n None):\n # PEP-3102: Separator for Keyword Only Parameter: *\n params += addnodes.desc_parameter('', '', addnodes.desc_sig_operator('', '*'))\n\n node = addnodes.desc_parameter()\n if param.kind == param.VAR_POSITIONAL:\n node += addnodes.desc_sig_operator('', '*')\n node += addnodes.desc_sig_name('', param.name)\n elif param.kind == param.VAR_KEYWORD:\n node += addnodes.desc_sig_operator('', '**')\n node += addnodes.desc_sig_name('', param.name)\n else:\n node += addnodes.desc_sig_name('', param.name)\n\n if param.annotation is not param.empty:\n children = _parse_annotation(param.annotation, env)\n node += addnodes.desc_sig_punctuation('', ':')\n node += addnodes.desc_sig_space()\n node += addnodes.desc_sig_name('', '', *children) # type: ignore\n if param.default is not param.empty:\n if param.annotation is not param.empty:\n node += addnodes.desc_sig_space()\n node += addnodes.desc_sig_operator('', '=')\n node += addnodes.desc_sig_space()\n else:\n node += addnodes.desc_sig_operator('', '=')\n node += nodes.inline('', param.default, classes=['default_value'],\n support_smartquotes=False)\n\n params += node\n last_kind = param.kind\n\n if last_kind == Parameter.POSITIONAL_ONLY:\n # PEP-570: Separator for Positional Only Parameter: /\n params += addnodes.desc_parameter('', '', addnodes.desc_sig_operator('', '/'))\n\n return params", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__pseudo_parse_arglist__pseudo_parse_arglist.try_.else_.signode_paramlist": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__pseudo_parse_arglist__pseudo_parse_arglist.try_.else_.signode_paramlist", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 292, "end_line": 338, "span_ids": ["_pseudo_parse_arglist"], "tokens": 411}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _pseudo_parse_arglist(signode: desc_signature, arglist: str) -> None:\n \"\"\"\"Parse\" a list of arguments separated by commas.\n\n Arguments can have \"optional\" annotations given by enclosing them in\n brackets. Currently, this will split at any comma, even if it's inside a\n string literal (e.g. default argument value).\n \"\"\"\n paramlist = addnodes.desc_parameterlist()\n stack: List[Element] = [paramlist]\n try:\n for argument in arglist.split(','):\n argument = argument.strip()\n ends_open = ends_close = 0\n while argument.startswith('['):\n stack.append(addnodes.desc_optional())\n stack[-2] += stack[-1]\n argument = argument[1:].strip()\n while argument.startswith(']'):\n stack.pop()\n argument = argument[1:].strip()\n while argument.endswith(']') and not argument.endswith('[]'):\n ends_close += 1\n argument = argument[:-1].strip()\n while argument.endswith('['):\n ends_open += 1\n argument = argument[:-1].strip()\n if argument:\n stack[-1] += addnodes.desc_parameter(\n '', '', addnodes.desc_sig_name(argument, argument))\n while ends_open:\n stack.append(addnodes.desc_optional())\n stack[-2] += stack[-1]\n ends_open -= 1\n while ends_close:\n stack.pop()\n ends_close -= 1\n if len(stack) != 1:\n raise IndexError\n except IndexError:\n # if there are too few or too many elements on the stack, just give up\n # and treat the whole argument list as one argument, discarding the\n # already partially populated paramlist node\n paramlist = addnodes.desc_parameterlist()\n paramlist += addnodes.desc_parameter(arglist, arglist)\n signode += paramlist\n else:\n signode += paramlist", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__This_override_allows_ou_PyXrefMixin.make_xref.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__This_override_allows_ou_PyXrefMixin.make_xref.return.result", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 341, "end_line": 375, "span_ids": ["_pseudo_parse_arglist", "PyXrefMixin.make_xref", "PyXrefMixin"], "tokens": 373}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# This override allows our inline type specifiers to behave like :class: link\n# when it comes to handling \".\" and \"~\" prefixes.\nclass PyXrefMixin:\n def make_xref(self, rolename: str, domain: str, target: str,\n innernode: Type[TextlikeNode] = nodes.emphasis,\n contnode: Node = None, env: BuildEnvironment = None,\n inliner: Inliner = None, location: Node = None) -> Node:\n # we use inliner=None to make sure we get the old behaviour with a single\n # pending_xref node\n result = super().make_xref(rolename, domain, target, # type: ignore\n innernode, contnode,\n env, inliner=None, location=None)\n if isinstance(result, pending_xref):\n result['refspecific'] = True\n result['py:module'] = env.ref_context.get('py:module')\n result['py:class'] = env.ref_context.get('py:class')\n\n reftype, reftarget, reftitle, _ = parse_reftarget(target)\n if reftarget != reftitle:\n result['reftype'] = reftype\n result['reftarget'] = reftarget\n\n result.clear()\n result += innernode(reftitle, reftitle)\n elif env.config.python_use_unqualified_type_names:\n children = result.children\n result.clear()\n\n shortname = target.split('.')[-1]\n textnode = innernode('', shortname)\n contnodes = [pending_xref_condition('', '', textnode, condition='resolved'),\n pending_xref_condition('', '', *children, condition='*')]\n result.extend(contnodes)\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject_PyObject.needs_arglist.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject_PyObject.needs_arglist.return.False", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 417, "end_line": 463, "span_ids": ["PyObject", "PyObject.needs_arglist", "PyObject.get_signature_prefix"], "tokens": 391}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyObject(ObjectDescription[Tuple[str, str]]):\n \"\"\"\n Description of a general Python object.\n\n :cvar allow_nesting: Class is an object that allows for nested namespaces\n :vartype allow_nesting: bool\n \"\"\"\n option_spec: OptionSpec = {\n 'noindex': directives.flag,\n 'noindexentry': directives.flag,\n 'module': directives.unchanged,\n 'canonical': directives.unchanged,\n 'annotation': directives.unchanged,\n }\n\n doc_field_types = [\n PyTypedField('parameter', label=_('Parameters'),\n names=('param', 'parameter', 'arg', 'argument',\n 'keyword', 'kwarg', 'kwparam'),\n typerolename='class', typenames=('paramtype', 'type'),\n can_collapse=True),\n PyTypedField('variable', label=_('Variables'),\n names=('var', 'ivar', 'cvar'),\n typerolename='class', typenames=('vartype',),\n can_collapse=True),\n PyGroupedField('exceptions', label=_('Raises'), rolename='exc',\n names=('raises', 'raise', 'exception', 'except'),\n can_collapse=True),\n Field('returnvalue', label=_('Returns'), has_arg=False,\n names=('returns', 'return')),\n PyField('returntype', label=_('Return type'), has_arg=False,\n names=('rtype',), bodyrolename='class'),\n ]\n\n allow_nesting = False\n\n def get_signature_prefix(self, sig: str) -> List[nodes.Node]:\n \"\"\"May return a prefix to put before the object name in the\n signature.\n \"\"\"\n return []\n\n def needs_arglist(self) -> bool:\n \"\"\"May return true if an empty argument list is to be generated even if\n the document contains none.\n \"\"\"\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.handle_signature_PyObject.handle_signature.return.fullname_prefix": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.handle_signature_PyObject.handle_signature.return.fullname_prefix", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 465, "end_line": 556, "span_ids": ["PyObject.handle_signature"], "tokens": 787}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyObject(ObjectDescription[Tuple[str, str]]):\n\n def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]:\n \"\"\"Transform a Python signature into RST nodes.\n\n Return (fully qualified name of the thing, classname if any).\n\n If inside a class, the current class name is handled intelligently:\n * it is stripped from the displayed name if present\n * it is added to the full name (return value) if not present\n \"\"\"\n m = py_sig_re.match(sig)\n if m is None:\n raise ValueError\n prefix, name, arglist, retann = m.groups()\n\n # determine module and class name (if applicable), as well as full name\n modname = self.options.get('module', self.env.ref_context.get('py:module'))\n classname = self.env.ref_context.get('py:class')\n if classname:\n add_module = False\n if prefix and (prefix == classname or\n prefix.startswith(classname + \".\")):\n fullname = prefix + name\n # class name is given again in the signature\n prefix = prefix[len(classname):].lstrip('.')\n elif prefix:\n # class name is given in the signature, but different\n # (shouldn't happen)\n fullname = classname + '.' + prefix + name\n else:\n # class name is not given in the signature\n fullname = classname + '.' + name\n else:\n add_module = True\n if prefix:\n classname = prefix.rstrip('.')\n fullname = prefix + name\n else:\n classname = ''\n fullname = name\n\n signode['module'] = modname\n signode['class'] = classname\n signode['fullname'] = fullname\n\n sig_prefix = self.get_signature_prefix(sig)\n if sig_prefix:\n if type(sig_prefix) is str:\n warnings.warn(\n \"Python directive method get_signature_prefix()\"\n \" returning a string is deprecated.\"\n \" It must now return a list of nodes.\"\n \" Return value was '{}'.\".format(sig_prefix),\n RemovedInSphinx60Warning)\n signode += addnodes.desc_annotation(sig_prefix, '', # type: ignore\n nodes.Text(sig_prefix)) # type: ignore\n else:\n signode += addnodes.desc_annotation(str(sig_prefix), '', *sig_prefix)\n\n if prefix:\n signode += addnodes.desc_addname(prefix, prefix)\n elif modname and add_module and self.env.config.add_module_names:\n nodetext = modname + '.'\n signode += addnodes.desc_addname(nodetext, nodetext)\n\n signode += addnodes.desc_name(name, name)\n if arglist:\n try:\n signode += _parse_arglist(arglist, self.env)\n except SyntaxError:\n # fallback to parse arglist original parser.\n # it supports to represent optional arguments (ex. \"func(foo [, bar])\")\n _pseudo_parse_arglist(signode, arglist)\n except NotImplementedError as exc:\n logger.warning(\"could not parse arglist (%r): %s\", arglist, exc,\n location=signode)\n _pseudo_parse_arglist(signode, arglist)\n else:\n if self.needs_arglist():\n # for callables, add an empty parameter list\n signode += addnodes.desc_parameterlist()\n\n if retann:\n children = _parse_annotation(retann, self.env)\n signode += addnodes.desc_returns(retann, '', *children)\n\n anno = self.options.get('annotation')\n if anno:\n signode += addnodes.desc_annotation(' ' + anno, '',\n addnodes.desc_sig_space(),\n nodes.Text(anno))\n\n return fullname, prefix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.before_content_PyObject.before_content.if_module_in_self_optio.self_env_ref_context_py_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.before_content_PyObject.before_content.if_module_in_self_optio.self_env_ref_context_py_", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 499, "end_line": 530, "span_ids": ["PyObject.before_content"], "tokens": 330}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyObject(ObjectDescription[Tuple[str, str]]):\n\n def before_content(self) -> None:\n \"\"\"Handle object nesting before content\n\n :py:class:`PyObject` represents Python language constructs. For\n constructs that are nestable, such as a Python classes, this method will\n build up a stack of the nesting hierarchy so that it can be later\n de-nested correctly, in :py:meth:`after_content`.\n\n For constructs that aren't nestable, the stack is bypassed, and instead\n only the most recent object is tracked. This object prefix name will be\n removed with :py:meth:`after_content`.\n \"\"\"\n prefix = None\n if self.names:\n # fullname and name_prefix come from the `handle_signature` method.\n # fullname represents the full object name that is constructed using\n # object nesting and explicit prefixes. `name_prefix` is the\n # explicit prefix given in a signature\n (fullname, name_prefix) = self.names[-1]\n if self.allow_nesting:\n prefix = fullname\n elif name_prefix:\n prefix = name_prefix.strip('.')\n if prefix:\n self.env.ref_context['py:class'] = prefix\n if self.allow_nesting:\n classes = self.env.ref_context.setdefault('py:classes', [])\n classes.append(prefix)\n if 'module' in self.options:\n modules = self.env.ref_context.setdefault('py:modules', [])\n modules.append(self.env.ref_context.get('py:module'))\n self.env.ref_context['py:module'] = self.options['module']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.after_content_PyObject.after_content.if_module_in_self_optio.if_modules_.else_.self_env_ref_context_pop_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.after_content_PyObject.after_content.if_module_in_self_optio.if_modules_.else_.self_env_ref_context_pop_", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 532, "end_line": 555, "span_ids": ["PyObject.after_content"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyObject(ObjectDescription[Tuple[str, str]]):\n\n def after_content(self) -> None:\n \"\"\"Handle object de-nesting after content\n\n If this class is a nestable object, removing the last nested class prefix\n ends further nesting in the object.\n\n If this class is not a nestable object, the list of classes should not\n be altered as we didn't affect the nesting levels in\n :py:meth:`before_content`.\n \"\"\"\n classes = self.env.ref_context.setdefault('py:classes', [])\n if self.allow_nesting:\n try:\n classes.pop()\n except IndexError:\n pass\n self.env.ref_context['py:class'] = (classes[-1] if len(classes) > 0\n else None)\n if 'module' in self.options:\n modules = self.env.ref_context.setdefault('py:modules', [])\n if modules:\n self.env.ref_context['py:module'] = modules.pop()\n else:\n self.env.ref_context.pop('py:module')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyFunction_PyFunction.get_index_text.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyFunction_PyFunction.get_index_text.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 648, "end_line": 683, "span_ids": ["PyFunction", "PyFunction.get_signature_prefix", "PyFunction.add_target_and_index", "PyFunction.get_index_text", "PyFunction.needs_arglist"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyFunction(PyObject):\n \"\"\"Description of a function.\"\"\"\n\n option_spec: OptionSpec = PyObject.option_spec.copy()\n option_spec.update({\n 'async': directives.flag,\n })\n\n def get_signature_prefix(self, sig: str) -> List[nodes.Node]:\n if 'async' in self.options:\n return [addnodes.desc_sig_keyword('', 'async'),\n addnodes.desc_sig_space()]\n else:\n return []\n\n def needs_arglist(self) -> bool:\n return True\n\n def add_target_and_index(self, name_cls: Tuple[str, str], sig: str,\n signode: desc_signature) -> None:\n super().add_target_and_index(name_cls, sig, signode)\n if 'noindexentry' not in self.options:\n modname = self.options.get('module', self.env.ref_context.get('py:module'))\n node_id = signode['ids'][0]\n\n name, cls = name_cls\n if modname:\n text = _('%s() (in module %s)') % (name, modname)\n self.indexnode['entries'].append(('single', text, node_id, '', None))\n else:\n text = '%s; %s()' % (pairindextypes['builtin'], name)\n self.indexnode['entries'].append(('pair', text, node_id, '', None))\n\n def get_index_text(self, modname: str, name_cls: Tuple[str, str]) -> str:\n # add index in own add_target_and_index() instead.\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyDecoratorFunction_PyDecoratorFunction.needs_arglist.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyDecoratorFunction_PyDecoratorFunction.needs_arglist.return.False", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 595, "end_line": 609, "span_ids": ["PyDecoratorFunction.handle_signature", "PyDecoratorFunction", "PyDecoratorFunction.run", "PyDecoratorFunction.needs_arglist"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyDecoratorFunction(PyFunction):\n \"\"\"Description of a decorator.\"\"\"\n\n def run(self) -> List[Node]:\n # a decorator function is a function after all\n self.name = 'py:function'\n return super().run()\n\n def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]:\n ret = super().handle_signature(sig, signode)\n signode.insert(0, addnodes.desc_addname('@', '@'))\n return ret\n\n def needs_arglist(self) -> bool:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyVariable_PyVariable.get_index_text.if_modname_.else_.return.__s_built_in_variable_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyVariable_PyVariable.get_index_text.if_modname_.else_.return.__s_built_in_variable_", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 703, "end_line": 737, "span_ids": ["PyVariable.get_index_text", "PyVariable.handle_signature", "PyVariable"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyVariable(PyObject):\n \"\"\"Description of a variable.\"\"\"\n\n option_spec: OptionSpec = PyObject.option_spec.copy()\n option_spec.update({\n 'type': directives.unchanged,\n 'value': directives.unchanged,\n })\n\n def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]:\n fullname, prefix = super().handle_signature(sig, signode)\n\n typ = self.options.get('type')\n if typ:\n annotations = _parse_annotation(typ, self.env)\n signode += addnodes.desc_annotation(typ, '',\n addnodes.desc_sig_punctuation('', ':'),\n addnodes.desc_sig_space(), *annotations)\n\n value = self.options.get('value')\n if value:\n signode += addnodes.desc_annotation(value, '',\n addnodes.desc_sig_space(),\n addnodes.desc_sig_punctuation('', '='),\n addnodes.desc_sig_space(),\n nodes.Text(value))\n\n return fullname, prefix\n\n def get_index_text(self, modname: str, name_cls: Tuple[str, str]) -> str:\n name, cls = name_cls\n if modname:\n return _('%s (in module %s)') % (name, modname)\n else:\n return _('%s (built-in variable)') % name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyClasslike_PyClasslike.get_index_text.if_self_objtype_class.else_.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyClasslike_PyClasslike.get_index_text.if_self_objtype_class.else_.return._", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 740, "end_line": 767, "span_ids": ["PyClasslike.get_signature_prefix", "PyClasslike", "PyClasslike.get_index_text"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyClasslike(PyObject):\n \"\"\"\n Description of a class-like object (classes, interfaces, exceptions).\n \"\"\"\n\n option_spec: OptionSpec = PyObject.option_spec.copy()\n option_spec.update({\n 'final': directives.flag,\n })\n\n allow_nesting = True\n\n def get_signature_prefix(self, sig: str) -> List[nodes.Node]:\n if 'final' in self.options:\n return [nodes.Text('final'), addnodes.desc_sig_space(),\n nodes.Text(self.objtype), addnodes.desc_sig_space()]\n else:\n return [nodes.Text(self.objtype), addnodes.desc_sig_space()]\n\n def get_index_text(self, modname: str, name_cls: Tuple[str, str]) -> str:\n if self.objtype == 'class':\n if not modname:\n return _('%s (built-in class)') % name_cls[0]\n return _('%s (class in %s)') % (name_cls[0], modname)\n elif self.objtype == 'exception':\n return name_cls[0]\n else:\n return ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyMethod.get_index_text_PyMethod.get_index_text.if_classmethod_in_self_.else_.return.__s_s_method_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyMethod.get_index_text_PyMethod.get_index_text.if_classmethod_in_self_.else_.return.__s_s_method_", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 811, "end_line": 830, "span_ids": ["PyMethod.get_index_text"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyMethod(PyObject):\n\n def get_index_text(self, modname: str, name_cls: Tuple[str, str]) -> str:\n name, cls = name_cls\n try:\n clsname, methname = name.rsplit('.', 1)\n if modname and self.env.config.add_module_names:\n clsname = '.'.join([modname, clsname])\n except ValueError:\n if modname:\n return _('%s() (in module %s)') % (name, modname)\n else:\n return '%s()' % name\n\n if 'classmethod' in self.options:\n return _('%s() (%s class method)') % (methname, clsname)\n elif 'property' in self.options:\n return _('%s (%s property)') % (methname, clsname)\n elif 'staticmethod' in self.options:\n return _('%s() (%s static method)') % (methname, clsname)\n else:\n return _('%s() (%s method)') % (methname, clsname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyClassMethod_PyDecoratorMethod.needs_arglist.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyClassMethod_PyDecoratorMethod.needs_arglist.return.False", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 833, "end_line": 870, "span_ids": ["PyClassMethod.run", "PyDecoratorMethod.handle_signature", "PyDecoratorMethod", "PyStaticMethod.run", "PyDecoratorMethod.run", "PyStaticMethod", "PyClassMethod", "PyDecoratorMethod.needs_arglist"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyClassMethod(PyMethod):\n \"\"\"Description of a classmethod.\"\"\"\n\n option_spec: OptionSpec = PyObject.option_spec.copy()\n\n def run(self) -> List[Node]:\n self.name = 'py:method'\n self.options['classmethod'] = True\n\n return super().run()\n\n\nclass PyStaticMethod(PyMethod):\n \"\"\"Description of a staticmethod.\"\"\"\n\n option_spec: OptionSpec = PyObject.option_spec.copy()\n\n def run(self) -> List[Node]:\n self.name = 'py:method'\n self.options['staticmethod'] = True\n\n return super().run()\n\n\nclass PyDecoratorMethod(PyMethod):\n \"\"\"Description of a decoratormethod.\"\"\"\n\n def run(self) -> List[Node]:\n self.name = 'py:method'\n return super().run()\n\n def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]:\n ret = super().handle_signature(sig, signode)\n signode.insert(0, addnodes.desc_addname('@', '@'))\n return ret\n\n def needs_arglist(self) -> bool:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyAttribute_PyAttribute.handle_signature.return.fullname_prefix": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyAttribute_PyAttribute.handle_signature.return.fullname_prefix", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 873, "end_line": 901, "span_ids": ["PyAttribute", "PyAttribute.handle_signature"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyAttribute(PyObject):\n \"\"\"Description of an attribute.\"\"\"\n\n option_spec: OptionSpec = PyObject.option_spec.copy()\n option_spec.update({\n 'type': directives.unchanged,\n 'value': directives.unchanged,\n })\n\n def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]:\n fullname, prefix = super().handle_signature(sig, signode)\n\n typ = self.options.get('type')\n if typ:\n annotations = _parse_annotation(typ, self.env)\n signode += addnodes.desc_annotation(typ, '',\n addnodes.desc_sig_punctuation('', ':'),\n addnodes.desc_sig_space(),\n *annotations)\n\n value = self.options.get('value')\n if value:\n signode += addnodes.desc_annotation(value, '',\n addnodes.desc_sig_space(),\n addnodes.desc_sig_punctuation('', '='),\n addnodes.desc_sig_space(),\n nodes.Text(value))\n\n return fullname, prefix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyAttribute.get_index_text_PyAttribute.get_index_text.return.__s_s_attribute_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyAttribute.get_index_text_PyAttribute.get_index_text.return.__s_s_attribute_", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 879, "end_line": 891, "span_ids": ["PyAttribute.get_index_text"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyAttribute(PyObject):\n\n def get_index_text(self, modname: str, name_cls: Tuple[str, str]) -> str:\n name, cls = name_cls\n try:\n clsname, attrname = name.rsplit('.', 1)\n if modname and self.env.config.add_module_names:\n clsname = '.'.join([modname, clsname])\n except ValueError:\n if modname:\n return _('%s (in module %s)') % (name, modname)\n else:\n return name\n\n return _('%s (%s attribute)') % (attrname, clsname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyModule_PyModule.make_old_id.return._module_s_name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyModule_PyModule.make_old_id.return._module_s_name", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 969, "end_line": 1029, "span_ids": ["PyModule.run", "PyModule", "PyModule.make_old_id"], "tokens": 521}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyModule(SphinxDirective):\n \"\"\"\n Directive to mark description of a new module.\n \"\"\"\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec: OptionSpec = {\n 'platform': lambda x: x,\n 'synopsis': lambda x: x,\n 'noindex': directives.flag,\n 'deprecated': directives.flag,\n }\n\n def run(self) -> List[Node]:\n domain = cast(PythonDomain, self.env.get_domain('py'))\n\n modname = self.arguments[0].strip()\n noindex = 'noindex' in self.options\n self.env.ref_context['py:module'] = modname\n ret: List[Node] = []\n if not noindex:\n # note module to the domain\n node_id = make_id(self.env, self.state.document, 'module', modname)\n target = nodes.target('', '', ids=[node_id], ismod=True)\n self.set_source_info(target)\n\n # Assign old styled node_id not to break old hyperlinks (if possible)\n # Note: Will removed in Sphinx-5.0 (RemovedInSphinx50Warning)\n old_node_id = self.make_old_id(modname)\n if node_id != old_node_id and old_node_id not in self.state.document.ids:\n target['ids'].append(old_node_id)\n\n self.state.document.note_explicit_target(target)\n\n domain.note_module(modname,\n node_id,\n self.options.get('synopsis', ''),\n self.options.get('platform', ''),\n 'deprecated' in self.options)\n domain.note_object(modname, 'module', node_id, location=target)\n\n # the platform and synopsis aren't printed; in fact, they are only\n # used in the modindex currently\n ret.append(target)\n indextext = '%s; %s' % (pairindextypes['module'], modname)\n inode = addnodes.index(entries=[('pair', indextext, node_id, '', None)])\n ret.append(inode)\n return ret\n\n def make_old_id(self, name: str) -> str:\n \"\"\"Generate old styled node_id.\n\n Old styled node_id is incompatible with docutils' node_id.\n It can contain dots and hyphens.\n\n .. note:: Old styled node_id was mainly used until Sphinx-3.0.\n \"\"\"\n return 'module-%s' % name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyCurrentModule_PyCurrentModule.run.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyCurrentModule_PyCurrentModule.run.return._", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1032, "end_line": 1050, "span_ids": ["PyCurrentModule", "PyCurrentModule.run"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyCurrentModule(SphinxDirective):\n \"\"\"\n This directive is just to tell Sphinx that we're documenting\n stuff in module foo, but links to module foo won't lead here.\n \"\"\"\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n modname = self.arguments[0].strip()\n if modname == 'None':\n self.env.ref_context.pop('py:module', None)\n else:\n self.env.ref_context['py:module'] = modname\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyXRefRole_PyXRefRole.process_link.return.title_target": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyXRefRole_PyXRefRole.process_link.return.title_target", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1001, "end_line": 1021, "span_ids": ["PyXRefRole", "PyXRefRole.process_link"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyXRefRole(XRefRole):\n def process_link(self, env: BuildEnvironment, refnode: Element,\n has_explicit_title: bool, title: str, target: str) -> Tuple[str, str]:\n refnode['py:module'] = env.ref_context.get('py:module')\n refnode['py:class'] = env.ref_context.get('py:class')\n if not has_explicit_title:\n title = title.lstrip('.') # only has a meaning for the target\n target = target.lstrip('~') # only has a meaning for the title\n # if the first character is a tilde, don't display the module/class\n # parts of the contents\n if title[0:1] == '~':\n title = title[1:]\n dot = title.rfind('.')\n if dot != -1:\n title = title[dot + 1:]\n # if the first character is a dot, search more specific namespaces first\n # else search builtins first\n if target[0:1] == '.':\n target = target[1:]\n refnode['refspecific'] = True\n return title, target", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_filter_meta_fields_filter_meta_fields.for_node_in_content_.if_isinstance_node_nodes.for_field_in_fields_.if_field_name_meta_o.break": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_filter_meta_fields_filter_meta_fields.for_node_in_content_.if_isinstance_node_nodes.for_field_in_fields_.if_field_name_meta_o.break", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1024, "end_line": 1036, "span_ids": ["filter_meta_fields"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def filter_meta_fields(app: Sphinx, domain: str, objtype: str, content: Element) -> None:\n \"\"\"Filter ``:meta:`` field from its docstring.\"\"\"\n if domain != 'py':\n return\n\n for node in content:\n if isinstance(node, nodes.field_list):\n fields = cast(List[nodes.field], node)\n for field in fields:\n field_name = cast(nodes.field_body, field[0]).astext().strip()\n if field_name == 'meta' or field_name.startswith('meta '):\n node.remove(field)\n break", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonModuleIndex_PythonModuleIndex.generate.return.sorted_content_collapse": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonModuleIndex_PythonModuleIndex.generate.return.sorted_content_collapse", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1091, "end_line": 1160, "span_ids": ["PythonModuleIndex", "PythonModuleIndex.generate"], "tokens": 567}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PythonModuleIndex(Index):\n \"\"\"\n Index subclass to provide the Python module index.\n \"\"\"\n\n name = 'modindex'\n localname = _('Python Module Index')\n shortname = _('modules')\n\n def generate(self, docnames: Iterable[str] = None\n ) -> Tuple[List[Tuple[str, List[IndexEntry]]], bool]:\n content: Dict[str, List[IndexEntry]] = {}\n # list of prefixes to ignore\n ignores: List[str] = self.domain.env.config['modindex_common_prefix']\n ignores = sorted(ignores, key=len, reverse=True)\n # list of all modules, sorted by module name\n modules = sorted(self.domain.data['modules'].items(),\n key=lambda x: x[0].lower())\n # sort out collapsible modules\n prev_modname = ''\n num_toplevels = 0\n for modname, (docname, node_id, synopsis, platforms, deprecated) in modules:\n if docnames and docname not in docnames:\n continue\n\n for ignore in ignores:\n if modname.startswith(ignore):\n modname = modname[len(ignore):]\n stripped = ignore\n break\n else:\n stripped = ''\n\n # we stripped the whole module name?\n if not modname:\n modname, stripped = stripped, ''\n\n entries = content.setdefault(modname[0].lower(), [])\n\n package = modname.split('.')[0]\n if package != modname:\n # it's a submodule\n if prev_modname == package:\n # first submodule - make parent a group head\n if entries:\n last = entries[-1]\n entries[-1] = IndexEntry(last[0], 1, last[2], last[3],\n last[4], last[5], last[6])\n elif not prev_modname.startswith(package):\n # submodule without parent in list, add dummy entry\n entries.append(IndexEntry(stripped + package, 1, '', '', '', '', ''))\n subtype = 2\n else:\n num_toplevels += 1\n subtype = 0\n\n qualifier = _('Deprecated') if deprecated else ''\n entries.append(IndexEntry(stripped + modname, subtype, docname,\n node_id, platforms, qualifier, synopsis))\n prev_modname = modname\n\n # apply heuristics when to collapse modindex at page load:\n # only collapse if number of toplevel modules is larger than\n # number of submodules\n collapse = len(modules) - num_toplevels < num_toplevels\n\n # sort by first letter\n sorted_content = sorted(content.items())\n\n return sorted_content, collapse", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain_PythonDomain.objects._fullname_ObjectEntry": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain_PythonDomain.objects._fullname_ObjectEntry", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1163, "end_line": 1216, "span_ids": ["PythonDomain", "PythonDomain.objects"], "tokens": 538}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PythonDomain(Domain):\n \"\"\"Python language domain.\"\"\"\n name = 'py'\n label = 'Python'\n object_types: Dict[str, ObjType] = {\n 'function': ObjType(_('function'), 'func', 'obj'),\n 'data': ObjType(_('data'), 'data', 'obj'),\n 'class': ObjType(_('class'), 'class', 'exc', 'obj'),\n 'exception': ObjType(_('exception'), 'exc', 'class', 'obj'),\n 'method': ObjType(_('method'), 'meth', 'obj'),\n 'classmethod': ObjType(_('class method'), 'meth', 'obj'),\n 'staticmethod': ObjType(_('static method'), 'meth', 'obj'),\n 'attribute': ObjType(_('attribute'), 'attr', 'obj'),\n 'property': ObjType(_('property'), 'attr', '_prop', 'obj'),\n 'module': ObjType(_('module'), 'mod', 'obj'),\n }\n\n directives = {\n 'function': PyFunction,\n 'data': PyVariable,\n 'class': PyClasslike,\n 'exception': PyClasslike,\n 'method': PyMethod,\n 'classmethod': PyClassMethod,\n 'staticmethod': PyStaticMethod,\n 'attribute': PyAttribute,\n 'property': PyProperty,\n 'module': PyModule,\n 'currentmodule': PyCurrentModule,\n 'decorator': PyDecoratorFunction,\n 'decoratormethod': PyDecoratorMethod,\n }\n roles = {\n 'data': PyXRefRole(),\n 'exc': PyXRefRole(),\n 'func': PyXRefRole(fix_parens=True),\n 'class': PyXRefRole(),\n 'const': PyXRefRole(),\n 'attr': PyXRefRole(),\n 'meth': PyXRefRole(fix_parens=True),\n 'mod': PyXRefRole(),\n 'obj': PyXRefRole(),\n }\n initial_data: Dict[str, Dict[str, Tuple[Any]]] = {\n 'objects': {}, # fullname -> docname, objtype\n 'modules': {}, # modname -> docname, synopsis, platform, deprecated\n }\n indices = [\n PythonModuleIndex,\n ]\n\n @property\n def objects(self) -> Dict[str, ObjectEntry]:\n return self.data.setdefault('objects', {}) # fullname -> ObjectEntry", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.note_object_PythonDomain.note_object.self_objects_name_Obje": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.note_object_PythonDomain.note_object.self_objects_name_Obje", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1218, "end_line": 1237, "span_ids": ["PythonDomain.note_object"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PythonDomain(Domain):\n\n def note_object(self, name: str, objtype: str, node_id: str,\n aliased: bool = False, location: Any = None) -> None:\n \"\"\"Note a python object for cross reference.\n\n .. versionadded:: 2.1\n \"\"\"\n if name in self.objects:\n other = self.objects[name]\n if other.aliased and aliased is False:\n # The original definition found. Override it!\n pass\n elif other.aliased is False and aliased:\n # The original definition is already registered.\n return\n else:\n # duplicated\n logger.warning(__('duplicate object description of %s, '\n 'other instance in %s, use :noindex: for one of them'),\n name, other.docname, location=location)\n self.objects[name] = ObjectEntry(self.env.docname, node_id, objtype, aliased)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.modules_PythonDomain.merge_domaindata.for_modname_mod_in_other.if_mod_docname_in_docname.self_modules_modname_m": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.modules_PythonDomain.merge_domaindata.for_modname_mod_in_other.if_mod_docname_in_docname.self_modules_modname_m", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1177, "end_line": 1205, "span_ids": ["PythonDomain.clear_doc", "PythonDomain.merge_domaindata", "PythonDomain.modules", "PythonDomain.note_module"], "tokens": 275}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PythonDomain(Domain):\n\n @property\n def modules(self) -> Dict[str, ModuleEntry]:\n return self.data.setdefault('modules', {}) # modname -> ModuleEntry\n\n def note_module(self, name: str, node_id: str, synopsis: str,\n platform: str, deprecated: bool) -> None:\n \"\"\"Note a python module for cross reference.\n\n .. versionadded:: 2.1\n \"\"\"\n self.modules[name] = ModuleEntry(self.env.docname, node_id,\n synopsis, platform, deprecated)\n\n def clear_doc(self, docname: str) -> None:\n for fullname, obj in list(self.objects.items()):\n if obj.docname == docname:\n del self.objects[fullname]\n for modname, mod in list(self.modules.items()):\n if mod.docname == docname:\n del self.modules[modname]\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:\n # XXX check duplicates?\n for fullname, obj in otherdata['objects'].items():\n if obj.docname in docnames:\n self.objects[fullname] = obj\n for modname, mod in otherdata['modules'].items():\n if mod.docname in docnames:\n self.modules[modname] = mod", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.find_obj_PythonDomain.find_obj.return.matches": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.find_obj_PythonDomain.find_obj.return.matches", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1269, "end_line": 1323, "span_ids": ["PythonDomain.find_obj"], "tokens": 526}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PythonDomain(Domain):\n\n def find_obj(self, env: BuildEnvironment, modname: str, classname: str,\n name: str, type: str, searchmode: int = 0\n ) -> List[Tuple[str, ObjectEntry]]:\n \"\"\"Find a Python object for \"name\", perhaps using the given module\n and/or classname. Returns a list of (name, object entry) tuples.\n \"\"\"\n # skip parens\n if name[-2:] == '()':\n name = name[:-2]\n\n if not name:\n return []\n\n matches: List[Tuple[str, ObjectEntry]] = []\n\n newname = None\n if searchmode == 1:\n if type is None:\n objtypes = list(self.object_types)\n else:\n objtypes = self.objtypes_for_role(type)\n if objtypes is not None:\n if modname and classname:\n fullname = modname + '.' + classname + '.' + name\n if fullname in self.objects and self.objects[fullname].objtype in objtypes:\n newname = fullname\n if not newname:\n if modname and modname + '.' + name in self.objects and \\\n self.objects[modname + '.' + name].objtype in objtypes:\n newname = modname + '.' + name\n elif name in self.objects and self.objects[name].objtype in objtypes:\n newname = name\n else:\n # \"fuzzy\" searching mode\n searchname = '.' + name\n matches = [(oname, self.objects[oname]) for oname in self.objects\n if oname.endswith(searchname) and\n self.objects[oname].objtype in objtypes]\n else:\n # NOTE: searching for exact match, object type is not considered\n if name in self.objects:\n newname = name\n elif type == 'mod':\n # only exact matches allowed for modules\n return []\n elif classname and classname + '.' + name in self.objects:\n newname = classname + '.' + name\n elif modname and modname + '.' + name in self.objects:\n newname = modname + '.' + name\n elif modname and classname and \\\n modname + '.' + classname + '.' + name in self.objects:\n newname = modname + '.' + classname + '.' + name\n if newname is not None:\n matches.append((newname, self.objects[newname]))\n return matches", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.resolve_xref_PythonDomain.resolve_xref.if_obj_2_module_.else_.return.make_refnode_builder_fro": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.resolve_xref_PythonDomain.resolve_xref.if_obj_2_module_.else_.return.make_refnode_builder_fro", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1325, "end_line": 1370, "span_ids": ["PythonDomain.resolve_xref"], "tokens": 509}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PythonDomain(Domain):\n\n def resolve_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n type: str, target: str, node: pending_xref, contnode: Element\n ) -> Optional[Element]:\n modname = node.get('py:module')\n clsname = node.get('py:class')\n searchmode = 1 if node.hasattr('refspecific') else 0\n matches = self.find_obj(env, modname, clsname, target,\n type, searchmode)\n\n if not matches and type == 'attr':\n # fallback to meth (for property; Sphinx-2.4.x)\n # this ensures that `:attr:` role continues to refer to the old property entry\n # that defined by ``method`` directive in old reST files.\n matches = self.find_obj(env, modname, clsname, target, 'meth', searchmode)\n if not matches and type == 'meth':\n # fallback to attr (for property)\n # this ensures that `:meth:` in the old reST files can refer to the property\n # entry that defined by ``property`` directive.\n #\n # Note: _prop is a secret role only for internal look-up.\n matches = self.find_obj(env, modname, clsname, target, '_prop', searchmode)\n\n if not matches:\n return None\n elif len(matches) > 1:\n canonicals = [m for m in matches if not m[1].aliased]\n if len(canonicals) == 1:\n matches = canonicals\n else:\n logger.warning(__('more than one target found for cross-reference %r: %s'),\n target, ', '.join(match[0] for match in matches),\n type='ref', subtype='python', location=node)\n name, obj = matches[0]\n\n if obj[2] == 'module':\n return self._make_module_refnode(builder, fromdocname, name, contnode)\n else:\n # determine the content of the reference by conditions\n content = find_pending_xref_condition(node, 'resolved')\n if content:\n children = content.children\n else:\n # if not found, use contnode\n children = [contnode]\n\n return make_refnode(builder, fromdocname, obj[0], obj[1], children, name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.resolve_any_xref_PythonDomain.resolve_any_xref.return.results": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.resolve_any_xref_PythonDomain.resolve_any_xref.return.results", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1372, "end_line": 1398, "span_ids": ["PythonDomain.resolve_any_xref"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PythonDomain(Domain):\n\n def resolve_any_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n target: str, node: pending_xref, contnode: Element\n ) -> List[Tuple[str, Element]]:\n modname = node.get('py:module')\n clsname = node.get('py:class')\n results: List[Tuple[str, Element]] = []\n\n # always search in \"refspecific\" mode with the :any: role\n matches = self.find_obj(env, modname, clsname, target, None, 1)\n for name, obj in matches:\n if obj[2] == 'module':\n results.append(('py:mod',\n self._make_module_refnode(builder, fromdocname,\n name, contnode)))\n else:\n # determine the content of the reference by conditions\n content = find_pending_xref_condition(node, 'resolved')\n if content:\n children = content.children\n else:\n # if not found, use contnode\n children = [contnode]\n\n results.append(('py:' + self.role_for_objtype(obj[2]),\n make_refnode(builder, fromdocname, obj[0], obj[1],\n children, name)))\n return results", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain._make_module_refnode_PythonDomain._make_module_refnode.return.make_refnode_builder_fro": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain._make_module_refnode_PythonDomain._make_module_refnode.return.make_refnode_builder_fro", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1309, "end_line": 1321, "span_ids": ["PythonDomain._make_module_refnode"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PythonDomain(Domain):\n\n def _make_module_refnode(self, builder: Builder, fromdocname: str, name: str,\n contnode: Node) -> Element:\n # get additional info for modules\n module = self.modules[name]\n title = name\n if module.synopsis:\n title += ': ' + module.synopsis\n if module.deprecated:\n title += _(' (deprecated)')\n if module.platform:\n title += ' (' + module.platform + ')'\n return make_refnode(builder, fromdocname, module.docname, module.node_id,\n contnode, title)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.get_objects_PythonDomain.get_full_qualified_name.if_target_is_None_.else_.return._join_filter_None_mo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PythonDomain.get_objects_PythonDomain.get_full_qualified_name.if_target_is_None_.else_.return._join_filter_None_mo", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1414, "end_line": 1432, "span_ids": ["PythonDomain.get_full_qualified_name", "PythonDomain.get_objects"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PythonDomain(Domain):\n\n def get_objects(self) -> Iterator[Tuple[str, str, str, str, str, int]]:\n for modname, mod in self.modules.items():\n yield (modname, modname, 'module', mod.docname, mod.node_id, 0)\n for refname, obj in self.objects.items():\n if obj.objtype != 'module': # modules are already handled\n if obj.aliased:\n # aliased names are not full-text searchable.\n yield (refname, refname, obj.objtype, obj.docname, obj.node_id, -1)\n else:\n yield (refname, refname, obj.objtype, obj.docname, obj.node_id, 1)\n\n def get_full_qualified_name(self, node: Element) -> Optional[str]:\n modname = node.get('py:module')\n clsname = node.get('py:class')\n target = node.get('reftarget')\n if target is None:\n return None\n else:\n return '.'.join(filter(None, [modname, clsname, target]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTMarkup_ReSTMarkup.make_old_id.return.self_objtype_name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTMarkup_ReSTMarkup.make_old_id.return.self_objtype_name", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 34, "end_line": 67, "span_ids": ["ReSTMarkup.add_target_and_index", "ReSTMarkup.make_old_id", "ReSTMarkup.get_index_text", "ReSTMarkup"], "tokens": 332}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReSTMarkup(ObjectDescription[str]):\n \"\"\"\n Description of generic reST markup.\n \"\"\"\n\n def add_target_and_index(self, name: str, sig: str, signode: desc_signature) -> None:\n node_id = make_id(self.env, self.state.document, self.objtype, name)\n signode['ids'].append(node_id)\n\n # Assign old styled node_id not to break old hyperlinks (if possible)\n # Note: Will be removed in Sphinx-5.0 (RemovedInSphinx50Warning)\n old_node_id = self.make_old_id(name)\n if old_node_id not in self.state.document.ids and old_node_id not in signode['ids']:\n signode['ids'].append(old_node_id)\n\n self.state.document.note_explicit_target(signode)\n\n domain = cast(ReSTDomain, self.env.get_domain('rst'))\n domain.note_object(self.objtype, name, node_id, location=signode)\n\n indextext = self.get_index_text(self.objtype, name)\n if indextext:\n self.indexnode['entries'].append(('single', indextext, node_id, '', None))\n\n def get_index_text(self, objectname: str, name: str) -> str:\n return ''\n\n def make_old_id(self, name: str) -> str:\n \"\"\"Generate old styled node_id for reST markups.\n\n .. note:: Old Styled node_id was used until Sphinx-3.0.\n This will be removed in Sphinx-5.0.\n \"\"\"\n return self.objtype + '-' + name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_parse_directive_parse_directive.if_parsed_args_strip_.else_.return._parsed_dir_strip_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_parse_directive_parse_directive.if_parsed_args_strip_.else_.return._parsed_dir_strip_", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 72, "end_line": 89, "span_ids": ["parse_directive"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_directive(d: str) -> Tuple[str, str]:\n \"\"\"Parse a directive signature.\n\n Returns (directive, arguments) string tuple. If no arguments are given,\n returns (directive, '').\n \"\"\"\n dir = d.strip()\n if not dir.startswith('.'):\n # Assume it is a directive without syntax\n return (dir, '')\n m = dir_sig_re.match(dir)\n if not m:\n return (dir, '')\n parsed_dir, parsed_args = m.groups()\n if parsed_args.strip():\n return (parsed_dir.strip(), ' ' + parsed_args.strip())\n else:\n return (parsed_dir.strip(), '')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirective_ReSTDirective.after_content.if_directives_.directives_pop_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirective_ReSTDirective.after_content.if_directives_.directives_pop_", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 92, "end_line": 115, "span_ids": ["ReSTDirective", "ReSTDirective.before_content", "ReSTDirective.get_index_text", "ReSTDirective.after_content", "ReSTDirective.handle_signature"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReSTDirective(ReSTMarkup):\n \"\"\"\n Description of a reST directive.\n \"\"\"\n def handle_signature(self, sig: str, signode: desc_signature) -> str:\n name, args = parse_directive(sig)\n desc_name = '.. %s::' % name\n signode += addnodes.desc_name(desc_name, desc_name)\n if len(args) > 0:\n signode += addnodes.desc_addname(args, args)\n return name\n\n def get_index_text(self, objectname: str, name: str) -> str:\n return _('%s (directive)') % name\n\n def before_content(self) -> None:\n if self.names:\n directives = self.env.ref_context.setdefault('rst:directives', [])\n directives.append(self.names[0])\n\n def after_content(self) -> None:\n directives = self.env.ref_context.setdefault('rst:directives', [])\n if directives:\n directives.pop()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirectiveOption_ReSTDirectiveOption.handle_signature.return.name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirectiveOption_ReSTDirectiveOption.handle_signature.return.name", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 109, "end_line": 130, "span_ids": ["ReSTDirectiveOption.handle_signature", "ReSTDirectiveOption"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReSTDirectiveOption(ReSTMarkup):\n \"\"\"\n Description of an option for reST directive.\n \"\"\"\n option_spec: OptionSpec = ReSTMarkup.option_spec.copy()\n option_spec.update({\n 'type': directives.unchanged,\n })\n\n def handle_signature(self, sig: str, signode: desc_signature) -> str:\n try:\n name, argument = re.split(r'\\s*:\\s+', sig.strip(), 1)\n except ValueError:\n name, argument = sig, None\n\n signode += addnodes.desc_name(':%s:' % name, ':%s:' % name)\n if argument:\n signode += addnodes.desc_annotation(' ' + argument, ' ' + argument)\n if self.options.get('type'):\n text = ' (%s)' % self.options['type']\n signode += addnodes.desc_annotation(text, text)\n return name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirectiveOption.add_target_and_index_ReSTDirectiveOption.add_target_and_index.None_2.else_.self_indexnode_entries_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirectiveOption.add_target_and_index_ReSTDirectiveOption.add_target_and_index.None_2.else_.self_indexnode_entries_", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 141, "end_line": 172, "span_ids": ["ReSTDirectiveOption.add_target_and_index"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReSTDirectiveOption(ReSTMarkup):\n\n def add_target_and_index(self, name: str, sig: str, signode: desc_signature) -> None:\n domain = cast(ReSTDomain, self.env.get_domain('rst'))\n\n directive_name = self.current_directive\n if directive_name:\n prefix = '-'.join([self.objtype, directive_name])\n objname = ':'.join([directive_name, name])\n else:\n prefix = self.objtype\n objname = name\n\n node_id = make_id(self.env, self.state.document, prefix, name)\n signode['ids'].append(node_id)\n\n # Assign old styled node_id not to break old hyperlinks (if possible)\n # Note: Will be removed in Sphinx-5.0 (RemovedInSphinx50Warning)\n old_node_id = self.make_old_id(name)\n if old_node_id not in self.state.document.ids and old_node_id not in signode['ids']:\n signode['ids'].append(old_node_id)\n\n self.state.document.note_explicit_target(signode)\n domain.note_object(self.objtype, objname, node_id, location=signode)\n\n if directive_name:\n key = name[0].upper()\n pair = [_('%s (directive)') % directive_name,\n _(':%s: (directive option)') % name]\n self.indexnode['entries'].append(('pair', '; '.join(pair), node_id, '', key))\n else:\n key = name[0].upper()\n text = _(':%s: (directive option)') % name\n self.indexnode['entries'].append(('single', text, node_id, '', key))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirectiveOption.current_directive_ReSTRole.get_index_text.return.__s_role_name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDirectiveOption.current_directive_ReSTRole.get_index_text.return.__s_role_name", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 174, "end_line": 200, "span_ids": ["ReSTRole.get_index_text", "ReSTDirectiveOption.current_directive", "ReSTRole.handle_signature", "ReSTDirectiveOption.make_old_id", "ReSTRole"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReSTDirectiveOption(ReSTMarkup):\n\n @property\n def current_directive(self) -> str:\n directives = self.env.ref_context.get('rst:directives')\n if directives:\n return directives[-1]\n else:\n return ''\n\n def make_old_id(self, name: str) -> str:\n \"\"\"Generate old styled node_id for directive options.\n\n .. note:: Old Styled node_id was used until Sphinx-3.0.\n This will be removed in Sphinx-5.0.\n \"\"\"\n return '-'.join([self.objtype, self.current_directive, name])\n\n\nclass ReSTRole(ReSTMarkup):\n \"\"\"\n Description of a reST role.\n \"\"\"\n def handle_signature(self, sig: str, signode: desc_signature) -> str:\n signode += addnodes.desc_name(':%s:' % sig, ':%s:' % sig)\n return sig\n\n def get_index_text(self, objectname: str, name: str) -> str:\n return _('%s (role)') % name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain_ReSTDomain.objects._objtype_fullname_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain_ReSTDomain.objects._objtype_fullname_", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 194, "end_line": 219, "span_ids": ["ReSTDomain", "ReSTDomain.objects"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReSTDomain(Domain):\n \"\"\"ReStructuredText domain.\"\"\"\n name = 'rst'\n label = 'reStructuredText'\n\n object_types = {\n 'directive': ObjType(_('directive'), 'dir'),\n 'directive:option': ObjType(_('directive-option'), 'dir'),\n 'role': ObjType(_('role'), 'role'),\n }\n directives = {\n 'directive': ReSTDirective,\n 'directive:option': ReSTDirectiveOption,\n 'role': ReSTRole,\n }\n roles = {\n 'dir': XRefRole(),\n 'role': XRefRole(),\n }\n initial_data: Dict[str, Dict[Tuple[str, str], str]] = {\n 'objects': {}, # fullname -> docname, objtype\n }\n\n @property\n def objects(self) -> Dict[Tuple[str, str], Tuple[str, str]]:\n return self.data.setdefault('objects', {}) # (objtype, fullname) -> (docname, node_id)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.note_object_ReSTDomain.note_object.self_objects_objtype_nam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.note_object_ReSTDomain.note_object.self_objects_objtype_nam", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 230, "end_line": 236, "span_ids": ["ReSTDomain.note_object"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReSTDomain(Domain):\n\n def note_object(self, objtype: str, name: str, node_id: str, location: Any = None) -> None:\n if (objtype, name) in self.objects:\n docname, node_id = self.objects[objtype, name]\n logger.warning(__('duplicate description of %s %s, other instance in %s') %\n (objtype, name, docname), location=location)\n\n self.objects[objtype, name] = (self.env.docname, node_id)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.clear_doc_ReSTDomain.merge_domaindata.for_typ_name_doc_no.if_doc_in_docnames_.self_objects_typ_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.clear_doc_ReSTDomain.merge_domaindata.for_typ_name_doc_no.if_doc_in_docnames_.self_objects_typ_name_", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 229, "end_line": 238, "span_ids": ["ReSTDomain.clear_doc", "ReSTDomain.merge_domaindata"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReSTDomain(Domain):\n\n def clear_doc(self, docname: str) -> None:\n for (typ, name), (doc, _node_id) in list(self.objects.items()):\n if doc == docname:\n del self.objects[typ, name]\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:\n # XXX check duplicates\n for (typ, name), (doc, node_id) in otherdata['objects'].items():\n if doc in docnames:\n self.objects[typ, name] = (doc, node_id)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.resolve_xref_ReSTDomain.resolve_xref.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.resolve_xref_ReSTDomain.resolve_xref.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 240, "end_line": 249, "span_ids": ["ReSTDomain.resolve_xref"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReSTDomain(Domain):\n\n def resolve_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n typ: str, target: str, node: pending_xref, contnode: Element\n ) -> Optional[Element]:\n objtypes = self.objtypes_for_role(typ)\n for objtype in objtypes:\n todocname, node_id = self.objects.get((objtype, target), (None, None))\n if todocname:\n return make_refnode(builder, fromdocname, todocname, node_id,\n contnode, target + ' ' + objtype)\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.resolve_any_xref_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py_ReSTDomain.resolve_any_xref_", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 251, "end_line": 277, "span_ids": ["setup", "ReSTDomain.get_objects", "ReSTDomain.resolve_any_xref"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReSTDomain(Domain):\n\n def resolve_any_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n target: str, node: pending_xref, contnode: Element\n ) -> List[Tuple[str, Element]]:\n results: List[Tuple[str, Element]] = []\n for objtype in self.object_types:\n todocname, node_id = self.objects.get((objtype, target), (None, None))\n if todocname:\n results.append(('rst:' + self.role_for_objtype(objtype),\n make_refnode(builder, fromdocname, todocname, node_id,\n contnode, target + ' ' + objtype)))\n return results\n\n def get_objects(self) -> Iterator[Tuple[str, str, str, str, str, int]]:\n for (typ, name), (docname, node_id) in self.data['objects'].items():\n yield name, name, typ, docname, node_id, 1\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_domain(ReSTDomain)\n\n return {\n 'version': 'builtin',\n 'env_version': 2,\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_GenericObject_GenericObject.handle_signature.return.name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_GenericObject_GenericObject.handle_signature.return.name", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 53, "span_ids": ["GenericObject.handle_signature", "GenericObject"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GenericObject(ObjectDescription[str]):\n \"\"\"\n A generic x-ref directive registered with Sphinx.add_object_type().\n \"\"\"\n indextemplate: str = ''\n parse_node: Callable[[\"GenericObject\", \"BuildEnvironment\", str, desc_signature], str] = None # NOQA\n\n def handle_signature(self, sig: str, signode: desc_signature) -> str:\n if self.parse_node:\n name = self.parse_node(self.env, sig, signode)\n else:\n signode.clear()\n signode += addnodes.desc_name(sig, sig)\n # normalize whitespace like XRefRole does\n name = ws_re.sub(' ', sig)\n return name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_GenericObject.add_target_and_index_GenericObject.make_old_id.return.self_objtype_name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_GenericObject.add_target_and_index_GenericObject.make_old_id.return.self_objtype_name", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 66, "end_line": 97, "span_ids": ["GenericObject.add_target_and_index", "GenericObject.make_old_id"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GenericObject(ObjectDescription[str]):\n\n def add_target_and_index(self, name: str, sig: str, signode: desc_signature) -> None:\n node_id = make_id(self.env, self.state.document, self.objtype, name)\n signode['ids'].append(node_id)\n\n # Assign old styled node_id not to break old hyperlinks (if possible)\n # Note: Will be removed in Sphinx-5.0 (RemovedInSphinx50Warning)\n old_node_id = self.make_old_id(name)\n if old_node_id not in self.state.document.ids and old_node_id not in signode['ids']:\n signode['ids'].append(old_node_id)\n\n self.state.document.note_explicit_target(signode)\n\n if self.indextemplate:\n colon = self.indextemplate.find(':')\n if colon != -1:\n indextype = self.indextemplate[:colon].strip()\n indexentry = self.indextemplate[colon + 1:].strip() % (name,)\n else:\n indextype = 'single'\n indexentry = self.indextemplate % (name,)\n self.indexnode['entries'].append((indextype, indexentry, node_id, '', None))\n\n std = cast(StandardDomain, self.env.get_domain('std'))\n std.note_object(self.objtype, name, node_id, location=signode)\n\n def make_old_id(self, name: str) -> str:\n \"\"\"Generate old styled node_id for generic objects.\n\n .. note:: Old Styled node_id was used until Sphinx-3.0.\n This will be removed in Sphinx-5.0.\n \"\"\"\n return self.objtype + '-' + name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_EnvVar_EnvVarXRefRole.result_nodes.return._indexnode_targetnode_n": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_EnvVar_EnvVarXRefRole.result_nodes.return._indexnode_targetnode_n", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 124, "span_ids": ["EnvVarXRefRole.result_nodes", "EnvVarXRefRole", "EnvVar"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EnvVar(GenericObject):\n indextemplate = _('environment variable; %s')\n\n\nclass EnvVarXRefRole(XRefRole):\n \"\"\"\n Cross-referencing role for environment variables (adds an index entry).\n \"\"\"\n\n def result_nodes(self, document: nodes.document, env: \"BuildEnvironment\", node: Element,\n is_ref: bool) -> Tuple[List[Node], List[system_message]]:\n if not is_ref:\n return [node], []\n varname = node['reftarget']\n tgtid = 'index-%s' % env.new_serialno('index')\n indexnode = addnodes.index()\n indexnode['entries'] = [\n ('single', varname, tgtid, '', None),\n ('single', _('environment variable; %s') % varname, tgtid, '', None)\n ]\n targetnode = nodes.target('', '', ids=[tgtid])\n document.note_explicit_target(targetnode)\n return [indexnode, targetnode, node], []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Target_Target.make_old_id.return.self_name_name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Target_Target.make_old_id.return.self_name_name", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 114, "end_line": 165, "span_ids": ["Target.make_old_id", "Target", "Target.run"], "tokens": 457}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Target(SphinxDirective):\n \"\"\"\n Generic target for user-defined cross-reference types.\n \"\"\"\n indextemplate = ''\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n # normalize whitespace in fullname like XRefRole does\n fullname = ws_re.sub(' ', self.arguments[0].strip())\n node_id = make_id(self.env, self.state.document, self.name, fullname)\n node = nodes.target('', '', ids=[node_id])\n self.set_source_info(node)\n\n # Assign old styled node_id not to break old hyperlinks (if possible)\n # Note: Will be removed in Sphinx-5.0 (RemovedInSphinx50Warning)\n old_node_id = self.make_old_id(fullname)\n if old_node_id not in self.state.document.ids and old_node_id not in node['ids']:\n node['ids'].append(old_node_id)\n\n self.state.document.note_explicit_target(node)\n ret: List[Node] = [node]\n if self.indextemplate:\n indexentry = self.indextemplate % (fullname,)\n indextype = 'single'\n colon = indexentry.find(':')\n if colon != -1:\n indextype = indexentry[:colon].strip()\n indexentry = indexentry[colon + 1:].strip()\n inode = addnodes.index(entries=[(indextype, indexentry, node_id, '', None)])\n ret.insert(0, inode)\n name = self.name\n if ':' in self.name:\n _, name = self.name.split(':', 1)\n\n std = cast(StandardDomain, self.env.get_domain('std'))\n std.note_object(name, fullname, node_id, location=node)\n\n return ret\n\n def make_old_id(self, name: str) -> str:\n \"\"\"Generate old styled node_id for targets.\n\n .. note:: Old Styled node_id was used until Sphinx-3.0.\n This will be removed in Sphinx-5.0.\n \"\"\"\n return self.name + '-' + name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Cmdoption_Cmdoption.handle_signature.return.firstname": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Cmdoption_Cmdoption.handle_signature.return.firstname", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 179, "end_line": 215, "span_ids": ["Cmdoption", "Cmdoption.handle_signature"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Cmdoption(ObjectDescription[str]):\n \"\"\"\n Description of a command-line option (.. option).\n \"\"\"\n\n def handle_signature(self, sig: str, signode: desc_signature) -> str:\n \"\"\"Transform an option description into RST nodes.\"\"\"\n count = 0\n firstname = ''\n for potential_option in sig.split(', '):\n potential_option = potential_option.strip()\n m = option_desc_re.match(potential_option)\n if not m:\n logger.warning(__('Malformed option description %r, should '\n 'look like \"opt\", \"-opt args\", \"--opt args\", '\n '\"/opt args\" or \"+opt args\"'), potential_option,\n location=signode)\n continue\n optname, args = m.groups()\n if optname.endswith('[') and args.endswith(']'):\n # optional value surrounded by brackets (ex. foo[=bar])\n optname = optname[:-1]\n args = '[' + args\n\n if count:\n signode += addnodes.desc_addname(', ', ', ')\n signode += addnodes.desc_name(optname, optname)\n signode += addnodes.desc_addname(args, args)\n if not count:\n firstname = optname\n signode['allnames'] = [optname]\n else:\n signode['allnames'].append(optname)\n count += 1\n if not firstname:\n raise ValueError\n return firstname", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Program_Program.run.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Program_Program.run.return._", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 248, "end_line": 265, "span_ids": ["Program", "Program.run"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Program(SphinxDirective):\n \"\"\"\n Directive to name the program for which options are documented.\n \"\"\"\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n program = ws_re.sub('-', self.arguments[0].strip())\n if program == 'None':\n self.env.ref_context.pop('std:program', None)\n else:\n self.env.ref_context['std:program'] = program\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_OptionXRefRole_split_term_classifiers.return.parts": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_OptionXRefRole_split_term_classifiers.return.parts", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 268, "end_line": 278, "span_ids": ["OptionXRefRole", "OptionXRefRole.process_link", "split_term_classifiers"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class OptionXRefRole(XRefRole):\n def process_link(self, env: \"BuildEnvironment\", refnode: Element, has_explicit_title: bool,\n title: str, target: str) -> Tuple[str, str]:\n refnode['std:program'] = env.ref_context.get('std:program')\n return title, target\n\n\ndef split_term_classifiers(line: str) -> List[Optional[str]]:\n # split line into a term and classifiers. if no classifier, None is used..\n parts: List[Optional[str]] = re.split(' +: +', line) + [None]\n return parts", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_make_glossary_term_make_glossary_term.return.term": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_make_glossary_term_make_glossary_term.return.term", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 281, "end_line": 308, "span_ids": ["make_glossary_term"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def make_glossary_term(env: \"BuildEnvironment\", textnodes: Iterable[Node], index_key: str,\n source: str, lineno: int, node_id: str, document: nodes.document\n ) -> nodes.term:\n # get a text-only representation of the term and register it\n # as a cross-reference target\n term = nodes.term('', '', *textnodes)\n term.source = source\n term.line = lineno\n termtext = term.astext()\n\n if node_id:\n # node_id is given from outside (mainly i18n module), use it forcedly\n term['ids'].append(node_id)\n else:\n node_id = make_id(env, document, 'term', termtext)\n term['ids'].append(node_id)\n document.note_explicit_target(term)\n\n std = cast(StandardDomain, env.get_domain('std'))\n std._note_term(termtext, node_id, location=term)\n\n # add an index entry too\n indexnode = addnodes.index()\n indexnode['entries'] = [('single', termtext, node_id, 'main', index_key)]\n indexnode.source, indexnode.line = term.source, term.line\n term.append(indexnode)\n\n return term", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Glossary_Glossary.run.return.messages_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Glossary_Glossary.run.return.messages_node_", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 311, "end_line": 422, "span_ids": ["Glossary", "Glossary.run"], "tokens": 890}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Glossary(SphinxDirective):\n \"\"\"\n Directive to create a glossary with cross-reference targets for :term:\n roles.\n \"\"\"\n\n has_content = True\n required_arguments = 0\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec: OptionSpec = {\n 'sorted': directives.flag,\n }\n\n def run(self) -> List[Node]:\n node = addnodes.glossary()\n node.document = self.state.document\n node['sorted'] = ('sorted' in self.options)\n\n # This directive implements a custom format of the reST definition list\n # that allows multiple lines of terms before the definition. This is\n # easy to parse since we know that the contents of the glossary *must\n # be* a definition list.\n\n # first, collect single entries\n entries: List[Tuple[List[Tuple[str, str, int]], StringList]] = []\n in_definition = True\n in_comment = False\n was_empty = True\n messages: List[Node] = []\n for line, (source, lineno) in zip(self.content, self.content.items):\n # empty line -> add to last definition\n if not line:\n if in_definition and entries:\n entries[-1][1].append('', source, lineno)\n was_empty = True\n continue\n # unindented line -> a term\n if line and not line[0].isspace():\n # enable comments\n if line.startswith('.. '):\n in_comment = True\n continue\n else:\n in_comment = False\n\n # first term of definition\n if in_definition:\n if not was_empty:\n messages.append(self.state.reporter.warning(\n _('glossary term must be preceded by empty line'),\n source=source, line=lineno))\n entries.append(([(line, source, lineno)], StringList()))\n in_definition = False\n # second term and following\n else:\n if was_empty:\n messages.append(self.state.reporter.warning(\n _('glossary terms must not be separated by empty lines'),\n source=source, line=lineno))\n if entries:\n entries[-1][0].append((line, source, lineno))\n else:\n messages.append(self.state.reporter.warning(\n _('glossary seems to be misformatted, check indentation'),\n source=source, line=lineno))\n elif in_comment:\n pass\n else:\n if not in_definition:\n # first line of definition, determines indentation\n in_definition = True\n indent_len = len(line) - len(line.lstrip())\n if entries:\n entries[-1][1].append(line[indent_len:], source, lineno)\n else:\n messages.append(self.state.reporter.warning(\n _('glossary seems to be misformatted, check indentation'),\n source=source, line=lineno))\n was_empty = False\n\n # now, parse all the entries into a big definition list\n items: List[nodes.definition_list_item] = []\n for terms, definition in entries:\n termnodes: List[Node] = []\n system_messages: List[Node] = []\n for line, source, lineno in terms:\n parts = split_term_classifiers(line)\n # parse the term with inline markup\n # classifiers (parts[1:]) will not be shown on doctree\n textnodes, sysmsg = self.state.inline_text(parts[0], lineno)\n\n # use first classifier as a index key\n term = make_glossary_term(self.env, textnodes, parts[1], source, lineno,\n node_id=None, document=self.state.document)\n term.rawsource = line\n system_messages.extend(sysmsg)\n termnodes.append(term)\n\n termnodes.extend(system_messages)\n\n defnode = nodes.definition()\n if definition:\n self.state.nested_parse(definition, definition.items[0][1],\n defnode)\n termnodes.append(defnode)\n items.append(nodes.definition_list_item('', *termnodes))\n\n dlist = nodes.definition_list('', *items)\n dlist['classes'].append('glossary')\n node += dlist\n return messages + [node]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_token_xrefs_token_xrefs.return.retnodes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_token_xrefs_token_xrefs.return.retnodes", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 425, "end_line": 455, "span_ids": ["token_xrefs"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def token_xrefs(text: str, productionGroup: str = '') -> List[Node]:\n if len(productionGroup) != 0:\n productionGroup += ':'\n retnodes: List[Node] = []\n pos = 0\n for m in token_re.finditer(text):\n if m.start() > pos:\n txt = text[pos:m.start()]\n retnodes.append(nodes.Text(txt, txt))\n token = m.group(1)\n if ':' in token:\n if token[0] == '~':\n _, title = token.split(':')\n target = token[1:]\n elif token[0] == ':':\n title = token[1:]\n target = title\n else:\n title = token\n target = token\n else:\n title = token\n target = productionGroup + token\n refnode = pending_xref(title, reftype='token', refdomain='std',\n reftarget=target)\n refnode += nodes.literal(token, title, classes=['xref'])\n retnodes.append(refnode)\n pos = m.end()\n if pos < len(text):\n retnodes.append(nodes.Text(text[pos:], text[pos:]))\n return retnodes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_ProductionList_TokenXRefRole.process_link.return.title_target": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_ProductionList_TokenXRefRole.process_link.return.title_target", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 458, "end_line": 532, "span_ids": ["ProductionList", "TokenXRefRole", "ProductionList.run", "ProductionList.make_old_id", "TokenXRefRole.process_link"], "tokens": 628}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ProductionList(SphinxDirective):\n \"\"\"\n Directive to list grammar productions.\n \"\"\"\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n domain = cast(StandardDomain, self.env.get_domain('std'))\n node: Element = addnodes.productionlist()\n self.set_source_info(node)\n # The backslash handling is from ObjectDescription.get_signatures\n nl_escape_re = re.compile(r'\\\\\\n')\n lines = nl_escape_re.sub('', self.arguments[0]).split('\\n')\n\n productionGroup = \"\"\n i = 0\n for rule in lines:\n if i == 0 and ':' not in rule:\n productionGroup = rule.strip()\n continue\n i += 1\n try:\n name, tokens = rule.split(':', 1)\n except ValueError:\n break\n subnode = addnodes.production(rule)\n name = name.strip()\n subnode['tokenname'] = name\n if subnode['tokenname']:\n prefix = 'grammar-token-%s' % productionGroup\n node_id = make_id(self.env, self.state.document, prefix, name)\n subnode['ids'].append(node_id)\n\n # Assign old styled node_id not to break old hyperlinks (if possible)\n # Note: Will be removed in Sphinx-5.0 (RemovedInSphinx50Warning)\n old_node_id = self.make_old_id(name)\n if (old_node_id not in self.state.document.ids and\n old_node_id not in subnode['ids']):\n subnode['ids'].append(old_node_id)\n\n self.state.document.note_implicit_target(subnode, subnode)\n\n if len(productionGroup) != 0:\n objName = \"%s:%s\" % (productionGroup, name)\n else:\n objName = name\n domain.note_object('token', objName, node_id, location=node)\n subnode.extend(token_xrefs(tokens, productionGroup))\n node.append(subnode)\n return [node]\n\n def make_old_id(self, token: str) -> str:\n \"\"\"Generate old styled node_id for tokens.\n\n .. note:: Old Styled node_id was used until Sphinx-3.0.\n This will be removed in Sphinx-5.0.\n \"\"\"\n return nodes.make_id('grammar-token-' + token)\n\n\nclass TokenXRefRole(XRefRole):\n def process_link(self, env: \"BuildEnvironment\", refnode: Element, has_explicit_title: bool,\n title: str, target: str) -> Tuple[str, str]:\n target = target.lstrip('~') # a title-specific thing\n if not self.has_explicit_title and title[0] == '~':\n if ':' in title:\n _, title = title.split(':')\n else:\n title = title[1:]\n return title, target", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.objects_StandardDomain.note_object.self_objects_objtype_nam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.objects_StandardDomain.note_object.self_objects_objtype_nam", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 645, "end_line": 659, "span_ids": ["StandardDomain.objects", "StandardDomain.note_object"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n @property\n def objects(self) -> Dict[Tuple[str, str], Tuple[str, str]]:\n return self.data.setdefault('objects', {}) # (objtype, name) -> docname, labelid\n\n def note_object(self, objtype: str, name: str, labelid: str, location: Any = None\n ) -> None:\n \"\"\"Note a generic object for cross reference.\n\n .. versionadded:: 3.0\n \"\"\"\n if (objtype, name) in self.objects:\n docname = self.objects[objtype, name][0]\n logger.warning(__('duplicate %s description of %s, other instance in %s'),\n objtype, name, docname, location=location)\n self.objects[objtype, name] = (self.env.docname, labelid)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.process_doc_StandardDomain.process_doc.for_name_explicit_in_doc.self_labels_name_docna": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.process_doc_StandardDomain.process_doc.for_name_explicit_in_doc.self_labels_name_docna", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 722, "end_line": 761, "span_ids": ["StandardDomain.process_doc"], "tokens": 379}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def process_doc(self, env: \"BuildEnvironment\", docname: str, document: nodes.document) -> None: # NOQA\n for name, explicit in document.nametypes.items():\n if not explicit:\n continue\n labelid = document.nameids[name]\n if labelid is None:\n continue\n node = document.ids[labelid]\n if isinstance(node, nodes.target) and 'refid' in node:\n # indirect hyperlink targets\n node = document.ids.get(node['refid'])\n labelid = node['names'][0]\n if (node.tagname == 'footnote' or\n 'refuri' in node or\n node.tagname.startswith('desc_')):\n # ignore footnote labels, labels automatically generated from a\n # link and object descriptions\n continue\n if name in self.labels:\n logger.warning(__('duplicate label %s, other instance in %s'),\n name, env.doc2path(self.labels[name][0]),\n location=node)\n self.anonlabels[name] = docname, labelid\n if node.tagname == 'section':\n title = cast(nodes.title, node[0])\n sectname = clean_astext(title)\n elif node.tagname == 'rubric':\n sectname = clean_astext(node)\n elif self.is_enumerable_node(node):\n sectname = self.get_numfig_title(node)\n if not sectname:\n continue\n else:\n toctree = next(node.findall(addnodes.toctree), None)\n if toctree and toctree.get('caption'):\n sectname = toctree.get('caption')\n else:\n # anonymous-only labels\n continue\n self.labels[name] = docname, labelid, sectname", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.add_program_option_StandardDomain.build_reference_node.return.newnode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.add_program_option_StandardDomain.build_reference_node.return.newnode", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 747, "end_line": 773, "span_ids": ["StandardDomain.build_reference_node", "StandardDomain.add_program_option"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def add_program_option(self, program: str, name: str, docname: str, labelid: str) -> None:\n self.progoptions[program, name] = (docname, labelid)\n\n def build_reference_node(self, fromdocname: str, builder: \"Builder\", docname: str,\n labelid: str, sectname: str, rolename: str, **options: Any\n ) -> Element:\n nodeclass = options.pop('nodeclass', nodes.reference)\n newnode = nodeclass('', '', internal=True, **options)\n innernode = nodes.inline(sectname, sectname)\n if innernode.get('classes') is not None:\n innernode['classes'].append('std')\n innernode['classes'].append('std-' + rolename)\n if docname == fromdocname:\n newnode['refid'] = labelid\n else:\n # set more info in contnode; in case the\n # get_relative_uri call raises NoUri,\n # the builder will then have to resolve these\n contnode = pending_xref('')\n contnode['refdocname'] = docname\n contnode['refsectname'] = sectname\n newnode['refuri'] = builder.get_relative_uri(\n fromdocname, docname)\n if labelid:\n newnode['refuri'] += '#' + labelid\n newnode.append(innernode)\n return newnode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.resolve_xref_StandardDomain.resolve_xref.return.resolver_env_fromdocname": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.resolve_xref_StandardDomain.resolve_xref.return.resolver_env_fromdocname", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 791, "end_line": 809, "span_ids": ["StandardDomain.resolve_xref"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def resolve_xref(self, env: \"BuildEnvironment\", fromdocname: str, builder: \"Builder\",\n typ: str, target: str, node: pending_xref, contnode: Element\n ) -> Optional[Element]:\n if typ == 'ref':\n resolver = self._resolve_ref_xref\n elif typ == 'numref':\n resolver = self._resolve_numref_xref\n elif typ == 'keyword':\n resolver = self._resolve_keyword_xref\n elif typ == 'doc':\n resolver = self._resolve_doc_xref\n elif typ == 'option':\n resolver = self._resolve_option_xref\n elif typ == 'term':\n resolver = self._resolve_term_xref\n else:\n resolver = self._resolve_obj_xref\n\n return resolver(env, fromdocname, builder, typ, target, node, contnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_ref_xref_StandardDomain._resolve_ref_xref.return.self_build_reference_node": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_ref_xref_StandardDomain._resolve_ref_xref.return.self_build_reference_node", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 811, "end_line": 827, "span_ids": ["StandardDomain._resolve_ref_xref"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def _resolve_ref_xref(self, env: \"BuildEnvironment\", fromdocname: str,\n builder: \"Builder\", typ: str, target: str, node: pending_xref,\n contnode: Element) -> Optional[Element]:\n if node['refexplicit']:\n # reference to anonymous label; the reference uses\n # the supplied link caption\n docname, labelid = self.anonlabels.get(target, ('', ''))\n sectname = node.astext()\n else:\n # reference to named label; the final node will\n # contain the section name after the label\n docname, labelid, sectname = self.labels.get(target, ('', '', ''))\n if not docname:\n return None\n\n return self.build_reference_node(fromdocname, builder,\n docname, labelid, sectname, 'ref')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_numref_xref_StandardDomain._resolve_numref_xref.return.self_build_reference_node": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_numref_xref_StandardDomain._resolve_numref_xref.return.self_build_reference_node", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 829, "end_line": 890, "span_ids": ["StandardDomain._resolve_numref_xref"], "tokens": 553}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def _resolve_numref_xref(self, env: \"BuildEnvironment\", fromdocname: str,\n builder: \"Builder\", typ: str, target: str,\n node: pending_xref, contnode: Element) -> Optional[Element]:\n if target in self.labels:\n docname, labelid, figname = self.labels.get(target, ('', '', ''))\n else:\n docname, labelid = self.anonlabels.get(target, ('', ''))\n figname = None\n\n if not docname:\n return None\n\n target_node = env.get_doctree(docname).ids.get(labelid)\n figtype = self.get_enumerable_node_type(target_node)\n if figtype is None:\n return None\n\n if figtype != 'section' and env.config.numfig is False:\n logger.warning(__('numfig is disabled. :numref: is ignored.'), location=node)\n return contnode\n\n try:\n fignumber = self.get_fignumber(env, builder, figtype, docname, target_node)\n if fignumber is None:\n return contnode\n except ValueError:\n logger.warning(__(\"Failed to create a cross reference. Any number is not \"\n \"assigned: %s\"),\n labelid, location=node)\n return contnode\n\n try:\n if node['refexplicit']:\n title = contnode.astext()\n else:\n title = env.config.numfig_format.get(figtype, '')\n\n if figname is None and '{name}' in title:\n logger.warning(__('the link has no caption: %s'), title, location=node)\n return contnode\n else:\n fignum = '.'.join(map(str, fignumber))\n if '{name}' in title or 'number' in title:\n # new style format (cf. \"Fig.{number}\")\n if figname:\n newtitle = title.format(name=figname, number=fignum)\n else:\n newtitle = title.format(number=fignum)\n else:\n # old style format (cf. \"Fig.%s\")\n newtitle = title % fignum\n except KeyError as exc:\n logger.warning(__('invalid numfig_format: %s (%r)'), title, exc, location=node)\n return contnode\n except TypeError:\n logger.warning(__('invalid numfig_format: %s'), title, location=node)\n return contnode\n\n return self.build_reference_node(fromdocname, builder,\n docname, labelid, newtitle, 'numref',\n nodeclass=addnodes.number_reference,\n title=title)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_keyword_xref_StandardDomain._resolve_keyword_xref.return.make_refnode_builder_fro": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_keyword_xref_StandardDomain._resolve_keyword_xref.return.make_refnode_builder_fro", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 892, "end_line": 900, "span_ids": ["StandardDomain._resolve_keyword_xref"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def _resolve_keyword_xref(self, env: \"BuildEnvironment\", fromdocname: str,\n builder: \"Builder\", typ: str, target: str,\n node: pending_xref, contnode: Element) -> Optional[Element]:\n # keywords are oddballs: they are referenced by named labels\n docname, labelid, _ = self.labels.get(target, ('', '', ''))\n if not docname:\n return None\n return make_refnode(builder, fromdocname, docname,\n labelid, contnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_doc_xref_StandardDomain._resolve_doc_xref.if_docname_not_in_env_all.else_.return.make_refnode_builder_fro": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_doc_xref_StandardDomain._resolve_doc_xref.if_docname_not_in_env_all.else_.return.make_refnode_builder_fro", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 902, "end_line": 917, "span_ids": ["StandardDomain._resolve_doc_xref"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def _resolve_doc_xref(self, env: \"BuildEnvironment\", fromdocname: str,\n builder: \"Builder\", typ: str, target: str,\n node: pending_xref, contnode: Element) -> Optional[Element]:\n # directly reference to document by source name; can be absolute or relative\n refdoc = node.get('refdoc', fromdocname)\n docname = docname_join(refdoc, node['reftarget'])\n if docname not in env.all_docs:\n return None\n else:\n if node['refexplicit']:\n # reference with explicit title\n caption = node.astext()\n else:\n caption = clean_astext(env.titles[docname])\n innernode = nodes.inline(caption, caption, classes=['doc'])\n return make_refnode(builder, fromdocname, docname, None, innernode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_option_xref_StandardDomain._resolve_option_xref.return.make_refnode_builder_fro": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_option_xref_StandardDomain._resolve_option_xref.return.make_refnode_builder_fro", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 919, "end_line": 939, "span_ids": ["StandardDomain._resolve_option_xref"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def _resolve_option_xref(self, env: \"BuildEnvironment\", fromdocname: str,\n builder: \"Builder\", typ: str, target: str,\n node: pending_xref, contnode: Element) -> Optional[Element]:\n progname = node.get('std:program')\n target = target.strip()\n docname, labelid = self.progoptions.get((progname, target), ('', ''))\n if not docname:\n commands = []\n while ws_re.search(target):\n subcommand, target = ws_re.split(target, 1)\n commands.append(subcommand)\n progname = \"-\".join(commands)\n\n docname, labelid = self.progoptions.get((progname, target), ('', ''))\n if docname:\n break\n else:\n return None\n\n return make_refnode(builder, fromdocname, docname,\n labelid, contnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_obj_xref_StandardDomain._resolve_obj_xref.return.make_refnode_builder_fro": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_obj_xref_StandardDomain._resolve_obj_xref.return.make_refnode_builder_fro", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 956, "end_line": 969, "span_ids": ["StandardDomain._resolve_obj_xref"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def _resolve_obj_xref(self, env: \"BuildEnvironment\", fromdocname: str,\n builder: \"Builder\", typ: str, target: str,\n node: pending_xref, contnode: Element) -> Optional[Element]:\n objtypes = self.objtypes_for_role(typ) or []\n for objtype in objtypes:\n if (objtype, target) in self.objects:\n docname, labelid = self.objects[objtype, target]\n break\n else:\n docname, labelid = '', ''\n if not docname:\n return None\n return make_refnode(builder, fromdocname, docname,\n labelid, contnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.resolve_any_xref_StandardDomain.resolve_any_xref.return.results": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.resolve_any_xref_StandardDomain.resolve_any_xref.return.results", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 971, "end_line": 992, "span_ids": ["StandardDomain.resolve_any_xref"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def resolve_any_xref(self, env: \"BuildEnvironment\", fromdocname: str,\n builder: \"Builder\", target: str, node: pending_xref,\n contnode: Element) -> List[Tuple[str, Element]]:\n results: List[Tuple[str, Element]] = []\n ltarget = target.lower() # :ref: lowercases its target automatically\n for role in ('ref', 'option'): # do not try \"keyword\"\n res = self.resolve_xref(env, fromdocname, builder, role,\n ltarget if role == 'ref' else target,\n node, contnode)\n if res:\n results.append(('std:' + role, res))\n # all others\n for objtype in self.object_types:\n key = (objtype, target)\n if objtype == 'term':\n key = (objtype, ltarget)\n if key in self.objects:\n docname, labelid = self.objects[key]\n results.append(('std:' + self.role_for_objtype(objtype),\n make_refnode(builder, fromdocname, docname,\n labelid, contnode)))\n return results", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_objects_StandardDomain.get_objects.None_4.if_name_not_in_non_anon_l.yield_name_name_label": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_objects_StandardDomain.get_objects.None_4.if_name_not_in_non_anon_l.yield_name_name_label", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 988, "end_line": 1007, "span_ids": ["StandardDomain.get_objects"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def get_objects(self) -> Iterator[Tuple[str, str, str, str, str, int]]:\n # handle the special 'doc' reference here\n for doc in self.env.all_docs:\n yield (doc, clean_astext(self.env.titles[doc]), 'doc', doc, '', -1)\n for (prog, option), info in self.progoptions.items():\n if prog:\n fullname = \".\".join([prog, option])\n yield (fullname, fullname, 'cmdoption', info[0], info[1], 1)\n else:\n yield (option, option, 'cmdoption', info[0], info[1], 1)\n for (type, name), info in self.objects.items():\n yield (name, name, type, info[0], info[1],\n self.object_types[type].attrs['searchprio'])\n for name, (docname, labelid, sectionname) in self.labels.items():\n yield (name, sectionname, 'label', docname, labelid, -1)\n # add anonymous-only labels as well\n non_anon_labels = set(self.labels)\n for name, (docname, labelid) in self.anonlabels.items():\n if name not in non_anon_labels:\n yield (name, name, 'label', docname, labelid, -1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_type_name_StandardDomain.get_numfig_title.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_type_name_StandardDomain.get_numfig_title.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1015, "end_line": 1034, "span_ids": ["StandardDomain.is_enumerable_node", "StandardDomain.get_type_name", "StandardDomain.get_numfig_title"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def get_type_name(self, type: ObjType, primary: bool = False) -> str:\n # never prepend \"Default\"\n return type.lname\n\n def is_enumerable_node(self, node: Node) -> bool:\n return node.__class__ in self.enumerable_nodes\n\n def get_numfig_title(self, node: Node) -> Optional[str]:\n \"\"\"Get the title of enumerable nodes to refer them using its title\"\"\"\n if self.is_enumerable_node(node):\n elem = cast(Element, node)\n _, title_getter = self.enumerable_nodes.get(elem.__class__, (None, None))\n if title_getter:\n return title_getter(elem)\n else:\n for subnode in elem:\n if isinstance(subnode, (nodes.caption, nodes.title)):\n return clean_astext(subnode)\n\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_enumerable_node_type_StandardDomain.get_enumerable_node_type.if_isinstance_node_nodes.else_.return.figtype": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_enumerable_node_type_StandardDomain.get_enumerable_node_type.if_isinstance_node_nodes.else_.return.figtype", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1036, "end_line": 1050, "span_ids": ["StandardDomain.get_enumerable_node_type"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def get_enumerable_node_type(self, node: Node) -> Optional[str]:\n \"\"\"Get type of enumerable nodes.\"\"\"\n def has_child(node: Element, cls: Type) -> bool:\n return any(isinstance(child, cls) for child in node)\n\n if isinstance(node, nodes.section):\n return 'section'\n elif (isinstance(node, nodes.container) and\n 'literal_block' in node and\n has_child(node, nodes.literal_block)):\n # given node is a code-block having caption\n return 'code-block'\n else:\n figtype, _ = self.enumerable_nodes.get(node.__class__, (None, None))\n return figtype", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.__getstate___BuildEnvironment.setup.self__update_settings_app": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.__getstate___BuildEnvironment.setup.self__update_settings_app", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 190, "end_line": 229, "span_ids": ["BuildEnvironment.__getstate__", "BuildEnvironment.setup", "BuildEnvironment.__setstate__"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def __getstate__(self) -> Dict:\n \"\"\"Obtains serializable data for pickling.\"\"\"\n __dict__ = self.__dict__.copy()\n __dict__.update(app=None, domains={}, events=None) # clear unpickable attributes\n return __dict__\n\n def __setstate__(self, state: Dict) -> None:\n self.__dict__.update(state)\n\n def setup(self, app: \"Sphinx\") -> None:\n \"\"\"Set up BuildEnvironment object.\"\"\"\n if self.version and self.version != app.registry.get_envversion(app):\n raise BuildEnvironmentError(__('build environment version not current'))\n elif self.srcdir and self.srcdir != app.srcdir:\n raise BuildEnvironmentError(__('source directory has changed'))\n\n if self.project:\n app.project.restore(self.project)\n\n self.app = app\n self.doctreedir = app.doctreedir\n self.events = app.events\n self.srcdir = app.srcdir\n self.project = app.project\n self.version = app.registry.get_envversion(app)\n\n # initialize domains\n self.domains = {}\n for domain in app.registry.create_domains(self):\n self.domains[domain.name] = domain\n\n # setup domains (must do after all initialization)\n for domain in self.domains.values():\n domain.setup()\n\n # initialize config\n self._update_config(app.config)\n\n # initialie settings\n self._update_settings(app.config)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment._update_config_BuildEnvironment._update_settings.self_settings_setdefault_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment._update_config_BuildEnvironment._update_settings.self_settings_setdefault_", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 226, "end_line": 259, "span_ids": ["BuildEnvironment._update_config", "BuildEnvironment._update_settings"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def _update_config(self, config: Config) -> None:\n \"\"\"Update configurations by new one.\"\"\"\n self.config_status = CONFIG_OK\n self.config_status_extra = ''\n if self.config is None:\n self.config_status = CONFIG_NEW\n elif self.config.extensions != config.extensions:\n self.config_status = CONFIG_EXTENSIONS_CHANGED\n extensions = sorted(\n set(self.config.extensions) ^ set(config.extensions))\n if len(extensions) == 1:\n extension = extensions[0]\n else:\n extension = '%d' % (len(extensions),)\n self.config_status_extra = ' (%r)' % (extension,)\n else:\n # check if a config value was changed that affects how\n # doctrees are read\n for item in config.filter('env'):\n if self.config[item.name] != item.value:\n self.config_status = CONFIG_CHANGED\n self.config_status_extra = ' (%r)' % (item.name,)\n break\n\n self.config = config\n\n def _update_settings(self, config: Config) -> None:\n \"\"\"Update settings by new config.\"\"\"\n self.settings['input_encoding'] = config.source_encoding\n self.settings['trim_footnote_reference_space'] = config.trim_footnote_reference_space\n self.settings['language_code'] = config.language\n\n # Allow to disable by 3rd party extension (workaround)\n self.settings.setdefault('smart_quotes', True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.set_versioning_method_BuildEnvironment.set_versioning_method.self.versioning_compare.compare": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.set_versioning_method_BuildEnvironment.set_versioning_method.self.versioning_compare.compare", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 261, "end_line": 282, "span_ids": ["BuildEnvironment.set_versioning_method"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def set_versioning_method(self, method: Union[str, Callable], compare: bool) -> None:\n \"\"\"This sets the doctree versioning method for this environment.\n\n Versioning methods are a builder property; only builders with the same\n versioning method can share the same doctree directory. Therefore, we\n raise an exception if the user tries to use an environment with an\n incompatible versioning method.\n \"\"\"\n condition: Union[bool, Callable]\n if callable(method):\n condition = method\n else:\n if method not in versioning_conditions:\n raise ValueError('invalid versioning method: %r' % method)\n condition = versioning_conditions[method]\n\n if self.versioning_condition not in (None, condition):\n raise SphinxError(__('This environment is incompatible with the '\n 'selected builder, please choose another '\n 'doctree directory.'))\n self.versioning_condition = condition\n self.versioning_compare = compare", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.clear_doc_BuildEnvironment.merge_info_from.self_events_emit_env_mer": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.clear_doc_BuildEnvironment.merge_info_from.self_events_emit_env_mer", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 289, "end_line": 315, "span_ids": ["BuildEnvironment.clear_doc", "BuildEnvironment.merge_info_from"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def clear_doc(self, docname: str) -> None:\n \"\"\"Remove all traces of a source file in the inventory.\"\"\"\n if docname in self.all_docs:\n self.all_docs.pop(docname, None)\n self.included.pop(docname, None)\n self.reread_always.discard(docname)\n\n for domain in self.domains.values():\n domain.clear_doc(docname)\n\n def merge_info_from(self, docnames: List[str], other: \"BuildEnvironment\",\n app: \"Sphinx\") -> None:\n \"\"\"Merge global information gathered about *docnames* while reading them\n from the *other* environment.\n\n This possibly comes from a parallel build process.\n \"\"\"\n docnames = set(docnames) # type: ignore\n for docname in docnames:\n self.all_docs[docname] = other.all_docs[docname]\n self.included[docname] = other.included[docname]\n if docname in other.reread_always:\n self.reread_always.add(docname)\n\n for domainname, domain in self.domains.items():\n domain.merge_domaindata(docnames, other.domaindata[domainname])\n self.events.emit('env-merge-info', self, docnames, other)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.relfn2path_BuildEnvironment.found_docs.return.self_project_docnames": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.relfn2path_BuildEnvironment.found_docs.return.self_project_docnames", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 327, "end_line": 349, "span_ids": ["BuildEnvironment.relfn2path", "BuildEnvironment.found_docs"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def relfn2path(self, filename: str, docname: str = None) -> Tuple[str, str]:\n \"\"\"Return paths to a file referenced from a document, relative to\n documentation root and absolute.\n\n In the input \"filename\", absolute filenames are taken as relative to the\n source dir, while relative filenames are relative to the dir of the\n containing document.\n \"\"\"\n filename = os_path(filename)\n if filename.startswith('/') or filename.startswith(os.sep):\n rel_fn = filename[1:]\n else:\n docdir = path.dirname(self.doc2path(docname or self.docname,\n base=None))\n rel_fn = path.join(docdir, filename)\n\n return (canon_path(path.normpath(rel_fn)),\n path.normpath(path.join(self.srcdir, rel_fn)))\n\n @property\n def found_docs(self) -> Set[str]:\n \"\"\"contains all existing docnames.\"\"\"\n return self.project.docnames", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.find_files_BuildEnvironment.find_files.try_.except_OSError_as_exc_.raise_DocumentError____F": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.find_files_BuildEnvironment.find_files.try_.except_OSError_as_exc_.raise_DocumentError____F", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 370, "end_line": 397, "span_ids": ["BuildEnvironment.find_files"], "tokens": 318}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def find_files(self, config: Config, builder: \"Builder\") -> None:\n \"\"\"Find all source files in the source dir and put them in\n self.found_docs.\n \"\"\"\n try:\n exclude_paths = (self.config.exclude_patterns +\n self.config.templates_path +\n builder.get_asset_paths())\n self.project.discover(exclude_paths)\n\n # Current implementation is applying translated messages in the reading\n # phase.Therefore, in order to apply the updated message catalog, it is\n # necessary to re-process from the reading phase. Here, if dependency\n # is set for the doc source and the mo file, it is processed again from\n # the reading phase when mo is updated. In the future, we would like to\n # move i18n process into the writing phase, and remove these lines.\n if builder.use_message_catalog:\n # add catalog mo file dependency\n repo = CatalogRepository(self.srcdir, self.config.locale_dirs,\n self.config.language, self.config.source_encoding)\n mo_paths = {c.domain: c.mo_path for c in repo.catalogs}\n for docname in self.found_docs:\n domain = docname_to_domain(docname, self.config.gettext_compact)\n if domain in mo_paths:\n self.dependencies[docname].add(mo_paths[domain])\n except OSError as exc:\n raise DocumentError(__('Failed to scan documents in %s: %r') %\n (self.srcdir, exc)) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.get_outdated_files_BuildEnvironment.get_outdated_files.return.added_changed_removed": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.get_outdated_files_BuildEnvironment.get_outdated_files.return.added_changed_removed", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 380, "end_line": 435, "span_ids": ["BuildEnvironment.get_outdated_files"], "tokens": 474}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def get_outdated_files(self, config_changed: bool) -> Tuple[Set[str], Set[str], Set[str]]:\n \"\"\"Return (added, changed, removed) sets.\"\"\"\n # clear all files no longer present\n removed = set(self.all_docs) - self.found_docs\n\n added: Set[str] = set()\n changed: Set[str] = set()\n\n if config_changed:\n # config values affect e.g. substitutions\n added = self.found_docs\n else:\n for docname in self.found_docs:\n if docname not in self.all_docs:\n logger.debug('[build target] added %r', docname)\n added.add(docname)\n continue\n # if the doctree file is not there, rebuild\n filename = path.join(self.doctreedir, docname + '.doctree')\n if not path.isfile(filename):\n logger.debug('[build target] changed %r', docname)\n changed.add(docname)\n continue\n # check the \"reread always\" list\n if docname in self.reread_always:\n logger.debug('[build target] changed %r', docname)\n changed.add(docname)\n continue\n # check the mtime of the document\n mtime = self.all_docs[docname]\n newmtime = path.getmtime(self.doc2path(docname))\n if newmtime > mtime:\n logger.debug('[build target] outdated %r: %s -> %s',\n docname,\n datetime.utcfromtimestamp(mtime),\n datetime.utcfromtimestamp(newmtime))\n changed.add(docname)\n continue\n # finally, check the mtime of dependencies\n for dep in self.dependencies[docname]:\n try:\n # this will do the right thing when dep is absolute too\n deppath = path.join(self.srcdir, dep)\n if not path.isfile(deppath):\n changed.add(docname)\n break\n depmtime = path.getmtime(deppath)\n if depmtime > mtime:\n changed.add(docname)\n break\n except OSError:\n # give it another chance\n changed.add(docname)\n break\n\n return added, changed, removed", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.check_dependents_BuildEnvironment.get_doctree.return.doctree": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.check_dependents_BuildEnvironment.get_doctree.return.doctree", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 437, "end_line": 515, "span_ids": ["BuildEnvironment.docname", "BuildEnvironment.prepare_settings", "BuildEnvironment.note_dependency", "BuildEnvironment.new_serialno", "BuildEnvironment.note_reread", "BuildEnvironment.check_dependents", "BuildEnvironment.get_domain", "BuildEnvironment.note_included", "BuildEnvironment.get_doctree"], "tokens": 687}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def check_dependents(self, app: \"Sphinx\", already: Set[str]) -> Generator[str, None, None]:\n to_rewrite: List[str] = []\n for docnames in self.events.emit('env-get-updated', self):\n to_rewrite.extend(docnames)\n for docname in set(to_rewrite):\n if docname not in already:\n yield docname\n\n # --------- SINGLE FILE READING --------------------------------------------\n\n def prepare_settings(self, docname: str) -> None:\n \"\"\"Prepare to set up environment for reading.\"\"\"\n self.temp_data['docname'] = docname\n # defaults to the global default, but can be re-set in a document\n self.temp_data['default_role'] = self.config.default_role\n self.temp_data['default_domain'] = \\\n self.domains.get(self.config.primary_domain)\n\n # utilities to use while reading a document\n\n @property\n def docname(self) -> str:\n \"\"\"Returns the docname of the document currently being parsed.\"\"\"\n return self.temp_data['docname']\n\n def new_serialno(self, category: str = '') -> int:\n \"\"\"Return a serial number, e.g. for index entry targets.\n\n The number is guaranteed to be unique in the current document.\n \"\"\"\n key = category + 'serialno'\n cur = self.temp_data.get(key, 0)\n self.temp_data[key] = cur + 1\n return cur\n\n def note_dependency(self, filename: str) -> None:\n \"\"\"Add *filename* as a dependency of the current document.\n\n This means that the document will be rebuilt if this file changes.\n\n *filename* should be absolute or relative to the source directory.\n \"\"\"\n self.dependencies[self.docname].add(filename)\n\n def note_included(self, filename: str) -> None:\n \"\"\"Add *filename* as a included from other document.\n\n This means the document is not orphaned.\n\n *filename* should be absolute or relative to the source directory.\n \"\"\"\n self.included[self.docname].add(self.path2doc(filename))\n\n def note_reread(self) -> None:\n \"\"\"Add the current document to the list of documents that will\n automatically be re-read at the next build.\n \"\"\"\n self.reread_always.add(self.docname)\n\n def get_domain(self, domainname: str) -> Domain:\n \"\"\"Return the domain instance with the specified name.\n\n Raises an ExtensionError if the domain is not registered.\n \"\"\"\n try:\n return self.domains[domainname]\n except KeyError as exc:\n raise ExtensionError(__('Domain %r is not registered') % domainname) from exc\n\n # --------- RESOLVING REFERENCES AND TOCTREES ------------------------------\n\n def get_doctree(self, docname: str) -> nodes.document:\n \"\"\"Read the doctree for a file from the pickle and return it.\"\"\"\n filename = path.join(self.doctreedir, docname + '.doctree')\n with open(filename, 'rb') as f:\n doctree = pickle.load(f)\n doctree.settings.env = self\n doctree.reporter = LoggingReporter(self.doc2path(docname))\n return doctree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.get_and_resolve_doctree_BuildEnvironment.get_and_resolve_doctree.return.doctree": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.get_and_resolve_doctree_BuildEnvironment.get_and_resolve_doctree.return.doctree", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 517, "end_line": 539, "span_ids": ["BuildEnvironment.get_and_resolve_doctree"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def get_and_resolve_doctree(self, docname: str, builder: \"Builder\",\n doctree: nodes.document = None, prune_toctrees: bool = True,\n includehidden: bool = False) -> nodes.document:\n \"\"\"Read the doctree from the pickle, resolve cross-references and\n toctrees and return it.\n \"\"\"\n if doctree is None:\n doctree = self.get_doctree(docname)\n\n # resolve all pending cross-references\n self.apply_post_transforms(doctree, docname)\n\n # now, resolve all toctree nodes\n for toctreenode in doctree.findall(addnodes.toctree):\n result = TocTree(self).resolve(docname, builder, toctreenode,\n prune=prune_toctrees,\n includehidden=includehidden)\n if result is None:\n toctreenode.replace_self([])\n else:\n toctreenode.replace_self(result)\n\n return doctree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.resolve_toctree_BuildEnvironment.resolve_toctree.return.TocTree_self_resolve_doc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.resolve_toctree_BuildEnvironment.resolve_toctree.return.TocTree_self_resolve_doc", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 552, "end_line": 568, "span_ids": ["BuildEnvironment.resolve_toctree"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def resolve_toctree(self, docname: str, builder: \"Builder\", toctree: addnodes.toctree,\n prune: bool = True, maxdepth: int = 0, titles_only: bool = False,\n collapse: bool = False, includehidden: bool = False) -> Node:\n \"\"\"Resolve a *toctree* node into individual bullet lists with titles\n as items, returning None (if no containing titles are found) or\n a new node.\n\n If *prune* is True, the tree is pruned to *maxdepth*, or if that is 0,\n to the value of the *maxdepth* option on the *toctree* node.\n If *titles_only* is True, only toplevel document titles will be in the\n resulting tree.\n If *collapse* is True, all branches not containing docname will\n be collapsed.\n \"\"\"\n return TocTree(self).resolve(docname, builder, toctree, prune,\n maxdepth, titles_only, collapse,\n includehidden)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.resolve_references_BuildEnvironment.apply_post_transforms.self_events_emit_doctree": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.resolve_references_BuildEnvironment.apply_post_transforms.self_events_emit_doctree", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 570, "end_line": 589, "span_ids": ["BuildEnvironment.apply_post_transforms", "BuildEnvironment.resolve_references"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def resolve_references(self, doctree: nodes.document, fromdocname: str,\n builder: \"Builder\") -> None:\n self.apply_post_transforms(doctree, fromdocname)\n\n def apply_post_transforms(self, doctree: nodes.document, docname: str) -> None:\n \"\"\"Apply all post-transforms.\"\"\"\n try:\n # set env.docname during applying post-transforms\n backup = copy(self.temp_data)\n self.temp_data['docname'] = docname\n\n transformer = SphinxTransformer(doctree)\n transformer.set_environment(self)\n transformer.add_transforms(self.app.registry.get_post_transforms())\n transformer.apply_transforms()\n finally:\n self.temp_data = backup\n\n # allow custom references to be resolved\n self.events.emit('doctree-resolved', doctree, docname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.collect_relations_BuildEnvironment.collect_relations.return.relations": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.collect_relations_BuildEnvironment.collect_relations.return.relations", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 580, "end_line": 612, "span_ids": ["BuildEnvironment.collect_relations"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def collect_relations(self) -> Dict[str, List[Optional[str]]]:\n traversed = set()\n\n def traverse_toctree(parent: str, docname: str) -> Iterator[Tuple[str, str]]:\n if parent == docname:\n logger.warning(__('self referenced toctree found. Ignored.'),\n location=docname, type='toc',\n subtype='circular')\n return\n\n # traverse toctree by pre-order\n yield parent, docname\n traversed.add(docname)\n\n for child in (self.toctree_includes.get(docname) or []):\n for subparent, subdocname in traverse_toctree(docname, child):\n if subdocname not in traversed:\n yield subparent, subdocname\n traversed.add(subdocname)\n\n relations = {}\n docnames = traverse_toctree(None, self.config.root_doc)\n prevdoc = None\n parent, docname = next(docnames)\n for nextparent, nextdoc in docnames:\n relations[docname] = [parent, prevdoc, nextdoc]\n prevdoc = docname\n docname = nextdoc\n parent = nextparent\n\n relations[docname] = [parent, prevdoc, None]\n\n return relations", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/__init__.py__", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 6}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Sphinx environment adapters\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.newlist_IndexEntries.create_index._group_the_entries_by_le": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.newlist_IndexEntries.create_index._group_the_entries_by_le", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/indexentries.py", "file_name": "indexentries.py", "file_type": "text/x-python", "category": "implementation", "start_line": 110, "end_line": 151, "span_ids": ["IndexEntries.create_index"], "tokens": 415}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexEntries:\n\n def create_index(self, builder: Builder, group_entries: bool = True,\n _fixre: Pattern = re.compile(r'(.*) ([(][^()]*[)])')\n ) -> List[Tuple[str, List[Tuple[str, Any]]]]:\n # ... other code\n newlist = sorted(new.items(), key=keyfunc)\n\n if group_entries:\n # fixup entries: transform\n # func() (in module foo)\n # func() (in module bar)\n # into\n # func()\n # (in module foo)\n # (in module bar)\n oldkey = ''\n oldsubitems: Dict[str, List] = None\n i = 0\n while i < len(newlist):\n key, (targets, subitems, _key) = newlist[i]\n # cannot move if it has subitems; structure gets too complex\n if not subitems:\n m = _fixre.match(key)\n if m:\n if oldkey == m.group(1):\n # prefixes match: add entry as subitem of the\n # previous entry\n oldsubitems.setdefault(m.group(2), [[], {}, _key])[0].\\\n extend(targets)\n del newlist[i]\n continue\n oldkey = m.group(1)\n else:\n oldkey = key\n oldsubitems = subitems\n i += 1\n\n # sort the sub-index entries\n def keyfunc2(entry: Tuple[str, List]) -> str:\n key = unicodedata.normalize('NFD', entry[0].lower())\n if key.startswith('\\N{RIGHT-TO-LEFT MARK}'):\n key = key[1:]\n if key[0:1].isalpha() or key.startswith('_'):\n key = chr(127) + key\n return key\n\n # group the entries by letter\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.keyfunc3_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.keyfunc3_", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/indexentries.py", "file_name": "indexentries.py", "file_type": "text/x-python", "category": "implementation", "start_line": 158, "end_line": 177, "span_ids": ["IndexEntries.create_index"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexEntries:\n\n def create_index(self, builder: Builder, group_entries: bool = True,\n _fixre: Pattern = re.compile(r'(.*) ([(][^()]*[)])')\n ) -> List[Tuple[str, List[Tuple[str, Any]]]]:\n # ... other code\n def keyfunc3(item: Tuple[str, List]) -> str:\n # hack: mutating the subitems dicts to a list in the keyfunc\n k, v = item\n v[1] = sorted(((si, se) for (si, (se, void, void)) in v[1].items()),\n key=keyfunc2)\n if v[2] is None:\n # now calculate the key\n if k.startswith('\\N{RIGHT-TO-LEFT MARK}'):\n k = k[1:]\n letter = unicodedata.normalize('NFD', k[0])[0].upper()\n if letter.isalpha() or letter == '_':\n return letter\n else:\n # get all other symbols under one heading\n return _('Symbols')\n else:\n return v[2]\n return [(key_, list(group))\n for (key_, group) in groupby(newlist, keyfunc3)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve_TocTree.resolve.excluded.Matcher_self_env_config_e": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve_TocTree.resolve.excluded.Matcher_self_env_config_e", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 77, "span_ids": ["TocTree.resolve"], "tokens": 394}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree:\n\n def resolve(self, docname: str, builder: \"Builder\", toctree: addnodes.toctree,\n prune: bool = True, maxdepth: int = 0, titles_only: bool = False,\n collapse: bool = False, includehidden: bool = False) -> Optional[Element]:\n \"\"\"Resolve a *toctree* node into individual bullet lists with titles\n as items, returning None (if no containing titles are found) or\n a new node.\n\n If *prune* is True, the tree is pruned to *maxdepth*, or if that is 0,\n to the value of the *maxdepth* option on the *toctree* node.\n If *titles_only* is True, only toplevel document titles will be in the\n resulting tree.\n If *collapse* is True, all branches not containing docname will\n be collapsed.\n \"\"\"\n if toctree.get('hidden', False) and not includehidden:\n return None\n\n # For reading the following two helper function, it is useful to keep\n # in mind the node structure of a toctree (using HTML-like node names\n # for brevity):\n #\n # <ul>\n # <li>\n # <p><a></p>\n # <p><a></p>\n # ...\n # <ul>\n # ...\n # </ul>\n # </li>\n # </ul>\n #\n # The transformation is made in two passes in order to avoid\n # interactions between marking and pruning the tree (see bug #1046).\n\n toctree_ancestors = self.get_toctree_ancestors(docname)\n excluded = Matcher(self.env.config.exclude_patterns)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve._toctree_add_classes_TocTree.resolve._toctree_add_classes.for_subnode_in_node_child.if_isinstance_subnode_a.None_1.if_subnode_refuri_d.while_subnode_.subnode.subnode_parent": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve._toctree_add_classes_TocTree.resolve._toctree_add_classes.for_subnode_in_node_child.if_isinstance_subnode_a.None_1.if_subnode_refuri_d.while_subnode_.subnode.subnode_parent", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 107, "span_ids": ["TocTree.resolve"], "tokens": 406}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree:\n\n def resolve(self, docname: str, builder: \"Builder\", toctree: addnodes.toctree,\n prune: bool = True, maxdepth: int = 0, titles_only: bool = False,\n collapse: bool = False, includehidden: bool = False) -> Optional[Element]:\n # ... other code\n\n def _toctree_add_classes(node: Element, depth: int) -> None:\n \"\"\"Add 'toctree-l%d' and 'current' classes to the toctree.\"\"\"\n for subnode in node.children:\n if isinstance(subnode, (addnodes.compact_paragraph,\n nodes.list_item)):\n # for <p> and <li>, indicate the depth level and recurse\n subnode['classes'].append('toctree-l%d' % (depth - 1))\n _toctree_add_classes(subnode, depth)\n elif isinstance(subnode, nodes.bullet_list):\n # for <ul>, just recurse\n _toctree_add_classes(subnode, depth + 1)\n elif isinstance(subnode, nodes.reference):\n # for <a>, identify which entries point to the current\n # document and therefore may not be collapsed\n if subnode['refuri'] == docname:\n if not subnode['anchorname']:\n # give the whole branch a 'current' class\n # (useful for styling it differently)\n branchnode: Element = subnode\n while branchnode:\n branchnode['classes'].append('current')\n branchnode = branchnode.parent\n # mark the list_item as \"on current page\"\n if subnode.parent.parent.get('iscurrent'):\n # but only if it's not already done\n return\n while subnode:\n subnode['iscurrent'] = True\n subnode = subnode.parent\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve._entries_from_toctree_TocTree.resolve._entries_from_toctree.return.entries": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve._entries_from_toctree_TocTree.resolve._entries_from_toctree.return.entries", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 109, "end_line": 213, "span_ids": ["TocTree.resolve"], "tokens": 1083}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree:\n\n def resolve(self, docname: str, builder: \"Builder\", toctree: addnodes.toctree,\n prune: bool = True, maxdepth: int = 0, titles_only: bool = False,\n collapse: bool = False, includehidden: bool = False) -> Optional[Element]:\n # ... other code\n\n def _entries_from_toctree(toctreenode: addnodes.toctree, parents: List[str],\n separate: bool = False, subtree: bool = False\n ) -> List[Element]:\n \"\"\"Return TOC entries for a toctree node.\"\"\"\n refs = [(e[0], e[1]) for e in toctreenode['entries']]\n entries: List[Element] = []\n for (title, ref) in refs:\n try:\n refdoc = None\n if url_re.match(ref):\n if title is None:\n title = ref\n reference = nodes.reference('', '', internal=False,\n refuri=ref, anchorname='',\n *[nodes.Text(title)])\n para = addnodes.compact_paragraph('', '', reference)\n item = nodes.list_item('', para)\n toc = nodes.bullet_list('', item)\n elif ref == 'self':\n # 'self' refers to the document from which this\n # toctree originates\n ref = toctreenode['parent']\n if not title:\n title = clean_astext(self.env.titles[ref])\n reference = nodes.reference('', '', internal=True,\n refuri=ref,\n anchorname='',\n *[nodes.Text(title)])\n para = addnodes.compact_paragraph('', '', reference)\n item = nodes.list_item('', para)\n # don't show subitems\n toc = nodes.bullet_list('', item)\n else:\n if ref in parents:\n logger.warning(__('circular toctree references '\n 'detected, ignoring: %s <- %s'),\n ref, ' <- '.join(parents),\n location=ref, type='toc', subtype='circular')\n continue\n refdoc = ref\n toc = self.env.tocs[ref].deepcopy()\n maxdepth = self.env.metadata[ref].get('tocdepth', 0)\n if ref not in toctree_ancestors or (prune and maxdepth > 0):\n self._toctree_prune(toc, 2, maxdepth, collapse)\n process_only_nodes(toc, builder.tags)\n if title and toc.children and len(toc.children) == 1:\n child = toc.children[0]\n for refnode in child.findall(nodes.reference):\n if refnode['refuri'] == ref and \\\n not refnode['anchorname']:\n refnode.children = [nodes.Text(title)]\n if not toc.children:\n # empty toc means: no titles will show up in the toctree\n logger.warning(__('toctree contains reference to document %r that '\n 'doesn\\'t have a title: no link will be generated'),\n ref, location=toctreenode)\n except KeyError:\n # this is raised if the included file does not exist\n if excluded(self.env.doc2path(ref, None)):\n message = __('toctree contains reference to excluded document %r')\n else:\n message = __('toctree contains reference to nonexisting document %r')\n\n logger.warning(message, ref, location=toctreenode)\n else:\n # if titles_only is given, only keep the main title and\n # sub-toctrees\n if titles_only:\n # children of toc are:\n # - list_item + compact_paragraph + (reference and subtoc)\n # - only + subtoc\n # - toctree\n children = cast(Iterable[nodes.Element], toc)\n\n # delete everything but the toplevel title(s)\n # and toctrees\n for toplevel in children:\n # nodes with length 1 don't have any children anyway\n if len(toplevel) > 1:\n subtrees = list(toplevel.findall(addnodes.toctree))\n if subtrees:\n toplevel[1][:] = subtrees # type: ignore\n else:\n toplevel.pop(1)\n # resolve all sub-toctrees\n for subtocnode in list(toc.findall(addnodes.toctree)):\n if not (subtocnode.get('hidden', False) and\n not includehidden):\n i = subtocnode.parent.index(subtocnode) + 1\n for entry in _entries_from_toctree(\n subtocnode, [refdoc] + parents,\n subtree=True):\n subtocnode.parent.insert(i, entry)\n i += 1\n subtocnode.parent.remove(subtocnode)\n if separate:\n entries.append(toc)\n else:\n children = cast(Iterable[nodes.Element], toc)\n entries.extend(children)\n if not subtree and not separate:\n ret = nodes.bullet_list()\n ret += entries\n return [ret]\n return entries\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve.maxdepth_TocTree.resolve.return.newnode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.resolve.maxdepth_TocTree.resolve.return.newnode", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 215, "end_line": 256, "span_ids": ["TocTree.resolve"], "tokens": 539}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree:\n\n def resolve(self, docname: str, builder: \"Builder\", toctree: addnodes.toctree,\n prune: bool = True, maxdepth: int = 0, titles_only: bool = False,\n collapse: bool = False, includehidden: bool = False) -> Optional[Element]:\n # ... other code\n\n maxdepth = maxdepth or toctree.get('maxdepth', -1)\n if not titles_only and toctree.get('titlesonly', False):\n titles_only = True\n if not includehidden and toctree.get('includehidden', False):\n includehidden = True\n\n # NOTE: previously, this was separate=True, but that leads to artificial\n # separation when two or more toctree entries form a logical unit, so\n # separating mode is no longer used -- it's kept here for history's sake\n tocentries = _entries_from_toctree(toctree, [], separate=False)\n if not tocentries:\n return None\n\n newnode = addnodes.compact_paragraph('', '')\n caption = toctree.attributes.get('caption')\n if caption:\n caption_node = nodes.title(caption, '', *[nodes.Text(caption)])\n caption_node.line = toctree.line\n caption_node.source = toctree.source\n caption_node.rawsource = toctree['rawcaption']\n if hasattr(toctree, 'uid'):\n # move uid to caption_node to translate it\n caption_node.uid = toctree.uid # type: ignore\n del toctree.uid # type: ignore\n newnode += caption_node\n newnode.extend(tocentries)\n newnode['toctree'] = True\n\n # prune the tree to maxdepth, also set toc depth and current classes\n _toctree_add_classes(newnode, 1)\n self._toctree_prune(newnode, 1, maxdepth if prune else 0, collapse)\n\n if isinstance(newnode[-1], nodes.Element) and len(newnode[-1]) == 0: # No titles found\n return None\n\n # set the target paths in the toctrees (they are not known at TOC\n # generation time)\n for refnode in newnode.findall(nodes.reference):\n if not url_re.match(refnode['refuri']):\n refnode['refuri'] = builder.get_relative_uri(\n docname, refnode['refuri']) + refnode['anchorname']\n return newnode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.get_toctree_ancestors_TocTree._toctree_prune.for_subnode_in_node_child.if_isinstance_subnode_a.elif_isinstance_subnode_.if_maxdepth_0_and_depth.else_.if_collapse_and_depth_.else_.self__toctree_prune_subno": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.get_toctree_ancestors_TocTree._toctree_prune.for_subnode_in_node_child.if_isinstance_subnode_a.elif_isinstance_subnode_.if_maxdepth_0_and_depth.else_.if_collapse_and_depth_.else_.self__toctree_prune_subno", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 258, "end_line": 290, "span_ids": ["TocTree.get_toctree_ancestors", "TocTree._toctree_prune"], "tokens": 340}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree:\n\n def get_toctree_ancestors(self, docname: str) -> List[str]:\n parent = {}\n for p, children in self.env.toctree_includes.items():\n for child in children:\n parent[child] = p\n ancestors: List[str] = []\n d = docname\n while d in parent and d not in ancestors:\n ancestors.append(d)\n d = parent[d]\n return ancestors\n\n def _toctree_prune(self, node: Element, depth: int, maxdepth: int, collapse: bool = False\n ) -> None:\n \"\"\"Utility: Cut a TOC at a specified depth.\"\"\"\n for subnode in node.children[:]:\n if isinstance(subnode, (addnodes.compact_paragraph,\n nodes.list_item)):\n # for <p> and <li>, just recurse\n self._toctree_prune(subnode, depth, maxdepth, collapse)\n elif isinstance(subnode, nodes.bullet_list):\n # for <ul>, determine if the depth is too large or if the\n # entry is to be collapsed\n if maxdepth > 0 and depth > maxdepth:\n subnode.parent.replace(subnode, [])\n else:\n # cull sub-entries whose parents aren't 'current'\n if (collapse and depth > 1 and\n 'iscurrent' not in subnode.parent):\n subnode.parent.remove(subnode)\n else:\n # recurse on visible children\n self._toctree_prune(subnode, depth + 1, maxdepth, collapse)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.get_toc_for_TocTree.get_toc_for.return.toc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.get_toc_for_TocTree.get_toc_for.return.toc", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 292, "end_line": 305, "span_ids": ["TocTree.get_toc_for"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree:\n\n def get_toc_for(self, docname: str, builder: \"Builder\") -> Node:\n \"\"\"Return a TOC nodetree -- for use on the same page only!\"\"\"\n tocdepth = self.env.metadata[docname].get('tocdepth', 0)\n try:\n toc = self.env.tocs[docname].deepcopy()\n self._toctree_prune(toc, 2, tocdepth)\n except KeyError:\n # the document does not exist anymore: return a dummy node that\n # renders to nothing\n return nodes.paragraph()\n process_only_nodes(toc, builder.tags)\n for node in toc.findall(nodes.reference):\n node['refuri'] = node['anchorname'] or '#'\n return toc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.get_toctree_for_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree.get_toctree_for_", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 307, "end_line": 329, "span_ids": ["TocTree.get_toctree_for"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree:\n\n def get_toctree_for(self, docname: str, builder: \"Builder\", collapse: bool,\n **kwargs: Any) -> Optional[Element]:\n \"\"\"Return the global TOC nodetree.\"\"\"\n doctree = self.env.get_doctree(self.env.config.root_doc)\n toctrees: List[Element] = []\n if 'includehidden' not in kwargs:\n kwargs['includehidden'] = True\n if 'maxdepth' not in kwargs or not kwargs['maxdepth']:\n kwargs['maxdepth'] = 0\n else:\n kwargs['maxdepth'] = int(kwargs['maxdepth'])\n kwargs['collapse'] = collapse\n for toctreenode in doctree.findall(addnodes.toctree):\n toctree = self.resolve(docname, builder, toctreenode, prune=True, **kwargs)\n if toctree:\n toctrees.append(toctree)\n if not toctrees:\n return None\n result = toctrees[0]\n for toctree in toctrees[1:]:\n result.extend(toctree.children)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/__init__.py_EnvironmentCollector.disable_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/__init__.py_EnvironmentCollector.disable_", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 81, "span_ids": ["EnvironmentCollector.process_doc", "EnvironmentCollector.get_updated_docs", "EnvironmentCollector.disable", "EnvironmentCollector.clear_doc", "EnvironmentCollector.get_outdated_docs", "EnvironmentCollector.merge_other"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EnvironmentCollector:\n\n def disable(self, app: \"Sphinx\") -> None:\n assert self.listener_ids is not None\n for listener_id in self.listener_ids.values():\n app.disconnect(listener_id)\n self.listener_ids = None\n\n def clear_doc(self, app: \"Sphinx\", env: BuildEnvironment, docname: str) -> None:\n \"\"\"Remove specified data of a document.\n\n This method is called on the removal of the document.\"\"\"\n raise NotImplementedError\n\n def merge_other(self, app: \"Sphinx\", env: BuildEnvironment,\n docnames: Set[str], other: BuildEnvironment) -> None:\n \"\"\"Merge in specified data regarding docnames from a different `BuildEnvironment`\n object which coming from a subprocess in parallel builds.\"\"\"\n raise NotImplementedError\n\n def process_doc(self, app: \"Sphinx\", doctree: nodes.document) -> None:\n \"\"\"Process a document and gather specific data from it.\n\n This method is called after the document is read.\"\"\"\n raise NotImplementedError\n\n def get_updated_docs(self, app: \"Sphinx\", env: BuildEnvironment) -> List[str]:\n \"\"\"Return a list of docnames to re-read.\n\n This methods is called after reading the whole of documents (experimental).\n \"\"\"\n return []\n\n def get_outdated_docs(self, app: \"Sphinx\", env: BuildEnvironment,\n added: Set[str], changed: Set[str], removed: Set[str]) -> List[str]:\n \"\"\"Return a list of docnames to re-read.\n\n This methods is called before reading the documents.\n \"\"\"\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py_ImageCollector.collect_candidates_ImageCollector.collect_candidates.for_key_files_in_globbed._select_by_similarity": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py_ImageCollector.collect_candidates_ImageCollector.collect_candidates.for_key_files_in_globbed._select_by_similarity", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/asset.py", "file_name": "asset.py", "file_type": "text/x-python", "category": "implementation", "start_line": 85, "end_line": 102, "span_ids": ["ImageCollector.collect_candidates"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ImageCollector(EnvironmentCollector):\n\n def collect_candidates(self, env: BuildEnvironment, imgpath: str,\n candidates: Dict[str, str], node: Node) -> None:\n globbed: Dict[str, List[str]] = {}\n for filename in glob(imgpath):\n new_imgpath = relative_path(path.join(env.srcdir, 'dummy'),\n filename)\n try:\n mimetype = guess_mimetype(filename)\n if mimetype is None:\n basename, suffix = path.splitext(filename)\n mimetype = 'image/x-' + suffix[1:]\n if mimetype not in candidates:\n globbed.setdefault(mimetype, []).append(new_imgpath)\n except OSError as err:\n logger.warning(__('image file %s not readable: %s') % (filename, err),\n location=node, type='image', subtype='not_readable')\n for key, files in globbed.items():\n candidates[key] = sorted(files, key=len)[0] # select by similarity", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py_DownloadFileCollector_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py_DownloadFileCollector_", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/asset.py", "file_name": "asset.py", "file_type": "text/x-python", "category": "implementation", "start_line": 105, "end_line": 140, "span_ids": ["DownloadFileCollector.clear_doc", "DownloadFileCollector", "setup", "DownloadFileCollector.process_doc", "DownloadFileCollector.merge_other"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DownloadFileCollector(EnvironmentCollector):\n \"\"\"Download files collector for sphinx.environment.\"\"\"\n\n def clear_doc(self, app: Sphinx, env: BuildEnvironment, docname: str) -> None:\n env.dlfiles.purge_doc(docname)\n\n def merge_other(self, app: Sphinx, env: BuildEnvironment,\n docnames: Set[str], other: BuildEnvironment) -> None:\n env.dlfiles.merge_other(docnames, other.dlfiles)\n\n def process_doc(self, app: Sphinx, doctree: nodes.document) -> None:\n \"\"\"Process downloadable file paths. \"\"\"\n for node in doctree.findall(addnodes.download_reference):\n targetname = node['reftarget']\n if '://' in targetname:\n node['refuri'] = targetname\n else:\n rel_filename, filename = app.env.relfn2path(targetname, app.env.docname)\n app.env.dependencies[app.env.docname].add(rel_filename)\n if not os.access(filename, os.R_OK):\n logger.warning(__('download file not readable: %s') % filename,\n location=node, type='download', subtype='not_readable')\n continue\n node['filename'] = app.env.dlfiles.add_file(app.env.docname, rel_filename)\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_env_collector(ImageCollector)\n app.add_env_collector(DownloadFileCollector)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/title.py_TitleCollector.process_doc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/title.py_TitleCollector.process_doc_", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/title.py", "file_name": "title.py", "file_type": "text/x-python", "category": "implementation", "start_line": 26, "end_line": 58, "span_ids": ["TitleCollector.process_doc", "setup"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TitleCollector(EnvironmentCollector):\n\n def process_doc(self, app: Sphinx, doctree: nodes.document) -> None:\n \"\"\"Add a title node to the document (just copy the first section title),\n and store that title in the environment.\n \"\"\"\n titlenode = nodes.title()\n longtitlenode = titlenode\n # explicit title set with title directive; use this only for\n # the <title> tag in HTML output\n if 'title' in doctree:\n longtitlenode = nodes.title()\n longtitlenode += nodes.Text(doctree['title'])\n # look for first section title and use that as the title\n for node in doctree.findall(nodes.section):\n visitor = SphinxContentsFilter(doctree)\n node[0].walkabout(visitor)\n titlenode += visitor.get_entry_text()\n break\n else:\n # document has no title\n titlenode += nodes.Text(doctree.get('title', '<no title>'))\n app.env.titles[app.env.docname] = titlenode\n app.env.longtitles[app.env.docname] = longtitlenode\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_env_collector(TitleCollector)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector_TocTreeCollector.clear_doc.for_subfn_fnset_in_list_.if_not_fnset_.del_env_files_to_rebuild_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector_TocTreeCollector.clear_doc.for_subfn_fnset_in_list_.if_not_fnset_.del_env_files_to_rebuild_", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 36, "end_line": 49, "span_ids": ["TocTreeCollector", "TocTreeCollector.clear_doc"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTreeCollector(EnvironmentCollector):\n def clear_doc(self, app: Sphinx, env: BuildEnvironment, docname: str) -> None:\n env.tocs.pop(docname, None)\n env.toc_secnumbers.pop(docname, None)\n env.toc_fignumbers.pop(docname, None)\n env.toc_num_entries.pop(docname, None)\n env.toctree_includes.pop(docname, None)\n env.glob_toctrees.discard(docname)\n env.numbered_toctrees.discard(docname)\n\n for subfn, fnset in list(env.files_to_rebuild.items()):\n fnset.discard(docname)\n if not fnset:\n del env.files_to_rebuild[subfn]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.merge_other_TocTreeCollector.merge_other.for_subfn_fnset_in_other.env_files_to_rebuild_setd": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.merge_other_TocTreeCollector.merge_other.for_subfn_fnset_in_other.env_files_to_rebuild_setd", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 64, "span_ids": ["TocTreeCollector.merge_other"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTreeCollector(EnvironmentCollector):\n\n def merge_other(self, app: Sphinx, env: BuildEnvironment, docnames: Set[str],\n other: BuildEnvironment) -> None:\n for docname in docnames:\n env.tocs[docname] = other.tocs[docname]\n env.toc_num_entries[docname] = other.toc_num_entries[docname]\n if docname in other.toctree_includes:\n env.toctree_includes[docname] = other.toctree_includes[docname]\n if docname in other.glob_toctrees:\n env.glob_toctrees.add(docname)\n if docname in other.numbered_toctrees:\n env.numbered_toctrees.add(docname)\n\n for subfn, fnset in other.files_to_rebuild.items():\n env.files_to_rebuild.setdefault(subfn, set()).update(fnset & set(docnames))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.process_doc_TocTreeCollector.process_doc.traverse_in_section.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.process_doc_TocTreeCollector.process_doc.traverse_in_section.return.result", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 52, "end_line": 67, "span_ids": ["TocTreeCollector.process_doc"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTreeCollector(EnvironmentCollector):\n\n def process_doc(self, app: Sphinx, doctree: nodes.document) -> None:\n \"\"\"Build a TOC from the doctree and store it in the inventory.\"\"\"\n docname = app.env.docname\n numentries = [0] # nonlocal again...\n\n def traverse_in_section(node: Element, cls: Type[N]) -> List[N]:\n \"\"\"Like traverse(), but stay within the same section.\"\"\"\n result: List[N] = []\n if isinstance(node, cls):\n result.append(node)\n for child in node.children:\n if isinstance(child, nodes.section):\n continue\n elif isinstance(child, nodes.Element):\n result.extend(traverse_in_section(child, cls))\n return result\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.process_doc.build_toc_TocTreeCollector.process_doc.app_env_toc_num_entries_d": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.process_doc.build_toc_TocTreeCollector.process_doc.app_env_toc_num_entries_d", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 69, "end_line": 121, "span_ids": ["TocTreeCollector.process_doc"], "tokens": 550}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTreeCollector(EnvironmentCollector):\n\n def process_doc(self, app: Sphinx, doctree: nodes.document) -> None:\n # ... other code\n\n def build_toc(node: Element, depth: int = 1) -> nodes.bullet_list:\n entries: List[Element] = []\n for sectionnode in node:\n # find all toctree nodes in this section and add them\n # to the toc (just copying the toctree node which is then\n # resolved in self.get_and_resolve_doctree)\n if isinstance(sectionnode, nodes.section):\n title = sectionnode[0]\n # copy the contents of the section title, but without references\n # and unnecessary stuff\n visitor = SphinxContentsFilter(doctree)\n title.walkabout(visitor)\n nodetext = visitor.get_entry_text()\n if not numentries[0]:\n # for the very first toc entry, don't add an anchor\n # as it is the file's title anyway\n anchorname = ''\n else:\n anchorname = '#' + sectionnode['ids'][0]\n numentries[0] += 1\n # make these nodes:\n # list_item -> compact_paragraph -> reference\n reference = nodes.reference(\n '', '', internal=True, refuri=docname,\n anchorname=anchorname, *nodetext)\n para = addnodes.compact_paragraph('', '', reference)\n item: Element = nodes.list_item('', para)\n sub_item = build_toc(sectionnode, depth + 1)\n if sub_item:\n item += sub_item\n entries.append(item)\n elif isinstance(sectionnode, addnodes.only):\n onlynode = addnodes.only(expr=sectionnode['expr'])\n blist = build_toc(sectionnode, depth)\n if blist:\n onlynode += blist.children\n entries.append(onlynode)\n elif isinstance(sectionnode, nodes.Element):\n for toctreenode in traverse_in_section(sectionnode,\n addnodes.toctree):\n item = toctreenode.copy()\n entries.append(item)\n # important: do the inventory stuff\n TocTree(app.env).note(docname, toctreenode)\n if entries:\n return nodes.bullet_list('', *entries)\n return None\n toc = build_toc(doctree)\n if toc:\n app.env.tocs[docname] = toc\n else:\n app.env.tocs[docname] = nodes.bullet_list('')\n app.env.toc_num_entries[docname] = numentries[0]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.get_updated_docs_TocTreeCollector.assign_section_numbers._walk_toc.for_subnode_in_node_child.if_isinstance_subnode_no.None_3._walk_toctree_subnode_de": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.get_updated_docs_TocTreeCollector.assign_section_numbers._walk_toc.for_subnode_in_node_child.if_isinstance_subnode_no.None_3._walk_toctree_subnode_de", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 123, "end_line": 167, "span_ids": ["TocTreeCollector.assign_section_numbers", "TocTreeCollector.get_updated_docs"], "tokens": 505}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTreeCollector(EnvironmentCollector):\n\n def get_updated_docs(self, app: Sphinx, env: BuildEnvironment) -> List[str]:\n return self.assign_section_numbers(env) + self.assign_figure_numbers(env)\n\n def assign_section_numbers(self, env: BuildEnvironment) -> List[str]:\n \"\"\"Assign a section number to each heading under a numbered toctree.\"\"\"\n # a list of all docnames whose section numbers changed\n rewrite_needed = []\n\n assigned: Set[str] = set()\n old_secnumbers = env.toc_secnumbers\n env.toc_secnumbers = {}\n\n def _walk_toc(node: Element, secnums: Dict, depth: int, titlenode: nodes.title = None) -> None: # NOQA\n # titlenode is the title of the document, it will get assigned a\n # secnumber too, so that it shows up in next/prev/parent rellinks\n for subnode in node.children:\n if isinstance(subnode, nodes.bullet_list):\n numstack.append(0)\n _walk_toc(subnode, secnums, depth - 1, titlenode)\n numstack.pop()\n titlenode = None\n elif isinstance(subnode, nodes.list_item):\n _walk_toc(subnode, secnums, depth, titlenode)\n titlenode = None\n elif isinstance(subnode, addnodes.only):\n # at this stage we don't know yet which sections are going\n # to be included; just include all of them, even if it leads\n # to gaps in the numbering\n _walk_toc(subnode, secnums, depth, titlenode)\n titlenode = None\n elif isinstance(subnode, addnodes.compact_paragraph):\n numstack[-1] += 1\n reference = cast(nodes.reference, subnode[0])\n if depth > 0:\n number = list(numstack)\n secnums[reference['anchorname']] = tuple(numstack)\n else:\n number = None\n secnums[reference['anchorname']] = None\n reference['secnumber'] = number\n if titlenode:\n titlenode['secnumber'] = number\n titlenode = None\n elif isinstance(subnode, addnodes.toctree):\n _walk_toctree(subnode, depth)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_section_numbers._walk_toctree_TocTreeCollector.assign_section_numbers.return.rewrite_needed": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_section_numbers._walk_toctree_TocTreeCollector.assign_section_numbers.return.rewrite_needed", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 169, "end_line": 198, "span_ids": ["TocTreeCollector.assign_section_numbers"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTreeCollector(EnvironmentCollector):\n\n def assign_section_numbers(self, env: BuildEnvironment) -> List[str]:\n # ... other code\n\n def _walk_toctree(toctreenode: addnodes.toctree, depth: int) -> None:\n if depth == 0:\n return\n for (_title, ref) in toctreenode['entries']:\n if url_re.match(ref) or ref == 'self':\n # don't mess with those\n continue\n elif ref in assigned:\n logger.warning(__('%s is already assigned section numbers '\n '(nested numbered toctree?)'), ref,\n location=toctreenode, type='toc', subtype='secnum')\n elif ref in env.tocs:\n secnums: Dict[str, Tuple[int, ...]] = {}\n env.toc_secnumbers[ref] = secnums\n assigned.add(ref)\n _walk_toc(env.tocs[ref], secnums, depth, env.titles.get(ref))\n if secnums != old_secnumbers.get(ref):\n rewrite_needed.append(ref)\n\n for docname in env.numbered_toctrees:\n assigned.add(docname)\n doctree = env.get_doctree(docname)\n for toctreenode in doctree.findall(addnodes.toctree):\n depth = toctreenode.get('numbered', 0)\n if depth:\n # every numbered toctree gets new numbering\n numstack = [0]\n _walk_toctree(toctreenode, depth)\n\n return rewrite_needed", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_figure_numbers_TocTreeCollector.assign_figure_numbers.register_fignumber.fignumbers_figure_id_g": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_figure_numbers_TocTreeCollector.assign_figure_numbers.register_fignumber.fignumbers_figure_id_g", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 200, "end_line": 245, "span_ids": ["TocTreeCollector.assign_figure_numbers"], "tokens": 450}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTreeCollector(EnvironmentCollector):\n\n def assign_figure_numbers(self, env: BuildEnvironment) -> List[str]:\n \"\"\"Assign a figure number to each figure under a numbered toctree.\"\"\"\n\n rewrite_needed = []\n\n assigned: Set[str] = set()\n old_fignumbers = env.toc_fignumbers\n env.toc_fignumbers = {}\n fignum_counter: Dict[str, Dict[Tuple[int, ...], int]] = {}\n\n def get_figtype(node: Node) -> str:\n for domain in env.domains.values():\n figtype = domain.get_enumerable_node_type(node)\n if domain.name == 'std' and not domain.get_numfig_title(node): # type: ignore\n # Skip if uncaptioned node\n continue\n\n if figtype:\n return figtype\n\n return None\n\n def get_section_number(docname: str, section: nodes.section) -> Tuple[int, ...]:\n anchorname = '#' + section['ids'][0]\n secnumbers = env.toc_secnumbers.get(docname, {})\n if anchorname in secnumbers:\n secnum = secnumbers.get(anchorname)\n else:\n secnum = secnumbers.get('')\n\n return secnum or tuple()\n\n def get_next_fignumber(figtype: str, secnum: Tuple[int, ...]) -> Tuple[int, ...]:\n counter = fignum_counter.setdefault(figtype, {})\n\n secnum = secnum[:env.config.numfig_secnum_depth]\n counter[secnum] = counter.get(secnum, 0) + 1\n return secnum + (counter[secnum],)\n\n def register_fignumber(docname: str, secnum: Tuple[int, ...],\n figtype: str, fignode: Element) -> None:\n env.toc_fignumbers.setdefault(docname, {})\n fignumbers = env.toc_fignumbers[docname].setdefault(figtype, {})\n figure_id = fignode['ids'][0]\n\n fignumbers[figure_id] = get_next_fignumber(figtype, secnum)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_figure_numbers._walk_doctree_TocTreeCollector.assign_figure_numbers._walk_doctree.for_subnode_in_doctree_ch.if_isinstance_subnode_no.None_1._walk_doctree_docname_su": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_figure_numbers._walk_doctree_TocTreeCollector.assign_figure_numbers._walk_doctree.for_subnode_in_doctree_ch.if_isinstance_subnode_no.None_1._walk_doctree_docname_su", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 247, "end_line": 267, "span_ids": ["TocTreeCollector.assign_figure_numbers"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTreeCollector(EnvironmentCollector):\n\n def assign_figure_numbers(self, env: BuildEnvironment) -> List[str]:\n # ... other code\n\n def _walk_doctree(docname: str, doctree: Element, secnum: Tuple[int, ...]) -> None:\n for subnode in doctree.children:\n if isinstance(subnode, nodes.section):\n next_secnum = get_section_number(docname, subnode)\n if next_secnum:\n _walk_doctree(docname, subnode, next_secnum)\n else:\n _walk_doctree(docname, subnode, secnum)\n elif isinstance(subnode, addnodes.toctree):\n for _title, subdocname in subnode['entries']:\n if url_re.match(subdocname) or subdocname == 'self':\n # don't mess with those\n continue\n\n _walk_doc(subdocname, secnum)\n elif isinstance(subnode, nodes.Element):\n figtype = get_figtype(subnode)\n if figtype and subnode['ids']:\n register_fignumber(docname, secnum, figtype, subnode)\n\n _walk_doctree(docname, subnode, secnum)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_figure_numbers._walk_doc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py_TocTreeCollector.assign_figure_numbers._walk_doc_", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 269, "end_line": 292, "span_ids": ["TocTreeCollector.assign_figure_numbers", "setup"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTreeCollector(EnvironmentCollector):\n\n def assign_figure_numbers(self, env: BuildEnvironment) -> List[str]:\n # ... other code\n\n def _walk_doc(docname: str, secnum: Tuple[int, ...]) -> None:\n if docname not in assigned:\n assigned.add(docname)\n doctree = env.get_doctree(docname)\n _walk_doctree(docname, doctree, secnum)\n\n if env.config.numfig:\n _walk_doc(env.config.root_doc, tuple())\n for docname, fignums in env.toc_fignumbers.items():\n if fignums != old_fignumbers.get(docname):\n rewrite_needed.append(docname)\n\n return rewrite_needed\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_env_collector(TocTreeCollector)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/errors.py_BuildEnvironmentError_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/errors.py_BuildEnvironmentError_", "embedding": null, "metadata": {"file_path": "sphinx/errors.py", "file_name": "errors.py", "file_type": "text/x-python", "category": "implementation", "start_line": 68, "end_line": 125, "span_ids": ["NoUri", "DocumentError", "PycodeError", "PycodeError.__str__", "SphinxParallelError.__str__", "VersionRequirementError", "ThemeError", "SphinxParallelError", "ConfigError", "BuildEnvironmentError", "FiletypeNotFoundError"], "tokens": 297}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironmentError(SphinxError):\n \"\"\"BuildEnvironment error.\"\"\"\n category = 'BuildEnvironment error'\n\n\nclass ConfigError(SphinxError):\n \"\"\"Configuration error.\"\"\"\n category = 'Configuration error'\n\n\nclass DocumentError(SphinxError):\n \"\"\"Document error.\"\"\"\n category = 'Document error'\n\n\nclass ThemeError(SphinxError):\n \"\"\"Theme error.\"\"\"\n category = 'Theme error'\n\n\nclass VersionRequirementError(SphinxError):\n \"\"\"Incompatible Sphinx version error.\"\"\"\n category = 'Sphinx version error'\n\n\nclass SphinxParallelError(SphinxError):\n \"\"\"Sphinx parallel build error.\"\"\"\n\n category = 'Sphinx parallel build error'\n\n def __init__(self, message: str, traceback: Any) -> None:\n self.message = message\n self.traceback = traceback\n\n def __str__(self) -> str:\n return self.message\n\n\nclass PycodeError(Exception):\n \"\"\"Pycode Python source code analyser error.\"\"\"\n\n def __str__(self) -> str:\n res = self.args[0]\n if len(self.args) > 1:\n res += ' (exception was: %r)' % self.args[1]\n return res\n\n\nclass NoUri(Exception):\n \"\"\"Raised by builder.get_relative_uri() or from missing-reference handlers\n if there is no URI available.\"\"\"\n pass\n\n\nclass FiletypeNotFoundError(Exception):\n \"\"\"Raised by get_filetype() if a filename matches no source suffix.\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/events.py_EventManager_EventManager.disconnect.for_listeners_in_self_lis.for_listener_in_listeners.if_listener_id_listene.listeners_remove_listener": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/events.py_EventManager_EventManager.disconnect.for_listeners_in_self_lis.for_listener_in_listeners.if_listener_id_listene.listeners_remove_listener", "embedding": null, "metadata": {"file_path": "sphinx/events.py", "file_name": "events.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 78, "span_ids": ["EventManager.connect", "EventManager", "EventManager.add", "EventManager.disconnect"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EventManager:\n \"\"\"Event manager for Sphinx.\"\"\"\n\n def __init__(self, app: \"Sphinx\") -> None:\n self.app = app\n self.events = core_events.copy()\n self.listeners: Dict[str, List[EventListener]] = defaultdict(list)\n self.next_listener_id = 0\n\n def add(self, name: str) -> None:\n \"\"\"Register a custom Sphinx event.\"\"\"\n if name in self.events:\n raise ExtensionError(__('Event %r already present') % name)\n self.events[name] = ''\n\n def connect(self, name: str, callback: Callable, priority: int) -> int:\n \"\"\"Connect a handler to specific event.\"\"\"\n if name not in self.events:\n raise ExtensionError(__('Unknown event name: %s') % name)\n\n listener_id = self.next_listener_id\n self.next_listener_id += 1\n self.listeners[name].append(EventListener(listener_id, callback, priority))\n return listener_id\n\n def disconnect(self, listener_id: int) -> None:\n \"\"\"Disconnect a handler.\"\"\"\n for listeners in self.listeners.values():\n for listener in listeners[:]:\n if listener.id == listener_id:\n listeners.remove(listener)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/events.py_EventManager.emit_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/events.py_EventManager.emit_", "embedding": null, "metadata": {"file_path": "sphinx/events.py", "file_name": "events.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 116, "span_ids": ["EventManager.emit", "EventManager.emit_firstresult"], "tokens": 320}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EventManager:\n\n def emit(self, name: str, *args: Any,\n allowed_exceptions: Tuple[Type[Exception], ...] = ()) -> List:\n \"\"\"Emit a Sphinx event.\"\"\"\n try:\n logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])\n except Exception:\n # not every object likes to be repr()'d (think\n # random stuff coming via autodoc)\n pass\n\n results = []\n listeners = sorted(self.listeners[name], key=attrgetter(\"priority\"))\n for listener in listeners:\n try:\n results.append(listener.handler(self.app, *args))\n except allowed_exceptions:\n # pass through the errors specified as *allowed_exceptions*\n raise\n except SphinxError:\n raise\n except Exception as exc:\n modname = safe_getattr(listener.handler, '__module__', None)\n raise ExtensionError(__(\"Handler %r for event %r threw an exception\") %\n (listener.handler, name), exc, modname=modname) from exc\n return results\n\n def emit_firstresult(self, name: str, *args: Any,\n allowed_exceptions: Tuple[Type[Exception], ...] = ()) -> Any:\n \"\"\"Emit a Sphinx event and returns first result.\n\n This returns the result of the first handler that doesn't return ``None``.\n \"\"\"\n for result in self.emit(name, *args, allowed_exceptions=allowed_exceptions):\n if result is not None:\n return result\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/__init__.py__", "embedding": null, "metadata": {"file_path": "sphinx/ext/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 9}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Contains Sphinx features not activated by default.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_argparse_is_packagedir.return.any_f_for_f_in_files_if_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_argparse_is_packagedir.return.any_f_for_f_in_files_if_i", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 12, "end_line": 68, "span_ids": ["module_join", "impl", "is_packagedir", "imports", "is_initpy"], "tokens": 402}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport glob\nimport locale\nimport os\nimport sys\nfrom copy import copy\nfrom fnmatch import fnmatch\nfrom importlib.machinery import EXTENSION_SUFFIXES\nfrom os import path\nfrom typing import Any, Generator, List, Tuple\n\nimport sphinx.locale\nfrom sphinx import __display_version__, package_dir\nfrom sphinx.cmd.quickstart import EXTENSIONS\nfrom sphinx.locale import __\nfrom sphinx.util.osutil import FileAvoidWrite, ensuredir\nfrom sphinx.util.template import ReSTRenderer\n\n# automodule options\nif 'SPHINX_APIDOC_OPTIONS' in os.environ:\n OPTIONS = os.environ['SPHINX_APIDOC_OPTIONS'].split(',')\nelse:\n OPTIONS = [\n 'members',\n 'undoc-members',\n # 'inherited-members', # disabled because there's a bug in sphinx\n 'show-inheritance',\n ]\n\nPY_SUFFIXES = ('.py', '.pyx') + tuple(EXTENSION_SUFFIXES)\n\ntemplate_dir = path.join(package_dir, 'templates', 'apidoc')\n\n\ndef is_initpy(filename: str) -> bool:\n \"\"\"Check *filename* is __init__ file or not.\"\"\"\n basename = path.basename(filename)\n for suffix in sorted(PY_SUFFIXES, key=len, reverse=True):\n if basename == '__init__' + suffix:\n return True\n else:\n return False\n\n\ndef module_join(*modnames: str) -> str:\n \"\"\"Join module names with dots.\"\"\"\n return '.'.join(filter(None, modnames))\n\n\ndef is_packagedir(dirname: str = None, files: List[str] = None) -> bool:\n \"\"\"Check given *files* contains __init__ file.\"\"\"\n if files is None and dirname is None:\n return False\n\n if files is None:\n files = os.listdir(dirname)\n return any(f for f in files if is_initpy(f))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_write_file_write_file.if_not_opts_force_and_pat.else_.with_FileAvoidWrite_fname.f_write_text_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_write_file_write_file.if_not_opts_force_and_pat.else_.with_FileAvoidWrite_fname.f_write_text_", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 93, "end_line": 109, "span_ids": ["write_file"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def write_file(name: str, text: str, opts: Any) -> None:\n \"\"\"Write the output file for module/package <name>.\"\"\"\n quiet = getattr(opts, 'quiet', None)\n\n fname = path.join(opts.destdir, '%s.%s' % (name, opts.suffix))\n if opts.dryrun:\n if not quiet:\n print(__('Would create file %s.') % fname)\n return\n if not opts.force and path.isfile(fname):\n if not quiet:\n print(__('File %s already exists, skipping.') % fname)\n else:\n if not quiet:\n print(__('Creating file %s.') % fname)\n with FileAvoidWrite(fname) as f:\n f.write(text)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_create_module_file_create_module_file.write_file_qualname_text": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_create_module_file_create_module_file.write_file_qualname_text", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 132, "end_line": 147, "span_ids": ["create_module_file"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def create_module_file(package: str, basename: str, opts: Any,\n user_template_dir: str = None) -> None:\n \"\"\"Build the text of the file and write the file.\"\"\"\n options = copy(OPTIONS)\n if opts.includeprivate and 'private-members' not in options:\n options.append('private-members')\n\n qualname = module_join(package, basename)\n context = {\n 'show_headings': not opts.noheadings,\n 'basename': basename,\n 'qualname': qualname,\n 'automodule_options': options,\n }\n text = ReSTRenderer([user_template_dir, template_dir]).render('module.rst_t', context)\n write_file(qualname, text, opts)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_create_package_file_create_package_file.if_submodules_and_opts_se.for_submodule_in_submodul.create_module_file_None_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_create_package_file_create_package_file.if_submodules_and_opts_se.for_submodule_in_submodul.create_module_file_None_", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 150, "end_line": 185, "span_ids": ["create_package_file"], "tokens": 403}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def create_package_file(root: str, master_package: str, subroot: str, py_files: List[str],\n opts: Any, subs: List[str], is_namespace: bool,\n excludes: List[str] = [], user_template_dir: str = None) -> None:\n \"\"\"Build the text of the file and write the file.\"\"\"\n # build a list of sub packages (directories containing an __init__ file)\n subpackages = [module_join(master_package, subroot, pkgname)\n for pkgname in subs\n if not is_skipped_package(path.join(root, pkgname), opts, excludes)]\n # build a list of sub modules\n submodules = [sub.split('.')[0] for sub in py_files\n if not is_skipped_module(path.join(root, sub), opts, excludes) and\n not is_initpy(sub)]\n submodules = [module_join(master_package, subroot, modname)\n for modname in submodules]\n options = copy(OPTIONS)\n if opts.includeprivate and 'private-members' not in options:\n options.append('private-members')\n\n pkgname = module_join(master_package, subroot)\n context = {\n 'pkgname': pkgname,\n 'subpackages': subpackages,\n 'submodules': submodules,\n 'is_namespace': is_namespace,\n 'modulefirst': opts.modulefirst,\n 'separatemodules': opts.separatemodules,\n 'automodule_options': options,\n 'show_headings': not opts.noheadings,\n 'maxdepth': opts.maxdepth,\n }\n text = ReSTRenderer([user_template_dir, template_dir]).render('package.rst_t', context)\n write_file(pkgname, text, opts)\n\n if submodules and opts.separatemodules:\n for submodule in submodules:\n create_module_file(None, submodule, opts, user_template_dir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_create_modules_toc_file_create_modules_toc_file.write_file_name_text_op": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_create_modules_toc_file_create_modules_toc_file.write_file_name_text_op", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 188, "end_line": 206, "span_ids": ["create_modules_toc_file"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def create_modules_toc_file(modules: List[str], opts: Any, name: str = 'modules',\n user_template_dir: str = None) -> None:\n \"\"\"Create the module's index.\"\"\"\n modules.sort()\n prev_module = ''\n for module in modules[:]:\n # look if the module is a subpackage and, if yes, ignore it\n if module.startswith(prev_module + '.'):\n modules.remove(module)\n else:\n prev_module = module\n\n context = {\n 'header': opts.header,\n 'maxdepth': opts.maxdepth,\n 'docnames': modules,\n }\n text = ReSTRenderer([user_template_dir, template_dir]).render('toc.rst_t', context)\n write_file(name, text, opts)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_is_skipped_package_is_skipped_module.if_not_path_exists_filena.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_is_skipped_package_is_skipped_module.if_not_path_exists_filena.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 236, "end_line": 264, "span_ids": ["is_skipped_package", "is_skipped_module"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def is_skipped_package(dirname: str, opts: Any, excludes: List[str] = []) -> bool:\n \"\"\"Check if we want to skip this module.\"\"\"\n if not path.isdir(dirname):\n return False\n\n files = glob.glob(path.join(dirname, '*.py'))\n regular_package = any(f for f in files if is_initpy(f))\n if not regular_package and not opts.implicit_namespaces:\n # *dirname* is not both a regular package and an implicit namespace pacage\n return True\n\n # Check there is some showable module inside package\n if all(is_excluded(path.join(dirname, f), excludes) for f in files):\n # all submodules are excluded\n return True\n else:\n return False\n\n\ndef is_skipped_module(filename: str, opts: Any, excludes: List[str]) -> bool:\n \"\"\"Check if we want to skip this module.\"\"\"\n if not path.exists(filename):\n # skip if the file doesn't exist\n return True\n elif path.basename(filename).startswith('_') and not opts.includeprivate:\n # skip if the module has a \"private\" name\n return True\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_recurse_tree_is_excluded.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_recurse_tree_is_excluded.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 301, "end_line": 364, "span_ids": ["is_excluded", "recurse_tree"], "tokens": 565}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def recurse_tree(rootpath: str, excludes: List[str], opts: Any,\n user_template_dir: str = None) -> List[str]:\n \"\"\"\n Look for every file in the directory tree and create the corresponding\n ReST files.\n \"\"\"\n implicit_namespaces = getattr(opts, 'implicit_namespaces', False)\n\n # check if the base directory is a package and get its name\n if is_packagedir(rootpath) or implicit_namespaces:\n root_package = rootpath.split(path.sep)[-1]\n else:\n # otherwise, the base is a directory with packages\n root_package = None\n\n toplevels = []\n for root, subs, files in walk(rootpath, excludes, opts):\n is_pkg = is_packagedir(None, files)\n is_namespace = not is_pkg and implicit_namespaces\n if is_pkg:\n for f in files[:]:\n if is_initpy(f):\n files.remove(f)\n files.insert(0, f)\n elif root != rootpath:\n # only accept non-package at toplevel unless using implicit namespaces\n if not implicit_namespaces:\n del subs[:]\n continue\n\n if is_pkg or is_namespace:\n # we are in a package with something to document\n if subs or len(files) > 1 or not is_skipped_package(root, opts):\n subpackage = root[len(rootpath):].lstrip(path.sep).\\\n replace(path.sep, '.')\n # if this is not a namespace or\n # a namespace and there is something there to document\n if not is_namespace or has_child_module(root, excludes, opts):\n create_package_file(root, root_package, subpackage,\n files, opts, subs, is_namespace, excludes,\n user_template_dir)\n toplevels.append(module_join(root_package, subpackage))\n else:\n # if we are at the root level, we don't require it to be a package\n assert root == rootpath and root_package is None\n for py_file in files:\n if not is_skipped_module(path.join(rootpath, py_file), opts, excludes):\n module = py_file.split('.')[0]\n create_module_file(root_package, module, opts, user_template_dir)\n toplevels.append(module)\n\n return toplevels\n\n\ndef is_excluded(root: str, excludes: List[str]) -> bool:\n \"\"\"Check if the directory is in the exclude list.\n\n Note: by having trailing slashes, we avoid common prefix issues, like\n e.g. an exclude \"foo\" also accidentally excluding \"foobar\".\n \"\"\"\n for exclude in excludes:\n if fnmatch(root, exclude):\n return True\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_get_parser_get_parser.parser_add_argument_s_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_get_parser_get_parser.parser_add_argument_s_", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 298, "end_line": 363, "span_ids": ["get_parser"], "tokens": 752}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_parser() -> argparse.ArgumentParser:\n parser = argparse.ArgumentParser(\n usage='%(prog)s [OPTIONS] -o <OUTPUT_PATH> <MODULE_PATH> '\n '[EXCLUDE_PATTERN, ...]',\n epilog=__('For more information, visit <https://www.sphinx-doc.org/>.'),\n description=__(\"\"\"\nLook recursively in <MODULE_PATH> for Python modules and packages and create\none reST file with automodule directives per package in the <OUTPUT_PATH>.\n\nThe <EXCLUDE_PATTERN>s can be file and/or directory patterns that will be\nexcluded from generation.\n\nNote: By default this script will not overwrite already created files.\"\"\"))\n\n parser.add_argument('--version', action='version', dest='show_version',\n version='%%(prog)s %s' % __display_version__)\n\n parser.add_argument('module_path',\n help=__('path to module to document'))\n parser.add_argument('exclude_pattern', nargs='*',\n help=__('fnmatch-style file and/or directory patterns '\n 'to exclude from generation'))\n\n parser.add_argument('-o', '--output-dir', action='store', dest='destdir',\n required=True,\n help=__('directory to place all output'))\n parser.add_argument('-q', action='store_true', dest='quiet',\n help=__('no output on stdout, just warnings on stderr'))\n parser.add_argument('-d', '--maxdepth', action='store', dest='maxdepth',\n type=int, default=4,\n help=__('maximum depth of submodules to show in the TOC '\n '(default: 4)'))\n parser.add_argument('-f', '--force', action='store_true', dest='force',\n help=__('overwrite existing files'))\n parser.add_argument('-l', '--follow-links', action='store_true',\n dest='followlinks', default=False,\n help=__('follow symbolic links. Powerful when combined '\n 'with collective.recipe.omelette.'))\n parser.add_argument('-n', '--dry-run', action='store_true', dest='dryrun',\n help=__('run the script without creating files'))\n parser.add_argument('-e', '--separate', action='store_true',\n dest='separatemodules',\n help=__('put documentation for each module on its own page'))\n parser.add_argument('-P', '--private', action='store_true',\n dest='includeprivate',\n help=__('include \"_private\" modules'))\n parser.add_argument('--tocfile', action='store', dest='tocfile', default='modules',\n help=__(\"filename of table of contents (default: modules)\"))\n parser.add_argument('-T', '--no-toc', action='store_false', dest='tocfile',\n help=__(\"don't create a table of contents file\"))\n parser.add_argument('-E', '--no-headings', action='store_true',\n dest='noheadings',\n help=__(\"don't create headings for the module/package \"\n \"packages (e.g. when the docstrings already \"\n \"contain them)\"))\n parser.add_argument('-M', '--module-first', action='store_true',\n dest='modulefirst',\n help=__('put module documentation before submodule '\n 'documentation'))\n parser.add_argument('--implicit-namespaces', action='store_true',\n dest='implicit_namespaces',\n help=__('interpret module paths according to PEP-0420 '\n 'implicit namespaces specification'))\n parser.add_argument('-s', '--suffix', action='store', dest='suffix',\n default='rst',\n help=__('file suffix (default: rst)'))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_get_parser.parser_add_argument_F__get_parser.return.parser": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_get_parser.parser_add_argument_F__get_parser.return.parser", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 413, "end_line": 441, "span_ids": ["get_parser"], "tokens": 374}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_parser() -> argparse.ArgumentParser:\n # ... other code\n parser.add_argument('-F', '--full', action='store_true', dest='full',\n help=__('generate a full project with sphinx-quickstart'))\n parser.add_argument('-a', '--append-syspath', action='store_true',\n dest='append_syspath',\n help=__('append module_path to sys.path, used when --full is given'))\n parser.add_argument('-H', '--doc-project', action='store', dest='header',\n help=__('project name (default: root module name)'))\n parser.add_argument('-A', '--doc-author', action='store', dest='author',\n help=__('project author(s), used when --full is given'))\n parser.add_argument('-V', '--doc-version', action='store', dest='version',\n help=__('project version, used when --full is given'))\n parser.add_argument('-R', '--doc-release', action='store', dest='release',\n help=__('project release, used when --full is given, '\n 'defaults to --doc-version'))\n\n group = parser.add_argument_group(__('extension options'))\n group.add_argument('--extensions', metavar='EXTENSIONS', dest='extensions',\n action='append', help=__('enable arbitrary extensions'))\n for ext in EXTENSIONS:\n group.add_argument('--ext-%s' % ext, action='append_const',\n const='sphinx.ext.%s' % ext, dest='extensions',\n help=__('enable %s extension') % ext)\n\n group = parser.add_argument_group(__('Project templating'))\n group.add_argument('-t', '--templatedir', metavar='TEMPLATEDIR',\n dest='templatedir',\n help=__('template directory for template files'))\n\n return parser", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_main_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_main_", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 395, "end_line": 473, "span_ids": ["main", "impl:11"], "tokens": 606}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def main(argv: List[str] = sys.argv[1:]) -> int:\n \"\"\"Parse and check the command line arguments.\"\"\"\n sphinx.locale.setlocale(locale.LC_ALL, '')\n sphinx.locale.init_console(os.path.join(package_dir, 'locale'), 'sphinx')\n\n parser = get_parser()\n args = parser.parse_args(argv)\n\n rootpath = path.abspath(args.module_path)\n\n # normalize opts\n\n if args.header is None:\n args.header = rootpath.split(path.sep)[-1]\n if args.suffix.startswith('.'):\n args.suffix = args.suffix[1:]\n if not path.isdir(rootpath):\n print(__('%s is not a directory.') % rootpath, file=sys.stderr)\n sys.exit(1)\n if not args.dryrun:\n ensuredir(args.destdir)\n excludes = [path.abspath(exclude) for exclude in args.exclude_pattern]\n modules = recurse_tree(rootpath, excludes, args, args.templatedir)\n\n if args.full:\n from sphinx.cmd import quickstart as qs\n modules.sort()\n prev_module = ''\n text = ''\n for module in modules:\n if module.startswith(prev_module + '.'):\n continue\n prev_module = module\n text += ' %s\\n' % module\n d = {\n 'path': args.destdir,\n 'sep': False,\n 'dot': '_',\n 'project': args.header,\n 'author': args.author or 'Author',\n 'version': args.version or '',\n 'release': args.release or args.version or '',\n 'suffix': '.' + args.suffix,\n 'master': 'index',\n 'epub': True,\n 'extensions': ['sphinx.ext.autodoc', 'sphinx.ext.viewcode',\n 'sphinx.ext.todo'],\n 'makefile': True,\n 'batchfile': True,\n 'make_mode': True,\n 'mastertocmaxdepth': args.maxdepth,\n 'mastertoctree': text,\n 'language': 'en',\n 'module_path': rootpath,\n 'append_syspath': args.append_syspath,\n }\n if args.extensions:\n d['extensions'].extend(args.extensions)\n if args.quiet:\n d['quiet'] = True\n\n for ext in d['extensions'][:]:\n if ',' in ext:\n d['extensions'].remove(ext)\n d['extensions'].extend(ext.split(','))\n\n if not args.dryrun:\n qs.generate(d, silent=True, overwrite=args.force,\n templatedir=args.templatedir)\n elif args.tocfile:\n create_modules_toc_file(modules, args, args.tocfile, args.templatedir)\n\n return 0\n\n\n# So program can be started with \"python -m sphinx.apidoc ...\"\nif __name__ == \"__main__\":\n main()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter_Documenter.add_line.if_line_strip_not_a.else_.self_directive_result_app": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter_Documenter.add_line.if_line_strip_not_a.else_.self_directive_result_app", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 294, "end_line": 370, "span_ids": ["Documenter.add_line", "Documenter", "Documenter.get_attr", "Documenter.__init__", "Documenter.documenters", "Documenter.can_document_member"], "tokens": 751}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n \"\"\"\n A Documenter knows how to autodocument a single object type. When\n registered with the AutoDirective, it will be used to document objects\n of that type when needed by autodoc.\n\n Its *objtype* attribute selects what auto directive it is assigned to\n (the directive name is 'auto' + objtype), and what directive it generates\n by default, though that can be overridden by an attribute called\n *directivetype*.\n\n A Documenter has an *option_spec* that works like a docutils directive's;\n in fact, it will be used to parse an auto directive's options that matches\n the Documenter.\n \"\"\"\n #: name by which the directive is called (auto...) and the default\n #: generated directive name\n objtype = 'object'\n #: indentation by which to indent the directive content\n content_indent = ' '\n #: priority if multiple documenters return True from can_document_member\n priority = 0\n #: order if autodoc_member_order is set to 'groupwise'\n member_order = 0\n #: true if the generated content may contain titles\n titles_allowed = False\n\n option_spec: OptionSpec = {\n 'noindex': bool_option\n }\n\n def get_attr(self, obj: Any, name: str, *defargs: Any) -> Any:\n \"\"\"getattr() override for types such as Zope interfaces.\"\"\"\n return autodoc_attrgetter(self.env.app, obj, name, *defargs)\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n \"\"\"Called to see if a member can be documented by this Documenter.\"\"\"\n raise NotImplementedError('must be implemented in subclasses')\n\n def __init__(self, directive: \"DocumenterBridge\", name: str, indent: str = '') -> None:\n self.directive = directive\n self.config: Config = directive.env.config\n self.env: BuildEnvironment = directive.env\n self.options = directive.genopt\n self.name = name\n self.indent = indent\n # the module and object path within the module, and the fully\n # qualified name (all set after resolve_name succeeds)\n self.modname: str = None\n self.module: ModuleType = None\n self.objpath: List[str] = None\n self.fullname: str = None\n # extra signature items (arguments and return annotation,\n # also set after resolve_name succeeds)\n self.args: str = None\n self.retann: str = None\n # the object to document (set after import_object succeeds)\n self.object: Any = None\n self.object_name: str = None\n # the parent/owner of the object to document\n self.parent: Any = None\n # the module analyzer to get at attribute docs, or None\n self.analyzer: ModuleAnalyzer = None\n\n @property\n def documenters(self) -> Dict[str, Type[\"Documenter\"]]:\n \"\"\"Returns registered Documenter classes\"\"\"\n return self.env.app.registry.documenters\n\n def add_line(self, line: str, source: str, *lineno: int) -> None:\n \"\"\"Append one line of generated reST to the output.\"\"\"\n if line.strip(): # not a blank line\n self.directive.result.append(self.indent + line, source, *lineno)\n else:\n self.directive.result.append('', source, *lineno)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.resolve_name_Documenter.resolve_name.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.resolve_name_Documenter.resolve_name.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 278, "end_line": 287, "span_ids": ["Documenter.resolve_name"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def resolve_name(self, modname: str, parents: Any, path: str, base: Any\n ) -> Tuple[str, List[str]]:\n \"\"\"Resolve the module and name of the object to document given by the\n arguments and the current module/class.\n\n Must return a pair of the module name and a chain of attributes; for\n example, it would return ``('zipfile', ['ZipFile', 'open'])`` for the\n ``zipfile.ZipFile.open`` method.\n \"\"\"\n raise NotImplementedError('must be implemented in subclasses')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.parse_name_Documenter.parse_name.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.parse_name_Documenter.parse_name.return.True", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 383, "end_line": 418, "span_ids": ["Documenter.parse_name"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def parse_name(self) -> bool:\n \"\"\"Determine what module to import and what attribute to document.\n\n Returns True and sets *self.modname*, *self.objpath*, *self.fullname*,\n *self.args* and *self.retann* if parsing and resolving was successful.\n \"\"\"\n # first, parse the definition -- auto directives for classes and\n # functions can contain a signature which is then used instead of\n # an autogenerated one\n try:\n matched = py_ext_sig_re.match(self.name)\n explicit_modname, path, base, args, retann = matched.groups()\n except AttributeError:\n logger.warning(__('invalid signature for auto%s (%r)') % (self.objtype, self.name),\n type='autodoc')\n return False\n\n # support explicit module and class name separation via ::\n if explicit_modname is not None:\n modname = explicit_modname[:-2]\n parents = path.rstrip('.').split('.') if path else []\n else:\n modname = None\n parents = []\n\n with mock(self.config.autodoc_mock_imports):\n self.modname, self.objpath = self.resolve_name(modname, parents, path, base)\n\n if not self.modname:\n return False\n\n self.args = args\n self.retann = retann\n self.fullname = ((self.modname or '') +\n ('.' + '.'.join(self.objpath) if self.objpath else ''))\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.format_signature_Documenter.format_signature.if_args_is_not_None_.else_.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.format_signature_Documenter.format_signature.if_args_is_not_None_.else_.return._", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 410, "end_line": 443, "span_ids": ["Documenter.format_signature"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def format_signature(self, **kwargs: Any) -> str:\n \"\"\"Format the signature (arguments and return annotation) of the object.\n\n Let the user process it via the ``autodoc-process-signature`` event.\n \"\"\"\n if self.args is not None:\n # signature given explicitly\n args = \"(%s)\" % self.args\n retann = self.retann\n else:\n # try to introspect the signature\n try:\n retann = None\n args = self._call_format_args(**kwargs)\n if args:\n matched = re.match(r'^(\\(.*\\))\\s+->\\s+(.*)$', args)\n if matched:\n args = matched.group(1)\n retann = matched.group(2)\n except Exception as exc:\n logger.warning(__('error while formatting arguments for %s: %s'),\n self.fullname, exc, type='autodoc')\n args = None\n\n result = self.env.events.emit_firstresult('autodoc-process-signature',\n self.objtype, self.fullname,\n self.object, self.options, args, retann)\n if result:\n args, retann = result\n\n if args is not None:\n return args + ((' -> %s' % retann) if retann else '')\n else:\n return ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.add_directive_header_Documenter.add_directive_header.if_self_objpath_.self_add_line_module": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.add_directive_header_Documenter.add_directive_header.if_self_objpath_.self_add_line_module", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 417, "end_line": 437, "span_ids": ["Documenter.add_directive_header"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def add_directive_header(self, sig: str) -> None:\n \"\"\"Add the directive header and options to the generated content.\"\"\"\n domain = getattr(self, 'domain', 'py')\n directive = getattr(self, 'directivetype', self.objtype)\n name = self.format_name()\n sourcename = self.get_sourcename()\n\n # one signature per line, indented by column\n prefix = '.. %s:%s:: ' % (domain, directive)\n for i, sig_line in enumerate(sig.split(\"\\n\")):\n self.add_line('%s%s%s' % (prefix, name, sig_line),\n sourcename)\n if i == 0:\n prefix = \" \" * len(prefix)\n\n if self.options.noindex:\n self.add_line(' :noindex:', sourcename)\n if self.objpath:\n # Be explicit about the module, this is necessary since .. class::\n # etc. don't support a prepended module name\n self.add_line(' :module: %s' % self.modname, sourcename)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_doc_Documenter.get_doc.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_doc_Documenter.get_doc.return._", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 550, "end_line": 565, "span_ids": ["Documenter.get_doc"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n \"\"\"Decode and return lines of the docstring(s) for the object.\n\n When it returns None, autodoc-process-docstring will not be called for this\n object.\n \"\"\"\n if ignore is not None:\n warnings.warn(\"The 'ignore' argument to autodoc.%s.get_doc() is deprecated.\"\n % self.__class__.__name__,\n RemovedInSphinx50Warning, stacklevel=2)\n docstring = getdoc(self.object, self.get_attr, self.config.autodoc_inherit_docstrings,\n self.parent, self.object_name)\n if docstring:\n tab_width = self.directive.state.document.settings.tab_width\n return [prepare_docstring(docstring, ignore, tab_width)]\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.add_content_Documenter.add_content.if_more_content_.for_line_src_in_zip_more.self_add_line_line_src_0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.add_content_Documenter.add_content.if_more_content_.for_line_src_in_zip_more.self_add_line_line_src_0", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 591, "end_line": 632, "span_ids": ["Documenter.add_content"], "tokens": 409}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def add_content(self, more_content: Optional[StringList], no_docstring: bool = False\n ) -> None:\n \"\"\"Add content from docstrings, attribute documentation and user.\"\"\"\n if no_docstring:\n warnings.warn(\"The 'no_docstring' argument to %s.add_content() is deprecated.\"\n % self.__class__.__name__,\n RemovedInSphinx50Warning, stacklevel=2)\n\n # set sourcename and add content from attribute documentation\n sourcename = self.get_sourcename()\n if self.analyzer:\n attr_docs = self.analyzer.find_attr_docs()\n if self.objpath:\n key = ('.'.join(self.objpath[:-1]), self.objpath[-1])\n if key in attr_docs:\n no_docstring = True\n # make a copy of docstring for attributes to avoid cache\n # the change of autodoc-process-docstring event.\n docstrings = [list(attr_docs[key])]\n\n for i, line in enumerate(self.process_doc(docstrings)):\n self.add_line(line, sourcename, i)\n\n # add content from docstrings\n if not no_docstring:\n docstrings = self.get_doc()\n if docstrings is None:\n # Do not call autodoc-process-docstring on get_doc() returns None.\n pass\n else:\n if not docstrings:\n # append at least a dummy docstring, so that the event\n # autodoc-process-docstring is fired and can add some\n # content if desired\n docstrings.append([])\n for i, line in enumerate(self.process_doc(docstrings)):\n self.add_line(line, sourcename, i)\n\n # add additional content (e.g. from document), if present\n if more_content:\n for line, src in zip(more_content.data, more_content.items):\n self.add_line(line, src[0], src[1])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.filter_members_Documenter.filter_members._process_members_and_det": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.filter_members_Documenter.filter_members._process_members_and_det", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 662, "end_line": 702, "span_ids": ["Documenter.filter_members"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def filter_members(self, members: ObjectMembers, want_all: bool\n ) -> List[Tuple[str, Any, bool]]:\n \"\"\"Filter the given member list.\n\n Members are skipped if\n\n - they are private (except if given explicitly or the private-members\n option is set)\n - they are special methods (except if given explicitly or the\n special-members option is set)\n - they are undocumented (except if the undoc-members option is set)\n\n The user can override the skipping decision by connecting to the\n ``autodoc-skip-member`` event.\n \"\"\"\n def is_filtered_inherited_member(name: str, obj: Any) -> bool:\n if inspect.isclass(self.object):\n for cls in self.object.__mro__:\n if cls.__name__ == self.options.inherited_members and cls != self.object:\n # given member is a member of specified *super class*\n return True\n elif name in cls.__dict__:\n return False\n elif name in self.get_attr(cls, '__annotations__', {}):\n return False\n elif isinstance(obj, ObjectMember) and obj.class_ is cls:\n return False\n\n return False\n\n ret = []\n\n # search for members in source code too\n namespace = '.'.join(self.objpath) # will be empty for modules\n\n if self.analyzer:\n attr_docs = self.analyzer.find_attr_docs()\n else:\n attr_docs = {}\n\n # process members and determine which to skip\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.document_members_Documenter.document_members.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.document_members_Documenter.document_members.None_3", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 820, "end_line": 863, "span_ids": ["Documenter.document_members"], "tokens": 451}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def document_members(self, all_members: bool = False) -> None:\n \"\"\"Generate reST for member documentation.\n\n If *all_members* is True, document all members, else those given by\n *self.options.members*.\n \"\"\"\n # set current namespace for finding members\n self.env.temp_data['autodoc:module'] = self.modname\n if self.objpath:\n self.env.temp_data['autodoc:class'] = self.objpath[0]\n\n want_all = (all_members or\n self.options.inherited_members or\n self.options.members is ALL)\n # find out which members are documentable\n members_check_module, members = self.get_object_members(want_all)\n\n # document non-skipped members\n memberdocumenters: List[Tuple[Documenter, bool]] = []\n for (mname, member, isattr) in self.filter_members(members, want_all):\n classes = [cls for cls in self.documenters.values()\n if cls.can_document_member(member, mname, isattr, self)]\n if not classes:\n # don't know how to document this member\n continue\n # prefer the documenter with the highest priority\n classes.sort(key=lambda cls: cls.priority)\n # give explicitly separated module name, so that members\n # of inner classes can be documented\n full_mname = self.modname + '::' + '.'.join(self.objpath + [mname])\n documenter = classes[-1](self.directive, full_mname, self.indent)\n memberdocumenters.append((documenter, isattr))\n\n member_order = self.options.member_order or self.config.autodoc_member_order\n memberdocumenters = self.sort_members(memberdocumenters, member_order)\n\n for documenter, isattr in memberdocumenters:\n documenter.generate(\n all_members=True, real_modname=self.real_modname,\n check_module=members_check_module and not isattr)\n\n # reset current objects\n self.env.temp_data['autodoc:module'] = None\n self.env.temp_data['autodoc:class'] = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.generate_Documenter.generate.self_document_members_all": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.generate_Documenter.generate.self_document_members_all", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 890, "end_line": 981, "span_ids": ["Documenter.generate"], "tokens": 857}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def generate(self, more_content: Optional[StringList] = None, real_modname: str = None,\n check_module: bool = False, all_members: bool = False) -> None:\n \"\"\"Generate reST for the object given by *self.name*, and possibly for\n its members.\n\n If *more_content* is given, include that content. If *real_modname* is\n given, use that module name to find attribute docs. If *check_module* is\n True, only generate if the object is defined in the module name it is\n imported from. If *all_members* is True, document all members.\n \"\"\"\n if not self.parse_name():\n # need a module to import\n logger.warning(\n __('don\\'t know which module to import for autodocumenting '\n '%r (try placing a \"module\" or \"currentmodule\" directive '\n 'in the document, or giving an explicit module name)') %\n self.name, type='autodoc')\n return\n\n # now, import the module and get object to document\n if not self.import_object():\n return\n\n # If there is no real module defined, figure out which to use.\n # The real module is used in the module analyzer to look up the module\n # where the attribute documentation would actually be found in.\n # This is used for situations where you have a module that collects the\n # functions and classes of internal submodules.\n guess_modname = self.get_real_modname()\n self.real_modname: str = real_modname or guess_modname\n\n # try to also get a source code analyzer for attribute docs\n try:\n self.analyzer = ModuleAnalyzer.for_module(self.real_modname)\n # parse right now, to get PycodeErrors on parsing (results will\n # be cached anyway)\n self.analyzer.find_attr_docs()\n except PycodeError as exc:\n logger.debug('[autodoc] module analyzer failed: %s', exc)\n # no source file -- e.g. for builtin and C modules\n self.analyzer = None\n # at least add the module.__file__ as a dependency\n if hasattr(self.module, '__file__') and self.module.__file__:\n self.directive.record_dependencies.add(self.module.__file__)\n else:\n self.directive.record_dependencies.add(self.analyzer.srcname)\n\n if self.real_modname != guess_modname:\n # Add module to dependency list if target object is defined in other module.\n try:\n analyzer = ModuleAnalyzer.for_module(guess_modname)\n self.directive.record_dependencies.add(analyzer.srcname)\n except PycodeError:\n pass\n\n docstrings: List[str] = sum(self.get_doc() or [], [])\n if ismock(self.object) and not docstrings:\n logger.warning(__('A mocked object is detected: %r'),\n self.name, type='autodoc')\n\n # check __module__ of object (for members not given explicitly)\n if check_module:\n if not self.check_module():\n return\n\n sourcename = self.get_sourcename()\n\n # make sure that the result starts with an empty line. This is\n # necessary for some situations where another directive preprocesses\n # reST and no starting newline is present\n self.add_line('', sourcename)\n\n # format the object's signature, if any\n try:\n sig = self.format_signature()\n except Exception as exc:\n logger.warning(__('error while formatting signature for %s: %s'),\n self.fullname, exc, type='autodoc')\n return\n\n # generate the directive header and options, if applicable\n self.add_directive_header(sig)\n self.add_line('', sourcename)\n\n # e.g. the module directive doesn't have content\n self.indent += self.content_indent\n\n # add all content (from docstrings, attribute docs etc.)\n self.add_content(more_content)\n\n # document members, if possible\n self.document_members(all_members)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter_ModuleDocumenter.parse_name.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter_ModuleDocumenter.parse_name.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 984, "end_line": 1027, "span_ids": ["ModuleDocumenter.parse_name", "ModuleDocumenter.resolve_name", "ModuleDocumenter", "ModuleDocumenter.can_document_member"], "tokens": 387}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleDocumenter(Documenter):\n \"\"\"\n Specialized Documenter subclass for modules.\n \"\"\"\n objtype = 'module'\n content_indent = ''\n titles_allowed = True\n\n option_spec: OptionSpec = {\n 'members': members_option, 'undoc-members': bool_option,\n 'noindex': bool_option, 'inherited-members': inherited_members_option,\n 'show-inheritance': bool_option, 'synopsis': identity,\n 'platform': identity, 'deprecated': bool_option,\n 'member-order': member_order_option, 'exclude-members': exclude_members_option,\n 'private-members': members_option, 'special-members': members_option,\n 'imported-members': bool_option, 'ignore-module-all': bool_option,\n 'no-value': bool_option,\n }\n\n def __init__(self, *args: Any) -> None:\n super().__init__(*args)\n merge_members_option(self.options)\n self.__all__: Optional[Sequence[str]] = None\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n # don't document submodules automatically\n return False\n\n def resolve_name(self, modname: str, parents: Any, path: str, base: Any\n ) -> Tuple[str, List[str]]:\n if modname is not None:\n logger.warning(__('\"::\" in automodule name doesn\\'t make sense'),\n type='autodoc')\n return (path or '') + base, []\n\n def parse_name(self) -> bool:\n ret = super().parse_name()\n if self.args or self.retann:\n logger.warning(__('signature arguments or return annotation '\n 'given for automodule %s') % self.fullname,\n type='autodoc')\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.add_directive_header_ModuleDocumenter.add_directive_header.if_self_options_deprecate.self_add_line_deprec": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.add_directive_header_ModuleDocumenter.add_directive_header.if_self_options_deprecate.self_add_line_deprec", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 850, "end_line": 861, "span_ids": ["ModuleDocumenter.add_directive_header"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleDocumenter(Documenter):\n\n def add_directive_header(self, sig: str) -> None:\n Documenter.add_directive_header(self, sig)\n\n sourcename = self.get_sourcename()\n\n # add some module-specific options\n if self.options.synopsis:\n self.add_line(' :synopsis: ' + self.options.synopsis, sourcename)\n if self.options.platform:\n self.add_line(' :platform: ' + self.options.platform, sourcename)\n if self.options.deprecated:\n self.add_line(' :deprecated:', sourcename)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleLevelDocumenter_ModuleLevelDocumenter.resolve_name.return.modname_parents_base_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleLevelDocumenter_ModuleLevelDocumenter.resolve_name.return.modname_parents_base_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 972, "end_line": 990, "span_ids": ["ModuleLevelDocumenter", "ModuleLevelDocumenter.resolve_name"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleLevelDocumenter(Documenter):\n \"\"\"\n Specialized Documenter subclass for objects on module level (functions,\n classes, data/constants).\n \"\"\"\n def resolve_name(self, modname: str, parents: Any, path: str, base: Any\n ) -> Tuple[str, List[str]]:\n if modname is None:\n if path:\n modname = path.rstrip('.')\n else:\n # if documenting a toplevel object without explicit module,\n # it can be contained in another auto directive ...\n modname = self.env.temp_data.get('autodoc:module')\n # ... or in the scope of a module directive\n if not modname:\n modname = self.env.ref_context.get('py:module')\n # ... else, it stays None, which means invalid\n return modname, parents + [base]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassLevelDocumenter_ClassLevelDocumenter.resolve_name.return.modname_parents_base_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassLevelDocumenter_ClassLevelDocumenter.resolve_name.return.modname_parents_base_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 993, "end_line": 1023, "span_ids": ["ClassLevelDocumenter", "ClassLevelDocumenter.resolve_name"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassLevelDocumenter(Documenter):\n \"\"\"\n Specialized Documenter subclass for objects on class level (methods,\n attributes).\n \"\"\"\n def resolve_name(self, modname: str, parents: Any, path: str, base: Any\n ) -> Tuple[str, List[str]]:\n if modname is None:\n if path:\n mod_cls = path.rstrip('.')\n else:\n mod_cls = None\n # if documenting a class-level object without path,\n # there must be a current class, either from a parent\n # auto directive ...\n mod_cls = self.env.temp_data.get('autodoc:class')\n # ... or from a class directive\n if mod_cls is None:\n mod_cls = self.env.ref_context.get('py:class')\n # ... if still None, there's no way to know\n if mod_cls is None:\n return None, []\n modname, sep, cls = mod_cls.rpartition('.')\n parents = [cls]\n # if the module name is still missing, get it like above\n if not modname:\n modname = self.env.temp_data.get('autodoc:module')\n if not modname:\n modname = self.env.ref_context.get('py:module')\n # ... else, it stays None, which means invalid\n return modname, parents + [base]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DocstringSignatureMixin_DocstringSignatureMixin._find_signature.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DocstringSignatureMixin_DocstringSignatureMixin._find_signature.return.result", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1183, "end_line": 1240, "span_ids": ["DocstringSignatureMixin", "DocstringSignatureMixin._find_signature"], "tokens": 434}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocstringSignatureMixin:\n \"\"\"\n Mixin for FunctionDocumenter and MethodDocumenter to provide the\n feature of reading the signature from the docstring.\n \"\"\"\n _new_docstrings: List[List[str]] = None\n _signatures: List[str] = None\n\n def _find_signature(self) -> Tuple[str, str]:\n # candidates of the object name\n valid_names = [self.objpath[-1]] # type: ignore\n if isinstance(self, ClassDocumenter):\n valid_names.append('__init__')\n if hasattr(self.object, '__mro__'):\n valid_names.extend(cls.__name__ for cls in self.object.__mro__)\n\n docstrings = self.get_doc()\n if docstrings is None:\n return None, None\n self._new_docstrings = docstrings[:]\n self._signatures = []\n result = None\n for i, doclines in enumerate(docstrings):\n for j, line in enumerate(doclines):\n if not line:\n # no lines in docstring, no match\n break\n\n if line.endswith('\\\\'):\n line = line.rstrip('\\\\').rstrip()\n\n # match first line of docstring against signature RE\n match = py_ext_sig_re.match(line)\n if not match:\n break\n exmod, path, base, args, retann = match.groups()\n\n # the base name must match ours\n if base not in valid_names:\n break\n\n # re-prepare docstring to ignore more leading indentation\n tab_width = self.directive.state.document.settings.tab_width # type: ignore\n self._new_docstrings[i] = prepare_docstring('\\n'.join(doclines[j + 1:]),\n tabsize=tab_width)\n\n if result is None:\n # first signature\n result = args, retann\n else:\n # subsequent signatures\n self._signatures.append(\"(%s) -> %s\" % (args, retann))\n\n if result:\n # finish the loop when signature found\n break\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DocstringStripSignatureMixin_DocstringStripSignatureMixin.format_signature.return.super_format_signature_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DocstringStripSignatureMixin_DocstringStripSignatureMixin.format_signature.return.super_format_signature_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1223, "end_line": 1238, "span_ids": ["DocstringStripSignatureMixin.format_signature", "DocstringStripSignatureMixin"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocstringStripSignatureMixin(DocstringSignatureMixin):\n \"\"\"\n Mixin for AttributeDocumenter to provide the\n feature of stripping any function signature from the docstring.\n \"\"\"\n def format_signature(self, **kwargs: Any) -> str:\n if self.args is None and self.config.autodoc_docstring_signature: # type: ignore\n # only act if a signature is not explicitly given already, and if\n # the feature is enabled\n result = self._find_signature()\n if result is not None:\n # Discarding _args is a only difference with\n # DocstringSignatureMixin.format_signature.\n # Documenter.format_signature use self.args value to format.\n _args, self.retann = result\n return super().format_signature(**kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter_FunctionDocumenter.can_document_member.return._inspect_isfunction_membe": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter_FunctionDocumenter.can_document_member.return._inspect_isfunction_membe", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1042, "end_line": 1054, "span_ids": ["FunctionDocumenter", "FunctionDocumenter.can_document_member"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type: ignore\n \"\"\"\n Specialized Documenter subclass for functions.\n \"\"\"\n objtype = 'function'\n member_order = 30\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n # supports functions, builtins and bound methods exported at the module level\n return (inspect.isfunction(member) or inspect.isbuiltin(member) or\n (inspect.isroutine(member) and isinstance(parent, ModuleDocumenter)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter.format_args_FunctionDocumenter.add_directive_header.if_inspect_iscoroutinefun.self_add_line_async_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter.format_args_FunctionDocumenter.add_directive_header.if_inspect_iscoroutinefun.self_add_line_async_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1293, "end_line": 1323, "span_ids": ["FunctionDocumenter.add_directive_header", "FunctionDocumenter.document_members", "FunctionDocumenter.format_args"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def format_args(self, **kwargs: Any) -> str:\n if self.config.autodoc_typehints in ('none', 'description'):\n kwargs.setdefault('show_annotation', False)\n if self.config.autodoc_typehints_format == \"short\":\n kwargs.setdefault('unqualified_typehints', True)\n\n try:\n self.env.app.emit('autodoc-before-process-signature', self.object, False)\n sig = inspect.signature(self.object, type_aliases=self.config.autodoc_type_aliases)\n args = stringify_signature(sig, **kwargs)\n except TypeError as exc:\n logger.warning(__(\"Failed to get a function signature for %s: %s\"),\n self.fullname, exc)\n return None\n except ValueError:\n args = ''\n\n if self.config.strip_signature_backslash:\n # escape backslashes for reST\n args = args.replace('\\\\', '\\\\\\\\')\n return args\n\n def document_members(self, all_members: bool = False) -> None:\n pass\n\n def add_directive_header(self, sig: str) -> None:\n sourcename = self.get_sourcename()\n super().add_directive_header(sig)\n\n if inspect.iscoroutinefunction(self.object) or inspect.isasyncgenfunction(self.object):\n self.add_line(' :async:', sourcename)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter_ClassDocumenter.import_object.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter_ClassDocumenter.import_object.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1437, "end_line": 1484, "span_ids": ["ClassDocumenter", "ClassDocumenter.import_object", "ClassDocumenter.can_document_member"], "tokens": 404}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type: ignore\n \"\"\"\n Specialized Documenter subclass for classes.\n \"\"\"\n objtype = 'class'\n member_order = 20\n option_spec: OptionSpec = {\n 'members': members_option, 'undoc-members': bool_option,\n 'noindex': bool_option, 'inherited-members': inherited_members_option,\n 'show-inheritance': bool_option, 'member-order': member_order_option,\n 'exclude-members': exclude_members_option,\n 'private-members': members_option, 'special-members': members_option,\n 'class-doc-from': class_doc_from_option,\n }\n\n _signature_class: Any = None\n _signature_method_name: str = None\n\n def __init__(self, *args: Any) -> None:\n super().__init__(*args)\n\n if self.config.autodoc_class_signature == 'separated':\n self.options = self.options.copy()\n\n # show __init__() method\n if self.options.special_members is None:\n self.options['special-members'] = ['__new__', '__init__']\n else:\n self.options.special_members.append('__new__')\n self.options.special_members.append('__init__')\n\n merge_members_option(self.options)\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n return isinstance(member, type)\n\n def import_object(self, raiseerror: bool = False) -> bool:\n ret = super().import_object(raiseerror)\n # if the class is documented under another name, document it\n # as data/attribute\n if ret:\n if hasattr(self.object, '__name__'):\n self.doc_as_attr = (self.objpath[-1] != self.object.__name__)\n else:\n self.doc_as_attr = True\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_doc_ClassDocumenter.get_doc.return._prepare_docstring_docstr": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_doc_ClassDocumenter.get_doc.return._prepare_docstring_docstr", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1717, "end_line": 1767, "span_ids": ["ClassDocumenter.get_doc"], "tokens": 528}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n if self.doc_as_attr:\n # Don't show the docstring of the class when it is an alias.\n comment = self.get_variable_comment()\n if comment:\n return []\n else:\n return None\n\n lines = getattr(self, '_new_docstrings', None)\n if lines is not None:\n return lines\n\n classdoc_from = self.options.get('class-doc-from', self.config.autoclass_content)\n\n docstrings = []\n attrdocstring = getdoc(self.object, self.get_attr)\n if attrdocstring:\n docstrings.append(attrdocstring)\n\n # for classes, what the \"docstring\" is can be controlled via a\n # config value; the default is only the class docstring\n if classdoc_from in ('both', 'init'):\n __init__ = self.get_attr(self.object, '__init__', None)\n initdocstring = getdoc(__init__, self.get_attr,\n self.config.autodoc_inherit_docstrings,\n self.object, '__init__')\n # for new-style classes, no __init__ means default __init__\n if (initdocstring is not None and\n (initdocstring == object.__init__.__doc__ or # for pypy\n initdocstring.strip() == object.__init__.__doc__)): # for !pypy\n initdocstring = None\n if not initdocstring:\n # try __new__\n __new__ = self.get_attr(self.object, '__new__', None)\n initdocstring = getdoc(__new__, self.get_attr,\n self.config.autodoc_inherit_docstrings,\n self.object, '__new__')\n # for new-style classes, no __new__ means default __new__\n if (initdocstring is not None and\n (initdocstring == object.__new__.__doc__ or # for pypy\n initdocstring.strip() == object.__new__.__doc__)): # for !pypy\n initdocstring = None\n if initdocstring:\n if classdoc_from == 'init':\n docstrings = [initdocstring]\n else:\n docstrings.append(initdocstring)\n\n tab_width = self.directive.state.document.settings.tab_width\n return [prepare_docstring(docstring, ignore, tab_width) for docstring in docstrings]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.format_args_MethodDocumenter.format_args.return.args": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.format_args_MethodDocumenter.format_args.return.args", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2156, "end_line": 2189, "span_ids": ["MethodDocumenter.format_args"], "tokens": 344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter):\n\n def format_args(self, **kwargs: Any) -> str:\n if self.config.autodoc_typehints in ('none', 'description'):\n kwargs.setdefault('show_annotation', False)\n if self.config.autodoc_typehints_format == \"short\":\n kwargs.setdefault('unqualified_typehints', True)\n\n try:\n if self.object == object.__init__ and self.parent != object:\n # Classes not having own __init__() method are shown as no arguments.\n #\n # Note: The signature of object.__init__() is (self, /, *args, **kwargs).\n # But it makes users confused.\n args = '()'\n else:\n if inspect.isstaticmethod(self.object, cls=self.parent, name=self.object_name):\n self.env.app.emit('autodoc-before-process-signature', self.object, False)\n sig = inspect.signature(self.object, bound_method=False,\n type_aliases=self.config.autodoc_type_aliases)\n else:\n self.env.app.emit('autodoc-before-process-signature', self.object, True)\n sig = inspect.signature(self.object, bound_method=True,\n type_aliases=self.config.autodoc_type_aliases)\n args = stringify_signature(sig, **kwargs)\n except TypeError as exc:\n logger.warning(__(\"Failed to get a method signature for %s: %s\"),\n self.fullname, exc)\n return None\n except ValueError:\n args = ''\n\n if self.config.strip_signature_backslash:\n # escape backslashes for reST\n args = args.replace('\\\\', '\\\\\\\\')\n return args", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.add_directive_header_MethodDocumenter.document_members.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.add_directive_header_MethodDocumenter.document_members.pass", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2191, "end_line": 2208, "span_ids": ["MethodDocumenter.add_directive_header", "MethodDocumenter.document_members"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter):\n\n def add_directive_header(self, sig: str) -> None:\n super().add_directive_header(sig)\n\n sourcename = self.get_sourcename()\n obj = self.parent.__dict__.get(self.object_name, self.object)\n if inspect.isabstractmethod(obj):\n self.add_line(' :abstractmethod:', sourcename)\n if inspect.iscoroutinefunction(obj) or inspect.isasyncgenfunction(obj):\n self.add_line(' :async:', sourcename)\n if inspect.isclassmethod(obj):\n self.add_line(' :classmethod:', sourcename)\n if inspect.isstaticmethod(obj, cls=self.parent, name=self.object_name):\n self.add_line(' :staticmethod:', sourcename)\n if self.analyzer and '.'.join(self.objpath) in self.analyzer.finals:\n self.add_line(' :final:', sourcename)\n\n def document_members(self, all_members: bool = False) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_warnings_DummyOptionSpec.__getitem__.return.lambda_x_x": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_warnings_DummyOptionSpec.__getitem__.return.lambda_x_x", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/directive.py", "file_name": "directive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 39, "span_ids": ["impl", "DummyOptionSpec", "DummyOptionSpec.__getitem__", "DummyOptionSpec.__bool__", "imports"], "tokens": 314}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import warnings\nfrom typing import Any, Callable, Dict, List, Set, Type\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\nfrom docutils.parsers.rst.states import RSTState\nfrom docutils.statemachine import StringList\nfrom docutils.utils import Reporter, assemble_option_dict\n\nfrom sphinx.config import Config\nfrom sphinx.deprecation import RemovedInSphinx50Warning, RemovedInSphinx60Warning\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.ext.autodoc import Documenter, Options\nfrom sphinx.util import logging\nfrom sphinx.util.docutils import SphinxDirective, switch_source_input\nfrom sphinx.util.nodes import nested_parse_with_titles\n\nlogger = logging.getLogger(__name__)\n\n\n# common option names for autodoc directives\nAUTODOC_DEFAULT_OPTIONS = ['members', 'undoc-members', 'inherited-members',\n 'show-inheritance', 'private-members', 'special-members',\n 'ignore-module-all', 'exclude-members', 'member-order',\n 'imported-members', 'class-doc-from', 'no-value']\n\nAUTODOC_EXTENDABLE_OPTIONS = ['members', 'private-members', 'special-members',\n 'exclude-members']\n\n\nclass DummyOptionSpec(dict):\n \"\"\"An option_spec allows any options.\"\"\"\n\n def __bool__(self) -> bool:\n \"\"\"Behaves like some options are defined.\"\"\"\n return True\n\n def __getitem__(self, key: str) -> Callable[[str], str]:\n return lambda x: x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_process_documenter_options_process_documenter_options.return.Options_assemble_option_d": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_process_documenter_options_process_documenter_options.return.Options_assemble_option_d", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/directive.py", "file_name": "directive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 74, "end_line": 97, "span_ids": ["process_documenter_options"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def process_documenter_options(documenter: Type[Documenter], config: Config, options: Dict\n ) -> Options:\n \"\"\"Recognize options of Documenter from user input.\"\"\"\n for name in AUTODOC_DEFAULT_OPTIONS:\n if name not in documenter.option_spec:\n continue\n else:\n negated = options.pop('no-' + name, True) is None\n if name in config.autodoc_default_options and not negated:\n if name in options and isinstance(config.autodoc_default_options[name], str):\n # take value from options if present or extend it\n # with autodoc_default_options if necessary\n if name in AUTODOC_EXTENDABLE_OPTIONS:\n if options[name] is not None and options[name].startswith('+'):\n options[name] = ','.join([config.autodoc_default_options[name],\n options[name][1:]])\n else:\n options[name] = config.autodoc_default_options[name]\n\n elif options.get(name) is not None:\n # remove '+' from option argument if there's nothing to merge it with\n options[name] = options[name].lstrip('+')\n\n return Options(assemble_option_dict(options.items(), documenter.option_spec))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_parse_generated_content_parse_generated_content.with_switch_source_input_.return.node_children": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_parse_generated_content_parse_generated_content.with_switch_source_input_.return.node_children", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/directive.py", "file_name": "directive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 100, "end_line": 114, "span_ids": ["parse_generated_content"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_generated_content(state: RSTState, content: StringList, documenter: Documenter\n ) -> List[Node]:\n \"\"\"Parse an item of content generated by Documenter.\"\"\"\n with switch_source_input(state, content):\n if documenter.titles_allowed:\n node: Element = nodes.section()\n # necessary so that the child nodes get the right source/line set\n node.document = state.document\n nested_parse_with_titles(state, content, node)\n else:\n node = nodes.paragraph()\n node.document = state.document\n state.nested_parse(content, 0, node)\n\n return node.children", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_AutodocDirective_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_AutodocDirective_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/directive.py", "file_name": "directive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 167, "span_ids": ["AutodocDirective.run", "AutodocDirective"], "tokens": 453}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AutodocDirective(SphinxDirective):\n \"\"\"A directive class for all autodoc directives. It works as a dispatcher of Documenters.\n\n It invokes a Documenter upon running. After the processing, it parses and returns\n the content generated by Documenter.\n \"\"\"\n option_spec = DummyOptionSpec()\n has_content = True\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n\n def run(self) -> List[Node]:\n reporter = self.state.document.reporter\n\n try:\n source, lineno = reporter.get_source_and_line(self.lineno) # type: ignore\n except AttributeError:\n source, lineno = (None, None)\n logger.debug('[autodoc] %s:%s: input:\\n%s', source, lineno, self.block_text)\n\n # look up target Documenter\n objtype = self.name[4:] # strip prefix (auto-).\n doccls = self.env.app.registry.documenters[objtype]\n\n # process the options with the selected documenter's option_spec\n try:\n documenter_options = process_documenter_options(doccls, self.config, self.options)\n except (KeyError, ValueError, TypeError) as exc:\n # an option is either unknown or has a wrong type\n logger.error('An option to %s is either unknown or has an invalid value: %s' %\n (self.name, exc), location=(self.env.docname, lineno))\n return []\n\n # generate the output\n params = DocumenterBridge(self.env, reporter, documenter_options, lineno, self.state)\n documenter = doccls(params, self.arguments[0])\n documenter.generate(more_content=self.content)\n if not params.result:\n return []\n\n logger.debug('[autodoc] output:\\n%s', '\\n'.join(params.result))\n\n # record all filenames as dependencies -- this will at least\n # partially make automatic invalidation possible\n for fn in params.record_dependencies:\n self.state.document.settings.record_dependencies.add(fn)\n\n result = parse_generated_content(self.state, params.result, documenter)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_import_object_import_object.try_.except_AttributeError_I.raise_ImportError_errmsg_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_import_object_import_object.try_.except_AttributeError_I.raise_ImportError_errmsg_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/importer.py", "file_name": "importer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 69, "end_line": 139, "span_ids": ["import_object"], "tokens": 649}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def import_object(modname: str, objpath: List[str], objtype: str = '',\n attrgetter: Callable[[Any, str], Any] = safe_getattr,\n warningiserror: bool = False) -> Any:\n if objpath:\n logger.debug('[autodoc] from %s import %s', modname, '.'.join(objpath))\n else:\n logger.debug('[autodoc] import %s', modname)\n\n try:\n module = None\n exc_on_importing = None\n objpath = list(objpath)\n while module is None:\n try:\n module = import_module(modname, warningiserror=warningiserror)\n logger.debug('[autodoc] import %s => %r', modname, module)\n except ImportError as exc:\n logger.debug('[autodoc] import %s => failed', modname)\n exc_on_importing = exc\n if '.' in modname:\n # retry with parent module\n modname, name = modname.rsplit('.', 1)\n objpath.insert(0, name)\n else:\n raise\n\n obj = module\n parent = None\n object_name = None\n for attrname in objpath:\n parent = obj\n logger.debug('[autodoc] getattr(_, %r)', attrname)\n mangled_name = mangle(obj, attrname)\n obj = attrgetter(obj, mangled_name)\n\n try:\n logger.debug('[autodoc] => %r', obj)\n except TypeError:\n # fallback of failure on logging for broken object\n # refs: https://github.com/sphinx-doc/sphinx/issues/9095\n logger.debug('[autodoc] => %r', (obj,))\n\n object_name = attrname\n return [module, parent, object_name, obj]\n except (AttributeError, ImportError) as exc:\n if isinstance(exc, AttributeError) and exc_on_importing:\n # restore ImportError\n exc = exc_on_importing\n\n if objpath:\n errmsg = ('autodoc: failed to import %s %r from module %r' %\n (objtype, '.'.join(objpath), modname))\n else:\n errmsg = 'autodoc: failed to import %s %r' % (objtype, modname)\n\n if isinstance(exc, ImportError):\n # import_module() raises ImportError having real exception obj and\n # traceback\n real_exc, traceback_msg = exc.args\n if isinstance(real_exc, SystemExit):\n errmsg += ('; the module executes module level statement '\n 'and it might call sys.exit().')\n elif isinstance(real_exc, ImportError) and real_exc.args:\n errmsg += '; the following exception was raised:\\n%s' % real_exc.args[0]\n else:\n errmsg += '; the following exception was raised:\\n%s' % traceback_msg\n else:\n errmsg += '; the following exception was raised:\\n%s' % traceback.format_exc()\n\n logger.debug(errmsg)\n raise ImportError(errmsg) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py__make_subclass__MockModule.__repr__.return.self___name__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py__make_subclass__MockModule.__repr__.return.self___name__", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/mock.py", "file_name": "mock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 65, "end_line": 90, "span_ids": ["_MockModule.__getattr__", "_MockModule.__repr__", "_make_subclass", "_MockModule"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _make_subclass(name: str, module: str, superclass: Any = _MockObject,\n attributes: Any = None, decorator_args: Tuple = ()) -> Any:\n attrs = {'__module__': module,\n '__display_name__': module + '.' + name,\n '__name__': name,\n '__sphinx_decorator_args__': decorator_args}\n attrs.update(attributes or {})\n\n return type(name, (superclass,), attrs)\n\n\nclass _MockModule(ModuleType):\n \"\"\"Used by autodoc_mock_imports.\"\"\"\n __file__ = os.devnull\n __sphinx_mock__ = True\n\n def __init__(self, name: str) -> None:\n super().__init__(name)\n self.__all__: List[str] = []\n self.__path__: List[str] = []\n\n def __getattr__(self, name: str) -> _MockObject:\n return _make_subclass(name, self.__name__)()\n\n def __repr__(self) -> str:\n return self.__name__", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_MockLoader_MockLoader.exec_module._nothing_to_do": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_MockLoader_MockLoader.exec_module._nothing_to_do", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/mock.py", "file_name": "mock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 96, "end_line": 108, "span_ids": ["MockLoader", "MockLoader.create_module", "MockLoader.exec_module"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MockLoader(Loader):\n \"\"\"A loader for mocking.\"\"\"\n def __init__(self, finder: \"MockFinder\") -> None:\n super().__init__()\n self.finder = finder\n\n def create_module(self, spec: ModuleSpec) -> ModuleType:\n logger.debug('[autodoc] adding a mock module as %s!', spec.name)\n self.finder.mocked_modules.append(spec.name)\n return _MockModule(spec.name)\n\n def exec_module(self, module: ModuleType) -> None:\n pass # nothing to do", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py_signature_from_ast_signature_from_ast.if_node_returns_.else_.return.Signature_params_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py_signature_from_ast_signature_from_ast.if_node_returns_.else_.return.Signature_params_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/type_comment.py", "file_name": "type_comment.py", "file_type": "text/x-python", "category": "implementation", "start_line": 40, "end_line": 86, "span_ids": ["signature_from_ast"], "tokens": 402}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def signature_from_ast(node: ast.FunctionDef, bound_method: bool,\n type_comment: ast.FunctionDef) -> Signature:\n \"\"\"Return a Signature object for the given *node*.\n\n :param bound_method: Specify *node* is a bound method or not\n \"\"\"\n params = []\n if hasattr(node.args, \"posonlyargs\"): # for py38+\n for arg in node.args.posonlyargs: # type: ignore\n param = Parameter(arg.arg, Parameter.POSITIONAL_ONLY, annotation=arg.type_comment)\n params.append(param)\n\n for arg in node.args.args:\n param = Parameter(arg.arg, Parameter.POSITIONAL_OR_KEYWORD,\n annotation=arg.type_comment or Parameter.empty)\n params.append(param)\n\n if node.args.vararg:\n param = Parameter(node.args.vararg.arg, Parameter.VAR_POSITIONAL,\n annotation=node.args.vararg.type_comment or Parameter.empty)\n params.append(param)\n\n for arg in node.args.kwonlyargs:\n param = Parameter(arg.arg, Parameter.KEYWORD_ONLY,\n annotation=arg.type_comment or Parameter.empty)\n params.append(param)\n\n if node.args.kwarg:\n param = Parameter(node.args.kwarg.arg, Parameter.VAR_KEYWORD,\n annotation=node.args.kwarg.type_comment or Parameter.empty)\n params.append(param)\n\n # Remove first parameter when *obj* is bound_method\n if bound_method and params:\n params.pop(0)\n\n # merge type_comment into signature\n if not_suppressed(type_comment.argtypes): # type: ignore\n for i, param in enumerate(params):\n params[i] = param.replace(annotation=type_comment.argtypes[i]) # type: ignore\n\n if node.returns:\n return Signature(params, return_annotation=node.returns)\n elif type_comment.returns:\n return Signature(params, return_annotation=ast_unparse(type_comment.returns))\n else:\n return Signature(params)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py_get_type_comment_get_type_comment.try_.except_SyntaxError_fa.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py_get_type_comment_get_type_comment.try_.except_SyntaxError_fa.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/type_comment.py", "file_name": "type_comment.py", "file_type": "text/x-python", "category": "implementation", "start_line": 89, "end_line": 114, "span_ids": ["get_type_comment"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_type_comment(obj: Any, bound_method: bool = False) -> Signature:\n \"\"\"Get type_comment'ed FunctionDef object from living object.\n\n This tries to parse original code for living object and returns\n Signature for given *obj*. It requires py38+ or typed_ast module.\n \"\"\"\n try:\n source = getsource(obj)\n if source.startswith((' ', r'\\t')):\n # subject is placed inside class or block. To read its docstring,\n # this adds if-block before the declaration.\n module = ast_parse('if True:\\n' + source)\n subject = cast(ast.FunctionDef, module.body[0].body[0]) # type: ignore\n else:\n module = ast_parse(source)\n subject = cast(ast.FunctionDef, module.body[0]) # type: ignore\n\n if getattr(subject, \"type_comment\", None):\n function = ast_parse(subject.type_comment, mode='func_type')\n return signature_from_ast(subject, bound_method, function) # type: ignore\n else:\n return None\n except (OSError, TypeError): # failed to load source code\n return None\n except SyntaxError: # failed to parse type_comments\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py_update_annotations_using_type_comments_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py_update_annotations_using_type_comments_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/type_comment.py", "file_name": "type_comment.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 142, "span_ids": ["update_annotations_using_type_comments", "setup"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def update_annotations_using_type_comments(app: Sphinx, obj: Any, bound_method: bool) -> None:\n \"\"\"Update annotations info of *obj* using type_comments.\"\"\"\n try:\n type_sig = get_type_comment(obj, bound_method)\n if type_sig:\n sig = inspect.signature(obj, bound_method)\n for param in sig.parameters.values():\n if param.name not in obj.__annotations__:\n annotation = type_sig.parameters[param.name].annotation\n if annotation is not Parameter.empty:\n obj.__annotations__[param.name] = ast_unparse(annotation)\n\n if 'return' not in obj.__annotations__:\n obj.__annotations__['return'] = type_sig.return_annotation\n except KeyError as exc:\n logger.warning(__(\"Failed to update signature for %r: parameter not found: %s\"),\n obj, exc)\n except NotImplementedError as exc: # failed to ast.unparse()\n logger.warning(__(\"Failed to parse type_comment for %r: %s\"), obj, exc)\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.connect('autodoc-before-process-signature', update_annotations_using_type_comments)\n\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py_merge_typehints_insert_field_list.return.field_list": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py_merge_typehints_insert_field_list.return.field_list", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/typehints.py", "file_name": "typehints.py", "file_type": "text/x-python", "category": "implementation", "start_line": 37, "end_line": 77, "span_ids": ["insert_field_list", "merge_typehints"], "tokens": 333}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def merge_typehints(app: Sphinx, domain: str, objtype: str, contentnode: Element) -> None:\n if domain != 'py':\n return\n if app.config.autodoc_typehints not in ('both', 'description'):\n return\n\n try:\n signature = cast(addnodes.desc_signature, contentnode.parent[0])\n if signature['module']:\n fullname = '.'.join([signature['module'], signature['fullname']])\n else:\n fullname = signature['fullname']\n except KeyError:\n # signature node does not have valid context info for the target object\n return\n\n annotations = app.env.temp_data.get('annotations', {})\n if annotations.get(fullname, {}):\n field_lists = [n for n in contentnode if isinstance(n, nodes.field_list)]\n if field_lists == []:\n field_list = insert_field_list(contentnode)\n field_lists.append(field_list)\n\n for field_list in field_lists:\n if app.config.autodoc_typehints_description_target == \"all\":\n modify_field_list(field_list, annotations[fullname])\n else:\n augment_descriptions_with_types(field_list, annotations[fullname])\n\n\ndef insert_field_list(node: Element) -> nodes.field_list:\n field_list = nodes.field_list()\n desc = [n for n in node if isinstance(n, addnodes.desc)]\n if desc:\n # insert just before sub object descriptions (ex. methods, nested classes, etc.)\n index = node.index(desc[0])\n node.insert(index - 1, [field_list])\n else:\n node += field_list\n\n return field_list", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder_CoverageBuilder.init.self.py_ignorexps.compile_regex_list_cover": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder_CoverageBuilder.init.self.py_ignorexps.compile_regex_list_cover", "embedding": null, "metadata": {"file_path": "sphinx/ext/coverage.py", "file_name": "coverage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 42, "end_line": 74, "span_ids": ["CoverageBuilder.init", "CoverageBuilder"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CoverageBuilder(Builder):\n \"\"\"\n Evaluates coverage of code in the documentation.\n \"\"\"\n name = 'coverage'\n epilog = __('Testing of coverage in the sources finished, look at the '\n 'results in %(outdir)s' + path.sep + 'python.txt.')\n\n def init(self) -> None:\n self.c_sourcefiles: List[str] = []\n for pattern in self.config.coverage_c_path:\n pattern = path.join(self.srcdir, pattern)\n self.c_sourcefiles.extend(glob.glob(pattern))\n\n self.c_regexes: List[Tuple[str, Pattern]] = []\n for (name, exp) in self.config.coverage_c_regexes.items():\n try:\n self.c_regexes.append((name, re.compile(exp)))\n except Exception:\n logger.warning(__('invalid regex %r in coverage_c_regexes'), exp)\n\n self.c_ignorexps: Dict[str, List[Pattern]] = {}\n for (name, exps) in self.config.coverage_ignore_c_items.items():\n self.c_ignorexps[name] = compile_regex_list('coverage_ignore_c_items',\n exps)\n self.mod_ignorexps = compile_regex_list('coverage_ignore_modules',\n self.config.coverage_ignore_modules)\n self.cls_ignorexps = compile_regex_list('coverage_ignore_classes',\n self.config.coverage_ignore_classes)\n self.fun_ignorexps = compile_regex_list('coverage_ignore_functions',\n self.config.coverage_ignore_functions)\n self.py_ignorexps = compile_regex_list('coverage_ignore_pyobjects',\n self.config.coverage_ignore_pyobjects)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.get_outdated_docs_CoverageBuilder.build_c_coverage.for_filename_in_self_c_so.if_undoc_.self_c_undoc_filename_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.get_outdated_docs_CoverageBuilder.build_c_coverage.for_filename_in_self_c_so.if_undoc_.self_c_undoc_filename_", "embedding": null, "metadata": {"file_path": "sphinx/ext/coverage.py", "file_name": "coverage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 76, "end_line": 107, "span_ids": ["CoverageBuilder.get_outdated_docs", "CoverageBuilder.write", "CoverageBuilder.build_c_coverage"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CoverageBuilder(Builder):\n\n def get_outdated_docs(self) -> str:\n return 'coverage overview'\n\n def write(self, *ignored: Any) -> None:\n self.py_undoc: Dict[str, Dict[str, Any]] = {}\n self.build_py_coverage()\n self.write_py_coverage()\n\n self.c_undoc: Dict[str, Set[Tuple[str, str]]] = {}\n self.build_c_coverage()\n self.write_c_coverage()\n\n def build_c_coverage(self) -> None:\n # Fetch all the info from the header files\n c_objects = self.env.domaindata['c']['objects']\n for filename in self.c_sourcefiles:\n undoc: Set[Tuple[str, str]] = set()\n with open(filename) as f:\n for line in f:\n for key, regex in self.c_regexes:\n match = regex.match(line)\n if match:\n name = match.groups()[0]\n if name not in c_objects:\n for exp in self.c_ignorexps.get(key, []):\n if exp.match(name):\n break\n else:\n undoc.add((key, name))\n continue\n if undoc:\n self.c_undoc[filename] = undoc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.write_c_coverage_CoverageBuilder.ignore_pyobj.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.write_c_coverage_CoverageBuilder.ignore_pyobj.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/coverage.py", "file_name": "coverage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 114, "end_line": 139, "span_ids": ["CoverageBuilder.ignore_pyobj", "CoverageBuilder.write_c_coverage"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CoverageBuilder(Builder):\n\n def write_c_coverage(self) -> None:\n output_file = path.join(self.outdir, 'c.txt')\n with open(output_file, 'w') as op:\n if self.config.coverage_write_headline:\n write_header(op, 'Undocumented C API elements', '=')\n op.write('\\n')\n\n for filename, undoc in self.c_undoc.items():\n write_header(op, filename)\n for typ, name in sorted(undoc):\n op.write(' * %-50s [%9s]\\n' % (name, typ))\n if self.config.coverage_show_missing_items:\n if self.app.quiet or self.app.warningiserror:\n logger.warning(__('undocumented c api: %s [%s] in file %s'),\n name, typ, filename)\n else:\n logger.info(red('undocumented ') + 'c ' + 'api ' +\n '%-30s' % (name + \" [%9s]\" % typ) +\n red(' - in file ') + filename)\n op.write('\\n')\n\n def ignore_pyobj(self, full_name: str) -> bool:\n for exp in self.py_ignorexps:\n if exp.search(full_name):\n return True\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.build_py_coverage_CoverageBuilder.build_py_coverage.for_mod_name_in_modules_.self_py_undoc_mod_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.build_py_coverage_CoverageBuilder.build_py_coverage.for_mod_name_in_modules_.self_py_undoc_mod_name_", "embedding": null, "metadata": {"file_path": "sphinx/ext/coverage.py", "file_name": "coverage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 136, "end_line": 225, "span_ids": ["CoverageBuilder.build_py_coverage"], "tokens": 621}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CoverageBuilder(Builder):\n\n def build_py_coverage(self) -> None:\n objects = self.env.domaindata['py']['objects']\n modules = self.env.domaindata['py']['modules']\n\n skip_undoc = self.config.coverage_skip_undoc_in_source\n\n for mod_name in modules:\n ignore = False\n for exp in self.mod_ignorexps:\n if exp.match(mod_name):\n ignore = True\n break\n if ignore or self.ignore_pyobj(mod_name):\n continue\n\n try:\n mod = import_module(mod_name)\n except ImportError as err:\n logger.warning(__('module %s could not be imported: %s'), mod_name, err)\n self.py_undoc[mod_name] = {'error': err}\n continue\n\n funcs = []\n classes: Dict[str, List[str]] = {}\n\n for name, obj in inspect.getmembers(mod):\n # diverse module attributes are ignored:\n if name[0] == '_':\n # begins in an underscore\n continue\n if not hasattr(obj, '__module__'):\n # cannot be attributed to a module\n continue\n if obj.__module__ != mod_name:\n # is not defined in this module\n continue\n\n full_name = '%s.%s' % (mod_name, name)\n if self.ignore_pyobj(full_name):\n continue\n\n if inspect.isfunction(obj):\n if full_name not in objects:\n for exp in self.fun_ignorexps:\n if exp.match(name):\n break\n else:\n if skip_undoc and not obj.__doc__:\n continue\n funcs.append(name)\n elif inspect.isclass(obj):\n for exp in self.cls_ignorexps:\n if exp.match(name):\n break\n else:\n if full_name not in objects:\n if skip_undoc and not obj.__doc__:\n continue\n # not documented at all\n classes[name] = []\n continue\n\n attrs: List[str] = []\n\n for attr_name in dir(obj):\n if attr_name not in obj.__dict__:\n continue\n try:\n attr = safe_getattr(obj, attr_name)\n except AttributeError:\n continue\n if not (inspect.ismethod(attr) or\n inspect.isfunction(attr)):\n continue\n if attr_name[0] == '_':\n # starts with an underscore, ignore it\n continue\n if skip_undoc and not attr.__doc__:\n # skip methods without docstring if wished\n continue\n full_attr_name = '%s.%s' % (full_name, attr_name)\n if self.ignore_pyobj(full_attr_name):\n continue\n if full_attr_name not in objects:\n attrs.append(attr_name)\n if attrs:\n # some attributes are undocumented\n classes[name] = attrs\n\n self.py_undoc[mod_name] = {'funcs': funcs, 'classes': classes}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.write_py_coverage_CoverageBuilder.finish.with_open_picklepath_wb.pickle_dump_self_py_undo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_CoverageBuilder.write_py_coverage_CoverageBuilder.finish.with_open_picklepath_wb.pickle_dump_self_py_undo", "embedding": null, "metadata": {"file_path": "sphinx/ext/coverage.py", "file_name": "coverage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 232, "end_line": 303, "span_ids": ["CoverageBuilder.finish", "CoverageBuilder.write_py_coverage"], "tokens": 694}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CoverageBuilder(Builder):\n\n def write_py_coverage(self) -> None:\n output_file = path.join(self.outdir, 'python.txt')\n failed = []\n with open(output_file, 'w') as op:\n if self.config.coverage_write_headline:\n write_header(op, 'Undocumented Python objects', '=')\n keys = sorted(self.py_undoc.keys())\n for name in keys:\n undoc = self.py_undoc[name]\n if 'error' in undoc:\n failed.append((name, undoc['error']))\n else:\n if not undoc['classes'] and not undoc['funcs']:\n continue\n\n write_header(op, name)\n if undoc['funcs']:\n op.write('Functions:\\n')\n op.writelines(' * %s\\n' % x for x in undoc['funcs'])\n if self.config.coverage_show_missing_items:\n if self.app.quiet or self.app.warningiserror:\n for func in undoc['funcs']:\n logger.warning(\n __('undocumented python function: %s :: %s'),\n name, func)\n else:\n for func in undoc['funcs']:\n logger.info(red('undocumented ') + 'py ' + 'function ' +\n '%-30s' % func + red(' - in module ') + name)\n op.write('\\n')\n if undoc['classes']:\n op.write('Classes:\\n')\n for class_name, methods in sorted(\n undoc['classes'].items()):\n if not methods:\n op.write(' * %s\\n' % class_name)\n if self.config.coverage_show_missing_items:\n if self.app.quiet or self.app.warningiserror:\n logger.warning(\n __('undocumented python class: %s :: %s'),\n name, class_name)\n else:\n logger.info(red('undocumented ') + 'py ' +\n 'class ' + '%-30s' % class_name +\n red(' - in module ') + name)\n else:\n op.write(' * %s -- missing methods:\\n\\n' % class_name)\n op.writelines(' - %s\\n' % x for x in methods)\n if self.config.coverage_show_missing_items:\n if self.app.quiet or self.app.warningiserror:\n for meth in methods:\n logger.warning(\n __('undocumented python method:' +\n ' %s :: %s :: %s'),\n name, class_name, meth)\n else:\n for meth in methods:\n logger.info(red('undocumented ') + 'py ' +\n 'method ' + '%-30s' %\n (class_name + '.' + meth) +\n red(' - in module ') + name)\n op.write('\\n')\n\n if failed:\n write_header(op, 'Modules that failed to import')\n op.writelines(' * %s -- %s\\n' % x for x in failed)\n\n def finish(self) -> None:\n # dump the coverage data to a pickle file too\n picklepath = path.join(self.outdir, 'undoc.pickle')\n with open(picklepath, 'wb') as dumpfile:\n pickle.dump((self.py_undoc, self.c_undoc), dumpfile)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/ext/coverage.py", "file_name": "coverage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 306, "end_line": 319, "span_ids": ["setup"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_builder(CoverageBuilder)\n app.add_config_value('coverage_ignore_modules', [], False)\n app.add_config_value('coverage_ignore_functions', [], False)\n app.add_config_value('coverage_ignore_classes', [], False)\n app.add_config_value('coverage_ignore_pyobjects', [], False)\n app.add_config_value('coverage_c_path', [], False)\n app.add_config_value('coverage_c_regexes', {}, False)\n app.add_config_value('coverage_ignore_c_items', {}, False)\n app.add_config_value('coverage_write_headline', True, False)\n app.add_config_value('coverage_skip_undoc_in_source', False, False)\n app.add_config_value('coverage_show_missing_items', False, False)\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_is_allowed_version_is_allowed_version.return.Version_version_in_Speci": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_is_allowed_version_is_allowed_version.return.Version_version_in_Speci", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 40, "end_line": 55, "span_ids": ["is_allowed_version"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def is_allowed_version(spec: str, version: str) -> bool:\n \"\"\"Check `spec` satisfies `version` or not.\n\n This obeys PEP-440 specifiers:\n https://peps.python.org/pep-0440/#version-specifiers\n\n Some examples:\n\n >>> is_allowed_version('3.3', '<=3.5')\n True\n >>> is_allowed_version('3.3', '<=3.2')\n False\n >>> is_allowed_version('3.3', '>3.2, <4.0')\n True\n \"\"\"\n return Version(version) in SpecifierSet(spec)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__set_up_the_necessary_di_TestDirective.run.return._node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__set_up_the_necessary_di_TestDirective.run.return._node_", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 58, "end_line": 144, "span_ids": ["is_allowed_version", "TestDirective", "TestDirective.run"], "tokens": 847}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# set up the necessary directives\n\nclass TestDirective(SphinxDirective):\n \"\"\"\n Base class for doctest-related directives.\n \"\"\"\n\n has_content = True\n required_arguments = 0\n optional_arguments = 1\n final_argument_whitespace = True\n\n def run(self) -> List[Node]:\n # use ordinary docutils nodes for test code: they get special attributes\n # so that our builder recognizes them, and the other builders are happy.\n code = '\\n'.join(self.content)\n test = None\n if self.name == 'doctest':\n if '<BLANKLINE>' in code:\n # convert <BLANKLINE>s to ordinary blank lines for presentation\n test = code\n code = blankline_re.sub('', code)\n if doctestopt_re.search(code) and 'no-trim-doctest-flags' not in self.options:\n if not test:\n test = code\n code = doctestopt_re.sub('', code)\n nodetype: Type[TextElement] = nodes.literal_block\n if self.name in ('testsetup', 'testcleanup') or 'hide' in self.options:\n nodetype = nodes.comment\n if self.arguments:\n groups = [x.strip() for x in self.arguments[0].split(',')]\n else:\n groups = ['default']\n node = nodetype(code, code, testnodetype=self.name, groups=groups)\n self.set_source_info(node)\n if test is not None:\n # only save if it differs from code\n node['test'] = test\n if self.name == 'doctest':\n if self.config.highlight_language in ('py', 'python'):\n node['language'] = 'pycon'\n else:\n node['language'] = 'pycon3' # default\n elif self.name == 'testcode':\n if self.config.highlight_language in ('py', 'python'):\n node['language'] = 'python'\n else:\n node['language'] = 'python3' # default\n elif self.name == 'testoutput':\n # don't try to highlight output\n node['language'] = 'none'\n node['options'] = {}\n if self.name in ('doctest', 'testoutput') and 'options' in self.options:\n # parse doctest-like output comparison flags\n option_strings = self.options['options'].replace(',', ' ').split()\n for option in option_strings:\n prefix, option_name = option[0], option[1:]\n if prefix not in '+-':\n self.state.document.reporter.warning(\n __(\"missing '+' or '-' in '%s' option.\") % option,\n line=self.lineno)\n continue\n if option_name not in doctest.OPTIONFLAGS_BY_NAME:\n self.state.document.reporter.warning(\n __(\"'%s' is not a valid option.\") % option_name,\n line=self.lineno)\n continue\n flag = doctest.OPTIONFLAGS_BY_NAME[option[1:]]\n node['options'][flag] = (option[0] == '+')\n if self.name == 'doctest' and 'pyversion' in self.options:\n try:\n spec = self.options['pyversion']\n python_version = '.'.join([str(v) for v in sys.version_info[:3]])\n if not is_allowed_version(spec, python_version):\n flag = doctest.OPTIONFLAGS_BY_NAME['SKIP']\n node['options'][flag] = True # Skip the test\n except InvalidSpecifier:\n self.state.document.reporter.warning(\n __(\"'%s' is not a valid pyversion option\") % spec,\n line=self.lineno)\n if 'skipif' in self.options:\n node['skipif'] = self.options['skipif']\n if 'trim-doctest-flags' in self.options:\n node['trim_flags'] = True\n elif 'no-trim-doctest-flags' in self.options:\n node['trim_flags'] = False\n return [node]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_TestsetupDirective_parser.doctest_DocTestParser_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_TestsetupDirective_parser.doctest_DocTestParser_", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 147, "end_line": 191, "span_ids": ["impl:8", "TestcleanupDirective", "TestcodeDirective", "TestsetupDirective", "impl:9", "TestoutputDirective", "DoctestDirective"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestsetupDirective(TestDirective):\n option_spec: OptionSpec = {\n 'skipif': directives.unchanged_required\n }\n\n\nclass TestcleanupDirective(TestDirective):\n option_spec: OptionSpec = {\n 'skipif': directives.unchanged_required\n }\n\n\nclass DoctestDirective(TestDirective):\n option_spec: OptionSpec = {\n 'hide': directives.flag,\n 'no-trim-doctest-flags': directives.flag,\n 'options': directives.unchanged,\n 'pyversion': directives.unchanged_required,\n 'skipif': directives.unchanged_required,\n 'trim-doctest-flags': directives.flag,\n }\n\n\nclass TestcodeDirective(TestDirective):\n option_spec: OptionSpec = {\n 'hide': directives.flag,\n 'no-trim-doctest-flags': directives.flag,\n 'pyversion': directives.unchanged_required,\n 'skipif': directives.unchanged_required,\n 'trim-doctest-flags': directives.flag,\n }\n\n\nclass TestoutputDirective(TestDirective):\n option_spec: OptionSpec = {\n 'hide': directives.flag,\n 'no-trim-doctest-flags': directives.flag,\n 'options': directives.unchanged,\n 'pyversion': directives.unchanged_required,\n 'skipif': directives.unchanged_required,\n 'trim-doctest-flags': directives.flag,\n }\n\n\nparser = doctest.DocTestParser()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__helper_classes_TestGroup.__repr__.return._TestGroup_name_r_setup": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__helper_classes_TestGroup.__repr__.return._TestGroup_name_r_setup", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 194, "end_line": 223, "span_ids": ["TestGroup", "impl:9", "TestGroup.add_code", "TestGroup.__repr__"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# helper classes\n\nclass TestGroup:\n def __init__(self, name: str) -> None:\n self.name = name\n self.setup: List[TestCode] = []\n self.tests: List[List[TestCode]] = []\n self.cleanup: List[TestCode] = []\n\n def add_code(self, code: \"TestCode\", prepend: bool = False) -> None:\n if code.type == 'testsetup':\n if prepend:\n self.setup.insert(0, code)\n else:\n self.setup.append(code)\n elif code.type == 'testcleanup':\n self.cleanup.append(code)\n elif code.type == 'doctest':\n self.tests.append([code])\n elif code.type == 'testcode':\n self.tests.append([code, None])\n elif code.type == 'testoutput':\n if self.tests and len(self.tests[-1]) == 2:\n self.tests[-1][1] = code\n else:\n raise RuntimeError(__('invalid TestCode type'))\n\n def __repr__(self) -> str:\n return 'TestGroup(name=%r, setup=%r, cleanup=%r, tests=%r)' % (\n self.name, self.setup, self.cleanup, self.tests)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_TestCode_TestCode.__repr__.return._TestCode_r_r_filenam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_TestCode_TestCode.__repr__.return._TestCode_r_r_filenam", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 226, "end_line": 237, "span_ids": ["TestCode.__repr__", "TestCode"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCode:\n def __init__(self, code: str, type: str, filename: str,\n lineno: int, options: Dict = None) -> None:\n self.code = code\n self.type = type\n self.filename = filename\n self.lineno = lineno\n self.options = options or {}\n\n def __repr__(self) -> str:\n return 'TestCode(%r, %r, filename=%r, lineno=%r, options=%r)' % (\n self.code, self.type, self.filename, self.lineno, self.options)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_SphinxDocTestRunner_SphinxDocTestRunner._DocTestRunner__patched_linecache_getlines.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_SphinxDocTestRunner_SphinxDocTestRunner._DocTestRunner__patched_linecache_getlines.None_2", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 240, "end_line": 267, "span_ids": ["SphinxDocTestRunner", "SphinxDocTestRunner._DocTestRunner__patched_linecache_getlines", "SphinxDocTestRunner.summarize"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxDocTestRunner(doctest.DocTestRunner):\n def summarize(self, out: Callable, verbose: bool = None # type: ignore\n ) -> Tuple[int, int]:\n string_io = StringIO()\n old_stdout = sys.stdout\n sys.stdout = string_io\n try:\n res = super().summarize(verbose)\n finally:\n sys.stdout = old_stdout\n out(string_io.getvalue())\n return res\n\n def _DocTestRunner__patched_linecache_getlines(self, filename: str,\n module_globals: Any = None) -> Any:\n # this is overridden from DocTestRunner adding the try-except below\n m = self._DocTestRunner__LINECACHE_FILENAME_RE.match(filename) # type: ignore\n if m and m.group('name') == self.test.name:\n try:\n example = self.test.examples[int(m.group('examplenum'))]\n # because we compile multiple doctest blocks with the same name\n # (viz. the group name) this might, for outer stack frames in a\n # traceback, get the wrong test which might not have enough examples\n except IndexError:\n pass\n else:\n return example.source.splitlines(True)\n return self.save_linecache_getlines(filename, module_globals) # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__the_new_builder_use__DocTestBuilder.init.self_outfile_write_Resu": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__the_new_builder_use__DocTestBuilder.init.self_outfile_write_Resu", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 270, "end_line": 307, "span_ids": ["DocTestBuilder", "DocTestBuilder.init", "SphinxDocTestRunner._DocTestRunner__patched_linecache_getlines"], "tokens": 336}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# the new builder -- use sphinx-build.py -b doctest to run\n\nclass DocTestBuilder(Builder):\n \"\"\"\n Runs test snippets in the documentation.\n \"\"\"\n name = 'doctest'\n epilog = __('Testing of doctests in the sources finished, look at the '\n 'results in %(outdir)s/output.txt.')\n\n def init(self) -> None:\n # default options\n self.opt = self.config.doctest_default_flags\n\n # HACK HACK HACK\n # doctest compiles its snippets with type 'single'. That is nice\n # for doctest examples but unusable for multi-statement code such\n # as setup code -- to be able to use doctest error reporting with\n # that code nevertheless, we monkey-patch the \"compile\" it uses.\n doctest.compile = self.compile # type: ignore\n\n sys.path[0:0] = self.config.doctest_path\n\n self.type = 'single'\n\n self.total_failures = 0\n self.total_tries = 0\n self.setup_failures = 0\n self.setup_tries = 0\n self.cleanup_failures = 0\n self.cleanup_tries = 0\n\n date = time.strftime('%Y-%m-%d %H:%M:%S')\n\n self.outfile = open(path.join(self.outdir, 'output.txt'), 'w', encoding='utf-8')\n self.outfile.write(('Results of doctest builder run on %s\\n'\n '==================================%s\\n') %\n (date, '=' * len(date)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder._out_DocTestBuilder.get_outdated_docs.return.self_env_found_docs": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder._out_DocTestBuilder.get_outdated_docs.return.self_env_found_docs", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 309, "end_line": 324, "span_ids": ["DocTestBuilder.get_target_uri", "DocTestBuilder._out", "DocTestBuilder._warn_out", "DocTestBuilder.get_outdated_docs"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocTestBuilder(Builder):\n\n def _out(self, text: str) -> None:\n logger.info(text, nonl=True)\n self.outfile.write(text)\n\n def _warn_out(self, text: str) -> None:\n if self.app.quiet or self.app.warningiserror:\n logger.warning(text)\n else:\n logger.info(text, nonl=True)\n self.outfile.write(text)\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n return ''\n\n def get_outdated_docs(self) -> Set[str]:\n return self.env.found_docs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.finish_DocTestBuilder.finish.if_self_total_failures_or.self.app.statuscode.1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.finish_DocTestBuilder.finish.if_self_total_failures_or.self.app.statuscode.1", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 326, "end_line": 345, "span_ids": ["DocTestBuilder.finish"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocTestBuilder(Builder):\n\n def finish(self) -> None:\n # write executive summary\n def s(v: int) -> str:\n return 's' if v != 1 else ''\n repl = (self.total_tries, s(self.total_tries),\n self.total_failures, s(self.total_failures),\n self.setup_failures, s(self.setup_failures),\n self.cleanup_failures, s(self.cleanup_failures))\n self._out('''\nDoctest summary\n===============\n%5d test%s\n%5d failure%s in tests\n%5d failure%s in setup code\n%5d failure%s in cleanup code\n''' % repl)\n self.outfile.close()\n\n if self.total_failures or self.setup_failures or self.cleanup_failures:\n self.app.statuscode = 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.write_DocTestBuilder.get_filename_for_node.return.filename": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.write_DocTestBuilder.get_filename_for_node.return.filename", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 347, "end_line": 366, "span_ids": ["DocTestBuilder.write", "DocTestBuilder.get_filename_for_node"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocTestBuilder(Builder):\n\n def write(self, build_docnames: Iterable[str], updated_docnames: Sequence[str],\n method: str = 'update') -> None:\n if build_docnames is None:\n build_docnames = sorted(self.env.all_docs)\n\n logger.info(bold('running tests...'))\n for docname in build_docnames:\n # no need to resolve the doctree\n doctree = self.env.get_doctree(docname)\n self.test_doc(docname, doctree)\n\n def get_filename_for_node(self, node: Node, docname: str) -> str:\n \"\"\"Try to get the file which actually contains the doctest, not the\n filename of the document it's included in.\"\"\"\n try:\n filename = relpath(node.source, self.env.srcdir)\\\n .rsplit(':docstring of ', maxsplit=1)[0]\n except Exception:\n filename = self.env.doc2path(docname, base=None)\n return filename", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.get_line_number_DocTestBuilder.skipped.if_skipif_not_in_node_.else_.return.should_skip": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.get_line_number_DocTestBuilder.skipped.if_skipif_not_in_node_.else_.return.should_skip", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 368, "end_line": 395, "span_ids": ["DocTestBuilder.skipped", "DocTestBuilder.get_line_number"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocTestBuilder(Builder):\n\n @staticmethod\n def get_line_number(node: Node) -> int:\n \"\"\"Get the real line number or admit we don't know.\"\"\"\n # TODO: Work out how to store or calculate real (file-relative)\n # line numbers for doctest blocks in docstrings.\n if ':docstring of ' in path.basename(node.source or ''):\n # The line number is given relative to the stripped docstring,\n # not the file. This is correct where it is set, in\n # `docutils.nodes.Node.setup_child`, but Sphinx should report\n # relative to the file, not the docstring.\n return None\n if node.line is not None:\n # TODO: find the root cause of this off by one error.\n return node.line - 1\n return None\n\n def skipped(self, node: Element) -> bool:\n if 'skipif' not in node:\n return False\n else:\n condition = node['skipif']\n context: Dict[str, Any] = {}\n if self.config.doctest_global_setup:\n exec(self.config.doctest_global_setup, context)\n should_skip = eval(condition, context)\n if self.config.doctest_global_cleanup:\n exec(self.config.doctest_global_cleanup, context)\n return should_skip", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.test_doc_DocTestBuilder.test_doc.if_self_cleanup_runner_tr.self_cleanup_tries_res": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.test_doc_DocTestBuilder.test_doc.if_self_cleanup_runner_tr.self_cleanup_tries_res", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 397, "end_line": 473, "span_ids": ["DocTestBuilder.test_doc"], "tokens": 748}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocTestBuilder(Builder):\n\n def test_doc(self, docname: str, doctree: Node) -> None:\n groups: Dict[str, TestGroup] = {}\n add_to_all_groups = []\n self.setup_runner = SphinxDocTestRunner(verbose=False,\n optionflags=self.opt)\n self.test_runner = SphinxDocTestRunner(verbose=False,\n optionflags=self.opt)\n self.cleanup_runner = SphinxDocTestRunner(verbose=False,\n optionflags=self.opt)\n\n self.test_runner._fakeout = self.setup_runner._fakeout # type: ignore\n self.cleanup_runner._fakeout = self.setup_runner._fakeout # type: ignore\n\n if self.config.doctest_test_doctest_blocks:\n def condition(node: Node) -> bool:\n return (isinstance(node, (nodes.literal_block, nodes.comment)) and\n 'testnodetype' in node) or \\\n isinstance(node, nodes.doctest_block)\n else:\n def condition(node: Node) -> bool:\n return isinstance(node, (nodes.literal_block, nodes.comment)) \\\n and 'testnodetype' in node\n for node in doctree.findall(condition): # type: Element\n if self.skipped(node):\n continue\n\n source = node['test'] if 'test' in node else node.astext()\n filename = self.get_filename_for_node(node, docname)\n line_number = self.get_line_number(node)\n if not source:\n logger.warning(__('no code/output in %s block at %s:%s'),\n node.get('testnodetype', 'doctest'),\n filename, line_number)\n code = TestCode(source, type=node.get('testnodetype', 'doctest'),\n filename=filename, lineno=line_number,\n options=node.get('options'))\n node_groups = node.get('groups', ['default'])\n if '*' in node_groups:\n add_to_all_groups.append(code)\n continue\n for groupname in node_groups:\n if groupname not in groups:\n groups[groupname] = TestGroup(groupname)\n groups[groupname].add_code(code)\n for code in add_to_all_groups:\n for group in groups.values():\n group.add_code(code)\n if self.config.doctest_global_setup:\n code = TestCode(self.config.doctest_global_setup,\n 'testsetup', filename=None, lineno=0)\n for group in groups.values():\n group.add_code(code, prepend=True)\n if self.config.doctest_global_cleanup:\n code = TestCode(self.config.doctest_global_cleanup,\n 'testcleanup', filename=None, lineno=0)\n for group in groups.values():\n group.add_code(code)\n if not groups:\n return\n\n self._out('\\nDocument: %s\\n----------%s\\n' %\n (docname, '-' * len(docname)))\n for group in groups.values():\n self.test_group(group)\n # Separately count results from setup code\n res_f, res_t = self.setup_runner.summarize(self._out, verbose=False)\n self.setup_failures += res_f\n self.setup_tries += res_t\n if self.test_runner.tries:\n res_f, res_t = self.test_runner.summarize(self._out, verbose=True)\n self.total_failures += res_f\n self.total_tries += res_t\n if self.cleanup_runner.tries:\n res_f, res_t = self.cleanup_runner.summarize(self._out,\n verbose=True)\n self.cleanup_failures += res_f\n self.cleanup_tries += res_t", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.compile_DocTestBuilder.test_group.run_setup_cleanup.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.compile_DocTestBuilder.test_group.run_setup_cleanup.return.True", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 475, "end_line": 498, "span_ids": ["DocTestBuilder.compile", "DocTestBuilder.test_group"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocTestBuilder(Builder):\n\n def compile(self, code: str, name: str, type: str, flags: Any, dont_inherit: bool) -> Any:\n return compile(code, name, self.type, flags, dont_inherit)\n\n def test_group(self, group: TestGroup) -> None:\n ns: Dict = {}\n\n def run_setup_cleanup(runner: Any, testcodes: List[TestCode], what: Any) -> bool:\n examples = []\n for testcode in testcodes:\n example = doctest.Example(testcode.code, '', lineno=testcode.lineno)\n examples.append(example)\n if not examples:\n return True\n # simulate a doctest with the code\n sim_doctest = doctest.DocTest(examples, {},\n '%s (%s code)' % (group.name, what),\n testcodes[0].filename, 0, None)\n sim_doctest.globs = ns\n old_f = runner.failures\n self.type = 'exec' # the snippet may contain multiple statements\n runner.run(sim_doctest, out=self._warn_out, clear_globs=False)\n if runner.failures > old_f:\n return False\n return True\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.test_group._run_the_setup_code_DocTestBuilder.test_group.run_setup_cleanup_self_cl": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_DocTestBuilder.test_group._run_the_setup_code_DocTestBuilder.test_group.run_setup_cleanup_self_cl", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 500, "end_line": 547, "span_ids": ["DocTestBuilder.test_group"], "tokens": 509}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocTestBuilder(Builder):\n\n def test_group(self, group: TestGroup) -> None:\n\n # run the setup code\n if not run_setup_cleanup(self.setup_runner, group.setup, 'setup'):\n # if setup failed, don't run the group\n return\n\n # run the tests\n for code in group.tests:\n if len(code) == 1:\n # ordinary doctests (code/output interleaved)\n try:\n test = parser.get_doctest(code[0].code, {}, group.name,\n code[0].filename, code[0].lineno)\n except Exception:\n logger.warning(__('ignoring invalid doctest code: %r'), code[0].code,\n location=(code[0].filename, code[0].lineno))\n continue\n if not test.examples:\n continue\n for example in test.examples:\n # apply directive's comparison options\n new_opt = code[0].options.copy()\n new_opt.update(example.options)\n example.options = new_opt\n self.type = 'single' # as for ordinary doctests\n else:\n # testcode and output separate\n output = code[1].code if code[1] else ''\n options = code[1].options if code[1] else {}\n # disable <BLANKLINE> processing as it is not needed\n options[doctest.DONT_ACCEPT_BLANKLINE] = True\n # find out if we're testing an exception\n m = parser._EXCEPTION_RE.match(output) # type: ignore\n if m:\n exc_msg = m.group('msg')\n else:\n exc_msg = None\n example = doctest.Example(code[0].code, output, exc_msg=exc_msg,\n lineno=code[0].lineno, options=options)\n test = doctest.DocTest([example], {}, group.name,\n code[0].filename, code[0].lineno, None)\n self.type = 'exec' # multiple statements again\n # DocTest.__init__ copies the globs namespace, which we don't want\n test.globs = ns\n # also don't clear the globs namespace after running the doctest\n self.test_runner.run(test, out=self._warn_out, clear_globs=False)\n\n # run the cleanup\n run_setup_cleanup(self.cleanup_runner, group.cleanup, 'cleanup')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 550, "end_line": 567, "span_ids": ["setup"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_directive('testsetup', TestsetupDirective)\n app.add_directive('testcleanup', TestcleanupDirective)\n app.add_directive('doctest', DoctestDirective)\n app.add_directive('testcode', TestcodeDirective)\n app.add_directive('testoutput', TestoutputDirective)\n app.add_builder(DocTestBuilder)\n # this config value adds to sys.path\n app.add_config_value('doctest_path', [], False)\n app.add_config_value('doctest_test_doctest_blocks', 'default', False)\n app.add_config_value('doctest_global_setup', '', False)\n app.add_config_value('doctest_global_cleanup', '', False)\n app.add_config_value(\n 'doctest_default_flags',\n doctest.DONT_ACCEPT_TRUE_FOR_1 | doctest.ELLIPSIS | doctest.IGNORE_EXCEPTION_DETAIL,\n False)\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/duration.py_on_builder_inited_on_doctree_read.domain_note_reading_durat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/duration.py_on_builder_inited_on_doctree_read.domain_note_reading_durat", "embedding": null, "metadata": {"file_path": "sphinx/ext/duration.py", "file_name": "duration.py", "file_type": "text/x-python", "category": "implementation", "start_line": 50, "end_line": 69, "span_ids": ["on_builder_inited", "on_source_read", "on_doctree_read"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def on_builder_inited(app: Sphinx) -> None:\n \"\"\"Initialize DurationDomain on bootstrap.\n\n This clears results of last build.\n \"\"\"\n domain = cast(DurationDomain, app.env.get_domain('duration'))\n domain.clear()\n\n\ndef on_source_read(app: Sphinx, docname: str, content: List[str]) -> None:\n \"\"\"Start to measure reading duration.\"\"\"\n app.env.temp_data['started_at'] = datetime.now()\n\n\ndef on_doctree_read(app: Sphinx, doctree: nodes.document) -> None:\n \"\"\"Record a reading duration.\"\"\"\n started_at = app.env.temp_data.get('started_at')\n duration = datetime.now() - started_at\n domain = cast(DurationDomain, app.env.get_domain('duration'))\n domain.note_reading_duration(duration)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/duration.py_on_build_finished_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/duration.py_on_build_finished_", "embedding": null, "metadata": {"file_path": "sphinx/ext/duration.py", "file_name": "duration.py", "file_type": "text/x-python", "category": "implementation", "start_line": 72, "end_line": 97, "span_ids": ["on_build_finished", "setup"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def on_build_finished(app: Sphinx, error: Exception) -> None:\n \"\"\"Display duration ranking on current build.\"\"\"\n domain = cast(DurationDomain, app.env.get_domain('duration'))\n durations = sorted(domain.reading_durations.items(), key=itemgetter(1), reverse=True)\n if not durations:\n return\n\n logger.info('')\n logger.info(__('====================== slowest reading durations ======================='))\n for docname, d in islice(durations, 5):\n logger.info('%d.%03d %s', d.seconds, d.microseconds / 1000, docname)\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_domain(DurationDomain)\n app.connect('builder-inited', on_builder_inited)\n app.connect('source-read', on_source_read)\n app.connect('doctree-read', on_doctree_read)\n app.connect('build-finished', on_build_finished)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/ifconfig.py_process_ifconfig_nodes_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/ifconfig.py_process_ifconfig_nodes_", "embedding": null, "metadata": {"file_path": "sphinx/ext/ifconfig.py", "file_name": "ifconfig.py", "file_type": "text/x-python", "category": "implementation", "start_line": 50, "end_line": 77, "span_ids": ["setup", "process_ifconfig_nodes"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def process_ifconfig_nodes(app: Sphinx, doctree: nodes.document, docname: str) -> None:\n ns = {confval.name: confval.value for confval in app.config}\n ns.update(app.config.__dict__.copy())\n ns['builder'] = app.builder.name\n for node in doctree.findall(ifconfig):\n try:\n res = eval(node['expr'], ns)\n except Exception as err:\n # handle exceptions in a clean fashion\n from traceback import format_exception_only\n msg = ''.join(format_exception_only(err.__class__, err))\n newnode = doctree.reporter.error('Exception occurred in '\n 'ifconfig expression: \\n%s' %\n msg, base_node=node)\n node.replace_self(newnode)\n else:\n if not res:\n node.replace_self([])\n else:\n node.replace_self(node.children)\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_node(ifconfig)\n app.add_directive('ifconfig', IfConfig)\n app.connect('doctree-resolved', process_ifconfig_nodes)\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgconverter.py_ImagemagickConverter.convert_ImagemagickConverter.convert.try_.except_CalledProcessError.raise_ExtensionError____": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgconverter.py_ImagemagickConverter.convert_ImagemagickConverter.convert.try_.except_CalledProcessError.raise_ExtensionError____", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgconverter.py", "file_name": "imgconverter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 52, "end_line": 73, "span_ids": ["ImagemagickConverter.convert"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ImagemagickConverter(ImageConverter):\n\n def convert(self, _from: str, _to: str) -> bool:\n \"\"\"Converts the image to expected one.\"\"\"\n try:\n # append an index 0 to source filename to pick up the first frame\n # (or first page) of image (ex. Animation GIF, PDF)\n _from += '[0]'\n\n args = ([self.config.image_converter] +\n self.config.image_converter_args +\n [_from, _to])\n logger.debug('Invoking %r ...', args)\n subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True)\n return True\n except OSError:\n logger.warning(__('convert command %r cannot be run, '\n 'check the image_converter setting'),\n self.config.image_converter)\n return False\n except CalledProcessError as exc:\n raise ExtensionError(__('convert exited with error:\\n'\n '[stderr]\\n%r\\n[stdout]\\n%r') %\n (exc.stderr, exc.stdout)) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgconverter.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgconverter.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgconverter.py", "file_name": "imgconverter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 76, "end_line": 95, "span_ids": ["setup"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_post_transform(ImagemagickConverter)\n if sys.platform == 'win32':\n # On Windows, we use Imagemagik v7 by default to avoid the trouble for\n # convert.exe bundled with Windows.\n app.add_config_value('image_converter', 'magick', 'env')\n app.add_config_value('image_converter_args', ['convert'], 'env')\n else:\n # On other platform, we use Imagemagick v6 by default. Especially,\n # Debian/Ubuntu are still based of v6. So we can't use \"magick\" command\n # for these platforms.\n app.add_config_value('image_converter', 'convert', 'env')\n app.add_config_value('image_converter_args', [], 'env')\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_generate_latex_macro_generate_latex_macro.return.LaTeXRenderer_templates_p": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_generate_latex_macro_generate_latex_macro.return.LaTeXRenderer_templates_p", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 113, "end_line": 134, "span_ids": ["generate_latex_macro"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def generate_latex_macro(image_format: str,\n math: str, config: Config, confdir: str = '') -> str:\n \"\"\"Generate LaTeX macro.\"\"\"\n variables = {\n 'fontsize': config.imgmath_font_size,\n 'baselineskip': int(round(config.imgmath_font_size * 1.2)),\n 'preamble': config.imgmath_latex_preamble,\n 'tightpage': '' if image_format == 'png' else ',tightpage',\n 'math': math\n }\n\n if config.imgmath_use_preview:\n template_name = 'preview.tex_t'\n else:\n template_name = 'template.tex_t'\n\n for template_dir in config.templates_path:\n template = path.join(confdir, template_dir, template_name)\n if path.exists(template):\n return LaTeXRenderer().render(template, variables)\n\n return LaTeXRenderer(templates_path).render(template_name, variables)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_ensure_tempdir_ensure_tempdir._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_ensure_tempdir_ensure_tempdir._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 137, "end_line": 147, "span_ids": ["ensure_tempdir"], "tokens": 107}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def ensure_tempdir(builder: Builder) -> str:\n \"\"\"Create temporary directory.\n\n use only one tempdir per build -- the use of a directory is cleaner\n than using temporary files, since we can clean up everything at once\n just removing the whole directory (see cleanup_tempdir)\n \"\"\"\n if not hasattr(builder, '_imgmath_tempdir'):\n builder._imgmath_tempdir = tempfile.mkdtemp() # type: ignore\n\n return builder._imgmath_tempdir # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_compile_math_compile_math.try_.except_CalledProcessError.raise_MathExtError_latex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_compile_math_compile_math.try_.except_CalledProcessError.raise_MathExtError_latex", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 113, "end_line": 138, "span_ids": ["compile_math"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def compile_math(latex: str, builder: Builder) -> str:\n \"\"\"Compile LaTeX macros for math to DVI.\"\"\"\n tempdir = ensure_tempdir(builder)\n filename = path.join(tempdir, 'math.tex')\n with open(filename, 'w', encoding='utf-8') as f:\n f.write(latex)\n\n # build latex command; old versions of latex don't have the\n # --output-directory option, so we have to manually chdir to the\n # temp dir to run it.\n command = [builder.config.imgmath_latex, '--interaction=nonstopmode']\n # add custom args from the config file\n command.extend(builder.config.imgmath_latex_args)\n command.append('math.tex')\n\n try:\n subprocess.run(command, stdout=PIPE, stderr=PIPE, cwd=tempdir, check=True,\n encoding='ascii')\n return path.join(tempdir, 'math.dvi')\n except OSError as exc:\n logger.warning(__('LaTeX command %r cannot be run (needed for math '\n 'display), check the imgmath_latex setting'),\n builder.config.imgmath_latex)\n raise InvokeError from exc\n except CalledProcessError as exc:\n raise MathExtError('latex exited with error', exc.stderr, exc.stdout) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_convert_dvi_to_image_convert_dvi_to_image.try_.except_CalledProcessError.raise_MathExtError_s_ex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_convert_dvi_to_image_convert_dvi_to_image.try_.except_CalledProcessError.raise_MathExtError_s_ex", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 141, "end_line": 152, "span_ids": ["convert_dvi_to_image"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def convert_dvi_to_image(command: List[str], name: str) -> Tuple[str, str]:\n \"\"\"Convert DVI file to specific image format.\"\"\"\n try:\n ret = subprocess.run(command, stdout=PIPE, stderr=PIPE, check=True, encoding='ascii')\n return ret.stdout, ret.stderr\n except OSError as exc:\n logger.warning(__('%s command %r cannot be run (needed for math '\n 'display), check the imgmath_%s setting'),\n name, command[0], name)\n raise InvokeError from exc\n except CalledProcessError as exc:\n raise MathExtError('%s exited with error' % name, exc.stderr, exc.stdout) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_convert_dvi_to_png_convert_dvi_to_png.return.filename_depth": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_convert_dvi_to_png_convert_dvi_to_png.return.filename_depth", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 191, "end_line": 214, "span_ids": ["convert_dvi_to_png"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def convert_dvi_to_png(dvipath: str, builder: Builder) -> Tuple[str, int]:\n \"\"\"Convert DVI file to PNG image.\"\"\"\n tempdir = ensure_tempdir(builder)\n filename = path.join(tempdir, 'math.png')\n\n name = 'dvipng'\n command = [builder.config.imgmath_dvipng, '-o', filename, '-T', 'tight', '-z9']\n command.extend(builder.config.imgmath_dvipng_args)\n if builder.config.imgmath_use_preview:\n command.append('--depth')\n command.append(dvipath)\n\n stdout, stderr = convert_dvi_to_image(command, name)\n\n depth = None\n if builder.config.imgmath_use_preview:\n for line in stdout.splitlines():\n matched = depth_re.match(line)\n if matched:\n depth = int(matched.group(1))\n write_png_depth(filename, depth)\n break\n\n return filename, depth", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_convert_dvi_to_svg_convert_dvi_to_svg.return.filename_depth": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_convert_dvi_to_svg_convert_dvi_to_svg.return.filename_depth", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 217, "end_line": 238, "span_ids": ["convert_dvi_to_svg"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def convert_dvi_to_svg(dvipath: str, builder: Builder) -> Tuple[str, int]:\n \"\"\"Convert DVI file to SVG image.\"\"\"\n tempdir = ensure_tempdir(builder)\n filename = path.join(tempdir, 'math.svg')\n\n name = 'dvisvgm'\n command = [builder.config.imgmath_dvisvgm, '-o', filename]\n command.extend(builder.config.imgmath_dvisvgm_args)\n command.append(dvipath)\n\n stdout, stderr = convert_dvi_to_image(command, name)\n\n depth = None\n if builder.config.imgmath_use_preview:\n for line in stderr.splitlines(): # not stdout !\n matched = depthsvg_re.match(line)\n if matched:\n depth = round(float(matched.group(1)) * 100 / 72.27) # assume 100ppi\n write_svg_depth(filename, depth)\n break\n\n return filename, depth", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_render_math_render_math.return.relfn_depth": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_render_math_render_math.return.relfn_depth", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 241, "end_line": 300, "span_ids": ["render_math"], "tokens": 592}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render_math(self: HTMLTranslator, math: str) -> Tuple[str, int]:\n \"\"\"Render the LaTeX math expression *math* using latex and dvipng or\n dvisvgm.\n\n Return the filename relative to the built document and the \"depth\",\n that is, the distance of image bottom and baseline in pixels, if the\n option to use preview_latex is switched on.\n\n Error handling may seem strange, but follows a pattern: if LaTeX or dvipng\n (dvisvgm) aren't available, only a warning is generated (since that enables\n people on machines without these programs to at least build the rest of the\n docs successfully). If the programs are there, however, they may not fail\n since that indicates a problem in the math source.\n \"\"\"\n image_format = self.builder.config.imgmath_image_format.lower()\n if image_format not in SUPPORT_FORMAT:\n raise MathExtError('imgmath_image_format must be either \"png\" or \"svg\"')\n\n latex = generate_latex_macro(image_format,\n math,\n self.builder.config,\n self.builder.confdir)\n\n filename = \"%s.%s\" % (sha1(latex.encode()).hexdigest(), image_format)\n relfn = posixpath.join(self.builder.imgpath, 'math', filename)\n outfn = path.join(self.builder.outdir, self.builder.imagedir, 'math', filename)\n if path.isfile(outfn):\n if image_format == 'png':\n depth = read_png_depth(outfn)\n elif image_format == 'svg':\n depth = read_svg_depth(outfn)\n return relfn, depth\n\n # if latex or dvipng (dvisvgm) has failed once, don't bother to try again\n if hasattr(self.builder, '_imgmath_warned_latex') or \\\n hasattr(self.builder, '_imgmath_warned_image_translator'):\n return None, None\n\n # .tex -> .dvi\n try:\n dvipath = compile_math(latex, self.builder)\n except InvokeError:\n self.builder._imgmath_warned_latex = True # type: ignore\n return None, None\n\n # .dvi -> .png/.svg\n try:\n if image_format == 'png':\n imgpath, depth = convert_dvi_to_png(dvipath, self.builder)\n elif image_format == 'svg':\n imgpath, depth = convert_dvi_to_svg(dvipath, self.builder)\n except InvokeError:\n self.builder._imgmath_warned_image_translator = True # type: ignore\n return None, None\n\n # Move generated image on tempdir to build dir\n ensuredir(path.dirname(outfn))\n shutil.move(imgpath, outfn)\n\n return relfn, depth", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_cleanup_tempdir_html_visit_math.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_cleanup_tempdir_html_visit_math.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 303, "end_line": 339, "span_ids": ["html_visit_math", "get_tooltip", "cleanup_tempdir"], "tokens": 328}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def cleanup_tempdir(app: Sphinx, exc: Exception) -> None:\n if exc:\n return\n if not hasattr(app.builder, '_imgmath_tempdir'):\n return\n try:\n shutil.rmtree(app.builder._mathpng_tempdir) # type: ignore\n except Exception:\n pass\n\n\ndef get_tooltip(self: HTMLTranslator, node: Element) -> str:\n if self.builder.config.imgmath_add_tooltips:\n return ' alt=\"%s\"' % self.encode(node.astext()).strip()\n return ''\n\n\ndef html_visit_math(self: HTMLTranslator, node: nodes.math) -> None:\n try:\n fname, depth = render_math(self, '$' + node.astext() + '$')\n except MathExtError as exc:\n msg = str(exc)\n sm = nodes.system_message(msg, type='WARNING', level=2,\n backrefs=[], source=node.astext())\n sm.walkabout(self)\n logger.warning(__('display latex %r: %s'), node.astext(), msg)\n raise nodes.SkipNode from exc\n if fname is None:\n # something failed -- use text-only as a bad substitute\n self.body.append('<span class=\"math\">%s</span>' %\n self.encode(node.astext()).strip())\n else:\n c = ('<img class=\"math\" src=\"%s\"' % fname) + get_tooltip(self, node)\n if depth is not None:\n c += ' style=\"vertical-align: %dpx\"' % (-depth)\n self.body.append(c + '/>')\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_try_import_try_import.try_.except_ImportError_.try_.except_ImportError_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_try_import_try_import.try_.except_ImportError_.try_.except_ImportError_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 69, "end_line": 95, "span_ids": ["try_import"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def try_import(objname: str) -> Any:\n \"\"\"Import a object or module using *name* and *currentmodule*.\n *name* should be a relative name from *currentmodule* or\n a fully-qualified name.\n\n Returns imported object or module. If failed, returns None value.\n \"\"\"\n try:\n return import_module(objname)\n except TypeError:\n # Relative import\n return None\n except ImportError:\n matched = module_sig_re.match(objname)\n\n if not matched:\n return None\n\n modname, attrname = matched.groups()\n\n if modname is None:\n return None\n try:\n module = import_module(modname)\n return getattr(module, attrname, None)\n except ImportError:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_import_classes_InheritanceException.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_import_classes_InheritanceException.pass", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 130, "span_ids": ["InheritanceException", "import_classes"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def import_classes(name: str, currmodule: str) -> Any:\n \"\"\"Import a class using its fully-qualified *name*.\"\"\"\n target = None\n\n # import class or module using currmodule\n if currmodule:\n target = try_import(currmodule + '.' + name)\n\n # import class or module without currmodule\n if target is None:\n target = try_import(name)\n\n if target is None:\n raise InheritanceException(\n 'Could not import class or module %r specified for '\n 'inheritance diagram' % name)\n\n if inspect.isclass(target):\n # If imported object is a class, just return it\n return [target]\n elif inspect.ismodule(target):\n # If imported object is a module, return classes defined on it\n classes = []\n for cls in target.__dict__.values():\n if inspect.isclass(cls) and cls.__module__ == target.__name__:\n classes.append(cls)\n return classes\n raise InheritanceException('%r specified for inheritance diagram is '\n 'not a class or module' % name)\n\n\nclass InheritanceException(Exception):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph_InheritanceGraph._import_classes.return.classes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph_InheritanceGraph._import_classes.return.classes", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 127, "end_line": 154, "span_ids": ["InheritanceGraph._import_classes", "InheritanceGraph"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InheritanceGraph:\n \"\"\"\n Given a list of classes, determines the set of classes that they inherit\n from all the way to the root \"object\", and then is able to generate a\n graphviz dot graph from them.\n \"\"\"\n def __init__(self, class_names: List[str], currmodule: str, show_builtins: bool = False,\n private_bases: bool = False, parts: int = 0, aliases: Dict[str, str] = None,\n top_classes: List[Any] = []) -> None:\n \"\"\"*class_names* is a list of child classes to show bases from.\n\n If *show_builtins* is True, then Python builtins will be shown\n in the graph.\n \"\"\"\n self.class_names = class_names\n classes = self._import_classes(class_names, currmodule)\n self.class_info = self._class_info(classes, show_builtins,\n private_bases, parts, aliases, top_classes)\n if not self.class_info:\n raise InheritanceException('No classes found for '\n 'inheritance diagram')\n\n def _import_classes(self, class_names: List[str], currmodule: str) -> List[Any]:\n \"\"\"Import a list of classes.\"\"\"\n classes: List[Any] = []\n for name in class_names:\n classes.extend(import_classes(name, currmodule))\n return classes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph._class_info.recurse_InheritanceGraph._class_info.return.list_all_classes_values_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph._class_info.recurse_InheritanceGraph._class_info.return.list_all_classes_values_", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 176, "end_line": 213, "span_ids": ["InheritanceGraph._class_info"], "tokens": 339}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InheritanceGraph:\n\n def _class_info(self, classes: List[Any], show_builtins: bool, private_bases: bool,\n parts: int, aliases: Dict[str, str], top_classes: List[Any]\n ) -> List[Tuple[str, str, List[str], str]]:\n # ... other code\n\n def recurse(cls: Any) -> None:\n if not show_builtins and cls in py_builtins:\n return\n if not private_bases and cls.__name__.startswith('_'):\n return\n\n nodename = self.class_name(cls, parts, aliases)\n fullname = self.class_name(cls, 0, aliases)\n\n # Use first line of docstring as tooltip, if available\n tooltip = None\n try:\n if cls.__doc__:\n doc = cls.__doc__.strip().split(\"\\n\")[0]\n if doc:\n tooltip = '\"%s\"' % doc.replace('\"', '\\\\\"')\n except Exception: # might raise AttributeError for strange classes\n pass\n\n baselist: List[str] = []\n all_classes[cls] = (nodename, fullname, baselist, tooltip)\n\n if fullname in top_classes:\n return\n\n for base in cls.__bases__:\n if not show_builtins and base in py_builtins:\n continue\n if not private_bases and base.__name__.startswith('_'):\n continue\n baselist.append(self.class_name(base, parts, aliases))\n if base not in all_classes:\n recurse(base)\n\n for cls in classes:\n recurse(cls)\n\n return list(all_classes.values())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph.class_name_InheritanceGraph.class_name.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph.class_name_InheritanceGraph.class_name.return.result", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 222, "end_line": 240, "span_ids": ["InheritanceGraph.class_name"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InheritanceGraph:\n\n def class_name(self, cls: Any, parts: int = 0, aliases: Dict[str, str] = None) -> str:\n \"\"\"Given a class object, return a fully-qualified name.\n\n This works for things I've tested in matplotlib so far, but may not be\n completely general.\n \"\"\"\n module = cls.__module__\n if module in ('__builtin__', 'builtins'):\n fullname = cls.__name__\n else:\n fullname = '%s.%s' % (module, cls.__qualname__)\n if parts == 0:\n result = fullname\n else:\n name_parts = fullname.split('.')\n result = '.'.join(name_parts[-parts:])\n if aliases is not None and result in aliases:\n return aliases[result]\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph.get_all_class_names_InheritanceGraph._format_graph_attrs.return._join_s_s_n_x_f": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph.get_all_class_names_InheritanceGraph._format_graph_attrs.return._join_s_s_n_x_f", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 242, "end_line": 270, "span_ids": ["InheritanceGraph.get_all_class_names", "InheritanceGraph._format_graph_attrs", "InheritanceGraph:3", "InheritanceGraph._format_node_attrs"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InheritanceGraph:\n\n def get_all_class_names(self) -> List[str]:\n \"\"\"Get all of the class names involved in the graph.\"\"\"\n return [fullname for (_, fullname, _, _) in self.class_info]\n\n # These are the default attrs for graphviz\n default_graph_attrs = {\n 'rankdir': 'LR',\n 'size': '\"8.0, 12.0\"',\n 'bgcolor': 'transparent',\n }\n default_node_attrs = {\n 'shape': 'box',\n 'fontsize': 10,\n 'height': 0.25,\n 'fontname': '\"Vera Sans, DejaVu Sans, Liberation Sans, '\n 'Arial, Helvetica, sans\"',\n 'style': '\"setlinewidth(0.5),filled\"',\n 'fillcolor': 'white',\n }\n default_edge_attrs = {\n 'arrowsize': 0.5,\n 'style': '\"setlinewidth(0.5)\"',\n }\n\n def _format_node_attrs(self, attrs: Dict) -> str:\n return ','.join(['%s=%s' % x for x in sorted(attrs.items())])\n\n def _format_graph_attrs(self, attrs: Dict) -> str:\n return ''.join(['%s=%s;\\n' % x for x in sorted(attrs.items())])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph.generate_dot_inheritance_diagram.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph.generate_dot_inheritance_diagram.pass", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 265, "end_line": 317, "span_ids": ["InheritanceGraph.generate_dot", "inheritance_diagram"], "tokens": 446}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InheritanceGraph:\n\n def generate_dot(self, name: str, urls: Dict = {}, env: BuildEnvironment = None,\n graph_attrs: Dict = {}, node_attrs: Dict = {}, edge_attrs: Dict = {}\n ) -> str:\n \"\"\"Generate a graphviz dot graph from the classes that were passed in\n to __init__.\n\n *name* is the name of the graph.\n\n *urls* is a dictionary mapping class names to HTTP URLs.\n\n *graph_attrs*, *node_attrs*, *edge_attrs* are dictionaries containing\n key/value pairs to pass on as graphviz properties.\n \"\"\"\n g_attrs = self.default_graph_attrs.copy()\n n_attrs = self.default_node_attrs.copy()\n e_attrs = self.default_edge_attrs.copy()\n g_attrs.update(graph_attrs)\n n_attrs.update(node_attrs)\n e_attrs.update(edge_attrs)\n if env:\n g_attrs.update(env.config.inheritance_graph_attrs)\n n_attrs.update(env.config.inheritance_node_attrs)\n e_attrs.update(env.config.inheritance_edge_attrs)\n\n res: List[str] = []\n res.append('digraph %s {\\n' % name)\n res.append(self._format_graph_attrs(g_attrs))\n\n for name, fullname, bases, tooltip in sorted(self.class_info):\n # Write the node\n this_node_attrs = n_attrs.copy()\n if fullname in urls:\n this_node_attrs['URL'] = '\"%s\"' % urls[fullname]\n this_node_attrs['target'] = '\"_top\"'\n if tooltip:\n this_node_attrs['tooltip'] = tooltip\n res.append(' \"%s\" [%s];\\n' %\n (name, self._format_node_attrs(this_node_attrs)))\n\n # Write the edges\n for base_name in bases:\n res.append(' \"%s\" -> \"%s\" [%s];\\n' %\n (base_name, name,\n self._format_node_attrs(e_attrs)))\n res.append('}\\n')\n return ''.join(res)\n\n\nclass inheritance_diagram(graphviz):\n \"\"\"\n A docutils node to use as a placeholder for the inheritance diagram.\n \"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceDiagram_InheritanceDiagram.run.if_caption_not_in_self_.else_.return._figure_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceDiagram_InheritanceDiagram.run.if_caption_not_in_self_.else_.return._figure_", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 320, "end_line": 378, "span_ids": ["InheritanceDiagram", "InheritanceDiagram.run"], "tokens": 528}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InheritanceDiagram(SphinxDirective):\n \"\"\"\n Run when the inheritance_diagram directive is first encountered.\n \"\"\"\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {\n 'parts': int,\n 'private-bases': directives.flag,\n 'caption': directives.unchanged,\n 'top-classes': directives.unchanged_required,\n }\n\n def run(self) -> List[Node]:\n node = inheritance_diagram()\n node.document = self.state.document\n class_names = self.arguments[0].split()\n class_role = self.env.get_domain('py').role('class')\n # Store the original content for use as a hash\n node['parts'] = self.options.get('parts', 0)\n node['content'] = ', '.join(class_names)\n node['top-classes'] = []\n for cls in self.options.get('top-classes', '').split(','):\n cls = cls.strip()\n if cls:\n node['top-classes'].append(cls)\n\n # Create a graph starting with the list of classes\n try:\n graph = InheritanceGraph(\n class_names, self.env.ref_context.get('py:module'),\n parts=node['parts'],\n private_bases='private-bases' in self.options,\n aliases=self.config.inheritance_alias,\n top_classes=node['top-classes'])\n except InheritanceException as err:\n return [node.document.reporter.warning(err, line=self.lineno)]\n\n # Create xref nodes for each target of the graph's image map and\n # add them to the doc tree so that Sphinx can resolve the\n # references to real URLs later. These nodes will eventually be\n # removed from the doctree after we're done with them.\n for name in graph.get_all_class_names():\n refnodes, x = class_role( # type: ignore\n 'class', ':class:`%s`' % name, name, 0, self.state) # type: ignore\n node.extend(refnodes)\n # Store the graph object so we can use it to generate the\n # dot file later\n node['graph'] = graph\n\n if 'caption' not in self.options:\n self.add_name(node)\n return [node]\n else:\n figure = figure_wrapper(self, node, self.options['caption'])\n self.add_name(figure)\n return [figure]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_get_graph_hash_html_visit_inheritance_diagram.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_get_graph_hash_html_visit_inheritance_diagram.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 388, "end_line": 423, "span_ids": ["get_graph_hash", "html_visit_inheritance_diagram"], "tokens": 366}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_graph_hash(node: inheritance_diagram) -> str:\n encoded = (node['content'] + str(node['parts'])).encode()\n return md5(encoded).hexdigest()[-10:]\n\n\ndef html_visit_inheritance_diagram(self: HTMLTranslator, node: inheritance_diagram) -> None:\n \"\"\"\n Output the graph for HTML. This will insert a PNG with clickable\n image map.\n \"\"\"\n graph = node['graph']\n\n graph_hash = get_graph_hash(node)\n name = 'inheritance%s' % graph_hash\n\n # Create a mapping from fully-qualified class names to URLs.\n graphviz_output_format = self.builder.env.config.graphviz_output_format.upper()\n current_filename = self.builder.current_docname + self.builder.out_suffix\n urls = {}\n pending_xrefs = cast(Iterable[addnodes.pending_xref], node)\n for child in pending_xrefs:\n if child.get('refuri') is not None:\n if graphviz_output_format == 'SVG':\n urls[child['reftitle']] = \"../\" + child.get('refuri')\n else:\n urls[child['reftitle']] = child.get('refuri')\n elif child.get('refid') is not None:\n if graphviz_output_format == 'SVG':\n urls[child['reftitle']] = '../' + current_filename + '#' + child.get('refid')\n else:\n urls[child['reftitle']] = '#' + child.get('refid')\n\n dotcode = graph.generate_dot(name, urls, env=self.builder.env)\n render_dot_html(self, node, dotcode, {}, 'inheritance', 'inheritance',\n alt='Inheritance diagram of ' + node['content'])\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_latex_visit_inheritance_diagram_latex_visit_inheritance_diagram.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_latex_visit_inheritance_diagram_latex_visit_inheritance_diagram.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 426, "end_line": 438, "span_ids": ["latex_visit_inheritance_diagram"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def latex_visit_inheritance_diagram(self: LaTeXTranslator, node: inheritance_diagram) -> None:\n \"\"\"\n Output the graph for LaTeX. This will insert a PDF.\n \"\"\"\n graph = node['graph']\n\n graph_hash = get_graph_hash(node)\n name = 'inheritance%s' % graph_hash\n\n dotcode = graph.generate_dot(name, env=self.builder.env,\n graph_attrs={'size': '\"6.0,6.0\"'})\n render_dot_latex(self, node, dotcode, {}, 'inheritance')\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_texinfo_visit_inheritance_diagram_skip.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_texinfo_visit_inheritance_diagram_skip.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 441, "end_line": 458, "span_ids": ["skip", "texinfo_visit_inheritance_diagram"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def texinfo_visit_inheritance_diagram(self: TexinfoTranslator, node: inheritance_diagram\n ) -> None:\n \"\"\"\n Output the graph for Texinfo. This will insert a PNG.\n \"\"\"\n graph = node['graph']\n\n graph_hash = get_graph_hash(node)\n name = 'inheritance%s' % graph_hash\n\n dotcode = graph.generate_dot(name, env=self.builder.env,\n graph_attrs={'size': '\"6.0,6.0\"'})\n render_dot_texinfo(self, node, dotcode, {}, 'inheritance')\n raise nodes.SkipNode\n\n\ndef skip(self: nodes.NodeVisitor, node: inheritance_diagram) -> None:\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 461, "end_line": 476, "span_ids": ["setup"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.setup_extension('sphinx.ext.graphviz')\n app.add_node(\n inheritance_diagram,\n latex=(latex_visit_inheritance_diagram, None),\n html=(html_visit_inheritance_diagram, None),\n text=(skip, None),\n man=(skip, None),\n texinfo=(texinfo_visit_inheritance_diagram, None))\n app.add_directive('inheritance-diagram', InheritanceDiagram)\n app.add_config_value('inheritance_graph_attrs', {}, False)\n app.add_config_value('inheritance_node_attrs', {}, False)\n app.add_config_value('inheritance_edge_attrs', {}, False)\n app.add_config_value('inheritance_alias', {}, False)\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_InventoryAdapter_InventoryAdapter.clear.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_InventoryAdapter_InventoryAdapter.clear.None_1", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 53, "end_line": 78, "span_ids": ["InventoryAdapter", "InventoryAdapter.clear", "InventoryAdapter.cache", "InventoryAdapter.named_inventory", "InventoryAdapter.main_inventory"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InventoryAdapter:\n \"\"\"Inventory adapter for environment\"\"\"\n\n def __init__(self, env: BuildEnvironment) -> None:\n self.env = env\n\n if not hasattr(env, 'intersphinx_cache'):\n self.env.intersphinx_cache = {} # type: ignore\n self.env.intersphinx_inventory = {} # type: ignore\n self.env.intersphinx_named_inventory = {} # type: ignore\n\n @property\n def cache(self) -> Dict[str, Tuple[str, int, Inventory]]:\n return self.env.intersphinx_cache # type: ignore\n\n @property\n def main_inventory(self) -> Inventory:\n return self.env.intersphinx_inventory # type: ignore\n\n @property\n def named_inventory(self) -> Dict[str, Inventory]:\n return self.env.intersphinx_named_inventory # type: ignore\n\n def clear(self) -> None:\n self.env.intersphinx_inventory.clear() # type: ignore\n self.env.intersphinx_named_inventory.clear() # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__strip_basic_auth__strip_basic_auth.return.urlunsplit_frags_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__strip_basic_auth__strip_basic_auth.return.urlunsplit_frags_", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 81, "end_line": 99, "span_ids": ["_strip_basic_auth"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _strip_basic_auth(url: str) -> str:\n \"\"\"Returns *url* with basic auth credentials removed. Also returns the\n basic auth username and password if they're present in *url*.\n\n E.g.: https://user:pass@example.com => https://example.com\n\n *url* need not include basic auth credentials.\n\n :param url: url which may or may not contain basic auth credentials\n :type url: ``str``\n\n :return: *url* with any basic auth creds removed\n :rtype: ``str``\n \"\"\"\n frags = list(urlsplit(url))\n # swap out \"user[:pass]@hostname\" for \"hostname\"\n if '@' in frags[1]:\n frags[1] = frags[1].split('@')[1]\n return urlunsplit(frags)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__read_from_url__read_from_url.return.r_raw": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__read_from_url__read_from_url.return.r_raw", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 124, "span_ids": ["_read_from_url"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _read_from_url(url: str, config: Config = None) -> IO:\n \"\"\"Reads data from *url* with an HTTP *GET*.\n\n This function supports fetching from resources which use basic HTTP auth as\n laid out by RFC1738 \u00a7 3.1. See \u00a7 5 for grammar definitions for URLs.\n\n .. seealso:\n\n https://www.ietf.org/rfc/rfc1738.txt\n\n :param url: URL of an HTTP resource\n :type url: ``str``\n\n :return: data read from resource described by *url*\n :rtype: ``file``-like object\n \"\"\"\n r = requests.get(url, stream=True, config=config, timeout=config.intersphinx_timeout)\n r.raise_for_status()\n r.raw.url = r.url\n # decode content-body based on the header.\n # ref: https://github.com/kennethreitz/requests/issues/2155\n r.raw.read = functools.partial(r.raw.read, decode_content=True)\n return r.raw", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__get_safe_url__get_safe_url.if_parts_username_is_None.else_.return.urlunsplit_frags_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__get_safe_url__get_safe_url.if_parts_username_is_None.else_.return.urlunsplit_frags_", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 127, "end_line": 149, "span_ids": ["_get_safe_url"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_safe_url(url: str) -> str:\n \"\"\"Gets version of *url* with basic auth passwords obscured. This function\n returns results suitable for printing and logging.\n\n E.g.: https://user:12345@example.com => https://user@example.com\n\n :param url: a url\n :type url: ``str``\n\n :return: *url* with password removed\n :rtype: ``str``\n \"\"\"\n parts = urlsplit(url)\n if parts.username is None:\n return url\n else:\n frags = list(parts)\n if parts.port:\n frags[1] = '{}@{}:{}'.format(parts.username, parts.hostname, parts.port)\n else:\n frags[1] = '{}@{}'.format(parts.username, parts.hostname)\n\n return urlunsplit(frags)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_fetch_inventory_fetch_inventory.None_1.else_.return.invdata": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_fetch_inventory_fetch_inventory.None_1.else_.return.invdata", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 152, "end_line": 188, "span_ids": ["fetch_inventory"], "tokens": 375}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def fetch_inventory(app: Sphinx, uri: str, inv: Any) -> Any:\n \"\"\"Fetch, parse and return an intersphinx inventory file.\"\"\"\n # both *uri* (base URI of the links to generate) and *inv* (actual\n # location of the inventory file) can be local or remote URIs\n localuri = '://' not in uri\n if not localuri:\n # case: inv URI points to remote resource; strip any existing auth\n uri = _strip_basic_auth(uri)\n try:\n if '://' in inv:\n f = _read_from_url(inv, config=app.config)\n else:\n f = open(path.join(app.srcdir, inv), 'rb')\n except Exception as err:\n err.args = ('intersphinx inventory %r not fetchable due to %s: %s',\n inv, err.__class__, str(err))\n raise\n try:\n if hasattr(f, 'url'):\n newinv = f.url # type: ignore\n if inv != newinv:\n logger.info(__('intersphinx inventory has moved: %s -> %s'), inv, newinv)\n\n if uri in (inv, path.dirname(inv), path.dirname(inv) + '/'):\n uri = path.dirname(newinv)\n with f:\n try:\n join = path.join if localuri else posixpath.join\n invdata = InventoryFile.load(f, uri, join)\n except ValueError as exc:\n raise ValueError('unknown or unsupported inventory version: %r' % exc) from exc\n except Exception as err:\n err.args = ('intersphinx inventory %r not readable due to %s: %s',\n inv, err.__class__.__name__, str(err))\n raise\n else:\n return invdata", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_fetch_inventory_group_fetch_inventory_group.try_.finally_.if_failures_.else_.logger_warning____failed": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_fetch_inventory_group_fetch_inventory_group.try_.finally_.if_failures_.else_.logger_warning____failed", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 191, "end_line": 225, "span_ids": ["fetch_inventory_group"], "tokens": 334}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def fetch_inventory_group(\n name: str, uri: str, invs: Any, cache: Any, app: Any, now: float\n) -> bool:\n cache_time = now - app.config.intersphinx_cache_limit * 86400\n failures = []\n try:\n for inv in invs:\n if not inv:\n inv = posixpath.join(uri, INVENTORY_FILENAME)\n # decide whether the inventory must be read: always read local\n # files; remote ones only if the cache time is expired\n if '://' not in inv or uri not in cache or cache[uri][1] < cache_time:\n safe_inv_url = _get_safe_url(inv)\n logger.info(__('loading intersphinx inventory from %s...'), safe_inv_url)\n try:\n invdata = fetch_inventory(app, uri, inv)\n except Exception as err:\n failures.append(err.args)\n continue\n if invdata:\n cache[uri] = (name, now, invdata)\n return True\n return False\n finally:\n if failures == []:\n pass\n elif len(failures) < len(invs):\n logger.info(__(\"encountered some issues with some of the inventories,\"\n \" but they had working alternatives:\"))\n for fail in failures:\n logger.info(*fail)\n else:\n issues = '\\n'.join([f[0] % f[1:] for f in failures])\n logger.warning(__(\"failed to reach any of the inventories \"\n \"with the following issues:\") + \"\\n\" + issues)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_load_mappings_load_mappings.if_any_updated_.for_name__x_invdata_in_.for_type_objects_in_invd.inventories_main_inventor": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_load_mappings_load_mappings.if_any_updated_.for_name__x_invdata_in_.for_type_objects_in_invd.inventories_main_inventor", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 228, "end_line": 258, "span_ids": ["load_mappings"], "tokens": 324}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def load_mappings(app: Sphinx) -> None:\n \"\"\"Load all intersphinx mappings into the environment.\"\"\"\n now = int(time.time())\n inventories = InventoryAdapter(app.builder.env)\n\n with concurrent.futures.ThreadPoolExecutor() as pool:\n futures = []\n for name, (uri, invs) in app.config.intersphinx_mapping.values():\n futures.append(pool.submit(\n fetch_inventory_group, name, uri, invs, inventories.cache, app, now\n ))\n updated = [f.result() for f in concurrent.futures.as_completed(futures)]\n\n if any(updated):\n inventories.clear()\n\n # Duplicate values in different inventories will shadow each\n # other; which one will override which can vary between builds\n # since they are specified using an unordered dict. To make\n # it more consistent, we sort the named inventories and then\n # add the unnamed inventories last. This means that the\n # unnamed inventories will shadow the named ones but the named\n # ones can still be accessed when the name is specified.\n cached_vals = list(inventories.cache.values())\n named_vals = sorted(v for v in cached_vals if v[0])\n unnamed_vals = [v for v in cached_vals if not v[0]]\n for name, _x, invdata in named_vals + unnamed_vals:\n if name:\n inventories.named_inventory[name] = invdata\n for type, objects in invdata.items():\n inventories.main_inventory.setdefault(type, {}).update(objects)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_setup_setup.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_setup_setup.return._", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 629, "end_line": 643, "span_ids": ["setup"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_config_value('intersphinx_mapping', {}, True)\n app.add_config_value('intersphinx_cache_limit', 5, False)\n app.add_config_value('intersphinx_timeout', None, False)\n app.add_config_value('intersphinx_disabled_reftypes', ['std:doc'], True)\n app.connect('config-inited', normalize_intersphinx_mapping, priority=800)\n app.connect('builder-inited', load_mappings)\n app.connect('source-read', install_dispatcher)\n app.connect('missing-reference', missing_reference)\n app.add_post_transform(IntersphinxRoleResolver)\n return {\n 'version': sphinx.__display_version__,\n 'env_version': 1,\n 'parallel_read_safe': True\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_inspect_main_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_inspect_main_", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 646, "end_line": 686, "span_ids": ["inspect_main", "inspect_main.MockConfig", "inspect_main.MockApp:2", "inspect_main.MockConfig:2", "inspect_main.MockApp", "impl:3"], "tokens": 295}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def inspect_main(argv: List[str]) -> None:\n \"\"\"Debug functionality to print out an inventory\"\"\"\n if len(argv) < 1:\n print(\"Print out an inventory file.\\n\"\n \"Error: must specify local path or URL to an inventory file.\",\n file=sys.stderr)\n sys.exit(1)\n\n class MockConfig:\n intersphinx_timeout: int = None\n tls_verify = False\n user_agent = None\n\n class MockApp:\n srcdir = ''\n config = MockConfig()\n\n def warn(self, msg: str) -> None:\n print(msg, file=sys.stderr)\n\n try:\n filename = argv[0]\n invdata = fetch_inventory(MockApp(), '', filename) # type: ignore\n for key in sorted(invdata or {}):\n print(key)\n for entry, einfo in sorted(invdata[key].items()):\n print('\\t%-40s %s%s' % (entry,\n '%-40s: ' % einfo[3] if einfo[3] != '-' else '',\n einfo[2]))\n except ValueError as exc:\n print(exc.args[0] % exc.args[1:])\n except Exception as exc:\n print('Unknown error: %r' % exc)\n\n\nif __name__ == '__main__':\n import logging as _logging\n _logging.basicConfig()\n\n inspect_main(argv=sys.argv[1:])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py_html_visit_displaymath_html_visit_displaymath.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py_html_visit_displaymath_html_visit_displaymath.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/ext/mathjax.py", "file_name": "mathjax.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 67, "span_ids": ["html_visit_displaymath"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def html_visit_displaymath(self: HTMLTranslator, node: nodes.math_block) -> None:\n self.body.append(self.starttag(node, 'div', CLASS='math notranslate nohighlight'))\n if node['nowrap']:\n self.body.append(self.encode(node.astext()))\n self.body.append('</div>')\n raise nodes.SkipNode\n\n # necessary to e.g. set the id property correctly\n if node['number']:\n number = get_node_equation_number(self, node)\n self.body.append('<span class=\"eqno\">(%s)' % number)\n self.add_permalink_ref(node, _('Permalink to this equation'))\n self.body.append('</span>')\n self.body.append(self.builder.config.mathjax_display[0])\n parts = [prt for prt in node.astext().split('\\n\\n') if prt.strip()]\n if len(parts) > 1: # Add alignment if there are more than 1 equation\n self.body.append(r' \\begin{align}\\begin{aligned}')\n for i, part in enumerate(parts):\n part = self.encode(part)\n if r'\\\\' in part:\n self.body.append(r'\\begin{split}' + part + r'\\end{split}')\n else:\n self.body.append(part)\n if i < len(parts) - 1: # append new line if not the last equation\n self.body.append(r'\\\\')\n if len(parts) > 1: # Add alignment if there are more than 1 equation\n self.body.append(r'\\end{aligned}\\end{align} ')\n self.body.append(self.builder.config.mathjax_display[1])\n self.body.append('</div>\\n')\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/ext/mathjax.py", "file_name": "mathjax.py", "file_type": "text/x-python", "category": "implementation", "start_line": 103, "end_line": 118, "span_ids": ["setup"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_html_math_renderer('mathjax',\n (html_visit_math, None),\n (html_visit_displaymath, None))\n\n app.add_config_value('mathjax_path', MATHJAX_URL, 'html')\n app.add_config_value('mathjax_options', {}, 'html')\n app.add_config_value('mathjax_inline', [r'\\(', r'\\)'], 'html')\n app.add_config_value('mathjax_display', [r'\\[', r'\\]'], 'html')\n app.add_config_value('mathjax_config', None, 'html')\n app.add_config_value('mathjax2_config', lambda c: c.mathjax_config, 'html')\n app.add_config_value('mathjax3_config', None, 'html')\n app.connect('html-page-context', install_mathjax)\n\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py_Config._Sphinx_napoleon_extens_Config._Sphinx_napoleon_extens": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py_Config._Sphinx_napoleon_extens_Config._Sphinx_napoleon_extens", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 12, "end_line": 262, "span_ids": ["Config"], "tokens": 2005}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config:\n \"\"\"Sphinx napoleon extension settings in `conf.py`.\n\n Listed below are all the settings used by napoleon and their default\n values. These settings can be changed in the Sphinx `conf.py` file. Make\n sure that \"sphinx.ext.napoleon\" is enabled in `conf.py`::\n\n # conf.py\n\n # Add any Sphinx extension module names here, as strings\n extensions = ['sphinx.ext.napoleon']\n\n # Napoleon settings\n napoleon_google_docstring = True\n napoleon_numpy_docstring = True\n napoleon_include_init_with_doc = False\n napoleon_include_private_with_doc = False\n napoleon_include_special_with_doc = False\n napoleon_use_admonition_for_examples = False\n napoleon_use_admonition_for_notes = False\n napoleon_use_admonition_for_references = False\n napoleon_use_ivar = False\n napoleon_use_param = True\n napoleon_use_rtype = True\n napoleon_use_keyword = True\n napoleon_preprocess_types = False\n napoleon_type_aliases = None\n napoleon_custom_sections = None\n napoleon_attr_annotations = True\n\n .. _Google style:\n https://google.github.io/styleguide/pyguide.html\n .. _NumPy style:\n https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard\n\n Attributes\n ----------\n napoleon_google_docstring : :obj:`bool` (Defaults to True)\n True to parse `Google style`_ docstrings. False to disable support\n for Google style docstrings.\n napoleon_numpy_docstring : :obj:`bool` (Defaults to True)\n True to parse `NumPy style`_ docstrings. False to disable support\n for NumPy style docstrings.\n napoleon_include_init_with_doc : :obj:`bool` (Defaults to False)\n True to list ``__init___`` docstrings separately from the class\n docstring. False to fall back to Sphinx's default behavior, which\n considers the ``__init___`` docstring as part of the class\n documentation.\n\n **If True**::\n\n def __init__(self):\n \\\"\\\"\\\"\n This will be included in the docs because it has a docstring\n \\\"\\\"\\\"\n\n def __init__(self):\n # This will NOT be included in the docs\n\n napoleon_include_private_with_doc : :obj:`bool` (Defaults to False)\n True to include private members (like ``_membername``) with docstrings\n in the documentation. False to fall back to Sphinx's default behavior.\n\n **If True**::\n\n def _included(self):\n \\\"\\\"\\\"\n This will be included in the docs because it has a docstring\n \\\"\\\"\\\"\n pass\n\n def _skipped(self):\n # This will NOT be included in the docs\n pass\n\n napoleon_include_special_with_doc : :obj:`bool` (Defaults to False)\n True to include special members (like ``__membername__``) with\n docstrings in the documentation. False to fall back to Sphinx's\n default behavior.\n\n **If True**::\n\n def __str__(self):\n \\\"\\\"\\\"\n This will be included in the docs because it has a docstring\n \\\"\\\"\\\"\n return unicode(self).encode('utf-8')\n\n def __unicode__(self):\n # This will NOT be included in the docs\n return unicode(self.__class__.__name__)\n\n napoleon_use_admonition_for_examples : :obj:`bool` (Defaults to False)\n True to use the ``.. admonition::`` directive for the **Example** and\n **Examples** sections. False to use the ``.. rubric::`` directive\n instead. One may look better than the other depending on what HTML\n theme is used.\n\n This `NumPy style`_ snippet will be converted as follows::\n\n Example\n -------\n This is just a quick example\n\n **If True**::\n\n .. admonition:: Example\n\n This is just a quick example\n\n **If False**::\n\n .. rubric:: Example\n\n This is just a quick example\n\n napoleon_use_admonition_for_notes : :obj:`bool` (Defaults to False)\n True to use the ``.. admonition::`` directive for **Notes** sections.\n False to use the ``.. rubric::`` directive instead.\n\n Note\n ----\n The singular **Note** section will always be converted to a\n ``.. note::`` directive.\n\n See Also\n --------\n :attr:`napoleon_use_admonition_for_examples`\n\n napoleon_use_admonition_for_references : :obj:`bool` (Defaults to False)\n True to use the ``.. admonition::`` directive for **References**\n sections. False to use the ``.. rubric::`` directive instead.\n\n See Also\n --------\n :attr:`napoleon_use_admonition_for_examples`\n\n napoleon_use_ivar : :obj:`bool` (Defaults to False)\n True to use the ``:ivar:`` role for instance variables. False to use\n the ``.. attribute::`` directive instead.\n\n This `NumPy style`_ snippet will be converted as follows::\n\n Attributes\n ----------\n attr1 : int\n Description of `attr1`\n\n **If True**::\n\n :ivar attr1: Description of `attr1`\n :vartype attr1: int\n\n **If False**::\n\n .. attribute:: attr1\n\n Description of `attr1`\n\n :type: int\n\n napoleon_use_param : :obj:`bool` (Defaults to True)\n True to use a ``:param:`` role for each function parameter. False to\n use a single ``:parameters:`` role for all the parameters.\n\n This `NumPy style`_ snippet will be converted as follows::\n\n Parameters\n ----------\n arg1 : str\n Description of `arg1`\n arg2 : int, optional\n Description of `arg2`, defaults to 0\n\n **If True**::\n\n :param arg1: Description of `arg1`\n :type arg1: str\n :param arg2: Description of `arg2`, defaults to 0\n :type arg2: int, optional\n\n **If False**::\n\n :parameters: * **arg1** (*str*) --\n Description of `arg1`\n * **arg2** (*int, optional*) --\n Description of `arg2`, defaults to 0\n\n napoleon_use_keyword : :obj:`bool` (Defaults to True)\n True to use a ``:keyword:`` role for each function keyword argument.\n False to use a single ``:keyword arguments:`` role for all the\n keywords.\n\n This behaves similarly to :attr:`napoleon_use_param`. Note unlike\n docutils, ``:keyword:`` and ``:param:`` will not be treated the same\n way - there will be a separate \"Keyword Arguments\" section, rendered\n in the same fashion as \"Parameters\" section (type links created if\n possible)\n\n See Also\n --------\n :attr:`napoleon_use_param`\n\n napoleon_use_rtype : :obj:`bool` (Defaults to True)\n True to use the ``:rtype:`` role for the return type. False to output\n the return type inline with the description.\n\n This `NumPy style`_ snippet will be converted as follows::\n\n Returns\n -------\n bool\n True if successful, False otherwise\n\n **If True**::\n\n :returns: True if successful, False otherwise\n :rtype: bool\n\n **If False**::\n\n :returns: *bool* -- True if successful, False otherwise\n\n napoleon_preprocess_types : :obj:`bool` (Defaults to False)\n Enable the type preprocessor.\n\n napoleon_type_aliases : :obj:`dict` (Defaults to None)\n Add a mapping of strings to string, translating types in numpy\n style docstrings. Only works if ``napoleon_preprocess_types = True``.\n\n napoleon_custom_sections : :obj:`list` (Defaults to None)\n Add a list of custom sections to include, expanding the list of parsed sections.\n\n The entries can either be strings or tuples, depending on the intention:\n * To create a custom \"generic\" section, just pass a string.\n * To create an alias for an existing section, pass a tuple containing the\n alias name and the original, in that order.\n * To create a custom section that displays like the parameters or returns\n section, pass a tuple containing the custom section name and a string\n value, \"params_style\" or \"returns_style\".\n\n If an entry is just a string, it is interpreted as a header for a generic\n section. If the entry is a tuple/list/indexed container, the first entry\n is the name of the section, the second is the section key to emulate. If the\n second entry value is \"params_style\" or \"returns_style\", the custom section\n will be displayed like the parameters section or returns section.\n\n napoleon_attr_annotations : :obj:`bool` (Defaults to True)\n Use the type annotations of class attributes that are documented in the docstring\n but do not have a type in the docstring.\n\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py_Config._config_values_Config.__init__.for_name_value_in_settin.setattr_self_name_value": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py_Config._config_values_Config.__init__.for_name_value_in_settin.setattr_self_name_value", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 263, "end_line": 286, "span_ids": ["Config"], "tokens": 300}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config:\n _config_values = {\n 'napoleon_google_docstring': (True, 'env'),\n 'napoleon_numpy_docstring': (True, 'env'),\n 'napoleon_include_init_with_doc': (False, 'env'),\n 'napoleon_include_private_with_doc': (False, 'env'),\n 'napoleon_include_special_with_doc': (False, 'env'),\n 'napoleon_use_admonition_for_examples': (False, 'env'),\n 'napoleon_use_admonition_for_notes': (False, 'env'),\n 'napoleon_use_admonition_for_references': (False, 'env'),\n 'napoleon_use_ivar': (False, 'env'),\n 'napoleon_use_param': (True, 'env'),\n 'napoleon_use_rtype': (True, 'env'),\n 'napoleon_use_keyword': (True, 'env'),\n 'napoleon_preprocess_types': (False, 'env'),\n 'napoleon_type_aliases': (None, 'env'),\n 'napoleon_custom_sections': (None, 'env'),\n 'napoleon_attr_annotations': (True, 'env'),\n }\n\n def __init__(self, **settings: Any) -> None:\n for name, (default, _rebuild) in self._config_values.items():\n setattr(self, name, default)\n for name, value in settings.items():\n setattr(self, name, value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py_setup_setup.return._version___version___": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py_setup_setup.return._version___version___", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 289, "end_line": 323, "span_ids": ["setup"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n \"\"\"Sphinx extension setup function.\n\n When the extension is loaded, Sphinx imports this module and executes\n the ``setup()`` function, which in turn notifies Sphinx of everything\n the extension offers.\n\n Parameters\n ----------\n app : sphinx.application.Sphinx\n Application object representing the Sphinx process\n\n See Also\n --------\n `The Sphinx documentation on Extensions\n <https://www.sphinx-doc.org/extensions.html>`_\n\n `The Extension Tutorial <https://www.sphinx-doc.org/extdev/tutorial.html>`_\n\n `The Extension API <https://www.sphinx-doc.org/extdev/appapi.html>`_\n\n \"\"\"\n if not isinstance(app, Sphinx):\n # probably called by tests\n return {'version': __version__, 'parallel_read_safe': True}\n\n _patch_python_domain()\n\n app.setup_extension('sphinx.ext.autodoc')\n app.connect('autodoc-process-docstring', _process_docstring)\n app.connect('autodoc-skip-member', _skip_member)\n\n for name, (default, rebuild) in Config._config_values.items():\n app.add_config_value(name, default, rebuild)\n return {'version': __version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__patch_python_domain__patch_python_domain.try_.else_.sphinx_domains_python_PyO": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__patch_python_domain__patch_python_domain.try_.else_.sphinx_domains_python_PyO", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 311, "end_line": 327, "span_ids": ["_patch_python_domain"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _patch_python_domain() -> None:\n try:\n from sphinx.domains.python import PyTypedField\n except ImportError:\n pass\n else:\n import sphinx.domains.python\n from sphinx.locale import _\n for doc_field in sphinx.domains.python.PyObject.doc_field_types:\n if doc_field.name == 'parameter':\n doc_field.names = ('param', 'parameter', 'arg', 'argument')\n break\n sphinx.domains.python.PyObject.doc_field_types.append(\n PyTypedField('keyword', label=_('Keyword Arguments'),\n names=('keyword', 'kwarg', 'kwparam'),\n typerolename='obj', typenames=('paramtype', 'kwtype'),\n can_collapse=True))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__process_docstring__process_docstring.lines_result_lines_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__process_docstring__process_docstring.lines_result_lines_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 345, "end_line": 392, "span_ids": ["_process_docstring"], "tokens": 450}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _process_docstring(app: Sphinx, what: str, name: str, obj: Any,\n options: Any, lines: List[str]) -> None:\n \"\"\"Process the docstring for a given python object.\n\n Called when autodoc has read and processed a docstring. `lines` is a list\n of docstring lines that `_process_docstring` modifies in place to change\n what Sphinx outputs.\n\n The following settings in conf.py control what styles of docstrings will\n be parsed:\n\n * ``napoleon_google_docstring`` -- parse Google style docstrings\n * ``napoleon_numpy_docstring`` -- parse NumPy style docstrings\n\n Parameters\n ----------\n app : sphinx.application.Sphinx\n Application object representing the Sphinx process.\n what : str\n A string specifying the type of the object to which the docstring\n belongs. Valid values: \"module\", \"class\", \"exception\", \"function\",\n \"method\", \"attribute\".\n name : str\n The fully qualified name of the object.\n obj : module, class, exception, function, method, or attribute\n The object to which the docstring belongs.\n options : sphinx.ext.autodoc.Options\n The options given to the directive: an object with attributes\n inherited_members, undoc_members, show_inheritance and noindex that\n are True if the flag option of same name was given to the auto\n directive.\n lines : list of str\n The lines of the docstring, see above.\n\n .. note:: `lines` is modified *in place*\n\n \"\"\"\n result_lines = lines\n docstring: GoogleDocstring = None\n if app.config.napoleon_numpy_docstring:\n docstring = NumpyDocstring(result_lines, app.config, app, what, name,\n obj, options)\n result_lines = docstring.lines()\n if app.config.napoleon_google_docstring:\n docstring = GoogleDocstring(result_lines, app.config, app, what, name,\n obj, options)\n result_lines = docstring.lines()\n lines[:] = result_lines[:]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__skip_member_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__skip_member_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 395, "end_line": 478, "span_ids": ["_skip_member"], "tokens": 730}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _skip_member(app: Sphinx, what: str, name: str, obj: Any,\n skip: bool, options: Any) -> bool:\n \"\"\"Determine if private and special class members are included in docs.\n\n The following settings in conf.py determine if private and special class\n members or init methods are included in the generated documentation:\n\n * ``napoleon_include_init_with_doc`` --\n include init methods if they have docstrings\n * ``napoleon_include_private_with_doc`` --\n include private members if they have docstrings\n * ``napoleon_include_special_with_doc`` --\n include special members if they have docstrings\n\n Parameters\n ----------\n app : sphinx.application.Sphinx\n Application object representing the Sphinx process\n what : str\n A string specifying the type of the object to which the member\n belongs. Valid values: \"module\", \"class\", \"exception\", \"function\",\n \"method\", \"attribute\".\n name : str\n The name of the member.\n obj : module, class, exception, function, method, or attribute.\n For example, if the member is the __init__ method of class A, then\n `obj` will be `A.__init__`.\n skip : bool\n A boolean indicating if autodoc will skip this member if `_skip_member`\n does not override the decision\n options : sphinx.ext.autodoc.Options\n The options given to the directive: an object with attributes\n inherited_members, undoc_members, show_inheritance and noindex that\n are True if the flag option of same name was given to the auto\n directive.\n\n Returns\n -------\n bool\n True if the member should be skipped during creation of the docs,\n False if it should be included in the docs.\n\n \"\"\"\n has_doc = getattr(obj, '__doc__', False)\n is_member = what in ('class', 'exception', 'module')\n if name != '__weakref__' and has_doc and is_member:\n cls_is_owner = False\n if what in ('class', 'exception'):\n qualname = getattr(obj, '__qualname__', '')\n cls_path, _, _ = qualname.rpartition('.')\n if cls_path:\n try:\n if '.' in cls_path:\n import functools\n import importlib\n\n mod = importlib.import_module(obj.__module__)\n mod_path = cls_path.split('.')\n cls = functools.reduce(getattr, mod_path, mod)\n else:\n cls = inspect.unwrap(obj).__globals__[cls_path]\n except Exception:\n cls_is_owner = False\n else:\n cls_is_owner = (cls and hasattr(cls, name) and # type: ignore\n name in cls.__dict__)\n else:\n cls_is_owner = False\n\n if what == 'module' or cls_is_owner:\n is_init = (name == '__init__')\n is_special = (not is_init and name.startswith('__') and\n name.endswith('__'))\n is_private = (not is_init and not is_special and\n name.startswith('_'))\n inc_init = app.config.napoleon_include_init_with_doc\n inc_special = app.config.napoleon_include_special_with_doc\n inc_private = app.config.napoleon_include_private_with_doc\n if ((is_special and inc_special) or\n (is_private and inc_private) or\n (is_init and inc_init)):\n return False\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring_GoogleDocstring._name_rgx.re_compile_r_s_P": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring_GoogleDocstring._name_rgx.re_compile_r_s_P", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 107, "span_ids": ["GoogleDocstring"], "tokens": 599}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n \"\"\"Convert Google style docstrings to reStructuredText.\n\n Parameters\n ----------\n docstring : :obj:`str` or :obj:`list` of :obj:`str`\n The docstring to parse, given either as a string or split into\n individual lines.\n config: :obj:`sphinx.ext.napoleon.Config` or :obj:`sphinx.config.Config`\n The configuration settings to use. If not given, defaults to the\n config object on `app`; or if `app` is not given defaults to the\n a new :class:`sphinx.ext.napoleon.Config` object.\n\n\n Other Parameters\n ----------------\n app : :class:`sphinx.application.Sphinx`, optional\n Application object representing the Sphinx process.\n what : :obj:`str`, optional\n A string specifying the type of the object to which the docstring\n belongs. Valid values: \"module\", \"class\", \"exception\", \"function\",\n \"method\", \"attribute\".\n name : :obj:`str`, optional\n The fully qualified name of the object.\n obj : module, class, exception, function, method, or attribute\n The object to which the docstring belongs.\n options : :class:`sphinx.ext.autodoc.Options`, optional\n The options given to the directive: an object with attributes\n inherited_members, undoc_members, show_inheritance and noindex that\n are True if the flag option of same name was given to the auto\n directive.\n\n\n Example\n -------\n >>> from sphinx.ext.napoleon import Config\n >>> config = Config(napoleon_use_param=True, napoleon_use_rtype=True)\n >>> docstring = '''One line summary.\n ...\n ... Extended description.\n ...\n ... Args:\n ... arg1(int): Description of `arg1`\n ... arg2(str): Description of `arg2`\n ... Returns:\n ... str: Description of return value.\n ... '''\n >>> print(GoogleDocstring(docstring, config))\n One line summary.\n <BLANKLINE>\n Extended description.\n <BLANKLINE>\n :param arg1: Description of `arg1`\n :type arg1: int\n :param arg2: Description of `arg2`\n :type arg2: str\n <BLANKLINE>\n :returns: Description of return value.\n :rtype: str\n <BLANKLINE>\n\n \"\"\"\n\n _name_rgx = re.compile(r\"^\\s*((?::(?P<role>\\S+):)?`(?P<name>~?[a-zA-Z0-9_.-]+)`|\"\n r\" (?P<name2>~?[a-zA-Z0-9_.-]+))\\s*\", re.X)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_field_GoogleDocstring._consume_field.return._name__type__descs": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_field_GoogleDocstring._consume_field.return._name__type__descs", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 264, "end_line": 288, "span_ids": ["GoogleDocstring._consume_field"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _consume_field(self, parse_type: bool = True, prefer_type: bool = False\n ) -> Tuple[str, str, List[str]]:\n line = next(self._line_iter)\n\n before, colon, after = self._partition_field_on_colon(line)\n _name, _type, _desc = before, '', after\n\n if parse_type:\n match = _google_typed_arg_regex.match(before)\n if match:\n _name = match.group(1).strip()\n _type = match.group(2)\n\n _name = self._escape_args_and_kwargs(_name)\n\n if prefer_type and not _type:\n _type, _name = _name, _type\n\n if _type and self._config.napoleon_preprocess_types:\n _type = _convert_type_spec(_type, self._config.napoleon_type_aliases or {})\n\n indent = self._get_indent(line) + 1\n _descs = [_desc] + self._dedent(self._consume_indented_block(indent))\n _descs = self.__class__(_descs, self._config).lines()\n return _name, _type, _descs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_returns_section_GoogleDocstring._consume_returns_section.if_lines_.else_.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_returns_section_GoogleDocstring._consume_returns_section.if_lines_.else_.return._", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 313, "end_line": 335, "span_ids": ["GoogleDocstring._consume_returns_section"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _consume_returns_section(self, preprocess_types: bool = False\n ) -> List[Tuple[str, str, List[str]]]:\n lines = self._dedent(self._consume_to_next_section())\n if lines:\n before, colon, after = self._partition_field_on_colon(lines[0])\n _name, _type, _desc = '', '', lines\n\n if colon:\n if after:\n _desc = [after] + lines[1:]\n else:\n _desc = lines[1:]\n\n _type = before\n\n if (_type and preprocess_types and\n self._config.napoleon_preprocess_types):\n _type = _convert_type_spec(_type, self._config.napoleon_type_aliases or {})\n\n _desc = self.__class__(_desc, self._config).lines()\n return [(_name, _type, _desc,)]\n else:\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_usage_section_GoogleDocstring._escape_args_and_kwargs.if_name_2_.else_.return.name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_usage_section_GoogleDocstring._escape_args_and_kwargs.if_name_2_.else_.return.name", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 291, "end_line": 331, "span_ids": ["GoogleDocstring._consume_to_next_section", "GoogleDocstring._escape_args_and_kwargs", "GoogleDocstring._consume_section_header", "GoogleDocstring._consume_to_end", "GoogleDocstring._consume_usage_section", "GoogleDocstring._dedent"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _consume_usage_section(self) -> List[str]:\n lines = self._dedent(self._consume_to_next_section())\n return lines\n\n def _consume_section_header(self) -> str:\n section = next(self._line_iter)\n stripped_section = section.strip(':')\n if stripped_section.lower() in self._sections:\n section = stripped_section\n return section\n\n def _consume_to_end(self) -> List[str]:\n lines = []\n while self._line_iter.has_next():\n lines.append(next(self._line_iter))\n return lines\n\n def _consume_to_next_section(self) -> List[str]:\n self._consume_empty()\n lines = []\n while not self._is_section_break():\n lines.append(next(self._line_iter))\n return lines + self._consume_empty()\n\n def _dedent(self, lines: List[str], full: bool = False) -> List[str]:\n if full:\n return [line.lstrip() for line in lines]\n else:\n min_indent = self._get_min_indent(lines)\n return [line[min_indent:] for line in lines]\n\n def _escape_args_and_kwargs(self, name: str) -> str:\n if name.endswith('_') and getattr(self._config, 'strip_signature_backslash', False):\n name = name[:-1] + r'\\_'\n\n if name[:2] == '**':\n return r'\\*\\*' + name[2:]\n elif name[:1] == '*':\n return r'\\*' + name[1:]\n else:\n return name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._fix_field_desc_GoogleDocstring._fix_field_desc.return.desc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._fix_field_desc_GoogleDocstring._fix_field_desc.return.desc", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 331, "end_line": 342, "span_ids": ["GoogleDocstring._fix_field_desc"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _fix_field_desc(self, desc: List[str]) -> List[str]:\n if self._is_list(desc):\n desc = [''] + desc\n elif desc[0].endswith('::'):\n desc_block = desc[1:]\n indent = self._get_indent(desc[0])\n block_indent = self._get_initial_indent(desc_block)\n if block_indent > indent:\n desc = [''] + desc\n else:\n desc = ['', desc[0]] + self._indent(desc_block, 4)\n return desc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_admonition_GoogleDocstring._format_block.if_lines_.else_.return._prefix_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_admonition_GoogleDocstring._format_block.if_lines_.else_.return._prefix_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 344, "end_line": 368, "span_ids": ["GoogleDocstring._format_admonition", "GoogleDocstring._format_block"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _format_admonition(self, admonition: str, lines: List[str]) -> List[str]:\n lines = self._strip_empty(lines)\n if len(lines) == 1:\n return ['.. %s:: %s' % (admonition, lines[0].strip()), '']\n elif lines:\n lines = self._indent(self._dedent(lines), 3)\n return ['.. %s::' % admonition, ''] + lines + ['']\n else:\n return ['.. %s::' % admonition, '']\n\n def _format_block(self, prefix: str, lines: List[str], padding: str = None) -> List[str]:\n if lines:\n if padding is None:\n padding = ' ' * len(prefix)\n result_lines = []\n for i, line in enumerate(lines):\n if i == 0:\n result_lines.append((prefix + line).rstrip())\n elif line:\n result_lines.append(padding + line)\n else:\n result_lines.append('')\n return result_lines\n else:\n return [prefix]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_docutils_params_GoogleDocstring._format_docutils_params.return.lines_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_docutils_params_GoogleDocstring._format_docutils_params.return.lines_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 370, "end_line": 385, "span_ids": ["GoogleDocstring._format_docutils_params"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _format_docutils_params(self, fields: List[Tuple[str, str, List[str]]],\n field_role: str = 'param', type_role: str = 'type'\n ) -> List[str]:\n lines = []\n for _name, _type, _desc in fields:\n _desc = self._strip_empty(_desc)\n if any(_desc):\n _desc = self._fix_field_desc(_desc)\n field = ':%s %s: ' % (field_role, _name)\n lines.extend(self._format_block(field, _desc))\n else:\n lines.append(':%s %s:' % (field_role, _name))\n\n if _type:\n lines.append(':%s %s: %s' % (type_role, _name, _type))\n return lines + ['']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_field_GoogleDocstring._format_field.if_has_desc_.else_.return._field_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_field_GoogleDocstring._format_field.if_has_desc_.else_.return._field_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 387, "end_line": 414, "span_ids": ["GoogleDocstring._format_field"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _format_field(self, _name: str, _type: str, _desc: List[str]) -> List[str]:\n _desc = self._strip_empty(_desc)\n has_desc = any(_desc)\n separator = ' -- ' if has_desc else ''\n if _name:\n if _type:\n if '`' in _type:\n field = '**%s** (%s)%s' % (_name, _type, separator)\n else:\n field = '**%s** (*%s*)%s' % (_name, _type, separator)\n else:\n field = '**%s**%s' % (_name, separator)\n elif _type:\n if '`' in _type:\n field = '%s%s' % (_type, separator)\n else:\n field = '*%s*%s' % (_type, separator)\n else:\n field = ''\n\n if has_desc:\n _desc = self._fix_field_desc(_desc)\n if _desc[0]:\n return [field + _desc[0]] + _desc[1:]\n else:\n return [field] + _desc\n else:\n return [field]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_fields_GoogleDocstring._format_fields.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._format_fields_GoogleDocstring._format_fields.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 451, "end_line": 468, "span_ids": ["GoogleDocstring._format_fields"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _format_fields(self, field_type: str, fields: List[Tuple[str, str, List[str]]]\n ) -> List[str]:\n field_type = ':%s:' % field_type.strip()\n padding = ' ' * len(field_type)\n multi = len(fields) > 1\n lines: List[str] = []\n for _name, _type, _desc in fields:\n field = self._format_field(_name, _type, _desc)\n if multi:\n if lines:\n lines.extend(self._format_block(padding + ' * ', field))\n else:\n lines.extend(self._format_block(field_type + ' * ', field))\n else:\n lines.extend(self._format_block(field_type + ' ', field))\n if lines and lines[-1]:\n lines.append('')\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._get_current_indent_GoogleDocstring._is_indented.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._get_current_indent_GoogleDocstring._is_indented.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 435, "end_line": 476, "span_ids": ["GoogleDocstring._get_min_indent", "GoogleDocstring._is_indented", "GoogleDocstring._get_initial_indent", "GoogleDocstring._get_current_indent", "GoogleDocstring._indent", "GoogleDocstring._get_indent"], "tokens": 345}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _get_current_indent(self, peek_ahead: int = 0) -> int:\n line = self._line_iter.peek(peek_ahead + 1)[peek_ahead]\n while line != self._line_iter.sentinel:\n if line:\n return self._get_indent(line)\n peek_ahead += 1\n line = self._line_iter.peek(peek_ahead + 1)[peek_ahead]\n return 0\n\n def _get_indent(self, line: str) -> int:\n for i, s in enumerate(line):\n if not s.isspace():\n return i\n return len(line)\n\n def _get_initial_indent(self, lines: List[str]) -> int:\n for line in lines:\n if line:\n return self._get_indent(line)\n return 0\n\n def _get_min_indent(self, lines: List[str]) -> int:\n min_indent = None\n for line in lines:\n if line:\n indent = self._get_indent(line)\n if min_indent is None:\n min_indent = indent\n elif indent < min_indent:\n min_indent = indent\n return min_indent or 0\n\n def _indent(self, lines: List[str], n: int = 4) -> List[str]:\n return [(' ' * n) + line for line in lines]\n\n def _is_indented(self, line: str, indent: int = 1) -> bool:\n for i, s in enumerate(line):\n if i >= indent:\n return True\n elif not s.isspace():\n return False\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._is_list_GoogleDocstring._is_list.return.next_indent_indent": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._is_list_GoogleDocstring._is_list.return.next_indent_indent", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 478, "end_line": 493, "span_ids": ["GoogleDocstring._is_list"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _is_list(self, lines: List[str]) -> bool:\n if not lines:\n return False\n if _bullet_list_regex.match(lines[0]):\n return True\n if _enumerated_list_regex.match(lines[0]):\n return True\n if len(lines) < 2 or lines[0].endswith('::'):\n return False\n indent = self._get_indent(lines[0])\n next_indent = indent\n for line in lines[1:]:\n if line:\n next_indent = self._get_indent(line)\n break\n return next_indent > indent", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._is_section_header_GoogleDocstring._is_section_break.return._not_self__line_iter_has_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._is_section_header_GoogleDocstring._is_section_break.return._not_self__line_iter_has_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 495, "end_line": 515, "span_ids": ["GoogleDocstring._is_section_header", "GoogleDocstring._is_section_break"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _is_section_header(self) -> bool:\n section = self._line_iter.peek().lower()\n match = _google_section_regex.match(section)\n if match and section.strip(':') in self._sections:\n header_indent = self._get_indent(section)\n section_indent = self._get_current_indent(peek_ahead=1)\n return section_indent > header_indent\n elif self._directive_sections:\n if _directive_regex.match(section):\n for directive_section in self._directive_sections:\n if section.startswith(directive_section):\n return True\n return False\n\n def _is_section_break(self) -> bool:\n line = self._line_iter.peek()\n return (not self._line_iter.has_next() or\n self._is_section_header() or\n (self._is_in_section and\n line and\n not self._is_indented(line, self._section_indent)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_GoogleDocstring._parse.while_self__line_iter_has.self__parsed_lines_extend": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_GoogleDocstring._parse.while_self__line_iter_has.self__parsed_lines_extend", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 574, "end_line": 606, "span_ids": ["GoogleDocstring._parse"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _parse(self) -> None:\n self._parsed_lines = self._consume_empty()\n\n if self._name and self._what in ('attribute', 'data', 'property'):\n # Implicit stop using StopIteration no longer allowed in\n # Python 3.7; see PEP 479\n res: List[str] = []\n try:\n res = self._parse_attribute_docstring()\n except StopIteration:\n pass\n self._parsed_lines.extend(res)\n return\n\n while self._line_iter.has_next():\n if self._is_section_header():\n try:\n section = self._consume_section_header()\n self._is_in_section = True\n self._section_indent = self._get_current_indent()\n if _directive_regex.match(section):\n lines = [section] + self._consume_to_next_section()\n else:\n lines = self._sections[section.lower()](section)\n finally:\n self._is_in_section = False\n self._section_indent = 0\n else:\n if not self._parsed_lines:\n lines = self._consume_contiguous() + self._consume_empty()\n else:\n lines = self._consume_to_next_section()\n self._parsed_lines.extend(lines)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_admonition_GoogleDocstring._parse_attribute_docstring.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_admonition_GoogleDocstring._parse_attribute_docstring.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 566, "end_line": 576, "span_ids": ["GoogleDocstring._parse_attribute_docstring", "GoogleDocstring._parse_admonition"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _parse_admonition(self, admonition: str, section: str) -> List[str]:\n # type (str, str) -> List[str]\n lines = self._consume_to_next_section()\n return self._format_admonition(admonition, lines)\n\n def _parse_attribute_docstring(self) -> List[str]:\n _type, _desc = self._consume_inline_attribute()\n lines = self._format_field('', '', _desc)\n if _type:\n lines.extend(['', ':type: %s' % _type])\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_attributes_section_GoogleDocstring._parse_attributes_section.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_attributes_section_GoogleDocstring._parse_attributes_section.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 620, "end_line": 644, "span_ids": ["GoogleDocstring._parse_attributes_section"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _parse_attributes_section(self, section: str) -> List[str]:\n lines = []\n for _name, _type, _desc in self._consume_fields():\n if not _type:\n _type = self._lookup_annotation(_name)\n if self._config.napoleon_use_ivar:\n field = ':ivar %s: ' % _name\n lines.extend(self._format_block(field, _desc))\n if _type:\n lines.append(':vartype %s: %s' % (_name, _type))\n else:\n lines.append('.. attribute:: ' + _name)\n if self._opt and 'noindex' in self._opt:\n lines.append(' :noindex:')\n lines.append('')\n\n fields = self._format_field('', '', _desc)\n lines.extend(self._indent(fields, 3))\n if _type:\n lines.append('')\n lines.extend(self._indent([':type: %s' % _type], 3))\n lines.append('')\n if self._config.napoleon_use_ivar:\n lines.append('')\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_examples_section_GoogleDocstring._parse_usage_section.return.header_block_lines_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_examples_section_GoogleDocstring._parse_usage_section.return.header_block_lines_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 660, "end_line": 685, "span_ids": ["GoogleDocstring._parse_custom_generic_section", "GoogleDocstring._parse_usage_section", "GoogleDocstring._parse_custom_params_style_section", "GoogleDocstring._parse_examples_section", "GoogleDocstring._parse_custom_returns_style_section"], "tokens": 267}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _parse_examples_section(self, section: str) -> List[str]:\n labels = {\n 'example': _('Example'),\n 'examples': _('Examples'),\n }\n use_admonition = self._config.napoleon_use_admonition_for_examples\n label = labels.get(section.lower(), section)\n return self._parse_generic_section(label, use_admonition)\n\n def _parse_custom_generic_section(self, section: str) -> List[str]:\n # for now, no admonition for simple custom sections\n return self._parse_generic_section(section, False)\n\n def _parse_custom_params_style_section(self, section: str) -> List[str]:\n return self._format_fields(section, self._consume_fields())\n\n def _parse_custom_returns_style_section(self, section: str) -> List[str]:\n fields = self._consume_returns_section(preprocess_types=True)\n return self._format_fields(section, fields)\n\n def _parse_usage_section(self, section: str) -> List[str]:\n header = ['.. rubric:: Usage:', '']\n block = ['.. code-block:: python', '']\n lines = self._consume_usage_section()\n lines = self._indent(lines, 3)\n return header + block + lines + ['']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_generic_section_GoogleDocstring._parse_generic_section.if_lines_.else_.return._header_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_generic_section_GoogleDocstring._parse_generic_section.if_lines_.else_.return._header_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 622, "end_line": 633, "span_ids": ["GoogleDocstring._parse_generic_section"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _parse_generic_section(self, section: str, use_admonition: bool) -> List[str]:\n lines = self._strip_empty(self._consume_to_next_section())\n lines = self._dedent(lines)\n if use_admonition:\n header = '.. admonition:: %s' % section\n lines = self._indent(lines, 3)\n else:\n header = '.. rubric:: %s' % section\n if lines:\n return [header, ''] + lines + ['']\n else:\n return [header, '']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_returns_section_GoogleDocstring._parse_returns_section.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_returns_section_GoogleDocstring._parse_returns_section.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 760, "end_line": 784, "span_ids": ["GoogleDocstring._parse_returns_section"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _parse_returns_section(self, section: str) -> List[str]:\n fields = self._consume_returns_section()\n multi = len(fields) > 1\n use_rtype = False if multi else self._config.napoleon_use_rtype\n lines: List[str] = []\n\n for _name, _type, _desc in fields:\n if use_rtype:\n field = self._format_field(_name, '', _desc)\n else:\n field = self._format_field(_name, _type, _desc)\n\n if multi:\n if lines:\n lines.extend(self._format_block(' * ', field))\n else:\n lines.extend(self._format_block(':returns: * ', field))\n else:\n if any(field): # only add :returns: if there's something to say\n lines.extend(self._format_block(':returns: ', field))\n if _type and use_rtype:\n lines.extend([':rtype: %s' % _type, ''])\n if lines and lines[-1]:\n lines.append('')\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_see_also_section_GoogleDocstring._partition_field_on_colon.return._join_before_colon_st": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_see_also_section_GoogleDocstring._partition_field_on_colon.return._join_before_colon_st", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 796, "end_line": 826, "span_ids": ["GoogleDocstring._parse_warns_section", "GoogleDocstring._parse_see_also_section", "GoogleDocstring._partition_field_on_colon", "GoogleDocstring._parse_yields_section"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _parse_see_also_section(self, section: str) -> List[str]:\n return self._parse_admonition('seealso', section)\n\n def _parse_warns_section(self, section: str) -> List[str]:\n return self._format_fields(_('Warns'), self._consume_fields())\n\n def _parse_yields_section(self, section: str) -> List[str]:\n fields = self._consume_returns_section(preprocess_types=True)\n return self._format_fields(_('Yields'), fields)\n\n def _partition_field_on_colon(self, line: str) -> Tuple[str, str, str]:\n before_colon = []\n after_colon = []\n colon = ''\n found_colon = False\n for i, source in enumerate(_xref_or_code_regex.split(line)):\n if found_colon:\n after_colon.append(source)\n else:\n m = _single_colon_regex.search(source)\n if (i % 2) == 0 and m:\n found_colon = True\n colon = source[m.start(): m.end()]\n before_colon.append(source[:m.start()])\n after_colon.append(source[m.end():])\n else:\n before_colon.append(source)\n\n return (\"\".join(before_colon).strip(),\n colon,\n \"\".join(after_colon).strip())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._qualify_name_GoogleDocstring._strip_empty.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._qualify_name_GoogleDocstring._strip_empty.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 818, "end_line": 848, "span_ids": ["GoogleDocstring._strip_empty", "GoogleDocstring._qualify_name"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _qualify_name(self, attr_name: str, klass: Type) -> str:\n warnings.warn('%s._qualify_name() is deprecated.' %\n self.__class__.__name__, RemovedInSphinx60Warning)\n if klass and '.' not in attr_name:\n if attr_name.startswith('~'):\n attr_name = attr_name[1:]\n try:\n q = klass.__qualname__\n except AttributeError:\n q = klass.__name__\n return '~%s.%s' % (q, attr_name)\n return attr_name\n\n def _strip_empty(self, lines: List[str]) -> List[str]:\n if lines:\n start = -1\n for i, line in enumerate(lines):\n if line:\n start = i\n break\n if start == -1:\n lines = []\n end = -1\n for i in reversed(range(len(lines))):\n line = lines[i]\n if line:\n end = i\n break\n if start > 0 or end + 1 < len(lines):\n lines = lines[start:end + 1]\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring_NumpyDocstring.__init__.super___init___docstrin": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring_NumpyDocstring.__init__.super___init___docstrin", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 780, "end_line": 877, "span_ids": ["NumpyDocstring"], "tokens": 745}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstring(GoogleDocstring):\n \"\"\"Convert NumPy style docstrings to reStructuredText.\n\n Parameters\n ----------\n docstring : :obj:`str` or :obj:`list` of :obj:`str`\n The docstring to parse, given either as a string or split into\n individual lines.\n config: :obj:`sphinx.ext.napoleon.Config` or :obj:`sphinx.config.Config`\n The configuration settings to use. If not given, defaults to the\n config object on `app`; or if `app` is not given defaults to the\n a new :class:`sphinx.ext.napoleon.Config` object.\n\n\n Other Parameters\n ----------------\n app : :class:`sphinx.application.Sphinx`, optional\n Application object representing the Sphinx process.\n what : :obj:`str`, optional\n A string specifying the type of the object to which the docstring\n belongs. Valid values: \"module\", \"class\", \"exception\", \"function\",\n \"method\", \"attribute\".\n name : :obj:`str`, optional\n The fully qualified name of the object.\n obj : module, class, exception, function, method, or attribute\n The object to which the docstring belongs.\n options : :class:`sphinx.ext.autodoc.Options`, optional\n The options given to the directive: an object with attributes\n inherited_members, undoc_members, show_inheritance and noindex that\n are True if the flag option of same name was given to the auto\n directive.\n\n\n Example\n -------\n >>> from sphinx.ext.napoleon import Config\n >>> config = Config(napoleon_use_param=True, napoleon_use_rtype=True)\n >>> docstring = '''One line summary.\n ...\n ... Extended description.\n ...\n ... Parameters\n ... ----------\n ... arg1 : int\n ... Description of `arg1`\n ... arg2 : str\n ... Description of `arg2`\n ... Returns\n ... -------\n ... str\n ... Description of return value.\n ... '''\n >>> print(NumpyDocstring(docstring, config))\n One line summary.\n <BLANKLINE>\n Extended description.\n <BLANKLINE>\n :param arg1: Description of `arg1`\n :type arg1: int\n :param arg2: Description of `arg2`\n :type arg2: str\n <BLANKLINE>\n :returns: Description of return value.\n :rtype: str\n <BLANKLINE>\n\n Methods\n -------\n __str__()\n Return the parsed docstring in reStructuredText format.\n\n Returns\n -------\n str\n UTF-8 encoded version of the docstring.\n\n __unicode__()\n Return the parsed docstring in reStructuredText format.\n\n Returns\n -------\n unicode\n Unicode version of the docstring.\n\n lines()\n Return the parsed lines of the docstring in reStructuredText format.\n\n Returns\n -------\n list(str)\n The lines of the docstring in a list.\n\n \"\"\"\n def __init__(self, docstring: Union[str, List[str]], config: SphinxConfig = None,\n app: Sphinx = None, what: str = '', name: str = '',\n obj: Any = None, options: Any = None) -> None:\n self._directive_sections = ['.. index::']\n super().__init__(docstring, config, app, what, name, obj, options)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._consume_field_NumpyDocstring._consume_field.return._name__type__desc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._consume_field_NumpyDocstring._consume_field.return._name__type__desc", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1120, "end_line": 1146, "span_ids": ["NumpyDocstring._consume_field"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstring(GoogleDocstring):\n\n def _consume_field(self, parse_type: bool = True, prefer_type: bool = False\n ) -> Tuple[str, str, List[str]]:\n line = next(self._line_iter)\n if parse_type:\n _name, _, _type = self._partition_field_on_colon(line)\n else:\n _name, _type = line, ''\n _name, _type = _name.strip(), _type.strip()\n _name = self._escape_args_and_kwargs(_name)\n\n if parse_type and not _type:\n _type = self._lookup_annotation(_name)\n\n if prefer_type and not _type:\n _type, _name = _name, _type\n\n if self._config.napoleon_preprocess_types:\n _type = _convert_numpy_type_spec(\n _type,\n location=self._get_location(),\n translations=self._config.napoleon_type_aliases or {},\n )\n\n indent = self._get_indent(line) + 1\n _desc = self._dedent(self._consume_indented_block(indent))\n _desc = self.__class__(_desc, self._config).lines()\n return _name, _type, _desc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._consume_returns_section_NumpyDocstring._parse_see_also_section.try_.except_ValueError_.return.self__format_admonition_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._consume_returns_section_NumpyDocstring._parse_see_also_section.try_.except_ValueError_.return.self__format_admonition_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1195, "end_line": 1232, "span_ids": ["NumpyDocstring._parse_see_also_section", "NumpyDocstring._is_section_header", "NumpyDocstring._consume_returns_section", "NumpyDocstring._is_section_break", "NumpyDocstring._consume_section_header"], "tokens": 349}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstring(GoogleDocstring):\n\n def _consume_returns_section(self, preprocess_types: bool = False\n ) -> List[Tuple[str, str, List[str]]]:\n return self._consume_fields(prefer_type=True)\n\n def _consume_section_header(self) -> str:\n section = next(self._line_iter)\n if not _directive_regex.match(section):\n # Consume the header underline\n next(self._line_iter)\n return section\n\n def _is_section_break(self) -> bool:\n line1, line2 = self._line_iter.peek(2)\n return (not self._line_iter.has_next() or\n self._is_section_header() or\n ['', ''] == [line1, line2] or\n (self._is_in_section and\n line1 and\n not self._is_indented(line1, self._section_indent)))\n\n def _is_section_header(self) -> bool:\n section, underline = self._line_iter.peek(2)\n section = section.lower()\n if section in self._sections and isinstance(underline, str):\n return bool(_numpy_section_regex.match(underline))\n elif self._directive_sections:\n if _directive_regex.match(section):\n for directive_section in self._directive_sections:\n if section.startswith(directive_section):\n return True\n return False\n\n def _parse_see_also_section(self, section: str) -> List[str]:\n lines = self._consume_to_next_section()\n try:\n return self._parse_numpydoc_see_also_section(lines)\n except ValueError:\n return self._format_admonition('seealso', lines)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._parse_numpydoc_see_also_section_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._parse_numpydoc_see_also_section_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1226, "end_line": 1330, "span_ids": ["NumpyDocstring._parse_numpydoc_see_also_section"], "tokens": 728}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstring(GoogleDocstring):\n\n def _parse_numpydoc_see_also_section(self, content: List[str]) -> List[str]:\n \"\"\"\n Derived from the NumpyDoc implementation of _parse_see_also.\n\n See Also\n --------\n func_name : Descriptive text\n continued text\n another_func_name : Descriptive text\n func_name1, func_name2, :meth:`func_name`, func_name3\n\n \"\"\"\n items = []\n\n def parse_item_name(text: str) -> Tuple[str, str]:\n \"\"\"Match ':role:`name`' or 'name'\"\"\"\n m = self._name_rgx.match(text)\n if m:\n g = m.groups()\n if g[1] is None:\n return g[3], None\n else:\n return g[2], g[1]\n raise ValueError(\"%s is not a item name\" % text)\n\n def push_item(name: str, rest: List[str]) -> None:\n if not name:\n return\n name, role = parse_item_name(name)\n items.append((name, list(rest), role))\n del rest[:]\n\n def translate(func, description, role):\n translations = self._config.napoleon_type_aliases\n if role is not None or not translations:\n return func, description, role\n\n translated = translations.get(func, func)\n match = self._name_rgx.match(translated)\n if not match:\n return translated, description, role\n\n groups = match.groupdict()\n role = groups[\"role\"]\n new_func = groups[\"name\"] or groups[\"name2\"]\n\n return new_func, description, role\n\n current_func = None\n rest: List[str] = []\n\n for line in content:\n if not line.strip():\n continue\n\n m = self._name_rgx.match(line)\n if m and line[m.end():].strip().startswith(':'):\n push_item(current_func, rest)\n current_func, line = line[:m.end()], line[m.end():]\n rest = [line.split(':', 1)[1].strip()]\n if not rest[0]:\n rest = []\n elif not line.startswith(' '):\n push_item(current_func, rest)\n current_func = None\n if ',' in line:\n for func in line.split(','):\n if func.strip():\n push_item(func, [])\n elif line.strip():\n current_func = line\n elif current_func is not None:\n rest.append(line.strip())\n push_item(current_func, rest)\n\n if not items:\n return []\n\n # apply type aliases\n items = [\n translate(func, description, role)\n for func, description, role in items\n ]\n\n lines: List[str] = []\n last_had_desc = True\n for name, desc, role in items:\n if role:\n link = ':%s:`%s`' % (role, name)\n else:\n link = ':obj:`%s`' % name\n if desc or last_had_desc:\n lines += ['']\n lines += [link]\n else:\n lines[-1] += \", %s\" % link\n if desc:\n lines += self._indent([' '.join(desc)])\n last_had_desc = True\n else:\n last_had_desc = False\n lines += ['']\n\n return self._format_admonition('seealso', lines)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_peek_iter.next_peek_iter.next.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_peek_iter.next_peek_iter.next.return.result", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/iterators.py", "file_name": "iterators.py", "file_type": "text/x-python", "category": "implementation", "start_line": 91, "end_line": 124, "span_ids": ["peek_iter.next"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class peek_iter:\n\n def next(self, n: int = None) -> Any:\n \"\"\"Get the next item or `n` items of the iterator.\n\n Parameters\n ----------\n n : int or None\n The number of items to retrieve. Defaults to None.\n\n Returns\n -------\n item or list of items\n The next item or `n` items of the iterator. If `n` is None, the\n item itself is returned. If `n` is an int, the items will be\n returned in a list. If `n` is 0, an empty list is returned.\n\n Raises\n ------\n StopIteration\n Raised if the iterator is exhausted, even if `n` is 0.\n\n \"\"\"\n self._fillcache(n)\n if not n:\n if self._cache[0] == self.sentinel:\n raise StopIteration\n if n is None:\n result = self._cache.popleft()\n else:\n result = []\n else:\n if self._cache[n - 1] == self.sentinel:\n raise StopIteration\n result = [self._cache.popleft() for i in range(n)]\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_peek_iter.peek_peek_iter.peek.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_peek_iter.peek_peek_iter.peek.return.result", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/iterators.py", "file_name": "iterators.py", "file_type": "text/x-python", "category": "implementation", "start_line": 126, "end_line": 151, "span_ids": ["peek_iter.peek"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class peek_iter:\n\n def peek(self, n: Optional[int] = None) -> Any:\n \"\"\"Preview the next item or `n` items of the iterator.\n\n The iterator is not advanced when peek is called.\n\n Returns\n -------\n item or list of items\n The next item or `n` items of the iterator. If `n` is None, the\n item itself is returned. If `n` is an int, the items will be\n returned in a list. If `n` is 0, an empty list is returned.\n\n If the iterator is exhausted, `peek_iter.sentinel` is returned,\n or placed as the last item in the returned list.\n\n Note\n ----\n Will never raise :exc:`StopIteration`.\n\n \"\"\"\n self._fillcache(n)\n if n is None:\n result = self._cache[0]\n else:\n result = [self._cache[i] for i in range(n)]\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_modify_iter_modify_iter.__init__.super___init___args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_modify_iter_modify_iter.__init__.super___init___args_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/iterators.py", "file_name": "iterators.py", "file_type": "text/x-python", "category": "implementation", "start_line": 154, "end_line": 221, "span_ids": ["modify_iter"], "tokens": 578}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class modify_iter(peek_iter):\n \"\"\"An iterator object that supports modifying items as they are returned.\n\n Parameters\n ----------\n o : iterable or callable\n `o` is interpreted very differently depending on the presence of\n `sentinel`.\n\n If `sentinel` is not given, then `o` must be a collection object\n which supports either the iteration protocol or the sequence protocol.\n\n If `sentinel` is given, then `o` must be a callable object.\n\n sentinel : any value, optional\n If given, the iterator will call `o` with no arguments for each\n call to its `next` method; if the value returned is equal to\n `sentinel`, :exc:`StopIteration` will be raised, otherwise the\n value will be returned.\n\n modifier : callable, optional\n The function that will be used to modify each item returned by the\n iterator. `modifier` should take a single argument and return a\n single value. Defaults to ``lambda x: x``.\n\n If `sentinel` is not given, `modifier` must be passed as a keyword\n argument.\n\n Attributes\n ----------\n modifier : callable\n `modifier` is called with each item in `o` as it is iterated. The\n return value of `modifier` is returned in lieu of the item.\n\n Values returned by `peek` as well as `next` are affected by\n `modifier`. However, `modify_iter.sentinel` is never passed through\n `modifier`; it will always be returned from `peek` unmodified.\n\n Example\n -------\n >>> a = [\" A list \",\n ... \" of strings \",\n ... \" with \",\n ... \" extra \",\n ... \" whitespace. \"]\n >>> modifier = lambda s: s.strip().replace('with', 'without')\n >>> for s in modify_iter(a, modifier=modifier):\n ... print('\"%s\"' % s)\n \"A list\"\n \"of strings\"\n \"without\"\n \"extra\"\n \"whitespace.\"\n\n \"\"\"\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n \"\"\"__init__(o, sentinel=None, modifier=lambda x: x)\"\"\"\n if 'modifier' in kwargs:\n self.modifier = kwargs['modifier']\n elif len(args) > 2:\n self.modifier = args[2]\n args = args[:2]\n else:\n self.modifier = lambda x: x\n if not callable(self.modifier):\n raise TypeError('modify_iter(o, modifier): '\n 'modifier must be callable')\n super().__init__(*args)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_modify_iter._fillcache_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py_modify_iter._fillcache_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/iterators.py", "file_name": "iterators.py", "file_type": "text/x-python", "category": "implementation", "start_line": 223, "end_line": 238, "span_ids": ["modify_iter._fillcache"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class modify_iter(peek_iter):\n\n def _fillcache(self, n: Optional[int]) -> None:\n \"\"\"Cache `n` modified items. If `n` is 0 or None, 1 item is cached.\n\n Each item returned by the iterator is passed through the\n `modify_iter.modified` function before being cached.\n\n \"\"\"\n if not n:\n n = 1\n try:\n while len(self._cache) < n:\n self._cache.append(self.modifier(next(self._iterable))) # type: ignore\n except StopIteration:\n while len(self._cache) < n:\n self._cache.append(self.sentinel)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_Todo_Todo.run.if_isinstance_todo_nodes.else_._never_reached_here": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_Todo_Todo.run.if_isinstance_todo_nodes.else_._never_reached_here", "embedding": null, "metadata": {"file_path": "sphinx/ext/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 39, "end_line": 69, "span_ids": ["Todo.run", "Todo"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Todo(BaseAdmonition, SphinxDirective):\n \"\"\"\n A todo entry, displayed (if configured) in the form of an admonition.\n \"\"\"\n\n node_class = todo_node\n has_content = True\n required_arguments = 0\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec: OptionSpec = {\n 'class': directives.class_option,\n 'name': directives.unchanged,\n }\n\n def run(self) -> List[Node]:\n if not self.options.get('class'):\n self.options['class'] = ['admonition-todo']\n\n (todo,) = super().run() # type: Tuple[Node]\n if isinstance(todo, nodes.system_message):\n return [todo]\n elif isinstance(todo, todo_node):\n todo.insert(0, nodes.title(text=_('Todo')))\n todo['docname'] = self.env.docname\n self.add_name(todo)\n self.set_source_info(todo)\n self.state.document.note_explicit_target(todo)\n return [todo]\n else:\n raise RuntimeError # never reached here", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/ext/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 322, "end_line": 345, "span_ids": ["setup"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_event('todo-defined')\n app.add_config_value('todo_include_todos', False, 'html')\n app.add_config_value('todo_link_only', False, 'html')\n app.add_config_value('todo_emit_warnings', False, 'html')\n\n app.add_node(todolist)\n app.add_node(todo_node,\n html=(visit_todo_node, depart_todo_node),\n latex=(latex_visit_todo_node, latex_depart_todo_node),\n text=(visit_todo_node, depart_todo_node),\n man=(visit_todo_node, depart_todo_node),\n texinfo=(visit_todo_node, depart_todo_node))\n\n app.add_directive('todo', Todo)\n app.add_directive('todolist', TodoList)\n app.add_domain(TodoDomain)\n app.connect('doctree-resolved', TodoListProcessor)\n return {\n 'version': sphinx.__display_version__,\n 'env_version': 2,\n 'parallel_read_safe': True\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_doctree_read_doctree_read.has_tag.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_doctree_read_doctree_read.has_tag.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 77, "end_line": 109, "span_ids": ["doctree_read"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def doctree_read(app: Sphinx, doctree: Node) -> None:\n env = app.builder.env\n if not hasattr(env, '_viewcode_modules'):\n env._viewcode_modules = {} # type: ignore\n\n def has_tag(modname: str, fullname: str, docname: str, refname: str) -> bool:\n entry = env._viewcode_modules.get(modname, None) # type: ignore\n if entry is False:\n return False\n\n code_tags = app.emit_firstresult('viewcode-find-source', modname)\n if code_tags is None:\n try:\n analyzer = ModuleAnalyzer.for_module(modname)\n analyzer.find_tags()\n except Exception:\n env._viewcode_modules[modname] = False # type: ignore\n return False\n\n code = analyzer.code\n tags = analyzer.tags\n else:\n code, tags = code_tags\n\n if entry is None or entry[0] != code:\n entry = code, tags, {}, refname\n env._viewcode_modules[modname] = entry # type: ignore\n _, tags, used, _ = entry\n if fullname in tags:\n used[fullname] = docname\n return True\n\n return False\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 332, "end_line": 351, "span_ids": ["setup"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_config_value('viewcode_import', None, False)\n app.add_config_value('viewcode_enable_epub', False, False)\n app.add_config_value('viewcode_follow_imported_members', True, False)\n app.connect('doctree-read', doctree_read)\n app.connect('env-merge-info', env_merge_info)\n app.connect('env-purge-doc', env_purge_doc)\n app.connect('html-collect-pages', collect_pages)\n app.connect('missing-reference', missing_reference)\n # app.add_config_value('viewcode_include_modules', [], 'env')\n # app.add_config_value('viewcode_exclude_modules', [], 'env')\n app.add_event('viewcode-find-source')\n app.add_event('viewcode-follow-imported')\n app.add_post_transform(ViewcodeAnchorTransform)\n return {\n 'version': sphinx.__display_version__,\n 'env_version': 1,\n 'parallel_read_safe': True\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/extension.py_verify_needs_extensions_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/extension.py_verify_needs_extensions_", "embedding": null, "metadata": {"file_path": "sphinx/extension.py", "file_name": "extension.py", "file_type": "text/x-python", "category": "implementation", "start_line": 36, "end_line": 74, "span_ids": ["verify_needs_extensions", "setup"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def verify_needs_extensions(app: \"Sphinx\", config: Config) -> None:\n \"\"\"Verify the required Sphinx extensions are loaded.\"\"\"\n if config.needs_extensions is None:\n return\n\n for extname, reqversion in config.needs_extensions.items():\n extension = app.extensions.get(extname)\n if extension is None:\n logger.warning(__('The %s extension is required by needs_extensions settings, '\n 'but it is not loaded.'), extname)\n continue\n\n fulfilled = True\n if extension.version == 'unknown version':\n fulfilled = False\n else:\n try:\n if Version(reqversion) > Version(extension.version):\n fulfilled = False\n except InvalidVersion:\n if reqversion > extension.version:\n fulfilled = False\n\n if not fulfilled:\n raise VersionRequirementError(__('This project needs the extension %s at least in '\n 'version %s and therefore cannot be built with '\n 'the loaded version (%s).') %\n (extname, reqversion, extension.version))\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.connect('config-inited', verify_needs_extensions, priority=800)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py_PygmentsBridge_PygmentsBridge.get_formatter.return.self_formatter_kwargs_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py_PygmentsBridge_PygmentsBridge.get_formatter.return.self_formatter_kwargs_", "embedding": null, "metadata": {"file_path": "sphinx/highlighting.py", "file_name": "highlighting.py", "file_type": "text/x-python", "category": "implementation", "start_line": 63, "end_line": 95, "span_ids": ["PygmentsBridge", "PygmentsBridge.get_formatter", "PygmentsBridge.get_style"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PygmentsBridge:\n # Set these attributes if you want to have different Pygments formatters\n # than the default ones.\n html_formatter = HtmlFormatter\n latex_formatter = LatexFormatter\n\n def __init__(self, dest: str = 'html', stylename: str = 'sphinx',\n latex_engine: str = None) -> None:\n self.dest = dest\n self.latex_engine = latex_engine\n\n style = self.get_style(stylename)\n self.formatter_args: Dict[str, Any] = {'style': style}\n if dest == 'html':\n self.formatter = self.html_formatter\n else:\n self.formatter = self.latex_formatter\n self.formatter_args['commandprefix'] = 'PYG'\n\n def get_style(self, stylename: str) -> Style:\n if stylename is None or stylename == 'sphinx':\n return SphinxStyle\n elif stylename == 'none':\n return NoneStyle\n elif '.' in stylename:\n module, stylename = stylename.rsplit('.', 1)\n return getattr(import_module(module), stylename)\n else:\n return get_style_by_name(stylename)\n\n def get_formatter(self, **kwargs: Any) -> Formatter:\n kwargs.update(self.formatter_args)\n return self.formatter(**kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py_PygmentsBridge.get_lexer_PygmentsBridge.get_lexer.return.lexer": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py_PygmentsBridge.get_lexer_PygmentsBridge.get_lexer.return.lexer", "embedding": null, "metadata": {"file_path": "sphinx/highlighting.py", "file_name": "highlighting.py", "file_type": "text/x-python", "category": "implementation", "start_line": 91, "end_line": 128, "span_ids": ["PygmentsBridge.get_lexer"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PygmentsBridge:\n # Set these attributes if you want to have different Pygments formatters\n\n def get_lexer(self, source: str, lang: str, opts: Dict = None,\n force: bool = False, location: Any = None) -> Lexer:\n if not opts:\n opts = {}\n\n # find out which lexer to use\n if lang in ('py', 'python'):\n if source.startswith('>>>'):\n # interactive session\n lang = 'pycon'\n else:\n lang = 'python'\n elif lang in ('py3', 'python3', 'default'):\n if source.startswith('>>>'):\n lang = 'pycon3'\n else:\n lang = 'python3'\n\n if lang in lexers:\n # just return custom lexers here (without installing raiseonerror filter)\n return lexers[lang]\n elif lang in lexer_classes:\n lexer = lexer_classes[lang](**opts)\n else:\n try:\n if lang == 'guess':\n lexer = guess_lexer(source, **opts)\n else:\n lexer = get_lexer_by_name(lang, **opts)\n except ClassNotFound:\n logger.warning(__('Pygments lexer name %r is not known'), lang,\n location=location)\n lexer = lexer_classes['none'](**opts)\n\n if not force:\n lexer.add_filter('raiseonerror')\n\n return lexer", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py_PygmentsBridge.highlight_block_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py_PygmentsBridge.highlight_block_", "embedding": null, "metadata": {"file_path": "sphinx/highlighting.py", "file_name": "highlighting.py", "file_type": "text/x-python", "category": "implementation", "start_line": 130, "end_line": 166, "span_ids": ["PygmentsBridge.get_stylesheet", "PygmentsBridge.highlight_block"], "tokens": 336}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PygmentsBridge:\n # Set these attributes if you want to have different Pygments formatters\n\n def highlight_block(self, source: str, lang: str, opts: Dict = None,\n force: bool = False, location: Any = None, **kwargs: Any) -> str:\n if not isinstance(source, str):\n source = source.decode()\n\n lexer = self.get_lexer(source, lang, opts, force, location)\n\n # highlight via Pygments\n formatter = self.get_formatter(**kwargs)\n try:\n hlsource = highlight(source, lexer, formatter)\n except ErrorToken:\n # this is most probably not the selected language,\n # so let it pass unhighlighted\n if lang == 'default':\n pass # automatic highlighting failed.\n else:\n logger.warning(__('Could not lex literal_block as \"%s\". '\n 'Highlighting skipped.'), lang,\n type='misc', subtype='highlighting_failure',\n location=location)\n lexer = self.get_lexer(source, 'none', opts, force, location)\n hlsource = highlight(source, lexer, formatter)\n\n if self.dest == 'html':\n return hlsource\n else:\n # MEMO: this is done to escape Unicode chars with non-Unicode engines\n return texescape.hlescape(hlsource, self.latex_engine)\n\n def get_stylesheet(self) -> str:\n formatter = self.get_formatter()\n if self.dest == 'html':\n return formatter.get_style_defs('.highlight')\n else:\n return formatter.get_style_defs() + _LATEX_ADD_STYLES", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxBaseReader_SphinxBaseReader.new_document.return.document": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxBaseReader_SphinxBaseReader.new_document.return.document", "embedding": null, "metadata": {"file_path": "sphinx/io.py", "file_name": "io.py", "file_type": "text/x-python", "category": "implementation", "start_line": 34, "end_line": 83, "span_ids": ["SphinxBaseReader.setup", "SphinxBaseReader.get_transforms", "SphinxBaseReader.new_document", "SphinxBaseReader"], "tokens": 338}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxBaseReader(standalone.Reader):\n \"\"\"\n A base class of readers for Sphinx.\n\n This replaces reporter by Sphinx's on generating document.\n \"\"\"\n\n transforms: List[Type[Transform]] = []\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n from sphinx.application import Sphinx\n if len(args) > 0 and isinstance(args[0], Sphinx):\n self._app = args[0]\n self._env = self._app.env\n args = args[1:]\n\n super().__init__(*args, **kwargs)\n\n def setup(self, app: \"Sphinx\") -> None:\n self._app = app # hold application object only for compatibility\n self._env = app.env\n\n def get_transforms(self) -> List[Type[Transform]]:\n transforms = super().get_transforms() + self.transforms\n\n # remove transforms which is not needed for Sphinx\n unused = [DanglingReferences]\n for transform in unused:\n if transform in transforms:\n transforms.remove(transform)\n\n return transforms\n\n def new_document(self) -> nodes.document:\n \"\"\"\n Creates a new document object which has a special reporter object good\n for logging.\n \"\"\"\n document = super().new_document()\n document.__class__ = addnodes.document # replace the class with patched version\n\n # substitute transformer\n document.transformer = SphinxTransformer(document)\n document.transformer.set_environment(self.settings.env)\n\n # substitute reporter\n reporter = document.reporter\n document.reporter = LoggingReporter.from_reporter(reporter)\n\n return document", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxStandaloneReader_SphinxStandaloneReader.read_source.return.arg_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxStandaloneReader_SphinxStandaloneReader.read_source.return.arg_0_", "embedding": null, "metadata": {"file_path": "sphinx/io.py", "file_name": "io.py", "file_type": "text/x-python", "category": "implementation", "start_line": 111, "end_line": 136, "span_ids": ["SphinxStandaloneReader.read", "SphinxStandaloneReader.read_source", "SphinxStandaloneReader.setup", "SphinxStandaloneReader"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxStandaloneReader(SphinxBaseReader):\n \"\"\"\n A basic document reader for Sphinx.\n \"\"\"\n\n def setup(self, app: \"Sphinx\") -> None:\n self.transforms = self.transforms + app.registry.get_transforms()\n super().setup(app)\n\n def read(self, source: Input, parser: Parser, settings: Values) -> nodes.document:\n self.source = source\n if not self.parser:\n self.parser = parser\n self.settings = settings\n self.input = self.read_source(settings.env)\n self.parse()\n return self.document\n\n def read_source(self, env: BuildEnvironment) -> str:\n \"\"\"Read content from source and do post-process.\"\"\"\n content = self.source.read()\n\n # emit \"source-read\" event\n arg = [content]\n env.events.emit('source-read', env.docname, arg)\n return arg[0]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxI18nReader_SphinxI18nReader.setup.for_transform_in_unused_.if_transform_in_self_tran.self_transforms_remove_tr": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxI18nReader_SphinxI18nReader.setup.for_transform_in_unused_.if_transform_in_self_tran.self_transforms_remove_tr", "embedding": null, "metadata": {"file_path": "sphinx/io.py", "file_name": "io.py", "file_type": "text/x-python", "category": "implementation", "start_line": 139, "end_line": 157, "span_ids": ["SphinxI18nReader.setup", "SphinxI18nReader"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxI18nReader(SphinxBaseReader):\n \"\"\"\n A document reader for i18n.\n\n This returns the source line number of original text as current source line number\n to let users know where the error happened.\n Because the translated texts are partial and they don't have correct line numbers.\n \"\"\"\n\n def setup(self, app: \"Sphinx\") -> None:\n super().setup(app)\n\n self.transforms = self.transforms + app.registry.get_transforms()\n unused = [PreserveTranslatableMessages, Locale, RemoveTranslatableInline,\n AutoIndexUpgrader, FigureAligner, SphinxDomains, DoctreeReadEvent,\n UIDTransform]\n for transform in unused:\n if transform in self.transforms:\n self.transforms.remove(transform)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxDummyWriter_SphinxFileInput.__init__.super___init___args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_SphinxDummyWriter_SphinxFileInput.__init__.super___init___args_", "embedding": null, "metadata": {"file_path": "sphinx/io.py", "file_name": "io.py", "file_type": "text/x-python", "category": "implementation", "start_line": 160, "end_line": 178, "span_ids": ["SphinxDummySourceClass", "SphinxDummyWriter", "SphinxFileInput", "SphinxDummyWriter.translate"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxDummyWriter(UnfilteredWriter):\n \"\"\"Dummy writer module used for generating doctree.\"\"\"\n\n supported = ('html',) # needed to keep \"meta\" nodes\n\n def translate(self) -> None:\n pass\n\n\ndef SphinxDummySourceClass(source: Any, *args: Any, **kwargs: Any) -> Any:\n \"\"\"Bypass source object as is to cheat Publisher.\"\"\"\n return source\n\n\nclass SphinxFileInput(FileInput):\n \"\"\"A basic FileInput for Sphinx.\"\"\"\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n kwargs['error_handler'] = 'sphinx'\n super().__init__(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_read_doc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py_read_doc_", "embedding": null, "metadata": {"file_path": "sphinx/io.py", "file_name": "io.py", "file_type": "text/x-python", "category": "implementation", "start_line": 156, "end_line": 183, "span_ids": ["read_doc"], "tokens": 290}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def read_doc(app: \"Sphinx\", env: BuildEnvironment, filename: str) -> nodes.document:\n \"\"\"Parse a document and convert to doctree.\"\"\"\n # set up error_handler for the target document\n error_handler = UnicodeDecodeErrorHandler(env.docname)\n codecs.register_error('sphinx', error_handler) # type: ignore\n\n reader = SphinxStandaloneReader()\n reader.setup(app)\n filetype = get_filetype(app.config.source_suffix, filename)\n parser = app.registry.create_source_parser(app, filetype)\n if parser.__class__.__name__ == 'CommonMarkParser' and parser.settings_spec == ():\n # a workaround for recommonmark\n # If recommonmark.AutoStrictify is enabled, the parser invokes reST parser\n # internally. But recommonmark-0.4.0 does not provide settings_spec for reST\n # parser. As a workaround, this copies settings_spec for RSTParser to the\n # CommonMarkParser.\n parser.settings_spec = RSTParser.settings_spec\n\n pub = Publisher(reader=reader,\n parser=parser,\n writer=SphinxDummyWriter(),\n source_class=SphinxFileInput,\n destination=NullOutput())\n pub.process_programmatic_settings(None, env.settings, None)\n pub.set_source(source_path=filename)\n pub.publish()\n return pub.document", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py__todim__todim._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py__todim__todim._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/jinja2glue.py", "file_name": "jinja2glue.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 58, "span_ids": ["_todim"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _todim(val: Union[int, str]) -> str:\n \"\"\"\n Make val a css dimension. In particular the following transformations\n are performed:\n\n - None -> 'initial' (default CSS value)\n - 0 -> '0'\n - ints and string representations of ints are interpreted as pixels.\n\n Everything else is returned unchanged.\n \"\"\"\n if val is None:\n return 'initial'\n elif str(val).isdigit():\n return '0' if int(val) == 0 else '%spx' % val\n return val # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py__slice_index__slice_index.for_slice_number_in_range.yield_seq_start_offset_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py__slice_index__slice_index.for_slice_number_in_range.yield_seq_start_offset_", "embedding": null, "metadata": {"file_path": "sphinx/jinja2glue.py", "file_name": "jinja2glue.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 79, "span_ids": ["_slice_index"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _slice_index(values: List, slices: int) -> Iterator[List]:\n seq = list(values)\n length = 0\n for value in values:\n length += 1 + len(value[1][1]) # count includes subitems\n items_per_slice = length // slices\n offset = 0\n for slice_number in range(slices):\n count = 0\n start = offset\n if slices == slice_number + 1: # last column\n offset = len(seq)\n else:\n for value in values[offset:]:\n count += 1 + len(value[1][1])\n offset += 1\n if count >= items_per_slice:\n break\n yield seq[start:offset]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_accesskey_warning._return_empty_string_not": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_accesskey_warning._return_empty_string_not", "embedding": null, "metadata": {"file_path": "sphinx/jinja2glue.py", "file_name": "jinja2glue.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 108, "span_ids": ["idgen.__next__", "idgen.current", "warning", "idgen", "accesskey", "idgen:2"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def accesskey(context: Any, key: str) -> str:\n \"\"\"Helper to output each access key only once.\"\"\"\n if '_accesskeys' not in context:\n context.vars['_accesskeys'] = {}\n if key and key not in context.vars['_accesskeys']:\n context.vars['_accesskeys'][key] = 1\n return 'accesskey=\"%s\"' % key\n return ''\n\n\nclass idgen:\n def __init__(self) -> None:\n self.id = 0\n\n def current(self) -> int:\n return self.id\n\n def __next__(self) -> int:\n self.id += 1\n return self.id\n next = __next__ # Python 2/Jinja compatibility\n\n\n@pass_context\ndef warning(context: Dict, message: str, *args: Any, **kwargs: Any) -> str:\n if 'pagename' in context:\n filename = context.get('pagename') + context.get('file_suffix', '')\n message = 'in rendering %s: %s' % (filename, message)\n logger = logging.getLogger('sphinx.themes')\n logger.warning(message, *args, **kwargs)\n return '' # return empty string not to output any values", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_SphinxFileSystemLoader_SphinxFileSystemLoader.get_source.raise_TemplateNotFound_te": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_SphinxFileSystemLoader_SphinxFileSystemLoader.get_source.raise_TemplateNotFound_te", "embedding": null, "metadata": {"file_path": "sphinx/jinja2glue.py", "file_name": "jinja2glue.py", "file_type": "text/x-python", "category": "implementation", "start_line": 115, "end_line": 138, "span_ids": ["SphinxFileSystemLoader.get_source", "SphinxFileSystemLoader"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxFileSystemLoader(FileSystemLoader):\n \"\"\"\n FileSystemLoader subclass that is not so strict about '..' entries in\n template names.\n \"\"\"\n\n def get_source(self, environment: Environment, template: str) -> Tuple[str, str, Callable]:\n for searchpath in self.searchpath:\n filename = path.join(searchpath, template)\n f = open_if_exists(filename)\n if f is None:\n continue\n with f:\n contents = f.read().decode(self.encoding)\n\n mtime = path.getmtime(filename)\n\n def uptodate() -> bool:\n try:\n return path.getmtime(filename) == mtime\n except OSError:\n return False\n return contents, filename, uptodate\n raise TemplateNotFound(template)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_BuiltinTemplateLoader.render_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_BuiltinTemplateLoader.render_", "embedding": null, "metadata": {"file_path": "sphinx/jinja2glue.py", "file_name": "jinja2glue.py", "file_type": "text/x-python", "category": "implementation", "start_line": 191, "end_line": 214, "span_ids": ["BuiltinTemplateLoader.newest_template_mtime", "BuiltinTemplateLoader.get_source", "BuiltinTemplateLoader.render", "BuiltinTemplateLoader.render_string"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuiltinTemplateLoader(TemplateBridge, BaseLoader):\n\n def render(self, template: str, context: Dict) -> str: # type: ignore\n return self.environment.get_template(template).render(context)\n\n def render_string(self, source: str, context: Dict) -> str:\n return self.environment.from_string(source).render(context)\n\n def newest_template_mtime(self) -> float:\n return max(mtimes_of_files(self.pathchain, '.html'))\n\n # Loader interface\n\n def get_source(self, environment: Environment, template: str) -> Tuple[str, str, Callable]:\n loaders = self.loaders\n # exclamation mark starts search from theme\n if template.startswith('!'):\n loaders = loaders[self.templatepathlen:]\n template = template[1:]\n for loader in loaders:\n try:\n return loader.get_source(environment, template)\n except TemplateNotFound:\n pass\n raise TemplateNotFound(template)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_translators_init.return.translator_has_translati": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_translators_init.return.translator_has_translati", "embedding": null, "metadata": {"file_path": "sphinx/locale/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 140, "span_ids": ["init", "impl"], "tokens": 360}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "translators: Dict[Tuple[str, str], NullTranslations] = defaultdict(NullTranslations)\n\n\ndef init(locale_dirs: List[Optional[str]], language: Optional[str],\n catalog: str = 'sphinx', namespace: str = 'general') -> Tuple[NullTranslations, bool]:\n \"\"\"Look for message catalogs in `locale_dirs` and *ensure* that there is at\n least a NullTranslations catalog set in `translators`. If called multiple\n times or if several ``.mo`` files are found, their contents are merged\n together (thus making ``init`` reentrant).\n \"\"\"\n global translators\n translator = translators.get((namespace, catalog))\n # ignore previously failed attempts to find message catalogs\n if translator.__class__ is NullTranslations:\n translator = None\n # the None entry is the system's default locale path\n has_translation = True\n\n if language and '_' in language:\n # for language having country code (like \"de_AT\")\n languages: Optional[List[str]] = [language, language.split('_')[0]]\n elif language:\n languages = [language]\n else:\n languages = None\n\n # loading\n for dir_ in locale_dirs:\n try:\n trans = gettext.translation(catalog, localedir=dir_, languages=languages)\n if translator is None:\n translator = trans\n else:\n translator.add_fallback(trans)\n except Exception:\n # Language couldn't be found in the specified path\n pass\n # guarantee translators[(namespace, catalog)] exists\n if translator is None:\n translator = NullTranslations()\n has_translation = False\n translators[(namespace, catalog)] = translator\n return translator, has_translation", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_setlocale_setlocale.try_.except_locale_Error_.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_setlocale_setlocale.try_.except_locale_Error_.pass", "embedding": null, "metadata": {"file_path": "sphinx/locale/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 149, "end_line": 166, "span_ids": ["setlocale"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setlocale(category: int, value: Union[str, Iterable[str]] = None) -> None:\n \"\"\"Update locale settings.\n\n This does not throw any exception even if update fails.\n This is workaround for Python's bug.\n\n For more details:\n\n * https://github.com/sphinx-doc/sphinx/issues/5724\n * https://bugs.python.org/issue18378#msg215215\n\n .. note:: Only for internal use. Please don't call this method from extensions.\n This will be removed in future.\n \"\"\"\n try:\n locale.setlocale(category, value)\n except locale.Error:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_init_console_init_console.return.init_locale_dir_langua": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_init_console_init_console.return.init_locale_dir_langua", "embedding": null, "metadata": {"file_path": "sphinx/locale/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 169, "end_line": 181, "span_ids": ["init_console"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def init_console(locale_dir: str, catalog: str) -> Tuple[NullTranslations, bool]:\n \"\"\"Initialize locale for console.\n\n .. versionadded:: 1.8\n \"\"\"\n try:\n # encoding is ignored\n language, _ = locale.getlocale(locale.LC_MESSAGES) # type: Tuple[Optional[str], Any]\n except AttributeError:\n # LC_MESSAGES is not always defined. Fallback to the default language\n # in case it is not.\n language = None\n return init([locale_dir], language, catalog, 'console')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_get_translator__lazy_translate.return.translator_gettext_messag": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_get_translator__lazy_translate.return.translator_gettext_messag", "embedding": null, "metadata": {"file_path": "sphinx/locale/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 184, "end_line": 197, "span_ids": ["get_translator", "_lazy_translate", "is_translator_registered"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_translator(catalog: str = 'sphinx', namespace: str = 'general') -> NullTranslations:\n return translators[(namespace, catalog)]\n\n\ndef is_translator_registered(catalog: str = 'sphinx', namespace: str = 'general') -> bool:\n return (namespace, catalog) in translators\n\n\ndef _lazy_translate(catalog: str, namespace: str, message: str) -> str:\n \"\"\"Used instead of _ when creating TranslationProxy, because _ is\n not bound yet at that time.\n \"\"\"\n translator = get_translator(catalog, namespace)\n return translator.gettext(message)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_get_translation_get_translation.return.gettext": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py_get_translation_get_translation.return.gettext", "embedding": null, "metadata": {"file_path": "sphinx/locale/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 194, "end_line": 230, "span_ids": ["get_translation"], "tokens": 324}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_translation(catalog: str, namespace: str = 'general') -> Callable:\n \"\"\"Get a translation function based on the *catalog* and *namespace*.\n\n The extension can use this API to translate the messages on the\n extension::\n\n import os\n from sphinx.locale import get_translation\n\n MESSAGE_CATALOG_NAME = 'myextension' # name of *.pot, *.po and *.mo files\n _ = get_translation(MESSAGE_CATALOG_NAME)\n text = _('Hello Sphinx!')\n\n\n def setup(app):\n package_dir = os.path.abspath(os.path.dirname(__file__))\n locale_dir = os.path.join(package_dir, 'locales')\n app.add_message_catalog(MESSAGE_CATALOG_NAME, locale_dir)\n\n With this code, sphinx searches a message catalog from\n ``${package_dir}/locales/${language}/LC_MESSAGES/myextension.mo``.\n The :confval:`language` is used for the searching.\n\n .. versionadded:: 1.8\n \"\"\"\n def gettext(message: str, *args: Any) -> str:\n if not is_translator_registered(catalog, namespace):\n # not initialized yet\n return _TranslationProxy(_lazy_translate, catalog, namespace, message) # type: ignore # NOQA\n else:\n translator = get_translator(catalog, namespace)\n if len(args) <= 1:\n return translator.gettext(message)\n else: # support pluralization\n return translator.ngettext(message, args[0], args[1])\n\n return gettext", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py__A_shortcut_for_sphinx_c_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py__A_shortcut_for_sphinx_c_", "embedding": null, "metadata": {"file_path": "sphinx/locale/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 233, "end_line": 261, "span_ids": ["get_translation", "impl:3"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# A shortcut for sphinx-core\n#: Translation function for messages on documentation (menu, labels, themes and so on).\n#: This function follows :confval:`language` setting.\n_ = get_translation('sphinx')\n#: Translation function for console messages\n#: This function follows locale setting (`LC_ALL`, `LC_MESSAGES` and so on).\n__ = get_translation('sphinx', 'console')\n\n\n# labels\nadmonitionlabels = {\n 'attention': _('Attention'),\n 'caution': _('Caution'),\n 'danger': _('Danger'),\n 'error': _('Error'),\n 'hint': _('Hint'),\n 'important': _('Important'),\n 'note': _('Note'),\n 'seealso': _('See also'),\n 'tip': _('Tip'),\n 'warning': _('Warning'),\n}\n\n# Moved to sphinx.directives.other (will be overridden later)\nversionlabels: Dict[str, str] = {}\n\n# Moved to sphinx.domains.python (will be overridden later)\npairindextypes: Dict[str, str] = {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/parsers.py_Parser_Parser.app.return.self__app": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/parsers.py_Parser_Parser.app.return.self__app", "embedding": null, "metadata": {"file_path": "sphinx/parsers.py", "file_name": "parsers.py", "file_type": "text/x-python", "category": "implementation", "start_line": 23, "end_line": 54, "span_ids": ["Parser", "Parser.set_application", "Parser.app"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Parser(docutils.parsers.Parser):\n \"\"\"\n A base class of source parsers. The additional parsers should inherit this class instead\n of ``docutils.parsers.Parser``. Compared with ``docutils.parsers.Parser``, this class\n improves accessibility to Sphinx APIs.\n\n The subclasses can access sphinx core runtime objects (app, config and env).\n \"\"\"\n\n #: The config object\n config: Config\n\n #: The environment object\n env: BuildEnvironment\n\n def set_application(self, app: \"Sphinx\") -> None:\n \"\"\"set_application will be called from Sphinx to set app and other instance variables\n\n :param sphinx.application.Sphinx app: Sphinx application object\n \"\"\"\n self._app = app\n self.config = app.config\n self.env = app.env\n\n @property\n def app(self) -> \"Sphinx\":\n \"\"\"The application object\n\n .. deprecated:: 3.0\n \"\"\"\n warnings.warn('parser.app is deprecated.', RemovedInSphinx50Warning, stacklevel=2)\n return self._app", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/parsers.py_RSTParser_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/parsers.py_RSTParser_", "embedding": null, "metadata": {"file_path": "sphinx/parsers.py", "file_name": "parsers.py", "file_type": "text/x-python", "category": "implementation", "start_line": 57, "end_line": 106, "span_ids": ["RSTParser.parse", "RSTParser", "setup", "RSTParser.decorate", "RSTParser.get_transforms"], "tokens": 359}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RSTParser(docutils.parsers.rst.Parser, Parser):\n \"\"\"A reST parser for Sphinx.\"\"\"\n\n def get_transforms(self) -> List[Type[Transform]]:\n \"\"\"\n Sphinx's reST parser replaces a transform class for smart-quotes by its own\n\n refs: sphinx.io.SphinxStandaloneReader\n \"\"\"\n transforms = super().get_transforms()\n transforms.remove(SmartQuotes)\n return transforms\n\n def parse(self, inputstring: Union[str, StringList], document: nodes.document) -> None:\n \"\"\"Parse text and generate a document tree.\"\"\"\n self.setup_parse(inputstring, document) # type: ignore\n self.statemachine = states.RSTStateMachine(\n state_classes=self.state_classes,\n initial_state=self.initial_state,\n debug=document.reporter.debug_flag)\n\n # preprocess inputstring\n if isinstance(inputstring, str):\n lines = docutils.statemachine.string2lines(\n inputstring, tab_width=document.settings.tab_width,\n convert_whitespace=True)\n\n inputlines = StringList(lines, document.current_source)\n else:\n inputlines = inputstring\n\n self.decorate(inputlines)\n self.statemachine.run(inputlines, document, inliner=self.inliner)\n self.finish_parse()\n\n def decorate(self, content: StringList) -> None:\n \"\"\"Preprocess reST content before parsing.\"\"\"\n prepend_prolog(content, self.config.rst_prolog)\n append_epilog(content, self.config.rst_epilog)\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_source_parser(RSTParser)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/project.py_Project.discover_Project.discover.return.self_docnames": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/project.py_Project.discover_Project.discover.return.self_docnames", "embedding": null, "metadata": {"file_path": "sphinx/project.py", "file_name": "project.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 53, "span_ids": ["Project.discover"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Project:\n\n def discover(self, exclude_paths: List[str] = []) -> Set[str]:\n \"\"\"Find all document files in the source directory and put them in\n :attr:`docnames`.\n \"\"\"\n self.docnames = set()\n excludes = compile_matchers(exclude_paths + EXCLUDE_PATHS)\n for filename in get_matching_files(self.srcdir, excludes): # type: ignore\n docname = self.path2doc(filename)\n if docname:\n if docname in self.docnames:\n pattern = os.path.join(self.srcdir, docname) + '.*'\n files = [relpath(f, self.srcdir) for f in glob(pattern)]\n logger.warning(__('multiple files found for the document \"%s\": %r\\n'\n 'Use %r for the build.'),\n docname, files, self.doc2path(docname), once=True)\n elif os.access(os.path.join(self.srcdir, filename), os.R_OK):\n self.docnames.add(docname)\n else:\n logger.warning(__(\"document not readable. Ignored.\"), location=docname)\n\n return self.docnames", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/project.py_Project.path2doc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/project.py_Project.path2doc_", "embedding": null, "metadata": {"file_path": "sphinx/project.py", "file_name": "project.py", "file_type": "text/x-python", "category": "implementation", "start_line": 55, "end_line": 89, "span_ids": ["Project.doc2path", "Project.path2doc"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Project:\n\n def path2doc(self, filename: str) -> Optional[str]:\n \"\"\"Return the docname for the filename if the file is a document.\n\n *filename* should be absolute or relative to the source directory.\n \"\"\"\n if filename.startswith(self.srcdir):\n filename = relpath(filename, self.srcdir)\n for suffix in self.source_suffix:\n if filename.endswith(suffix):\n filename = path_stabilize(filename)\n return filename[:-len(suffix)]\n\n # the file does not have docname\n return None\n\n def doc2path(self, docname: str, basedir: bool = True) -> str:\n \"\"\"Return the filename for the document name.\n\n If *basedir* is True, return as an absolute path.\n Else, return as a relative path to the source directory.\n \"\"\"\n docname = docname.replace(SEP, os.path.sep)\n basename = os.path.join(self.srcdir, docname)\n for suffix in self.source_suffix:\n if os.path.isfile(basename + suffix):\n break\n else:\n # document does not exist\n suffix = list(self.source_suffix)[0]\n\n if basedir:\n return basename + suffix\n else:\n return docname + suffix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.for_string_ModuleAnalyzer.for_file.return.obj": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.for_string_ModuleAnalyzer.for_file.return.obj", "embedding": null, "metadata": {"file_path": "sphinx/pycode/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 96, "span_ids": ["ModuleAnalyzer.for_file", "ModuleAnalyzer.for_string"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleAnalyzer:\n\n @classmethod\n def for_string(cls, string: str, modname: str, srcname: str = '<string>'\n ) -> \"ModuleAnalyzer\":\n return cls(StringIO(string), modname, srcname)\n\n @classmethod\n def for_file(cls, filename: str, modname: str) -> \"ModuleAnalyzer\":\n if ('file', filename) in cls.cache:\n return cls.cache['file', filename]\n try:\n with tokenize.open(filename) as f:\n obj = cls(f, modname, filename)\n cls.cache['file', filename] = obj\n except Exception as err:\n if '.egg' + path.sep in filename:\n obj = cls.cache['file', filename] = cls.for_egg(filename, modname)\n else:\n raise PycodeError('error opening %r' % filename, err) from err\n return obj", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.for_egg_ModuleAnalyzer.for_egg.try_.except_Exception_as_exc_.raise_PycodeError_error_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.for_egg_ModuleAnalyzer.for_egg.try_.except_Exception_as_exc_.raise_PycodeError_error_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 107, "span_ids": ["ModuleAnalyzer.for_egg"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleAnalyzer:\n\n @classmethod\n def for_egg(cls, filename: str, modname: str) -> \"ModuleAnalyzer\":\n SEP = re.escape(path.sep)\n eggpath, relpath = re.split('(?<=\\\\.egg)' + SEP, filename)\n try:\n with ZipFile(eggpath) as egg:\n code = egg.read(relpath).decode()\n return cls.for_string(code, modname, filename)\n except Exception as exc:\n raise PycodeError('error opening %r' % filename, exc) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.for_module_ModuleAnalyzer.for_module.return.obj": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.for_module_ModuleAnalyzer.for_module.return.obj", "embedding": null, "metadata": {"file_path": "sphinx/pycode/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 108, "end_line": 126, "span_ids": ["ModuleAnalyzer.for_module"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleAnalyzer:\n\n @classmethod\n def for_module(cls, modname: str) -> \"ModuleAnalyzer\":\n if ('module', modname) in cls.cache:\n entry = cls.cache['module', modname]\n if isinstance(entry, PycodeError):\n raise entry\n return entry\n\n try:\n filename, source = cls.get_module_source(modname)\n if source is not None:\n obj = cls.for_string(source, modname, filename or '<string>')\n elif filename is not None:\n obj = cls.for_file(filename, modname)\n except PycodeError as err:\n cls.cache['module', modname] = err\n raise\n cls.cache['module', modname] = obj\n return obj", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__a_greatly_cut_down_vers__UnparseVisitor._visit_arg_with_default.return.name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__a_greatly_cut_down_vers__UnparseVisitor._visit_arg_with_default.return.name", "embedding": null, "metadata": {"file_path": "sphinx/pycode/ast.py", "file_name": "ast.py", "file_type": "text/x-python", "category": "implementation", "start_line": 76, "end_line": 100, "span_ids": ["_UnparseVisitor:2", "_UnparseVisitor._visit_op", "_UnparseVisitor.visit_arg", "_UnparseVisitor._visit_arg_with_default", "_UnparseVisitor", "unparse_3"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# a greatly cut-down version of `ast._Unparser`\nclass _UnparseVisitor(ast.NodeVisitor):\n def __init__(self, code: str = '') -> None:\n self.code = code\n\n def _visit_op(self, node: ast.AST) -> str:\n return OPERATORS[node.__class__]\n for _op in OPERATORS:\n locals()['visit_{}'.format(_op.__name__)] = _visit_op\n\n def visit_arg(self, node: ast.arg) -> str:\n if node.annotation:\n return \"%s: %s\" % (node.arg, self.visit(node.annotation))\n else:\n return node.arg\n\n def _visit_arg_with_default(self, arg: ast.arg, default: Optional[ast.AST]) -> str:\n \"\"\"Unparse a single argument to a string.\"\"\"\n name = self.visit(arg)\n if default:\n if arg.annotation:\n name += \" = %s\" % self.visit(default)\n else:\n name += \"=%s\" % self.visit(default)\n return name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_arguments__UnparseVisitor.visit_arguments.return._join_args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_arguments__UnparseVisitor.visit_arguments.return._join_args_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/ast.py", "file_name": "ast.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 138, "span_ids": ["_UnparseVisitor.visit_arguments"], "tokens": 352}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _UnparseVisitor(ast.NodeVisitor):\n\n def visit_arguments(self, node: ast.arguments) -> str:\n defaults: List[Optional[ast.expr]] = list(node.defaults)\n positionals = len(node.args)\n posonlyargs = 0\n if hasattr(node, \"posonlyargs\"): # for py38+\n posonlyargs += len(node.posonlyargs) # type:ignore\n positionals += posonlyargs\n for _ in range(len(defaults), positionals):\n defaults.insert(0, None)\n\n kw_defaults: List[Optional[ast.expr]] = list(node.kw_defaults)\n for _ in range(len(kw_defaults), len(node.kwonlyargs)):\n kw_defaults.insert(0, None)\n\n args: List[str] = []\n if hasattr(node, \"posonlyargs\"): # for py38+\n for i, arg in enumerate(node.posonlyargs): # type: ignore\n args.append(self._visit_arg_with_default(arg, defaults[i]))\n\n if node.posonlyargs: # type: ignore\n args.append('/')\n\n for i, arg in enumerate(node.args):\n args.append(self._visit_arg_with_default(arg, defaults[i + posonlyargs]))\n\n if node.vararg:\n args.append(\"*\" + self.visit(node.vararg))\n\n if node.kwonlyargs and not node.vararg:\n args.append('*')\n for i, arg in enumerate(node.kwonlyargs):\n args.append(self._visit_arg_with_default(arg, kw_defaults[i]))\n\n if node.kwarg:\n args.append(\"**\" + self.visit(node.kwarg))\n\n return \", \".join(args)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_get_lvar_names_get_lvar_names.if_node_name_in_Index_.else_.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_get_lvar_names_get_lvar_names.if_node_name_in_Index_.else_.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 46, "end_line": 85, "span_ids": ["get_lvar_names"], "tokens": 391}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_lvar_names(node: ast.AST, self: ast.arg = None) -> List[str]:\n \"\"\"Convert assignment-AST to variable names.\n\n This raises `TypeError` if the assignment does not create new variable::\n\n ary[0] = 'foo'\n dic[\"bar\"] = 'baz'\n # => TypeError\n \"\"\"\n if self:\n self_id = self.arg\n\n node_name = node.__class__.__name__\n if node_name in ('Index', 'Num', 'Slice', 'Str', 'Subscript'):\n raise TypeError('%r does not create new variable' % node)\n elif node_name == 'Name':\n if self is None or node.id == self_id: # type: ignore\n return [node.id] # type: ignore\n else:\n raise TypeError('The assignment %r is not instance variable' % node)\n elif node_name in ('Tuple', 'List'):\n members = []\n for elt in node.elts: # type: ignore\n try:\n members.extend(get_lvar_names(elt, self))\n except TypeError:\n pass\n return members\n elif node_name == 'Attribute':\n if node.value.__class__.__name__ == 'Name' and self and node.value.id == self_id: # type: ignore # NOQA\n # instance variable\n return [\"%s\" % get_lvar_names(node.attr, self)[0]] # type: ignore\n else:\n raise TypeError('The assignment %r is not instance variable' % node)\n elif node_name == 'str':\n return [node] # type: ignore\n elif node_name == 'Starred':\n return get_lvar_names(node.value, self) # type: ignore\n else:\n raise NotImplementedError('Unexpected node name %r' % node_name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_dedent_docstring_Token.__repr__.return._Token_kind_r_value_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_dedent_docstring_Token.__repr__.return._Token_kind_r_value_r_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 74, "end_line": 116, "span_ids": ["Token", "Token.match", "dedent_docstring", "Token.__repr__", "Token.__eq__"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def dedent_docstring(s: str) -> str:\n \"\"\"Remove common leading indentation from docstring.\"\"\"\n def dummy() -> None:\n # dummy function to mock `inspect.getdoc`.\n pass\n\n dummy.__doc__ = s\n docstring = inspect.getdoc(dummy)\n if docstring:\n return docstring.lstrip(\"\\r\\n\").rstrip(\"\\r\\n\")\n else:\n return \"\"\n\n\nclass Token:\n \"\"\"Better token wrapper for tokenize module.\"\"\"\n\n def __init__(self, kind: int, value: Any, start: Tuple[int, int], end: Tuple[int, int],\n source: str) -> None:\n self.kind = kind\n self.value = value\n self.start = start\n self.end = end\n self.source = source\n\n def __eq__(self, other: Any) -> bool:\n if isinstance(other, int):\n return self.kind == other\n elif isinstance(other, str):\n return self.value == other\n elif isinstance(other, (list, tuple)):\n return [self.kind, self.value] == list(other)\n elif other is None:\n return False\n else:\n raise ValueError('Unknown value: %r' % other)\n\n def match(self, *conditions: Any) -> bool:\n return any(self == candidate for candidate in conditions)\n\n def __repr__(self) -> str:\n return '<Token kind=%r value=%r>' % (tokenize.tok_name[self.kind],\n self.value.strip())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_TokenProcessor_TokenProcessor.fetch_token.return.self_current": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_TokenProcessor_TokenProcessor.fetch_token.return.self_current", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 119, "end_line": 142, "span_ids": ["TokenProcessor.fetch_token", "TokenProcessor.get_line", "TokenProcessor"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TokenProcessor:\n def __init__(self, buffers: List[str]) -> None:\n lines = iter(buffers)\n self.buffers = buffers\n self.tokens = tokenize.generate_tokens(lambda: next(lines))\n self.current: Optional[Token] = None\n self.previous: Optional[Token] = None\n\n def get_line(self, lineno: int) -> str:\n \"\"\"Returns specified line.\"\"\"\n return self.buffers[lineno - 1]\n\n def fetch_token(self) -> Token:\n \"\"\"Fetch the next token from source code.\n\n Returns ``None`` if sequence finished.\n \"\"\"\n try:\n self.previous = self.current\n self.current = Token(*next(self.tokens))\n except StopIteration:\n self.current = None\n\n return self.current", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_TokenProcessor.fetch_until_TokenProcessor.fetch_until.return.tokens": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_TokenProcessor.fetch_until_TokenProcessor.fetch_until.return.tokens", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 155, "end_line": 172, "span_ids": ["TokenProcessor.fetch_until"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TokenProcessor:\n\n def fetch_until(self, condition: Any) -> List[Token]:\n \"\"\"Fetch tokens until specified token appeared.\n\n .. note:: This also handles parenthesis well.\n \"\"\"\n tokens = []\n while self.fetch_token():\n tokens.append(self.current)\n if self.current == condition:\n break\n elif self.current == [OP, '(']:\n tokens += self.fetch_until([OP, ')'])\n elif self.current == [OP, '{']:\n tokens += self.fetch_until([OP, '}'])\n elif self.current == [OP, '[']:\n tokens += self.fetch_until([OP, ']'])\n\n return tokens", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_AfterCommentParser_AfterCommentParser.parse.if_self_current_COMMEN.self.comment.self_current_value": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_AfterCommentParser_AfterCommentParser.parse.if_self_current_COMMEN.self.comment.self_current_value", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 164, "end_line": 206, "span_ids": ["AfterCommentParser", "AfterCommentParser.parse", "AfterCommentParser.fetch_rvalue"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AfterCommentParser(TokenProcessor):\n \"\"\"Python source code parser to pick up comments after assignments.\n\n This parser takes code which starts with an assignment statement,\n and returns the comment for the variable if one exists.\n \"\"\"\n\n def __init__(self, lines: List[str]) -> None:\n super().__init__(lines)\n self.comment: Optional[str] = None\n\n def fetch_rvalue(self) -> List[Token]:\n \"\"\"Fetch right-hand value of assignment.\"\"\"\n tokens = []\n while self.fetch_token():\n tokens.append(self.current)\n if self.current == [OP, '(']:\n tokens += self.fetch_until([OP, ')'])\n elif self.current == [OP, '{']:\n tokens += self.fetch_until([OP, '}'])\n elif self.current == [OP, '[']:\n tokens += self.fetch_until([OP, ']'])\n elif self.current == INDENT:\n tokens += self.fetch_until(DEDENT)\n elif self.current == [OP, ';']:\n break\n elif self.current.kind not in (OP, NAME, NUMBER, STRING):\n break\n\n return tokens\n\n def parse(self) -> None:\n \"\"\"Parse the code and obtain comment after assignment.\"\"\"\n # skip lvalue (or whole of AnnAssign)\n while not self.fetch_token().match([OP, '='], NEWLINE, COMMENT):\n assert self.current\n\n # skip rvalue (if exists)\n if self.current == [OP, '=']:\n self.fetch_rvalue()\n\n if self.current == COMMENT:\n self.comment = self.current.value", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_AnnAssign_VariableCommentPicker.visit_Expr.if_isinstance_self_previ.try_.except_TypeError_._this_assignment_is_not_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_AnnAssign_VariableCommentPicker.visit_Expr.if_isinstance_self_previ.try_.except_TypeError_._this_assignment_is_not_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 393, "end_line": 413, "span_ids": ["VariableCommentPicker.visit_AnnAssign", "VariableCommentPicker.visit_Expr"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VariableCommentPicker(ast.NodeVisitor):\n\n def visit_AnnAssign(self, node: ast.AnnAssign) -> None:\n \"\"\"Handles AnnAssign node and pick up a variable comment.\"\"\"\n self.visit_Assign(node) # type: ignore\n\n def visit_Expr(self, node: ast.Expr) -> None:\n \"\"\"Handles Expr node and pick up a comment if string.\"\"\"\n if (isinstance(self.previous, (ast.Assign, ast.AnnAssign)) and\n isinstance(node.value, ast.Str)):\n try:\n targets = get_assign_targets(self.previous)\n varnames = get_lvar_names(targets[0], self.get_self())\n for varname in varnames:\n if isinstance(node.value.s, str):\n docstring = node.value.s\n else:\n docstring = node.value.s.decode(self.encoding or 'utf-8')\n\n self.add_variable_comment(varname, dedent_docstring(docstring))\n self.add_entry(varname)\n except TypeError:\n pass # this assignment is not new definition!", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_DefinitionFinder_DefinitionFinder.add_definition.if_self_indents_and_self_.else_.self_definitions_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_DefinitionFinder_DefinitionFinder.add_definition.if_self_indents_and_self_.else_.self_definitions_name_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 458, "end_line": 476, "span_ids": ["DefinitionFinder", "DefinitionFinder.add_definition"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionFinder(TokenProcessor):\n \"\"\"Python source code parser to detect location of functions,\n classes and methods.\n \"\"\"\n\n def __init__(self, lines: List[str]) -> None:\n super().__init__(lines)\n self.decorator: Optional[Token] = None\n self.context: List[str] = []\n self.indents: List = []\n self.definitions: Dict[str, Tuple[str, int, int]] = {}\n\n def add_definition(self, name: str, entry: Tuple[str, int, int]) -> None:\n \"\"\"Add a location of definition.\"\"\"\n if self.indents and self.indents[-1][0] == 'def' and entry[0] == 'def':\n # ignore definition of inner function\n pass\n else:\n self.definitions[name] = entry", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_DefinitionFinder.parse_DefinitionFinder.parse.while_True_.if_token_is_None_.elif_token_DEDENT_.self_finalize_block_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_DefinitionFinder.parse_DefinitionFinder.parse.while_True_.if_token_is_None_.elif_token_DEDENT_.self_finalize_block_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 452, "end_line": 471, "span_ids": ["DefinitionFinder.parse"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionFinder(TokenProcessor):\n\n def parse(self) -> None:\n \"\"\"Parse the code to obtain location of definitions.\"\"\"\n while True:\n token = self.fetch_token()\n if token is None:\n break\n elif token == COMMENT:\n pass\n elif token == [OP, '@'] and (self.previous is None or\n self.previous.match(NEWLINE, NL, INDENT, DEDENT)):\n if self.decorator is None:\n self.decorator = token\n elif token.match([NAME, 'class']):\n self.parse_definition('class')\n elif token.match([NAME, 'def']):\n self.parse_definition('def')\n elif token == INDENT:\n self.indents.append(('other', None, None))\n elif token == DEDENT:\n self.finalize_block()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_DefinitionFinder.parse_definition_DefinitionFinder.finalize_block.if_definition_0_othe.self_context_pop_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_DefinitionFinder.parse_definition_DefinitionFinder.finalize_block.if_definition_0_othe.self_context_pop_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 473, "end_line": 504, "span_ids": ["DefinitionFinder.parse_definition", "DefinitionFinder.finalize_block"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionFinder(TokenProcessor):\n\n def parse_definition(self, typ: str) -> None:\n \"\"\"Parse AST of definition.\"\"\"\n name = self.fetch_token()\n self.context.append(name.value)\n funcname = '.'.join(self.context)\n\n if self.decorator:\n start_pos = self.decorator.start[0]\n self.decorator = None\n else:\n start_pos = name.start[0]\n\n self.fetch_until([OP, ':'])\n if self.fetch_token().match(COMMENT, NEWLINE):\n self.fetch_until(INDENT)\n self.indents.append((typ, funcname, start_pos))\n else:\n # one-liner\n self.add_definition(funcname, (typ, start_pos, name.end[0]))\n self.context.pop()\n\n def finalize_block(self) -> None:\n \"\"\"Finalize definition block.\"\"\"\n definition = self.indents.pop()\n if definition[0] != 'other':\n typ, funcname, start_pos = definition\n end_pos = self.current.end[0] - 1\n while emptyline_re.match(self.get_line(end_pos)):\n end_pos -= 1\n\n self.add_definition(funcname, (typ, start_pos, end_pos))\n self.context.pop()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_Parser_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_Parser_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 533, "end_line": 570, "span_ids": ["Parser.parse_comments", "Parser", "Parser.parse", "Parser.parse_definition"], "tokens": 305}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Parser:\n \"\"\"Python source code parser to pick up variable comments.\n\n This is a better wrapper for ``VariableCommentPicker``.\n \"\"\"\n\n def __init__(self, code: str, encoding: str = 'utf-8') -> None:\n self.code = filter_whitespace(code)\n self.encoding = encoding\n self.annotations: Dict[Tuple[str, str], str] = {}\n self.comments: Dict[Tuple[str, str], str] = {}\n self.deforders: Dict[str, int] = {}\n self.definitions: Dict[str, Tuple[str, int, int]] = {}\n self.finals: List[str] = []\n self.overloads: Dict[str, List[Signature]] = {}\n\n def parse(self) -> None:\n \"\"\"Parse the source code.\"\"\"\n self.parse_comments()\n self.parse_definition()\n\n def parse_comments(self) -> None:\n \"\"\"Parse the code and pick up comments.\"\"\"\n tree = parse(self.code)\n picker = VariableCommentPicker(self.code.splitlines(True), self.encoding)\n picker.visit(tree)\n self.annotations = picker.annotations\n self.comments = picker.comments\n self.deforders = picker.deforders\n self.finals = picker.finals\n self.overloads = picker.overloads\n\n def parse_definition(self) -> None:\n \"\"\"Parse the location of definitions from the code.\"\"\"\n parser = DefinitionFinder(self.code.splitlines(True))\n parser.parse()\n self.definitions = parser.definitions", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pygments_styles.py_PyramidStyle_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pygments_styles.py_PyramidStyle_", "embedding": null, "metadata": {"file_path": "sphinx/pygments_styles.py", "file_name": "pygments_styles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 96, "span_ids": ["PyramidStyle"], "tokens": 506}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyramidStyle(Style):\n \"\"\"\n Pylons/pyramid pygments style based on friendly style, by Blaise Laflamme.\n \"\"\"\n\n # work in progress...\n\n background_color = \"#f8f8f8\"\n default_style = \"\"\n\n styles = {\n Whitespace: \"#bbbbbb\",\n Comment: \"italic #60a0b0\",\n Comment.Preproc: \"noitalic #007020\",\n Comment.Special: \"noitalic bg:#fff0f0\",\n\n Keyword: \"bold #007020\",\n Keyword.Pseudo: \"nobold\",\n Keyword.Type: \"nobold #902000\",\n\n Operator: \"#666666\",\n Operator.Word: \"bold #007020\",\n\n Name.Builtin: \"#007020\",\n Name.Function: \"#06287e\",\n Name.Class: \"bold #0e84b5\",\n Name.Namespace: \"bold #0e84b5\",\n Name.Exception: \"#007020\",\n Name.Variable: \"#bb60d5\",\n Name.Constant: \"#60add5\",\n Name.Label: \"bold #002070\",\n Name.Entity: \"bold #d55537\",\n Name.Attribute: \"#0e84b5\",\n Name.Tag: \"bold #062873\",\n Name.Decorator: \"bold #555555\",\n\n String: \"#4070a0\",\n String.Doc: \"italic\",\n String.Interpol: \"italic #70a0d0\",\n String.Escape: \"bold #4070a0\",\n String.Regex: \"#235388\",\n String.Symbol: \"#517918\",\n String.Other: \"#c65d09\",\n Number: \"#40a070\",\n\n Generic.Heading: \"bold #000080\",\n Generic.Subheading: \"bold #800080\",\n Generic.Deleted: \"#A00000\",\n Generic.Inserted: \"#00A000\",\n Generic.Error: \"#FF0000\",\n Generic.Emph: \"italic\",\n Generic.Strong: \"bold\",\n Generic.Prompt: \"bold #c65d09\",\n Generic.Output: \"#888\",\n Generic.Traceback: \"#04D\",\n\n Error: \"#a40000 bg:#fbe3e4\"\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_builder_SphinxComponentRegistry.add_builder.self_builders_builder_nam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_builder_SphinxComponentRegistry.add_builder.self_builders_builder_nam", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 128, "end_line": 135, "span_ids": ["SphinxComponentRegistry.add_builder"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_builder(self, builder: Type[Builder], override: bool = False) -> None:\n logger.debug('[app] adding builder: %r', builder)\n if not hasattr(builder, 'name'):\n raise ExtensionError(__('Builder class %s has no \"name\" attribute') % builder)\n if builder.name in self.builders and not override:\n raise ExtensionError(__('Builder %r already exists (in module %s)') %\n (builder.name, self.builders[builder.name].__module__))\n self.builders[builder.name] = builder", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.preload_builder_SphinxComponentRegistry.has_domain.return.domain_in_self_domains": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.preload_builder_SphinxComponentRegistry.has_domain.return.domain_in_self_domains", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 137, "end_line": 164, "span_ids": ["SphinxComponentRegistry.add_domain", "SphinxComponentRegistry.has_domain", "SphinxComponentRegistry.preload_builder", "SphinxComponentRegistry.create_builder"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def preload_builder(self, app: \"Sphinx\", name: str) -> None:\n if name is None:\n return\n\n if name not in self.builders:\n builder_entry_points = entry_points(group='sphinx.builders')\n try:\n entry_point = builder_entry_points[name]\n except KeyError as exc:\n raise SphinxError(__('Builder name %s not registered or available'\n ' through entry point') % name) from exc\n\n self.load_extension(app, entry_point.module)\n\n def create_builder(self, app: \"Sphinx\", name: str) -> Builder:\n if name not in self.builders:\n raise SphinxError(__('Builder name %s not registered') % name)\n\n return self.builders[name](app)\n\n def add_domain(self, domain: Type[Domain], override: bool = False) -> None:\n logger.debug('[app] adding domain: %r', domain)\n if domain.name in self.domains and not override:\n raise ExtensionError(__('domain %s already registered') % domain.name)\n self.domains[domain.name] = domain\n\n def has_domain(self, domain: str) -> bool:\n return domain in self.domains", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.create_domains_SphinxComponentRegistry.create_domains.for_DomainClass_in_self_d.yield_domain": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.create_domains_SphinxComponentRegistry.create_domains.for_DomainClass_in_self_d.yield_domain", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 161, "end_line": 172, "span_ids": ["SphinxComponentRegistry.create_domains"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def create_domains(self, env: BuildEnvironment) -> Iterator[Domain]:\n for DomainClass in self.domains.values():\n domain = DomainClass(env)\n\n # transplant components added by extensions\n domain.directives.update(self.domain_directives.get(domain.name, {}))\n domain.roles.update(self.domain_roles.get(domain.name, {}))\n domain.indices.extend(self.domain_indices.get(domain.name, []))\n for name, objtype in self.domain_object_types.get(domain.name, {}).items():\n domain.add_object_type(name, objtype)\n\n yield domain", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_directive_to_domain_SphinxComponentRegistry.add_directive_to_domain.directives_name_cls": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_directive_to_domain_SphinxComponentRegistry.add_directive_to_domain.directives_name_cls", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 179, "end_line": 189, "span_ids": ["SphinxComponentRegistry.add_directive_to_domain"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_directive_to_domain(self, domain: str, name: str,\n cls: Type[Directive], override: bool = False) -> None:\n logger.debug('[app] adding directive to domain: %r', (domain, name, cls))\n if domain not in self.domains:\n raise ExtensionError(__('domain %s not yet registered') % domain)\n\n directives = self.domain_directives.setdefault(domain, {})\n if name in directives and not override:\n raise ExtensionError(__('The %r directive is already registered to domain %s') %\n (name, domain))\n directives[name] = cls", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_role_to_domain_SphinxComponentRegistry.add_role_to_domain.roles_name_role": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_role_to_domain_SphinxComponentRegistry.add_role_to_domain.roles_name_role", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 186, "end_line": 196, "span_ids": ["SphinxComponentRegistry.add_role_to_domain"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_role_to_domain(self, domain: str, name: str,\n role: Union[RoleFunction, XRefRole], override: bool = False\n ) -> None:\n logger.debug('[app] adding role to domain: %r', (domain, name, role))\n if domain not in self.domains:\n raise ExtensionError(__('domain %s not yet registered') % domain)\n roles = self.domain_roles.setdefault(domain, {})\n if name in roles and not override:\n raise ExtensionError(__('The %r role is already registered to domain %s') %\n (name, domain))\n roles[name] = role", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_index_to_domain_SphinxComponentRegistry.add_index_to_domain.indices_append_index_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_index_to_domain_SphinxComponentRegistry.add_index_to_domain.indices_append_index_", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 203, "end_line": 212, "span_ids": ["SphinxComponentRegistry.add_index_to_domain"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_index_to_domain(self, domain: str, index: Type[Index],\n override: bool = False) -> None:\n logger.debug('[app] adding index to domain: %r', (domain, index))\n if domain not in self.domains:\n raise ExtensionError(__('domain %s not yet registered') % domain)\n indices = self.domain_indices.setdefault(domain, [])\n if index in indices and not override:\n raise ExtensionError(__('The %r index is already registered to domain %s') %\n (index.name, domain))\n indices.append(index)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_object_type_SphinxComponentRegistry.add_object_type.object_types_directivenam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_object_type_SphinxComponentRegistry.add_object_type.object_types_directivenam", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 214, "end_line": 236, "span_ids": ["SphinxComponentRegistry.add_object_type"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_object_type(self, directivename: str, rolename: str, indextemplate: str = '',\n parse_node: Callable = None, ref_nodeclass: Type[TextElement] = None,\n objname: str = '', doc_field_types: List = [], override: bool = False\n ) -> None:\n logger.debug('[app] adding object type: %r',\n (directivename, rolename, indextemplate, parse_node,\n ref_nodeclass, objname, doc_field_types))\n\n # create a subclass of GenericObject as the new directive\n directive = type(directivename,\n (GenericObject, object),\n {'indextemplate': indextemplate,\n 'parse_node': staticmethod(parse_node),\n 'doc_field_types': doc_field_types})\n\n self.add_directive_to_domain('std', directivename, directive)\n self.add_role_to_domain('std', rolename, XRefRole(innernodeclass=ref_nodeclass))\n\n object_types = self.domain_object_types.setdefault('std', {})\n if directivename in object_types and not override:\n raise ExtensionError(__('The %r object_type is already registered') %\n directivename)\n object_types[directivename] = ObjType(objname or directivename, rolename)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_crossref_type_SphinxComponentRegistry.add_crossref_type.object_types_directivenam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_crossref_type_SphinxComponentRegistry.add_crossref_type.object_types_directivenam", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 238, "end_line": 256, "span_ids": ["SphinxComponentRegistry.add_crossref_type"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_crossref_type(self, directivename: str, rolename: str, indextemplate: str = '',\n ref_nodeclass: Type[TextElement] = None, objname: str = '',\n override: bool = False) -> None:\n logger.debug('[app] adding crossref type: %r',\n (directivename, rolename, indextemplate, ref_nodeclass, objname))\n\n # create a subclass of Target as the new directive\n directive = type(directivename,\n (Target, object),\n {'indextemplate': indextemplate})\n\n self.add_directive_to_domain('std', directivename, directive)\n self.add_role_to_domain('std', rolename, XRefRole(innernodeclass=ref_nodeclass))\n\n object_types = self.domain_object_types.setdefault('std', {})\n if directivename in object_types and not override:\n raise ExtensionError(__('The %r crossref_type is already registered') %\n directivename)\n object_types[directivename] = ObjType(objname or directivename, rolename)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_source_suffix_SphinxComponentRegistry.add_translator.self_translators_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_source_suffix_SphinxComponentRegistry.add_translator.self_translators_name_", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 258, "end_line": 310, "span_ids": ["SphinxComponentRegistry.get_source_parsers", "SphinxComponentRegistry.add_source_parser", "SphinxComponentRegistry.get_source_input", "SphinxComponentRegistry.create_source_parser", "SphinxComponentRegistry.add_source_suffix", "SphinxComponentRegistry.add_translator", "SphinxComponentRegistry.get_source_parser"], "tokens": 486}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_source_suffix(self, suffix: str, filetype: str, override: bool = False) -> None:\n logger.debug('[app] adding source_suffix: %r, %r', suffix, filetype)\n if suffix in self.source_suffix and not override:\n raise ExtensionError(__('source_suffix %r is already registered') % suffix)\n else:\n self.source_suffix[suffix] = filetype\n\n def add_source_parser(self, parser: Type[Parser], override: bool = False) -> None:\n logger.debug('[app] adding search source_parser: %r', parser)\n\n # create a map from filetype to parser\n for filetype in parser.supported:\n if filetype in self.source_parsers and not override:\n raise ExtensionError(__('source_parser for %r is already registered') %\n filetype)\n else:\n self.source_parsers[filetype] = parser\n\n def get_source_parser(self, filetype: str) -> Type[Parser]:\n try:\n return self.source_parsers[filetype]\n except KeyError as exc:\n raise SphinxError(__('Source parser for %s not registered') % filetype) from exc\n\n def get_source_parsers(self) -> Dict[str, Type[Parser]]:\n return self.source_parsers\n\n def create_source_parser(self, app: \"Sphinx\", filename: str) -> Parser:\n parser_class = self.get_source_parser(filename)\n parser = parser_class()\n if isinstance(parser, SphinxParser):\n parser.set_application(app)\n return parser\n\n def get_source_input(self, filetype: str) -> Optional[Type[Input]]:\n warnings.warn('SphinxComponentRegistry.get_source_input() is deprecated.',\n RemovedInSphinx60Warning)\n\n try:\n return self.source_inputs[filetype]\n except KeyError:\n try:\n # use special source_input for unknown filetype\n return self.source_inputs['*']\n except KeyError:\n return None\n\n def add_translator(self, name: str, translator: Type[nodes.NodeVisitor],\n override: bool = False) -> None:\n logger.debug('[app] Change of translator for the %s builder.', name)\n if name in self.translators and not override:\n raise ExtensionError(__('Translator for %r already exists') % name)\n self.translators[name] = translator", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_translation_handlers_SphinxComponentRegistry.get_translator_class.return.self_translators_get_buil": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_translation_handlers_SphinxComponentRegistry.get_translator_class.return.self_translators_get_buil", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 312, "end_line": 328, "span_ids": ["SphinxComponentRegistry.get_translator_class", "SphinxComponentRegistry.add_translation_handlers"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_translation_handlers(self, node: Type[Element],\n **kwargs: Tuple[Callable, Callable]) -> None:\n logger.debug('[app] adding translation_handlers: %r, %r', node, kwargs)\n for builder_name, handlers in kwargs.items():\n translation_handlers = self.translation_handlers.setdefault(builder_name, {})\n try:\n visit, depart = handlers # unpack once for assertion\n translation_handlers[node.__name__] = (visit, depart)\n except ValueError as exc:\n raise ExtensionError(\n __('kwargs for add_node() must be a (visit, depart) '\n 'function tuple: %r=%r') % (builder_name, handlers)\n ) from exc\n\n def get_translator_class(self, builder: Builder) -> Type[nodes.NodeVisitor]:\n return self.translators.get(builder.name,\n builder.default_translator_class)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.create_translator_SphinxComponentRegistry.create_translator.return.translator": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.create_translator_SphinxComponentRegistry.create_translator.return.translator", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 320, "end_line": 336, "span_ids": ["SphinxComponentRegistry.create_translator"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def create_translator(self, builder: Builder, *args: Any) -> nodes.NodeVisitor:\n translator_class = self.get_translator_class(builder)\n assert translator_class, \"translator not found for %s\" % builder.name\n translator = translator_class(*args)\n\n # transplant handlers for custom nodes to translator instance\n handlers = self.translation_handlers.get(builder.name, None)\n if handlers is None:\n # retry with builder.format\n handlers = self.translation_handlers.get(builder.format, {})\n\n for name, (visit, depart) in handlers.items():\n setattr(translator, 'visit_' + name, MethodType(visit, translator))\n if depart:\n setattr(translator, 'depart_' + name, MethodType(depart, translator))\n\n return translator", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_enumerable_node_SphinxComponentRegistry.add_enumerable_node.self_enumerable_nodes_nod": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_enumerable_node_SphinxComponentRegistry.add_enumerable_node.self_enumerable_nodes_nod", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 390, "end_line": 395, "span_ids": ["SphinxComponentRegistry.add_enumerable_node"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_enumerable_node(self, node: Type[Node], figtype: str,\n title_getter: TitleGetter = None, override: bool = False) -> None:\n logger.debug('[app] adding enumerable node: (%r, %r, %r)', node, figtype, title_getter)\n if node in self.enumerable_nodes and not override:\n raise ExtensionError(__('enumerable_node %r already registered') % node)\n self.enumerable_nodes[node] = (figtype, title_getter)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.load_extension_SphinxComponentRegistry.get_envversion.return.envversion": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.load_extension_SphinxComponentRegistry.get_envversion.return.envversion", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 411, "end_line": 462, "span_ids": ["SphinxComponentRegistry.get_envversion", "SphinxComponentRegistry.load_extension"], "tokens": 463}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def load_extension(self, app: \"Sphinx\", extname: str) -> None:\n \"\"\"Load a Sphinx extension.\"\"\"\n if extname in app.extensions: # already loaded\n return\n if extname in EXTENSION_BLACKLIST:\n logger.warning(__('the extension %r was already merged with Sphinx since '\n 'version %s; this extension is ignored.'),\n extname, EXTENSION_BLACKLIST[extname])\n return\n\n # update loading context\n prefix = __('while setting up extension %s:') % extname\n with prefixed_warnings(prefix):\n try:\n mod = import_module(extname)\n except ImportError as err:\n logger.verbose(__('Original exception:\\n') + traceback.format_exc())\n raise ExtensionError(__('Could not import extension %s') % extname,\n err) from err\n\n setup = getattr(mod, 'setup', None)\n if setup is None:\n logger.warning(__('extension %r has no setup() function; is it really '\n 'a Sphinx extension module?'), extname)\n metadata: Dict[str, Any] = {}\n else:\n try:\n metadata = setup(app)\n except VersionRequirementError as err:\n # add the extension name to the version required\n raise VersionRequirementError(\n __('The %s extension used by this project needs at least '\n 'Sphinx v%s; it therefore cannot be built with this '\n 'version.') % (extname, err)\n ) from err\n\n if metadata is None:\n metadata = {}\n elif not isinstance(metadata, dict):\n logger.warning(__('extension %r returned an unsupported object from '\n 'its setup() function; it should return None or a '\n 'metadata dictionary'), extname)\n metadata = {}\n\n app.extensions[extname] = Extension(extname, mod, **metadata)\n\n def get_envversion(self, app: \"Sphinx\") -> Dict[str, str]:\n from sphinx.environment import ENV_VERSION\n envversion = {ext.name: ext.metadata['env_version'] for ext in app.extensions.values()\n if ext.metadata.get('env_version')}\n envversion['sphinx'] = ENV_VERSION\n return envversion", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_merge_source_suffix_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_merge_source_suffix_", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 465, "end_line": 487, "span_ids": ["merge_source_suffix", "setup"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def merge_source_suffix(app: \"Sphinx\", config: Config) -> None:\n \"\"\"Merge any user-specified source_suffix with any added by extensions.\"\"\"\n for suffix, filetype in app.registry.source_suffix.items():\n if suffix not in app.config.source_suffix:\n app.config.source_suffix[suffix] = filetype\n elif app.config.source_suffix[suffix] is None:\n # filetype is not specified (default filetype).\n # So it overrides default filetype by extensions setting.\n app.config.source_suffix[suffix] = filetype\n\n # copy config.source_suffix to registry\n app.registry.source_suffix = app.config.source_suffix\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.connect('config-inited', merge_source_suffix, priority=800)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole.create_xref_node_XRefRole.create_xref_node.return.self_result_nodes_self_in": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole.create_xref_node_XRefRole.create_xref_node.return.self_result_nodes_self_in", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 143, "end_line": 166, "span_ids": ["XRefRole.create_xref_node"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class XRefRole(ReferenceRole):\n\n def create_xref_node(self) -> Tuple[List[Node], List[system_message]]:\n target = self.target\n title = self.title\n if self.lowercase:\n target = target.lower()\n if self.fix_parens:\n title, target = self.update_title_and_target(title, target)\n\n # create the reference node\n options = {'refdoc': self.env.docname,\n 'refdomain': self.refdomain,\n 'reftype': self.reftype,\n 'refexplicit': self.has_explicit_title,\n 'refwarn': self.warn_dangling}\n refnode = self.nodeclass(self.rawtext, **options)\n self.set_source_info(refnode)\n\n # determine the target and title for the class\n title, target = self.process_link(self.env, refnode, self.has_explicit_title,\n title, target)\n refnode['reftarget'] = target\n refnode += self.innernodeclass(self.rawtext, title, classes=self.classes)\n\n return self.result_nodes(self.inliner.document, self.env, refnode, is_ref=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole._methods_that_can_be_ove_XRefRole.process_link.return.title_ws_re_sub_tar": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole._methods_that_can_be_ove_XRefRole.process_link.return.title_ws_re_sub_tar", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 168, "end_line": 177, "span_ids": ["XRefRole.process_link", "XRefRole.create_xref_node"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class XRefRole(ReferenceRole):\n\n # methods that can be overwritten\n\n def process_link(self, env: \"BuildEnvironment\", refnode: Element, has_explicit_title: bool,\n title: str, target: str) -> Tuple[str, str]:\n \"\"\"Called after parsing title and target text, and creating the\n reference node (given in *refnode*). This method can alter the\n reference node and must return a new (or the same) ``(title, target)``\n tuple.\n \"\"\"\n return title, ws_re.sub(' ', target)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole.result_nodes_AnyXRefRole.process_link.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole.result_nodes_AnyXRefRole.process_link.return.result", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 179, "end_line": 195, "span_ids": ["AnyXRefRole", "AnyXRefRole.process_link", "XRefRole.result_nodes"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class XRefRole(ReferenceRole):\n\n def result_nodes(self, document: nodes.document, env: \"BuildEnvironment\", node: Element,\n is_ref: bool) -> Tuple[List[Node], List[system_message]]:\n \"\"\"Called before returning the finished nodes. *node* is the reference\n node if one was created (*is_ref* is then true), else the content node.\n This method can add other nodes and must return a ``(nodes, messages)``\n tuple (the usual return value of a role function).\n \"\"\"\n return [node], []\n\n\nclass AnyXRefRole(XRefRole):\n def process_link(self, env: \"BuildEnvironment\", refnode: Element, has_explicit_title: bool,\n title: str, target: str) -> Tuple[str, str]:\n result = super().process_link(env, refnode, has_explicit_title, title, target)\n # add all possible context info (i.e. std:program, py:module etc.)\n refnode.attributes.update(env.ref_context)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_RFC_RFC.build_uri.if_len_ret_2_.else_.return.base_url_self_inliner_r": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_RFC_RFC.build_uri.if_len_ret_2_.else_.return.base_url_self_inliner_r", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 201, "end_line": 232, "span_ids": ["RFC.build_uri", "RFC.run", "RFC"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RFC(ReferenceRole):\n def run(self) -> Tuple[List[Node], List[system_message]]:\n target_id = 'index-%s' % self.env.new_serialno('index')\n entries = [('single', 'RFC; RFC %s' % self.target, target_id, '', None)]\n\n index = addnodes.index(entries=entries)\n target = nodes.target('', '', ids=[target_id])\n self.inliner.document.note_explicit_target(target)\n\n try:\n refuri = self.build_uri()\n reference = nodes.reference('', '', internal=False, refuri=refuri, classes=['rfc'])\n if self.has_explicit_title:\n reference += nodes.strong(self.title, self.title)\n else:\n title = \"RFC \" + self.title\n reference += nodes.strong(title, title)\n except ValueError:\n msg = self.inliner.reporter.error(__('invalid RFC number %s') % self.target,\n line=self.lineno)\n prb = self.inliner.problematic(self.rawtext, self.rawtext, msg)\n return [prb], [msg]\n\n return [index, target, reference], []\n\n def build_uri(self) -> str:\n base_url = self.inliner.document.settings.rfc_base_url\n ret = self.target.split('#', 1)\n if len(ret) == 2:\n return base_url + self.inliner.rfc_url % int(ret[0]) + '#' + ret[1]\n else:\n return base_url + self.inliner.rfc_url % int(ret[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_EmphasizedLiteral_EmphasizedLiteral.parse.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_EmphasizedLiteral_EmphasizedLiteral.parse.return.result", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 268, "end_line": 315, "span_ids": ["EmphasizedLiteral.parse", "EmphasizedLiteral.run", "EmphasizedLiteral"], "tokens": 397}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EmphasizedLiteral(SphinxRole):\n parens_re = re.compile(r'(\\\\\\\\|\\\\{|\\\\}|{|})')\n\n def run(self) -> Tuple[List[Node], List[system_message]]:\n children = self.parse(self.text)\n node = nodes.literal(self.rawtext, '', *children,\n role=self.name.lower(), classes=[self.name])\n\n return [node], []\n\n def parse(self, text: str) -> List[Node]:\n result: List[Node] = []\n\n stack = ['']\n for part in self.parens_re.split(text):\n if part == '\\\\\\\\': # escaped backslash\n stack[-1] += '\\\\'\n elif part == '{':\n if len(stack) >= 2 and stack[-2] == \"{\": # nested\n stack[-1] += \"{\"\n else:\n # start emphasis\n stack.append('{')\n stack.append('')\n elif part == '}':\n if len(stack) == 3 and stack[1] == \"{\" and len(stack[2]) > 0:\n # emphasized word found\n if stack[0]:\n result.append(nodes.Text(stack[0], stack[0]))\n result.append(nodes.emphasis(stack[2], stack[2]))\n stack = ['']\n else:\n # emphasized word not found; the rparen is not a special symbol\n stack.append('}')\n stack = [''.join(stack)]\n elif part == '\\\\{': # escaped left-brace\n stack[-1] += '{'\n elif part == '\\\\}': # escaped right-brace\n stack[-1] += '}'\n else: # others (containing escaped braces)\n stack[-1] += part\n\n if ''.join(stack):\n # remaining is treated as Text\n text = ''.join(stack)\n result.append(nodes.Text(text, text))\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py__SearchEnglish_imported__languages._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py__SearchEnglish_imported__languages._", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 108, "end_line": 144, "span_ids": ["impl:2", "parse_stop_word", "impl", "SearchLanguage.word_filter"], "tokens": 343}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# SearchEnglish imported after SearchLanguage is defined due to circular import\nfrom sphinx.search.en import SearchEnglish\n\n\ndef parse_stop_word(source: str) -> Set[str]:\n \"\"\"\n Parse snowball style word list like this:\n\n * http://snowball.tartarus.org/algorithms/finnish/stop.txt\n \"\"\"\n result: Set[str] = set()\n for line in source.splitlines():\n line = line.split('|')[0] # remove comment\n result.update(line.split())\n return result\n\n\n# maps language name to module.class or directly a class\nlanguages: Dict[str, Any] = {\n 'da': 'sphinx.search.da.SearchDanish',\n 'de': 'sphinx.search.de.SearchGerman',\n 'en': SearchEnglish,\n 'es': 'sphinx.search.es.SearchSpanish',\n 'fi': 'sphinx.search.fi.SearchFinnish',\n 'fr': 'sphinx.search.fr.SearchFrench',\n 'hu': 'sphinx.search.hu.SearchHungarian',\n 'it': 'sphinx.search.it.SearchItalian',\n 'ja': 'sphinx.search.ja.SearchJapanese',\n 'nl': 'sphinx.search.nl.SearchDutch',\n 'no': 'sphinx.search.no.SearchNorwegian',\n 'pt': 'sphinx.search.pt.SearchPortuguese',\n 'ro': 'sphinx.search.ro.SearchRomanian',\n 'ru': 'sphinx.search.ru.SearchRussian',\n 'sv': 'sphinx.search.sv.SearchSwedish',\n 'tr': 'sphinx.search.tr.SearchTurkish',\n 'zh': 'sphinx.search.zh.SearchChinese',\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.load_IndexBuilder.dump.format_dump_self_freeze_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.load_IndexBuilder.dump.format_dump_self_freeze_", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 290, "end_line": 320, "span_ids": ["IndexBuilder.dump", "IndexBuilder.load"], "tokens": 298}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexBuilder:\n\n def load(self, stream: IO, format: Any) -> None:\n \"\"\"Reconstruct from frozen data.\"\"\"\n if isinstance(format, str):\n format = self.formats[format]\n frozen = format.load(stream)\n # if an old index is present, we treat it as not existing.\n if not isinstance(frozen, dict) or \\\n frozen.get('envversion') != self.env.version:\n raise ValueError('old format')\n index2fn = frozen['docnames']\n self._filenames = dict(zip(index2fn, frozen['filenames']))\n self._titles = dict(zip(index2fn, frozen['titles']))\n\n def load_terms(mapping: Dict[str, Any]) -> Dict[str, Set[str]]:\n rv = {}\n for k, v in mapping.items():\n if isinstance(v, int):\n rv[k] = {index2fn[v]}\n else:\n rv[k] = {index2fn[i] for i in v}\n return rv\n\n self._mapping = load_terms(frozen['terms'])\n self._title_mapping = load_terms(frozen['titleterms'])\n # no need to load keywords/objtypes\n\n def dump(self, stream: IO, format: Any) -> None:\n \"\"\"Dump the frozen index to a stream.\"\"\"\n if isinstance(format, str):\n format = self.formats[format]\n format.dump(self.freeze(), stream)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_objects_IndexBuilder.get_objects.return.rv": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_objects_IndexBuilder.get_objects.return.rv", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 298, "end_line": 333, "span_ids": ["IndexBuilder.get_objects"], "tokens": 341}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexBuilder:\n\n def get_objects(self, fn2index: Dict[str, int]\n ) -> Dict[str, List[Tuple[int, int, int, str, str]]]:\n rv: Dict[str, List[Tuple[int, int, int, str, str]]] = {}\n otypes = self._objtypes\n onames = self._objnames\n for domainname, domain in sorted(self.env.domains.items()):\n for fullname, dispname, type, docname, anchor, prio in \\\n sorted(domain.get_objects()):\n if docname not in fn2index:\n continue\n if prio < 0:\n continue\n fullname = html.escape(fullname)\n dispname = html.escape(dispname)\n prefix, _, name = dispname.rpartition('.')\n plist = rv.setdefault(prefix, [])\n try:\n typeindex = otypes[domainname, type]\n except KeyError:\n typeindex = len(otypes)\n otypes[domainname, type] = typeindex\n otype = domain.object_types.get(type)\n if otype:\n # use str() to fire translation proxies\n onames[typeindex] = (domainname, type,\n str(domain.get_type_name(otype)))\n else:\n onames[typeindex] = (domainname, type, type)\n if anchor == fullname:\n shortanchor = ''\n elif anchor == type + '-' + fullname:\n shortanchor = '-'\n else:\n shortanchor = anchor\n plist.append((fn2index[docname], typeindex, prio, shortanchor, name))\n return rv", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_terms_IndexBuilder.get_terms.return.rvs": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_terms_IndexBuilder.get_terms.return.rvs", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 335, "end_line": 345, "span_ids": ["IndexBuilder.get_terms"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexBuilder:\n\n def get_terms(self, fn2index: Dict) -> Tuple[Dict[str, List[str]], Dict[str, List[str]]]:\n rvs: Tuple[Dict[str, List[str]], Dict[str, List[str]]] = ({}, {})\n for rv, mapping in zip(rvs, (self._mapping, self._title_mapping)):\n for k, v in mapping.items():\n if len(v) == 1:\n fn, = v\n if fn in fn2index:\n rv[k] = fn2index[fn]\n else:\n rv[k] = sorted([fn2index[fn] for fn in v if fn in fn2index])\n return rvs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.freeze_IndexBuilder.freeze.return.dict_docnames_docnames_f": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.freeze_IndexBuilder.freeze.return.dict_docnames_docnames_f", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 371, "end_line": 383, "span_ids": ["IndexBuilder.freeze"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexBuilder:\n\n def freeze(self) -> Dict[str, Any]:\n \"\"\"Create a usable data structure for serializing.\"\"\"\n docnames, titles = zip(*sorted(self._titles.items()))\n filenames = [self._filenames.get(docname) for docname in docnames]\n fn2index = {f: i for (i, f) in enumerate(docnames)}\n terms, title_terms = self.get_terms(fn2index)\n\n objects = self.get_objects(fn2index) # populates _objtypes\n objtypes = {v: k[0] + ':' + k[1] for (k, v) in self._objtypes.items()}\n objnames = self._objnames\n return dict(docnames=docnames, filenames=filenames, titles=titles, terms=terms,\n objects=objects, objtypes=objtypes, objnames=objnames,\n titleterms=title_terms, envversion=self.env.version)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.label_IndexBuilder.prune.for_wordnames_in_self__ti.wordnames_intersection_up": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.label_IndexBuilder.prune.for_wordnames_in_self__ti.wordnames_intersection_up", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 385, "end_line": 401, "span_ids": ["IndexBuilder.label", "IndexBuilder.prune"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexBuilder:\n\n def label(self) -> str:\n return \"%s (code: %s)\" % (self.lang.language_name, self.lang.lang)\n\n def prune(self, docnames: Iterable[str]) -> None:\n \"\"\"Remove data for all docnames not in the list.\"\"\"\n new_titles = {}\n new_filenames = {}\n for docname in docnames:\n if docname in self._titles:\n new_titles[docname] = self._titles[docname]\n new_filenames[docname] = self._filenames[docname]\n self._titles = new_titles\n self._filenames = new_filenames\n for wordnames in self._mapping.values():\n wordnames.intersection_update(docnames)\n for wordnames in self._title_mapping.values():\n wordnames.intersection_update(docnames)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.feed_IndexBuilder.feed.None_1.if__filter_stemmed_word_.self__mapping_setdefault_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.feed_IndexBuilder.feed.None_1.if__filter_stemmed_word_.self__mapping_setdefault_", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 403, "end_line": 434, "span_ids": ["IndexBuilder.feed"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexBuilder:\n\n def feed(self, docname: str, filename: str, title: str, doctree: nodes.document) -> None:\n \"\"\"Feed a doctree to the index.\"\"\"\n self._titles[docname] = title\n self._filenames[docname] = filename\n\n visitor = WordCollector(doctree, self.lang)\n doctree.walk(visitor)\n\n # memoize self.lang.stem\n def stem(word: str) -> str:\n try:\n return self._stem_cache[word]\n except KeyError:\n self._stem_cache[word] = self.lang.stem(word).lower()\n return self._stem_cache[word]\n _filter = self.lang.word_filter\n\n for word in visitor.found_title_words:\n stemmed_word = stem(word)\n if _filter(stemmed_word):\n self._title_mapping.setdefault(stemmed_word, set()).add(docname)\n elif _filter(word): # stemmer must not remove words from search index\n self._title_mapping.setdefault(word, set()).add(docname)\n\n for word in visitor.found_words:\n stemmed_word = stem(word)\n # again, stemmer must not remove words from search index\n if not _filter(stemmed_word) and _filter(word):\n stemmed_word = word\n already_indexed = docname in self._title_mapping.get(stemmed_word, set())\n if _filter(stemmed_word) and not already_indexed:\n self._mapping.setdefault(stemmed_word, set()).add(docname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/it.py_italian_stopwords.parse_stop_word__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/it.py_italian_stopwords.parse_stop_word__", "embedding": null, "metadata": {"file_path": "sphinx/search/it.py", "file_name": "it.py", "file_type": "text/x-python", "category": "implementation", "start_line": 9, "end_line": 315, "span_ids": ["SearchItalian.stem", "impl", "SearchItalian.init", "SearchItalian"], "tokens": 1595}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "italian_stopwords = parse_stop_word('''\n| source: http://snowball.tartarus.org/algorithms/italian/stop.txt\nad | a (to) before vowel\nal | a + il\nallo | a + lo\nai | a + i\nagli | a + gli\nall | a + l'\nagl | a + gl'\nalla | a + la\nalle | a + le\ncon | with\ncol | con + il\ncoi | con + i (forms collo, cogli etc are now very rare)\nda | from\ndal | da + il\ndallo | da + lo\ndai | da + i\ndagli | da + gli\ndall | da + l'\ndagl | da + gll'\ndalla | da + la\ndalle | da + le\ndi | of\ndel | di + il\ndello | di + lo\ndei | di + i\ndegli | di + gli\ndell | di + l'\ndegl | di + gl'\ndella | di + la\ndelle | di + le\nin | in\nnel | in + el\nnello | in + lo\nnei | in + i\nnegli | in + gli\nnell | in + l'\nnegl | in + gl'\nnella | in + la\nnelle | in + le\nsu | on\nsul | su + il\nsullo | su + lo\nsui | su + i\nsugli | su + gli\nsull | su + l'\nsugl | su + gl'\nsulla | su + la\nsulle | su + le\nper | through, by\ntra | among\ncontro | against\nio | I\ntu | thou\nlui | he\nlei | she\nnoi | we\nvoi | you\nloro | they\nmio | my\nmia |\nmiei |\nmie |\ntuo |\ntua |\ntuoi | thy\ntue |\nsuo |\nsua |\nsuoi | his, her\nsue |\nnostro | our\nnostra |\nnostri |\nnostre |\nvostro | your\nvostra |\nvostri |\nvostre |\nmi | me\nti | thee\nci | us, there\nvi | you, there\nlo | him, the\nla | her, the\nli | them\nle | them, the\ngli | to him, the\nne | from there etc\nil | the\nun | a\nuno | a\nuna | a\nma | but\ned | and\nse | if\nperch\u00e9 | why, because\nanche | also\ncome | how\ndov | where (as dov')\ndove | where\nche | who, that\nchi | who\ncui | whom\nnon | not\npi\u00f9 | more\nquale | who, that\nquanto | how much\nquanti |\nquanta |\nquante |\nquello | that\nquelli |\nquella |\nquelle |\nquesto | this\nquesti |\nquesta |\nqueste |\nsi | yes\ntutto | all\ntutti | all\n\n | single letter forms:\n\na | at\nc | as c' for ce or ci\ne | and\ni | the\nl | as l'\no | or\n\n | forms of avere, to have (not including the infinitive):\n\nho\nhai\nha\nabbiamo\navete\nhanno\nabbia\nabbiate\nabbiano\navr\u00f2\navrai\navr\u00e0\navremo\navrete\navranno\navrei\navresti\navrebbe\navremmo\navreste\navrebbero\navevo\navevi\naveva\navevamo\navevate\navevano\nebbi\navesti\nebbe\navemmo\naveste\nebbero\navessi\navesse\navessimo\navessero\navendo\navuto\navuta\navuti\navute\n\n | forms of essere, to be (not including the infinitive):\nsono\nsei\n\u00e8\nsiamo\nsiete\nsia\nsiate\nsiano\nsar\u00f2\nsarai\nsar\u00e0\nsaremo\nsarete\nsaranno\nsarei\nsaresti\nsarebbe\nsaremmo\nsareste\nsarebbero\nero\neri\nera\neravamo\neravate\nerano\nfui\nfosti\nfu\nfummo\nfoste\nfurono\nfossi\nfosse\nfossimo\nfossero\nessendo\n\n | forms of fare, to do (not including the infinitive, fa, fat-):\nfaccio\nfai\nfacciamo\nfanno\nfaccia\nfacciate\nfacciano\nfar\u00f2\nfarai\nfar\u00e0\nfaremo\nfarete\nfaranno\nfarei\nfaresti\nfarebbe\nfaremmo\nfareste\nfarebbero\nfacevo\nfacevi\nfaceva\nfacevamo\nfacevate\nfacevano\nfeci\nfacesti\nfece\nfacemmo\nfaceste\nfecero\nfacessi\nfacesse\nfacessimo\nfacessero\nfacendo\n\n | forms of stare, to be (not including the infinitive):\nsto\nstai\nsta\nstiamo\nstanno\nstia\nstiate\nstiano\nstar\u00f2\nstarai\nstar\u00e0\nstaremo\nstarete\nstaranno\nstarei\nstaresti\nstarebbe\nstaremmo\nstareste\nstarebbero\nstavo\nstavi\nstava\nstavamo\nstavate\nstavano\nstetti\nstesti\nstette\nstemmo\nsteste\nstettero\nstessi\nstesse\nstessimo\nstessero\n''')\n\n\nclass SearchItalian(SearchLanguage):\n lang = 'it'\n language_name = 'Italian'\n js_stemmer_rawcode = 'italian-stemmer.js'\n stopwords = italian_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('italian')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_MecabSplitter_MecabSplitter.init_native.self.native.MeCab_Tagger_param_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_MecabSplitter_MecabSplitter.init_native.self.native.MeCab_Tagger_param_", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 46, "end_line": 70, "span_ids": ["MecabSplitter", "MecabSplitter.init_native", "MecabSplitter.split"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MecabSplitter(BaseSplitter):\n def __init__(self, options: Dict) -> None:\n super().__init__(options)\n self.ctypes_libmecab: Any = None\n self.ctypes_mecab: Any = None\n if not native_module:\n self.init_ctypes(options)\n else:\n self.init_native(options)\n self.dict_encode = options.get('dic_enc', 'utf-8')\n\n def split(self, input: str) -> List[str]:\n if native_module:\n result = self.native.parse(input)\n else:\n result = self.ctypes_libmecab.mecab_sparse_tostr(\n self.ctypes_mecab, input.encode(self.dict_encode))\n return result.split(' ')\n\n def init_native(self, options: Dict) -> None:\n param = '-Owakati'\n dict = options.get('dict')\n if dict:\n param += ' -d %s' % dict\n self.native = MeCab.Tagger(param)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_MecabSplitter.init_ctypes_MecabSplitter.__del__.if_self_ctypes_libmecab_.self_ctypes_libmecab_meca": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_MecabSplitter.init_ctypes_MecabSplitter.__del__.if_self_ctypes_libmecab_.self_ctypes_libmecab_meca", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 118, "span_ids": ["MecabSplitter.init_ctypes", "MecabSplitter.__del__"], "tokens": 394}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MecabSplitter(BaseSplitter):\n\n def init_ctypes(self, options: Dict) -> None:\n import ctypes.util\n\n lib = options.get('lib')\n\n if lib is None:\n if sys.platform.startswith('win'):\n libname = 'libmecab.dll'\n else:\n libname = 'mecab'\n libpath = ctypes.util.find_library(libname)\n elif os.path.basename(lib) == lib:\n libpath = ctypes.util.find_library(lib)\n else:\n libpath = None\n if os.path.exists(lib):\n libpath = lib\n if libpath is None:\n raise RuntimeError('MeCab dynamic library is not available')\n\n param = 'mecab -Owakati'\n dict = options.get('dict')\n if dict:\n param += ' -d %s' % dict\n\n fs_enc = sys.getfilesystemencoding() or sys.getdefaultencoding()\n\n self.ctypes_libmecab = ctypes.CDLL(libpath)\n self.ctypes_libmecab.mecab_new2.argtypes = (ctypes.c_char_p,)\n self.ctypes_libmecab.mecab_new2.restype = ctypes.c_void_p\n self.ctypes_libmecab.mecab_sparse_tostr.argtypes = (ctypes.c_void_p, ctypes.c_char_p)\n self.ctypes_libmecab.mecab_sparse_tostr.restype = ctypes.c_char_p\n self.ctypes_mecab = self.ctypes_libmecab.mecab_new2(param.encode(fs_enc))\n if self.ctypes_mecab is None:\n raise SphinxError('mecab initialization failed')\n\n def __del__(self) -> None:\n if self.ctypes_libmecab:\n self.ctypes_libmecab.mecab_destroy(self.ctypes_mecab)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_MeCabBinder_JanomeSplitter.split.return.result_split_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_MeCabBinder_JanomeSplitter.split.return.result_split_", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 120, "end_line": 137, "span_ids": ["JanomeSplitter.split", "JanomeSplitter", "impl:13", "JanomeSplitter.init_tokenizer"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "MeCabBinder = MecabSplitter # keep backward compatibility until Sphinx-1.6\n\n\nclass JanomeSplitter(BaseSplitter):\n def __init__(self, options: Dict) -> None:\n super().__init__(options)\n self.user_dict = options.get('user_dic')\n self.user_dict_enc = options.get('user_dic_enc', 'utf8')\n self.init_tokenizer()\n\n def init_tokenizer(self) -> None:\n if not janome_module:\n raise RuntimeError('Janome is not available')\n self.tokenizer = janome.tokenizer.Tokenizer(udic=self.user_dict, udic_enc=self.user_dict_enc)\n\n def split(self, input: str) -> List[str]:\n result = ' '.join(token.surface for token in self.tokenizer.tokenize(input))\n return result.split(' ')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter_DefaultSplitter.BQ3__._BHH_792_BHI_2664": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter_DefaultSplitter.BQ3__._BHH_792_BHI_2664", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 140, "end_line": 166, "span_ids": ["DefaultSplitter"], "tokens": 755}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n patterns_ = {re.compile(pattern): value for pattern, value in {\n '[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341\u767e\u5343\u4e07\u5104\u5146]': 'M',\n '[\u4e00-\u9fa0\u3005\u3006\u30f5\u30f6]': 'H',\n '[\u3041-\u3093]': 'I',\n '[\u30a1-\u30f4\u30fc\uff71-\uff9d\uff9e\uff70]': 'K',\n '[a-zA-Z\uff41-\uff5a\uff21-\uff3a]': 'A',\n '[0-9\uff10-\uff19]': 'N',\n }.items()}\n BIAS__ = -332\n BC1__ = {'HH': 6, 'II': 2461, 'KH': 406, 'OH': -1378}\n BC2__ = {'AA': -3267, 'AI': 2744, 'AN': -878, 'HH': -4070, 'HM': -1711,\n 'HN': 4012, 'HO': 3761, 'IA': 1327, 'IH': -1184, 'II': -1332,\n 'IK': 1721, 'IO': 5492, 'KI': 3831, 'KK': -8741, 'MH': -3132,\n 'MK': 3334, 'OO': -2920}\n BC3__ = {'HH': 996, 'HI': 626, 'HK': -721, 'HN': -1307, 'HO': -836, 'IH': -301,\n 'KK': 2762, 'MK': 1079, 'MM': 4034, 'OA': -1652, 'OH': 266}\n BP1__ = {'BB': 295, 'OB': 304, 'OO': -125, 'UB': 352}\n BP2__ = {'BO': 60, 'OO': -1762}\n BQ1__ = {'BHH': 1150, 'BHM': 1521, 'BII': -1158, 'BIM': 886, 'BMH': 1208,\n 'BNH': 449, 'BOH': -91, 'BOO': -2597, 'OHI': 451, 'OIH': -296,\n 'OKA': 1851, 'OKH': -1020, 'OKK': 904, 'OOO': 2965}\n BQ2__ = {'BHH': 118, 'BHI': -1159, 'BHM': 466, 'BIH': -919, 'BKK': -1720,\n 'BKO': 864, 'OHH': -1139, 'OHM': -181, 'OIH': 153, 'UHI': -1146}\n BQ3__ = {'BHH': -792, 'BHI': 2664, 'BII': -299, 'BKI': 419, 'BMH': 937,\n 'BMM': 8335, 'BNN': 998, 'BOH': 775, 'OHH': 2174, 'OHM': 439, 'OII': 280,\n 'OKH': 1798, 'OKI': -793, 'OKO': -2242, 'OMH': -2402, 'OOO': 11699}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.BQ4___DefaultSplitter.BW1__._\u3068_660_\u540c_727_B": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.BQ4___DefaultSplitter.BW1__._\u3068_660_\u540c_727_B", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 167, "end_line": 184, "span_ids": ["DefaultSplitter"], "tokens": 667}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n BQ4__ = {'BHH': -3895, 'BIH': 3761, 'BII': -4654, 'BIK': 1348, 'BKK': -1806,\n 'BMI': -3385, 'BOO': -12396, 'OAH': 926, 'OHH': 266, 'OHK': -2036,\n 'ONN': -973}\n BW1__ = {',\u3068': 660, ',\u540c': 727, 'B1\u3042': 1404, 'B1\u540c': 542, '\u3001\u3068': 660,\n '\u3001\u540c': 727, '\u300d\u3068': 1682, '\u3042\u3063': 1505, '\u3044\u3046': 1743, '\u3044\u3063': -2055,\n '\u3044\u308b': 672, '\u3046\u3057': -4817, '\u3046\u3093': 665, '\u304b\u3089': 3472, '\u304c\u3089': 600,\n '\u3053\u3046': -790, '\u3053\u3068': 2083, '\u3053\u3093': -1262, '\u3055\u3089': -4143, '\u3055\u3093': 4573,\n '\u3057\u305f': 2641, '\u3057\u3066': 1104, '\u3059\u3067': -3399, '\u305d\u3053': 1977, '\u305d\u308c': -871,\n '\u305f\u3061': 1122, '\u305f\u3081': 601, '\u3063\u305f': 3463, '\u3064\u3044': -802, '\u3066\u3044': 805,\n '\u3066\u304d': 1249, '\u3067\u304d': 1127, '\u3067\u3059': 3445, '\u3067\u306f': 844, '\u3068\u3044': -4915,\n '\u3068\u307f': 1922, '\u3069\u3053': 3887, '\u306a\u3044': 5713, '\u306a\u3063': 3015, '\u306a\u3069': 7379,\n '\u306a\u3093': -1113, '\u306b\u3057': 2468, '\u306b\u306f': 1498, '\u306b\u3082': 1671, '\u306b\u5bfe': -912,\n '\u306e\u4e00': -501, '\u306e\u4e2d': 741, '\u307e\u305b': 2448, '\u307e\u3067': 1711, '\u307e\u307e': 2600,\n '\u307e\u308b': -2155, '\u3084\u3080': -1947, '\u3088\u3063': -2565, '\u308c\u305f': 2369, '\u308c\u3067': -913,\n '\u3092\u3057': 1860, '\u3092\u898b': 731, '\u4ea1\u304f': -1886, '\u4eac\u90fd': 2558, '\u53d6\u308a': -2784,\n '\u5927\u304d': -2604, '\u5927\u962a': 1497, '\u5e73\u65b9': -2314, '\u5f15\u304d': -1336, '\u65e5\u672c': -195,\n '\u672c\u5f53': -2423, '\u6bce\u65e5': -2113, '\u76ee\u6307': -724, '\uff22\uff11\u3042': 1404, '\uff22\uff11\u540c': 542,\n '\uff63\u3068': 1682}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.BW2___DefaultSplitter.BW2__._11822_11_669": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.BW2___DefaultSplitter.BW2__._11822_11_669", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 185, "end_line": 208, "span_ids": ["DefaultSplitter"], "tokens": 975}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n BW2__ = {'..': -11822, '11': -669, '\u2015\u2015': -5730, '\u2212\u2212': -13175, '\u3044\u3046': -1609,\n '\u3046\u304b': 2490, '\u304b\u3057': -1350, '\u304b\u3082': -602, '\u304b\u3089': -7194, '\u304b\u308c': 4612,\n '\u304c\u3044': 853, '\u304c\u3089': -3198, '\u304d\u305f': 1941, '\u304f\u306a': -1597, '\u3053\u3068': -8392,\n '\u3053\u306e': -4193, '\u3055\u305b': 4533, '\u3055\u308c': 13168, '\u3055\u3093': -3977, '\u3057\u3044': -1819,\n '\u3057\u304b': -545, '\u3057\u305f': 5078, '\u3057\u3066': 972, '\u3057\u306a': 939, '\u305d\u306e': -3744,\n '\u305f\u3044': -1253, '\u305f\u305f': -662, '\u305f\u3060': -3857, '\u305f\u3061': -786, '\u305f\u3068': 1224,\n '\u305f\u306f': -939, '\u3063\u305f': 4589, '\u3063\u3066': 1647, '\u3063\u3068': -2094, '\u3066\u3044': 6144,\n '\u3066\u304d': 3640, '\u3066\u304f': 2551, '\u3066\u306f': -3110, '\u3066\u3082': -3065, '\u3067\u3044': 2666,\n '\u3067\u304d': -1528, '\u3067\u3057': -3828, '\u3067\u3059': -4761, '\u3067\u3082': -4203, '\u3068\u3044': 1890,\n '\u3068\u3053': -1746, '\u3068\u3068': -2279, '\u3068\u306e': 720, '\u3068\u307f': 5168, '\u3068\u3082': -3941,\n '\u306a\u3044': -2488, '\u306a\u304c': -1313, '\u306a\u3069': -6509, '\u306a\u306e': 2614, '\u306a\u3093': 3099,\n '\u306b\u304a': -1615, '\u306b\u3057': 2748, '\u306b\u306a': 2454, '\u306b\u3088': -7236, '\u306b\u5bfe': -14943,\n '\u306b\u5f93': -4688, '\u306b\u95a2': -11388, '\u306e\u304b': 2093, '\u306e\u3067': -7059, '\u306e\u306b': -6041,\n '\u306e\u306e': -6125, '\u306f\u3044': 1073, '\u306f\u304c': -1033, '\u306f\u305a': -2532, '\u3070\u308c': 1813,\n '\u307e\u3057': -1316, '\u307e\u3067': -6621, '\u307e\u308c': 5409, '\u3081\u3066': -3153, '\u3082\u3044': 2230,\n '\u3082\u306e': -10713, '\u3089\u304b': -944, '\u3089\u3057': -1611, '\u3089\u306b': -1897, '\u308a\u3057': 651,\n '\u308a\u307e': 1620, '\u308c\u305f': 4270, '\u308c\u3066': 849, '\u308c\u3070': 4114, '\u308d\u3046': 6067,\n '\u308f\u308c': 7901, '\u3092\u901a': -11877, '\u3093\u3060': 728, '\u3093\u306a': -4115, '\u4e00\u4eba': 602,\n '\u4e00\u65b9': -1375, '\u4e00\u65e5': 970, '\u4e00\u90e8': -1051, '\u4e0a\u304c': -4479, '\u4f1a\u793e': -1116,\n '\u51fa\u3066': 2163, '\u5206\u306e': -7758, '\u540c\u515a': 970, '\u540c\u65e5': -913, '\u5927\u962a': -2471,\n '\u59d4\u54e1': -1250, '\u5c11\u306a': -1050, '\u5e74\u5ea6': -8669, '\u5e74\u9593': -1626, '\u5e9c\u770c': -2363,\n '\u624b\u6a29': -1982, '\u65b0\u805e': -4066, '\u65e5\u65b0': -722, '\u65e5\u672c': -7068, '\u65e5\u7c73': 3372,\n '\u66dc\u65e5': -601, '\u671d\u9bae': -2355, '\u672c\u4eba': -2697, '\u6771\u4eac': -1543, '\u7136\u3068': -1384,\n '\u793e\u4f1a': -1276, '\u7acb\u3066': -990, '\u7b2c\u306b': -1612, '\u7c73\u56fd': -4268, '\uff11\uff11': -669}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.BW3___DefaultSplitter.BW3__._\u3042\u305f_2194_\u3042\u308a_719_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.BW3___DefaultSplitter.BW3__._\u3042\u305f_2194_\u3042\u308a_719_", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 209, "end_line": 231, "span_ids": ["DefaultSplitter"], "tokens": 906}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n BW3__ = {'\u3042\u305f': -2194, '\u3042\u308a': 719, '\u3042\u308b': 3846, '\u3044.': -1185, '\u3044\u3002': -1185,\n '\u3044\u3044': 5308, '\u3044\u3048': 2079, '\u3044\u304f': 3029, '\u3044\u305f': 2056, '\u3044\u3063': 1883,\n '\u3044\u308b': 5600, '\u3044\u308f': 1527, '\u3046\u3061': 1117, '\u3046\u3068': 4798, '\u3048\u3068': 1454,\n '\u304b.': 2857, '\u304b\u3002': 2857, '\u304b\u3051': -743, '\u304b\u3063': -4098, '\u304b\u306b': -669,\n '\u304b\u3089': 6520, '\u304b\u308a': -2670, '\u304c,': 1816, '\u304c\u3001': 1816, '\u304c\u304d': -4855,\n '\u304c\u3051': -1127, '\u304c\u3063': -913, '\u304c\u3089': -4977, '\u304c\u308a': -2064, '\u304d\u305f': 1645,\n '\u3051\u3069': 1374, '\u3053\u3068': 7397, '\u3053\u306e': 1542, '\u3053\u308d': -2757, '\u3055\u3044': -714,\n '\u3055\u3092': 976, '\u3057,': 1557, '\u3057\u3001': 1557, '\u3057\u3044': -3714, '\u3057\u305f': 3562,\n '\u3057\u3066': 1449, '\u3057\u306a': 2608, '\u3057\u307e': 1200, '\u3059.': -1310, '\u3059\u3002': -1310,\n '\u3059\u308b': 6521, '\u305a,': 3426, '\u305a\u3001': 3426, '\u305a\u306b': 841, '\u305d\u3046': 428,\n '\u305f.': 8875, '\u305f\u3002': 8875, '\u305f\u3044': -594, '\u305f\u306e': 812, '\u305f\u308a': -1183,\n '\u305f\u308b': -853, '\u3060.': 4098, '\u3060\u3002': 4098, '\u3060\u3063': 1004, '\u3063\u305f': -4748,\n '\u3063\u3066': 300, '\u3066\u3044': 6240, '\u3066\u304a': 855, '\u3066\u3082': 302, '\u3067\u3059': 1437,\n '\u3067\u306b': -1482, '\u3067\u306f': 2295, '\u3068\u3046': -1387, '\u3068\u3057': 2266, '\u3068\u306e': 541,\n '\u3068\u3082': -3543, '\u3069\u3046': 4664, '\u306a\u3044': 1796, '\u306a\u304f': -903, '\u306a\u3069': 2135,\n '\u306b,': -1021, '\u306b\u3001': -1021, '\u306b\u3057': 1771, '\u306b\u306a': 1906, '\u306b\u306f': 2644,\n '\u306e,': -724, '\u306e\u3001': -724, '\u306e\u5b50': -1000, '\u306f,': 1337, '\u306f\u3001': 1337,\n '\u3079\u304d': 2181, '\u307e\u3057': 1113, '\u307e\u3059': 6943, '\u307e\u3063': -1549, '\u307e\u3067': 6154,\n '\u307e\u308c': -793, '\u3089\u3057': 1479, '\u3089\u308c': 6820, '\u308b\u308b': 3818, '\u308c,': 854,\n '\u308c\u3001': 854, '\u308c\u305f': 1850, '\u308c\u3066': 1375, '\u308c\u3070': -3246, '\u308c\u308b': 1091,\n '\u308f\u308c': -605, '\u3093\u3060': 606, '\u3093\u3067': 798, '\u30ab\u6708': 990, '\u4f1a\u8b70': 860,\n '\u5165\u308a': 1232, '\u5927\u4f1a': 2217, '\u59cb\u3081': 1681, '\u5e02': 965, '\u65b0\u805e': -5055,\n '\u65e5,': 974, '\u65e5\u3001': 974, '\u793e\u4f1a': 2024, '\uff76\u6708': 990}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.TC1___DefaultSplitter.TQ2__._BIHH_1401_BIII_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.TC1___DefaultSplitter.TQ2__._BIHH_1401_BIII_", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 232, "end_line": 250, "span_ids": ["DefaultSplitter"], "tokens": 654}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n TC1__ = {'AAA': 1093, 'HHH': 1029, 'HHM': 580, 'HII': 998, 'HOH': -390,\n 'HOM': -331, 'IHI': 1169, 'IOH': -142, 'IOI': -1015, 'IOM': 467,\n 'MMH': 187, 'OOI': -1832}\n TC2__ = {'HHO': 2088, 'HII': -1023, 'HMM': -1154, 'IHI': -1965,\n 'KKH': 703, 'OII': -2649}\n TC3__ = {'AAA': -294, 'HHH': 346, 'HHI': -341, 'HII': -1088, 'HIK': 731,\n 'HOH': -1486, 'IHH': 128, 'IHI': -3041, 'IHO': -1935, 'IIH': -825,\n 'IIM': -1035, 'IOI': -542, 'KHH': -1216, 'KKA': 491, 'KKH': -1217,\n 'KOK': -1009, 'MHH': -2694, 'MHM': -457, 'MHO': 123, 'MMH': -471,\n 'NNH': -1689, 'NNO': 662, 'OHO': -3393}\n TC4__ = {'HHH': -203, 'HHI': 1344, 'HHK': 365, 'HHM': -122, 'HHN': 182,\n 'HHO': 669, 'HIH': 804, 'HII': 679, 'HOH': 446, 'IHH': 695,\n 'IHO': -2324, 'IIH': 321, 'III': 1497, 'IIO': 656, 'IOO': 54,\n 'KAK': 4845, 'KKA': 3386, 'KKK': 3065, 'MHH': -405, 'MHI': 201,\n 'MMH': -241, 'MMM': 661, 'MOM': 841}\n TQ1__ = {'BHHH': -227, 'BHHI': 316, 'BHIH': -132, 'BIHH': 60, 'BIII': 1595,\n 'BNHH': -744, 'BOHH': 225, 'BOOO': -908, 'OAKK': 482, 'OHHH': 281,\n 'OHIH': 249, 'OIHI': 200, 'OIIH': -68}\n TQ2__ = {'BIHH': -1401, 'BIII': -1033, 'BKAK': -543, 'BOOO': -5591}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.TQ3___DefaultSplitter.UC1__._A_484_K_93_M_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.TQ3___DefaultSplitter.UC1__._A_484_K_93_M_", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 251, "end_line": 270, "span_ids": ["DefaultSplitter"], "tokens": 716}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n TQ3__ = {'BHHH': 478, 'BHHM': -1073, 'BHIH': 222, 'BHII': -504, 'BIIH': -116,\n 'BIII': -105, 'BMHI': -863, 'BMHM': -464, 'BOMH': 620, 'OHHH': 346,\n 'OHHI': 1729, 'OHII': 997, 'OHMH': 481, 'OIHH': 623, 'OIIH': 1344,\n 'OKAK': 2792, 'OKHH': 587, 'OKKA': 679, 'OOHH': 110, 'OOII': -685}\n TQ4__ = {'BHHH': -721, 'BHHM': -3604, 'BHII': -966, 'BIIH': -607, 'BIII': -2181,\n 'OAAA': -2763, 'OAKK': 180, 'OHHH': -294, 'OHHI': 2446, 'OHHO': 480,\n 'OHIH': -1573, 'OIHH': 1935, 'OIHI': -493, 'OIIH': 626, 'OIII': -4007,\n 'OKAK': -8156}\n TW1__ = {'\u306b\u3064\u3044': -4681, '\u6771\u4eac\u90fd': 2026}\n TW2__ = {'\u3042\u308b\u7a0b': -2049, '\u3044\u3063\u305f': -1256, '\u3053\u308d\u304c': -2434, '\u3057\u3087\u3046': 3873,\n '\u305d\u306e\u5f8c': -4430, '\u3060\u3063\u3066': -1049, '\u3066\u3044\u305f': 1833, '\u3068\u3057\u3066': -4657,\n '\u3068\u3082\u306b': -4517, '\u3082\u306e\u3067': 1882, '\u4e00\u6c17\u306b': -792, '\u521d\u3081\u3066': -1512,\n '\u540c\u6642\u306b': -8097, '\u5927\u304d\u306a': -1255, '\u5bfe\u3057\u3066': -2721, '\u793e\u4f1a\u515a': -3216}\n TW3__ = {'\u3044\u305f\u3060': -1734, '\u3057\u3066\u3044': 1314, '\u3068\u3057\u3066': -4314, '\u306b\u3064\u3044': -5483,\n '\u306b\u3068\u3063': -5989, '\u306b\u5f53\u305f': -6247, '\u306e\u3067,': -727, '\u306e\u3067\u3001': -727,\n '\u306e\u3082\u306e': -600, '\u308c\u304b\u3089': -3752, '\u5341\u4e8c\u6708': -2287}\n TW4__ = {'\u3044\u3046.': 8576, '\u3044\u3046\u3002': 8576, '\u304b\u3089\u306a': -2348, '\u3057\u3066\u3044': 2958,\n '\u305f\u304c,': 1516, '\u305f\u304c\u3001': 1516, '\u3066\u3044\u308b': 1538, '\u3068\u3044\u3046': 1349,\n '\u307e\u3057\u305f': 5543, '\u307e\u305b\u3093': 1097, '\u3088\u3046\u3068': -4258, '\u3088\u308b\u3068': 5865}\n UC1__ = {'A': 484, 'K': 93, 'M': 645, 'O': -505}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UC2___DefaultSplitter.UW1__._156_156_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UC2___DefaultSplitter.UW1__._156_156_", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 271, "end_line": 291, "span_ids": ["DefaultSplitter"], "tokens": 631}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n UC2__ = {'A': 819, 'H': 1059, 'I': 409, 'M': 3987, 'N': 5775, 'O': 646}\n UC3__ = {'A': -1370, 'I': 2311}\n UC4__ = {'A': -2643, 'H': 1809, 'I': -1032, 'K': -3450, 'M': 3565,\n 'N': 3876, 'O': 6646}\n UC5__ = {'H': 313, 'I': -1238, 'K': -799, 'M': 539, 'O': -831}\n UC6__ = {'H': -506, 'I': -253, 'K': 87, 'M': 247, 'O': -387}\n UP1__ = {'O': -214}\n UP2__ = {'B': 69, 'O': 935}\n UP3__ = {'B': 189}\n UQ1__ = {'BH': 21, 'BI': -12, 'BK': -99, 'BN': 142, 'BO': -56, 'OH': -95,\n 'OI': 477, 'OK': 410, 'OO': -2422}\n UQ2__ = {'BH': 216, 'BI': 113, 'OK': 1759}\n UQ3__ = {'BA': -479, 'BH': 42, 'BI': 1913, 'BK': -7198, 'BM': 3160,\n 'BN': 6427, 'BO': 14761, 'OI': -827, 'ON': -3212}\n UW1__ = {',': 156, '\u3001': 156, '\u300c': -463, '\u3042': -941, '\u3046': -127, '\u304c': -553,\n '\u304d': 121, '\u3053': 505, '\u3067': -201, '\u3068': -547, '\u3069': -123, '\u306b': -789,\n '\u306e': -185, '\u306f': -847, '\u3082': -466, '\u3084': -470, '\u3088': 182, '\u3089': -292,\n '\u308a': 208, '\u308c': 169, '\u3092': -446, '\u3093': -137, '\u30fb': -135, '\u4e3b': -402,\n '\u4eac': -268, '\u533a': -912, '\u5348': 871, '\u56fd': -460, '\u5927': 561, '\u59d4': 729,\n '\u5e02': -411, '\u65e5': -141, '\u7406': 361, '\u751f': -408, '\u770c': -386, '\u90fd': -718,\n '\uff62': -463, '\uff65': -135}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UW2___DefaultSplitter.UW4__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UW2___DefaultSplitter.UW4__", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 292, "end_line": 382, "span_ids": ["DefaultSplitter"], "tokens": 758}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n UW2__ = {',': -829, '\u3001': -829, '\u3007': 892, '\u300c': -645, '\u300d': 3145, '\u3042': -538,\n '\u3044': 505, '\u3046': 134, '\u304a': -502, '\u304b': 1454, '\u304c': -856, '\u304f': -412,\n '\u3053': 1141, '\u3055': 878, '\u3056': 540, '\u3057': 1529, '\u3059': -675, '\u305b': 300,\n '\u305d': -1011, '\u305f': 188, '\u3060': 1837, '\u3064': -949, '\u3066': -291, '\u3067': -268,\n '\u3068': -981, '\u3069': 1273, '\u306a': 1063, '\u306b': -1764, '\u306e': 130, '\u306f': -409,\n '\u3072': -1273, '\u3079': 1261, '\u307e': 600, '\u3082': -1263, '\u3084': -402, '\u3088': 1639,\n '\u308a': -579, '\u308b': -694, '\u308c': 571, '\u3092': -2516, '\u3093': 2095, '\u30a2': -587,\n '\u30ab': 306, '\u30ad': 568, '\u30c3': 831, '\u4e09': -758, '\u4e0d': -2150, '\u4e16': -302,\n '\u4e2d': -968, '\u4e3b': -861, '\u4e8b': 492, '\u4eba': -123, '\u4f1a': 978, '\u4fdd': 362,\n '\u5165': 548, '\u521d': -3025, '\u526f': -1566, '\u5317': -3414, '\u533a': -422, '\u5927': -1769,\n '\u5929': -865, '\u592a': -483, '\u5b50': -1519, '\u5b66': 760, '\u5b9f': 1023, '\u5c0f': -2009,\n '\u5e02': -813, '\u5e74': -1060, '\u5f37': 1067, '\u624b': -1519, '\u63fa': -1033, '\u653f': 1522,\n '\u6587': -1355, '\u65b0': -1682, '\u65e5': -1815, '\u660e': -1462, '\u6700': -630, '\u671d': -1843,\n '\u672c': -1650, '\u6771': -931, '\u679c': -665, '\u6b21': -2378, '\u6c11': -180, '\u6c17': -1740,\n '\u7406': 752, '\u767a': 529, '\u76ee': -1584, '\u76f8': -242, '\u770c': -1165, '\u7acb': -763,\n '\u7b2c': 810, '\u7c73': 509, '\u81ea': -1353, '\u884c': 838, '\u897f': -744, '\u898b': -3874,\n '\u8abf': 1010, '\u8b70': 1198, '\u8fbc': 3041, '\u958b': 1758, '\u9593': -1257, '\uff62': -645,\n '\uff63': 3145, '\uff6f': 831, '\uff71': -587, '\uff76': 306, '\uff77': 568}\n UW3__ =\n # ... other code\n UW4__ =\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UW5___DefaultSplitter.UW5__._465_299_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UW5___DefaultSplitter.UW5__._465_299_1_", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 383, "end_line": 399, "span_ids": ["DefaultSplitter"], "tokens": 699}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n UW5__ = {',': 465, '.': -299, '1': -514, 'E2': -32768, ']': -2762, '\u3001': 465,\n '\u3002': -299, '\u300c': 363, '\u3042': 1655, '\u3044': 331, '\u3046': -503, '\u3048': 1199,\n '\u304a': 527, '\u304b': 647, '\u304c': -421, '\u304d': 1624, '\u304e': 1971, '\u304f': 312,\n '\u3052': -983, '\u3055': -1537, '\u3057': -1371, '\u3059': -852, '\u3060': -1186, '\u3061': 1093,\n '\u3063': 52, '\u3064': 921, '\u3066': -18, '\u3067': -850, '\u3068': -127, '\u3069': 1682,\n '\u306a': -787, '\u306b': -1224, '\u306e': -635, '\u306f': -578, '\u3079': 1001, '\u307f': 502,\n '\u3081': 865, '\u3083': 3350, '\u3087': 854, '\u308a': -208, '\u308b': 429, '\u308c': 504,\n '\u308f': 419, '\u3092': -1264, '\u3093': 327, '\u30a4': 241, '\u30eb': 451, '\u30f3': -343,\n '\u4e2d': -871, '\u4eac': 722, '\u4f1a': -1153, '\u515a': -654, '\u52d9': 3519, '\u533a': -901,\n '\u544a': 848, '\u54e1': 2104, '\u5927': -1296, '\u5b66': -548, '\u5b9a': 1785, '\u5d50': -1304,\n '\u5e02': -2991, '\u5e2d': 921, '\u5e74': 1763, '\u601d': 872, '\u6240': -814, '\u6319': 1618,\n '\u65b0': -1682, '\u65e5': 218, '\u6708': -4353, '\u67fb': 932, '\u683c': 1356, '\u6a5f': -1508,\n '\u6c0f': -1347, '\u7530': 240, '\u753a': -3912, '\u7684': -3149, '\u76f8': 1319, '\u7701': -1052,\n '\u770c': -4003, '\u7814': -997, '\u793e': -278, '\u7a7a': -813, '\u7d71': 1955, '\u8005': -2233,\n '\u8868': 663, '\u8a9e': -1073, '\u8b70': 1219, '\u9078': -1018, '\u90ce': -368, '\u9577': 786,\n '\u9593': 1191, '\u984c': 2368, '\u9928': -689, '\uff11': -514, '\uff25\uff12': -32768, '\uff62': 363,\n '\uff72': 241, '\uff99': 451, '\uff9d': -343}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UW6___DefaultSplitter._segment": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.UW6___DefaultSplitter._segment", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 400, "end_line": 423, "span_ids": ["DefaultSplitter", "DefaultSplitter.ts_", "DefaultSplitter.ctype_"], "tokens": 442}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n UW6__ = {',': 227, '.': 808, '1': -270, 'E1': 306, '\u3001': 227, '\u3002': 808,\n '\u3042': -307, '\u3046': 189, '\u304b': 241, '\u304c': -73, '\u304f': -121, '\u3053': -200,\n '\u3058': 1782, '\u3059': 383, '\u305f': -428, '\u3063': 573, '\u3066': -1014, '\u3067': 101,\n '\u3068': -105, '\u306a': -253, '\u306b': -149, '\u306e': -417, '\u306f': -236, '\u3082': -206,\n '\u308a': 187, '\u308b': -135, '\u3092': 195, '\u30eb': -673, '\u30f3': -496, '\u4e00': -277,\n '\u4e2d': 201, '\u4ef6': -800, '\u4f1a': 624, '\u524d': 302, '\u533a': 1792, '\u54e1': -1212,\n '\u59d4': 798, '\u5b66': -960, '\u5e02': 887, '\u5e83': -695, '\u5f8c': 535, '\u696d': -697,\n '\u76f8': 753, '\u793e': -507, '\u798f': 974, '\u7a7a': -822, '\u8005': 1811, '\u9023': 463,\n '\u90ce': 1082, '\uff11': -270, '\uff25\uff11': 306, '\uff99': -673, '\uff9d': -496}\n\n # ctype_\n def ctype_(self, char: str) -> str:\n for pattern, value in self.patterns_.items():\n if pattern.match(char):\n return value\n return 'O'\n\n # ts_\n def ts_(self, dict: Dict[str, int], key: str) -> int:\n if key in dict:\n return dict[key]\n return 0\n\n # segment", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.split_DefaultSplitter.split.p3._U_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.split_DefaultSplitter.split.p3._U_", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 424, "end_line": 443, "span_ids": ["DefaultSplitter.split"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n def split(self, input: str) -> List[str]:\n if not input:\n return []\n\n result = []\n seg = ['B3', 'B2', 'B1']\n ctype = ['O', 'O', 'O']\n for t in input:\n seg.append(t)\n ctype.append(self.ctype_(t))\n seg.append('E1')\n seg.append('E2')\n seg.append('E3')\n ctype.append('O')\n ctype.append('O')\n ctype.append('O')\n word = seg[3]\n p1 = 'U'\n p2 = 'U'\n p3 = 'U'\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.split.for_i_in_range_4_len_seg_DefaultSplitter.split.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_DefaultSplitter.split.for_i_in_range_4_len_seg_DefaultSplitter.split.return.result", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 445, "end_line": 513, "span_ids": ["DefaultSplitter.split"], "tokens": 964}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSplitter(BaseSplitter):\n def split(self, input: str) -> List[str]:\n # ... other code\n\n for i in range(4, len(seg) - 3):\n score = self.BIAS__\n w1 = seg[i-3]\n w2 = seg[i-2]\n w3 = seg[i-1]\n w4 = seg[i]\n w5 = seg[i+1]\n w6 = seg[i+2]\n c1 = ctype[i-3]\n c2 = ctype[i-2]\n c3 = ctype[i-1]\n c4 = ctype[i]\n c5 = ctype[i+1]\n c6 = ctype[i+2]\n score += self.ts_(self.UP1__, p1)\n score += self.ts_(self.UP2__, p2)\n score += self.ts_(self.UP3__, p3)\n score += self.ts_(self.BP1__, p1 + p2)\n score += self.ts_(self.BP2__, p2 + p3)\n score += self.ts_(self.UW1__, w1)\n score += self.ts_(self.UW2__, w2)\n score += self.ts_(self.UW3__, w3)\n score += self.ts_(self.UW4__, w4)\n score += self.ts_(self.UW5__, w5)\n score += self.ts_(self.UW6__, w6)\n score += self.ts_(self.BW1__, w2 + w3)\n score += self.ts_(self.BW2__, w3 + w4)\n score += self.ts_(self.BW3__, w4 + w5)\n score += self.ts_(self.TW1__, w1 + w2 + w3)\n score += self.ts_(self.TW2__, w2 + w3 + w4)\n score += self.ts_(self.TW3__, w3 + w4 + w5)\n score += self.ts_(self.TW4__, w4 + w5 + w6)\n score += self.ts_(self.UC1__, c1)\n score += self.ts_(self.UC2__, c2)\n score += self.ts_(self.UC3__, c3)\n score += self.ts_(self.UC4__, c4)\n score += self.ts_(self.UC5__, c5)\n score += self.ts_(self.UC6__, c6)\n score += self.ts_(self.BC1__, c2 + c3)\n score += self.ts_(self.BC2__, c3 + c4)\n score += self.ts_(self.BC3__, c4 + c5)\n score += self.ts_(self.TC1__, c1 + c2 + c3)\n score += self.ts_(self.TC2__, c2 + c3 + c4)\n score += self.ts_(self.TC3__, c3 + c4 + c5)\n score += self.ts_(self.TC4__, c4 + c5 + c6)\n# score += self.ts_(self.TC5__, c4 + c5 + c6)\n score += self.ts_(self.UQ1__, p1 + c1)\n score += self.ts_(self.UQ2__, p2 + c2)\n score += self.ts_(self.UQ1__, p3 + c3)\n score += self.ts_(self.BQ1__, p2 + c2 + c3)\n score += self.ts_(self.BQ2__, p2 + c3 + c4)\n score += self.ts_(self.BQ3__, p3 + c2 + c3)\n score += self.ts_(self.BQ4__, p3 + c3 + c4)\n score += self.ts_(self.TQ1__, p2 + c1 + c2 + c3)\n score += self.ts_(self.TQ2__, p2 + c2 + c3 + c4)\n score += self.ts_(self.TQ3__, p3 + c1 + c2 + c3)\n score += self.ts_(self.TQ4__, p3 + c2 + c3 + c4)\n p = 'O'\n if score > 0:\n result.append(word.strip())\n word = ''\n p = 'B'\n p1 = p2\n p2 = p3\n p3 = p\n word += seg[i]\n\n result.append(word.strip())\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_TinySegmenter_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py_TinySegmenter_", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 516, "end_line": 543, "span_ids": ["SearchJapanese.stem", "SearchJapanese", "SearchJapanese.word_filter", "SearchJapanese.init", "impl:15", "SearchJapanese.split"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "TinySegmenter = DefaultSplitter # keep backward compatibility until Sphinx-1.6\n\n\nclass SearchJapanese(SearchLanguage):\n \"\"\"\n Japanese search implementation: uses no stemmer, but word splitting is quite\n complicated.\n \"\"\"\n lang = 'ja'\n language_name = 'Japanese'\n\n def init(self, options: Dict) -> None:\n dotted_path = options.get('type', 'sphinx.search.ja.DefaultSplitter')\n try:\n self.splitter = import_object(dotted_path)(options)\n except ExtensionError as exc:\n raise ExtensionError(\"Splitter module %r can't be imported\" %\n dotted_path) from exc\n\n def split(self, input: str) -> List[str]:\n return self.splitter.split(input)\n\n def word_filter(self, stemmed_word: str) -> bool:\n return len(stemmed_word) > 1\n\n def stem(self, word: str) -> str:\n return word", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py_js_porter_stemmer_js_porter_stemmer._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py_js_porter_stemmer_js_porter_stemmer._", "embedding": null, "metadata": {"file_path": "sphinx/search/zh.py", "file_name": "zh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 36, "end_line": 220, "span_ids": ["impl:2"], "tokens": 1482}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "js_porter_stemmer = \"\"\"\n/**\n * Porter Stemmer\n */\nvar Stemmer = function() {\n\n var step2list = {\n ational: 'ate',\n tional: 'tion',\n enci: 'ence',\n anci: 'ance',\n izer: 'ize',\n bli: 'ble',\n alli: 'al',\n entli: 'ent',\n eli: 'e',\n ousli: 'ous',\n ization: 'ize',\n ation: 'ate',\n ator: 'ate',\n alism: 'al',\n iveness: 'ive',\n fulness: 'ful',\n ousness: 'ous',\n aliti: 'al',\n iviti: 'ive',\n biliti: 'ble',\n logi: 'log'\n };\n\n var step3list = {\n icate: 'ic',\n ative: '',\n alize: 'al',\n iciti: 'ic',\n ical: 'ic',\n ful: '',\n ness: ''\n };\n\n var c = \"[^aeiou]\"; // consonant\n var v = \"[aeiouy]\"; // vowel\n var C = c + \"[^aeiouy]*\"; // consonant sequence\n var V = v + \"[aeiou]*\"; // vowel sequence\n\n var mgr0 = \"^(\" + C + \")?\" + V + C; // [C]VC... is m>0\n var meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\"; // [C]VC[V] is m=1\n var mgr1 = \"^(\" + C + \")?\" + V + C + V + C; // [C]VCVC... is m>1\n var s_v = \"^(\" + C + \")?\" + v; // vowel in stem\n\n this.stemWord = function (w) {\n var stem;\n var suffix;\n var firstch;\n var origword = w;\n\n if (w.length < 3)\n return w;\n\n var re;\n var re2;\n var re3;\n var re4;\n\n firstch = w.substr(0,1);\n if (firstch == \"y\")\n w = firstch.toUpperCase() + w.substr(1);\n\n // Step 1a\n re = /^(.+?)(ss|i)es$/;\n re2 = /^(.+?)([^s])s$/;\n\n if (re.test(w))\n w = w.replace(re,\"$1$2\");\n else if (re2.test(w))\n w = w.replace(re2,\"$1$2\");\n\n // Step 1b\n re = /^(.+?)eed$/;\n re2 = /^(.+?)(ed|ing)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n re = new RegExp(mgr0);\n if (re.test(fp[1])) {\n re = /.$/;\n w = w.replace(re,\"\");\n }\n }\n else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1];\n re2 = new RegExp(s_v);\n if (re2.test(stem)) {\n w = stem;\n re2 = /(at|bl|iz)$/;\n re3 = new RegExp(\"([^aeiouylsz])\\\\\\\\1$\");\n re4 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n if (re2.test(w))\n w = w + \"e\";\n else if (re3.test(w)) {\n re = /.$/;\n w = w.replace(re,\"\");\n }\n else if (re4.test(w))\n w = w + \"e\";\n }\n }\n\n // Step 1c\n re = /^(.+?)y$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = new RegExp(s_v);\n if (re.test(stem))\n w = stem + \"i\";\n }\n\n // Step 2\n re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|\\\nization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = new RegExp(mgr0);\n if (re.test(stem))\n w = stem + step2list[suffix];\n }\n\n // Step 3\n re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = new RegExp(mgr0);\n if (re.test(stem))\n w = stem + step3list[suffix];\n }\n\n // Step 4\n re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|\\\niti|ous|ive|ize)$/;\n re2 = /^(.+?)(s|t)(ion)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = new RegExp(mgr1);\n if (re.test(stem))\n w = stem;\n }\n else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1] + fp[2];\n re2 = new RegExp(mgr1);\n if (re2.test(stem))\n w = stem;\n }\n\n // Step 5\n re = /^(.+?)e$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = new RegExp(mgr1);\n re2 = new RegExp(meq1);\n re3 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))\n w = stem;\n }\n re = /ll$/;\n re2 = new RegExp(mgr1);\n if (re.test(w) && re2.test(w)) {\n re = /.$/;\n w = w.replace(re,\"\");\n }\n\n // and turn initial Y back to y\n if (firstch == \"y\")\n w = firstch.toLowerCase() + w.substr(1);\n return w;\n }\n}\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py_SearchChinese_SearchChinese.word_filter.return.len_stemmed_word_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py_SearchChinese_SearchChinese.word_filter.return.len_stemmed_word_1", "embedding": null, "metadata": {"file_path": "sphinx/search/zh.py", "file_name": "zh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 215, "end_line": 246, "span_ids": ["SearchChinese", "SearchChinese.split", "SearchChinese.init", "SearchChinese.word_filter"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SearchChinese(SearchLanguage):\n \"\"\"\n Chinese search implementation\n \"\"\"\n\n lang = 'zh'\n language_name = 'Chinese'\n js_stemmer_code = js_porter_stemmer\n stopwords = english_stopwords\n latin1_letters = re.compile(r'[a-zA-Z0-9_]+')\n latin_terms: List[str] = []\n\n def init(self, options: Dict) -> None:\n if JIEBA:\n dict_path = options.get('dict')\n if dict_path and os.path.isfile(dict_path):\n jieba.load_userdict(dict_path)\n\n self.stemmer = get_stemmer()\n\n def split(self, input: str) -> List[str]:\n chinese: List[str] = []\n if JIEBA:\n chinese = list(jieba.cut_for_search(input))\n\n latin1 = \\\n [term.strip() for term in self.latin1_letters.findall(input)]\n self.latin_terms.extend(latin1)\n return chinese + latin1\n\n def word_filter(self, stemmed_word: str) -> bool:\n return len(stemmed_word) > 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py_SearchChinese.stem_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py_SearchChinese.stem_", "embedding": null, "metadata": {"file_path": "sphinx/search/zh.py", "file_name": "zh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 256, "end_line": 268, "span_ids": ["SearchChinese.stem"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SearchChinese(SearchLanguage):\n\n def stem(self, word: str) -> str:\n # Don't stem Latin words that are long enough to be relevant for search\n # if not stemmed, but would be too short after being stemmed\n # avoids some issues with acronyms\n should_not_be_stemmed = (\n word in self.latin_terms and\n len(word) >= 3 and\n len(self.stemmer.stem(word.lower())) < 3\n )\n if should_not_be_stemmed:\n return word.lower()\n return self.stemmer.stem(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_os_BuildDoc.boolean_options._fresh_env_all_files_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_os_BuildDoc.boolean_options._fresh_env_all_files_", "embedding": null, "metadata": {"file_path": "sphinx/setup_command.py", "file_name": "setup_command.py", "file_type": "text/x-python", "category": "implementation", "start_line": 6, "end_line": 83, "span_ids": ["BuildDoc", "imports"], "tokens": 431}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\nimport warnings\nfrom distutils.cmd import Command\nfrom distutils.errors import DistutilsExecError\nfrom io import StringIO\nfrom typing import Any, Dict\n\nfrom sphinx.application import Sphinx\nfrom sphinx.cmd.build import handle_exception\nfrom sphinx.deprecation import RemovedInSphinx70Warning\nfrom sphinx.util.console import color_terminal, nocolor\nfrom sphinx.util.docutils import docutils_namespace, patch_docutils\nfrom sphinx.util.osutil import abspath\n\n\nclass BuildDoc(Command):\n\n description = 'Build Sphinx documentation'\n user_options = [\n ('fresh-env', 'E', 'discard saved environment'),\n ('all-files', 'a', 'build all files'),\n ('source-dir=', 's', 'Source directory'),\n ('build-dir=', None, 'Build directory'),\n ('config-dir=', 'c', 'Location of the configuration directory'),\n ('builder=', 'b', 'The builder (or builders) to use. Can be a comma- '\n 'or space-separated list. Defaults to \"html\"'),\n ('warning-is-error', 'W', 'Turn warning into errors'),\n ('project=', None, 'The documented project\\'s name'),\n ('version=', None, 'The short X.Y version'),\n ('release=', None, 'The full version, including alpha/beta/rc tags'),\n ('today=', None, 'How to format the current date, used as the '\n 'replacement for |today|'),\n ('link-index', 'i', 'Link index.html to the master doc'),\n ('copyright', None, 'The copyright string'),\n ('pdb', None, 'Start pdb on exception'),\n ('verbosity', 'v', 'increase verbosity (can be repeated)'),\n ('nitpicky', 'n', 'nit-picky mode, warn about all missing references'),\n ('keep-going', None, 'With -W, keep going when getting warnings'),\n ]\n boolean_options = ['fresh-env', 'all-files', 'warning-is-error',\n 'link-index', 'nitpicky']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_BuildDoc.finalize_options_BuildDoc.finalize_options.self.builder_target_dirs._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_BuildDoc.finalize_options_BuildDoc.finalize_options.self.builder_target_dirs._", "embedding": null, "metadata": {"file_path": "sphinx/setup_command.py", "file_name": "setup_command.py", "file_type": "text/x-python", "category": "implementation", "start_line": 114, "end_line": 134, "span_ids": ["BuildDoc.finalize_options"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildDoc(Command):\n\n def finalize_options(self) -> None:\n self.ensure_string_list('builder')\n\n if self.source_dir is None:\n self.source_dir = self._guess_source_dir()\n self.announce('Using source directory %s' % self.source_dir)\n\n self.ensure_dirname('source_dir')\n\n if self.config_dir is None:\n self.config_dir = self.source_dir\n\n if self.build_dir is None:\n build = self.get_finalized_command('build')\n self.build_dir = os.path.join(abspath(build.build_base), 'sphinx') # type: ignore\n\n self.doctree_dir = os.path.join(self.build_dir, 'doctrees')\n\n self.builder_target_dirs = [\n (builder, os.path.join(self.build_dir, builder))\n for builder in self.builder]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_BuildDoc.run_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_BuildDoc.run_", "embedding": null, "metadata": {"file_path": "sphinx/setup_command.py", "file_name": "setup_command.py", "file_type": "text/x-python", "category": "implementation", "start_line": 136, "end_line": 187, "span_ids": ["BuildDoc.run"], "tokens": 440}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildDoc(Command):\n\n def run(self) -> None:\n warnings.warn('setup.py build_sphinx is deprecated.',\n RemovedInSphinx70Warning, stacklevel=2)\n\n if not color_terminal():\n nocolor()\n if not self.verbose: # type: ignore\n status_stream = StringIO()\n else:\n status_stream = sys.stdout # type: ignore\n confoverrides: Dict[str, Any] = {}\n if self.project:\n confoverrides['project'] = self.project\n if self.version:\n confoverrides['version'] = self.version\n if self.release:\n confoverrides['release'] = self.release\n if self.today:\n confoverrides['today'] = self.today\n if self.copyright:\n confoverrides['copyright'] = self.copyright\n if self.nitpicky:\n confoverrides['nitpicky'] = self.nitpicky\n\n for builder, builder_target_dir in self.builder_target_dirs:\n app = None\n\n try:\n confdir = self.config_dir or self.source_dir\n with patch_docutils(confdir), docutils_namespace():\n app = Sphinx(self.source_dir, self.config_dir,\n builder_target_dir, self.doctree_dir,\n builder, confoverrides, status_stream,\n freshenv=self.fresh_env,\n warningiserror=self.warning_is_error,\n verbosity=self.verbosity, keep_going=self.keep_going)\n app.build(force_all=self.all_files)\n if app.statuscode:\n raise DistutilsExecError(\n 'caused by %s builder.' % app.builder.name)\n except Exception as exc:\n handle_exception(app, self, exc, sys.stderr)\n if not self.pdb:\n raise SystemExit(1) from exc\n\n if not self.link_index:\n continue\n\n src = app.config.root_doc + app.builder.out_suffix # type: ignore\n dst = app.builder.get_outfilename('index') # type: ignore\n os.symlink(src, dst)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/__init__.py__", "embedding": null, "metadata": {"file_path": "sphinx/testing/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["docstring"], "tokens": 40}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Sphinx test utilities\n\nYou can require sphinx.testing pytest fixtures in a test module or a conftest\nfile like this:\n\n pytest_plugins = 'sphinx.testing.fixtures'\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/comparer.py_PathComparer.diff_PathComparer.rdiff.return.self__diff_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/comparer.py_PathComparer.diff_PathComparer.rdiff.return.self__diff_", "embedding": null, "metadata": {"file_path": "sphinx/testing/comparer.py", "file_name": "comparer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 50, "end_line": 79, "span_ids": ["PathComparer.diff", "PathComparer.rdiff", "PathComparer.ldiff"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PathComparer:\n\n def diff(self, other: Union[str, pathlib.Path]) -> List[str]:\n \"\"\"compare self and other.\n\n When different is not exist, return empty list.\n\n >>> PathComparer('/to/index').diff('C:\\\\to\\\\index')\n []\n\n When different is exist, return unified diff style list as:\n\n >>> PathComparer('/to/index').diff('C:\\\\to\\\\index2')\n [\n '- C:/to/index'\n '+ C:/to/index2'\n '? +'\n ]\n \"\"\"\n return self.ldiff(other)\n\n def ldiff(self, other: Union[str, pathlib.Path]) -> List[str]:\n return self._diff(\n self.path,\n pathlib.Path(other),\n )\n\n def rdiff(self, other: Union[str, pathlib.Path]) -> List[str]:\n return self._diff(\n pathlib.Path(other),\n self.path,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/comparer.py_PathComparer._diff_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/comparer.py_PathComparer._diff_", "embedding": null, "metadata": {"file_path": "sphinx/testing/comparer.py", "file_name": "comparer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 81, "end_line": 104, "span_ids": ["pytest_assertrepr_compare", "PathComparer._diff"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PathComparer:\n\n def _diff(self, lhs: pathlib.Path, rhs: pathlib.Path) -> List[str]:\n if lhs == rhs:\n return []\n\n if lhs.drive or rhs.drive:\n # If either has a drive letter compare by absolute path\n s_path, o_path = lhs.absolute().as_posix(), rhs.absolute().as_posix()\n else:\n s_path, o_path = lhs.as_posix(), rhs.as_posix()\n\n if s_path == o_path:\n return []\n\n return [line.strip() for line in difflib.Differ().compare([s_path], [o_path])]\n\n\ndef pytest_assertrepr_compare(op: str, left: Any, right: Any) -> List[str]:\n if isinstance(left, PathComparer) and op == \"==\":\n return ['Comparing path:'] + left.ldiff(right)\n elif isinstance(right, PathComparer) and op == \"==\":\n return ['Comparing path:'] + right.rdiff(left)\n else:\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_app_params_app_params._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_app_params_app_params._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/testing/fixtures.py", "file_name": "fixtures.py", "file_type": "text/x-python", "category": "implementation", "start_line": 57, "end_line": 102, "span_ids": ["app_params"], "tokens": 391}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef app_params(request: Any, test_params: Dict, shared_result: SharedResult,\n sphinx_test_tempdir: str, rootdir: str) -> Tuple[Dict, Dict]:\n \"\"\"\n Parameters that are specified by 'pytest.mark.sphinx' for\n sphinx.application.Sphinx initialization\n \"\"\"\n\n # ##### process pytest.mark.sphinx\n\n if hasattr(request.node, 'iter_markers'): # pytest-3.6.0 or newer\n markers = request.node.iter_markers(\"sphinx\")\n else:\n markers = request.node.get_marker(\"sphinx\")\n pargs = {}\n kwargs: Dict[str, Any] = {}\n\n if markers is not None:\n # to avoid stacking positional args\n for info in reversed(list(markers)):\n for i, a in enumerate(info.args):\n pargs[i] = a\n kwargs.update(info.kwargs)\n\n args = [pargs[i] for i in sorted(pargs.keys())]\n\n # ##### process pytest.mark.test_params\n if test_params['shared_result']:\n if 'srcdir' in kwargs:\n raise pytest.Exception('You can not specify shared_result and '\n 'srcdir in same time.')\n kwargs['srcdir'] = test_params['shared_result']\n restore = shared_result.restore(test_params['shared_result'])\n kwargs.update(restore)\n\n # ##### prepare Application params\n\n testroot = kwargs.pop('testroot', 'root')\n kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)\n\n # special support for sphinx/tests\n if rootdir and not srcdir.exists():\n testroot_path = rootdir / ('test-' + testroot)\n testroot_path.copytree(srcdir)\n\n return namedtuple('app_params', 'args,kwargs')(args, kwargs) # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_test_params_test_params.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_test_params_test_params.return.result", "embedding": null, "metadata": {"file_path": "sphinx/testing/fixtures.py", "file_name": "fixtures.py", "file_type": "text/x-python", "category": "implementation", "start_line": 105, "end_line": 129, "span_ids": ["test_params"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef test_params(request: Any) -> Dict:\n \"\"\"\n Test parameters that are specified by 'pytest.mark.test_params'\n\n :param Union[str] shared_result:\n If the value is provided, app._status and app._warning objects will be\n shared in the parametrized test functions and/or test functions that\n have same 'shared_result' value.\n **NOTE**: You can not specify both shared_result and srcdir.\n \"\"\"\n if hasattr(request.node, 'get_closest_marker'): # pytest-3.6.0 or newer\n env = request.node.get_closest_marker('test_params')\n else:\n env = request.node.get_marker('test_params')\n kwargs = env.kwargs if env else {}\n result = {\n 'shared_result': None,\n }\n result.update(kwargs)\n\n if (result['shared_result'] and not isinstance(result['shared_result'], str)):\n raise pytest.Exception('You can only provide a string type of value '\n 'for \"shared_result\" ')\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_app_warning.return.app__warning": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_app_warning.return.app__warning", "embedding": null, "metadata": {"file_path": "sphinx/testing/fixtures.py", "file_name": "fixtures.py", "file_type": "text/x-python", "category": "implementation", "start_line": 132, "end_line": 166, "span_ids": ["app", "status", "warning"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(scope='function')\ndef app(test_params: Dict, app_params: Tuple[Dict, Dict], make_app: Callable,\n shared_result: SharedResult) -> Generator[SphinxTestApp, None, None]:\n \"\"\"\n Provides the 'sphinx.application.Sphinx' object\n \"\"\"\n args, kwargs = app_params\n app_ = make_app(*args, **kwargs)\n yield app_\n\n print('# testroot:', kwargs.get('testroot', 'root'))\n print('# builder:', app_.builder.name)\n print('# srcdir:', app_.srcdir)\n print('# outdir:', app_.outdir)\n print('# status:', '\\n' + app_._status.getvalue())\n print('# warning:', '\\n' + app_._warning.getvalue())\n\n if test_params['shared_result']:\n shared_result.store(test_params['shared_result'], app_)\n\n\n@pytest.fixture(scope='function')\ndef status(app: SphinxTestApp) -> StringIO:\n \"\"\"\n Back-compatibility for testing with previous @with_app decorator\n \"\"\"\n return app._status\n\n\n@pytest.fixture(scope='function')\ndef warning(app: SphinxTestApp) -> StringIO:\n \"\"\"\n Back-compatibility for testing with previous @with_app decorator\n \"\"\"\n return app._warning", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_make_app_make_app.for_app__in_reversed_apps.app__cleanup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_make_app_make_app.for_app__in_reversed_apps.app__cleanup_", "embedding": null, "metadata": {"file_path": "sphinx/testing/fixtures.py", "file_name": "fixtures.py", "file_type": "text/x-python", "category": "implementation", "start_line": 169, "end_line": 194, "span_ids": ["make_app"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture()\ndef make_app(test_params: Dict, monkeypatch: Any) -> Generator[Callable, None, None]:\n \"\"\"\n Provides make_app function to initialize SphinxTestApp instance.\n if you want to initialize 'app' in your test function. please use this\n instead of using SphinxTestApp class directory.\n \"\"\"\n monkeypatch.setattr('sphinx.application.abspath', lambda x: x)\n\n apps = []\n syspath = sys.path[:]\n\n def make(*args, **kwargs):\n status, warning = StringIO(), StringIO()\n kwargs.setdefault('status', status)\n kwargs.setdefault('warning', warning)\n app_: Any = SphinxTestApp(*args, **kwargs)\n apps.append(app_)\n if test_params['shared_result']:\n app_ = SphinxTestAppWrapperForSkipBuilding(app_)\n return app_\n yield make\n\n sys.path[:] = syspath\n for app_ in reversed(apps): # clean up applications from the new ones\n app_.cleanup()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_shared_result_if_graphviz_found.pytest_skip_graphviz_do": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_shared_result_if_graphviz_found.pytest_skip_graphviz_do", "embedding": null, "metadata": {"file_path": "sphinx/testing/fixtures.py", "file_name": "fixtures.py", "file_type": "text/x-python", "category": "implementation", "start_line": 193, "end_line": 217, "span_ids": ["if_graphviz_found", "shared_result", "_shared_result_cache"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef shared_result() -> SharedResult:\n return SharedResult()\n\n\n@pytest.fixture(scope='module', autouse=True)\ndef _shared_result_cache() -> None:\n SharedResult.cache.clear()\n\n\n@pytest.fixture\ndef if_graphviz_found(app: SphinxTestApp) -> None:\n \"\"\"\n The test will be skipped when using 'if_graphviz_found' fixture and graphviz\n dot command is not found.\n \"\"\"\n graphviz_dot = getattr(app.config, 'graphviz_dot', '')\n try:\n if graphviz_dot:\n subprocess.run([graphviz_dot, '-V'], stdout=PIPE, stderr=PIPE) # show version\n return\n except OSError: # No such file or directory\n pass\n\n pytest.skip('graphviz \"dot\" is not available')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_sphinx_test_tempdir_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_sphinx_test_tempdir_", "embedding": null, "metadata": {"file_path": "sphinx/testing/fixtures.py", "file_name": "fixtures.py", "file_type": "text/x-python", "category": "implementation", "start_line": 224, "end_line": 258, "span_ids": ["sphinx_test_tempdir", "tempdir", "rollback_sysmodules"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(scope='session')\ndef sphinx_test_tempdir(tmpdir_factory: Any) -> \"util.path\":\n \"\"\"\n Temporary directory wrapped with `path` class.\n \"\"\"\n tmpdir = tmpdir_factory.getbasetemp()\n return util.path(tmpdir).abspath()\n\n\n@pytest.fixture\ndef tempdir(tmpdir: str) -> \"util.path\":\n \"\"\"\n Temporary directory wrapped with `path` class.\n This fixture is for back-compatibility with old test implementation.\n \"\"\"\n return util.path(tmpdir)\n\n\n@pytest.fixture\ndef rollback_sysmodules():\n \"\"\"\n Rollback sys.modules to its value before testing to unload modules\n during tests.\n\n For example, used in test_ext_autosummary.py to permit unloading the\n target module to clear its cache.\n \"\"\"\n try:\n sysmodules = list(sys.modules)\n yield\n finally:\n for modname in list(sys.modules):\n if modname not in sysmodules:\n sys.modules.pop(modname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path.rmtree_path.rmtree.shutil_rmtree_self_ignor": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path.rmtree_path.rmtree.shutil_rmtree_self_ignor", "embedding": null, "metadata": {"file_path": "sphinx/testing/path.py", "file_name": "path.py", "file_type": "text/x-python", "category": "implementation", "start_line": 73, "end_line": 89, "span_ids": ["path.rmtree"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class path(str):\n\n def rmtree(self, ignore_errors: bool = False, onerror: Callable = None) -> None:\n \"\"\"\n Removes the file or directory and any files or directories it may\n contain.\n\n :param ignore_errors:\n If ``True`` errors are silently ignored, otherwise an exception\n is raised in case an error occurs.\n\n :param onerror:\n A callback which gets called with the arguments `func`, `path` and\n `exc_info`. `func` is one of :func:`os.listdir`, :func:`os.remove`\n or :func:`os.rmdir`. `path` is the argument to the function which\n caused it to fail and `exc_info` is a tuple as returned by\n :func:`sys.exc_info`.\n \"\"\"\n shutil.rmtree(self, ignore_errors=ignore_errors, onerror=onerror)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path.movetree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path.movetree_", "embedding": null, "metadata": {"file_path": "sphinx/testing/path.py", "file_name": "path.py", "file_type": "text/x-python", "category": "implementation", "start_line": 103, "end_line": 216, "span_ids": ["path.read_text", "path.listdir", "path.__repr__", "path.bytes", "path.lexists", "path.joinpath", "path.read_bytes", "path.exists", "path.utime", "path.makedirs", "path.movetree", "path:3", "path.stat", "path.unlink", "path.write_text", "path.write_bytes", "path:5", "path.open", "path.text"], "tokens": 802}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class path(str):\n\n def movetree(self, destination: str) -> None:\n \"\"\"\n Recursively move the file or directory to the given `destination`\n similar to the Unix \"mv\" command.\n\n If the `destination` is a file it may be overwritten depending on the\n :func:`os.rename` semantics.\n \"\"\"\n shutil.move(self, destination)\n\n move = movetree\n\n def unlink(self) -> None:\n \"\"\"\n Removes a file.\n \"\"\"\n os.unlink(self)\n\n def stat(self) -> Any:\n \"\"\"\n Returns a stat of the file.\n \"\"\"\n return os.stat(self)\n\n def utime(self, arg: Any) -> None:\n os.utime(self, arg)\n\n def open(self, mode: str = 'r', **kwargs: Any) -> IO:\n return open(self, mode, **kwargs)\n\n def write_text(self, text: str, encoding: str = 'utf-8', **kwargs: Any) -> None:\n \"\"\"\n Writes the given `text` to the file.\n \"\"\"\n with open(self, 'w', encoding=encoding, **kwargs) as f:\n f.write(text)\n\n def text(self, encoding: str = 'utf-8', **kwargs: Any) -> str:\n \"\"\"\n Returns the text in the file.\n \"\"\"\n warnings.warn('Path.text() is deprecated. Please use read_text() instead.',\n RemovedInSphinx50Warning, stacklevel=2)\n return self.read_text(encoding, **kwargs)\n\n def read_text(self, encoding: str = 'utf-8', **kwargs: Any) -> str:\n \"\"\"\n Returns the text in the file.\n \"\"\"\n with open(self, encoding=encoding, **kwargs) as f:\n return f.read()\n\n def bytes(self) -> builtins.bytes:\n \"\"\"\n Returns the bytes in the file.\n \"\"\"\n warnings.warn('Path.bytes() is deprecated. Please use read_bytes() instead.',\n RemovedInSphinx50Warning, stacklevel=2)\n return self.read_bytes()\n\n def read_bytes(self) -> builtins.bytes:\n \"\"\"\n Returns the bytes in the file.\n \"\"\"\n with open(self, mode='rb') as f:\n return f.read()\n\n def write_bytes(self, bytes: str, append: bool = False) -> None:\n \"\"\"\n Writes the given `bytes` to the file.\n\n :param append:\n If ``True`` given `bytes` are added at the end of the file.\n \"\"\"\n if append:\n mode = 'ab'\n else:\n mode = 'wb'\n with open(self, mode=mode) as f:\n f.write(bytes)\n\n def exists(self) -> bool:\n \"\"\"\n Returns ``True`` if the path exist.\n \"\"\"\n return os.path.exists(self)\n\n def lexists(self) -> bool:\n \"\"\"\n Returns ``True`` if the path exists unless it is a broken symbolic\n link.\n \"\"\"\n return os.path.lexists(self)\n\n def makedirs(self, mode: int = 0o777, exist_ok: bool = False) -> None:\n \"\"\"\n Recursively create directories.\n \"\"\"\n os.makedirs(self, mode, exist_ok=exist_ok)\n\n def joinpath(self, *args: Any) -> \"path\":\n \"\"\"\n Joins the path with the argument given and returns the result.\n \"\"\"\n return self.__class__(os.path.join(self, *map(self.__class__, args)))\n\n def listdir(self) -> List[str]:\n return os.listdir(self)\n\n __div__ = __truediv__ = joinpath\n\n def __repr__(self) -> str:\n return '%s(%s)' % (self.__class__.__name__, super().__repr__())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/restructuredtext.py_from_os_import_path_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/restructuredtext.py_from_os_import_path_", "embedding": null, "metadata": {"file_path": "sphinx/testing/restructuredtext.py", "file_name": "restructuredtext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 9, "end_line": 36, "span_ids": ["imports", "parse"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from os import path\n\nfrom docutils import nodes\nfrom docutils.core import publish_doctree\n\nfrom sphinx.application import Sphinx\nfrom sphinx.io import SphinxStandaloneReader\nfrom sphinx.parsers import RSTParser\nfrom sphinx.util.docutils import sphinx_domains\n\n\ndef parse(app: Sphinx, text: str, docname: str = 'index') -> nodes.document:\n \"\"\"Parse a string as reStructuredText with Sphinx application.\"\"\"\n try:\n app.env.temp_data['docname'] = docname\n reader = SphinxStandaloneReader()\n reader.setup(app)\n parser = RSTParser()\n parser.set_application(app)\n with sphinx_domains(app.env):\n return publish_doctree(text, path.join(app.srcdir, docname + '.rst'),\n reader=reader,\n parser=parser,\n settings_overrides={'env': app.env,\n 'gettext_compact': True})\n finally:\n app.env.temp_data.pop('docname', None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_assert_node_assert_node.if_kwargs_.for_key_value_in_kwargs_.assert_node_key_value": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_assert_node_assert_node.if_kwargs_.for_key_value_in_kwargs_.assert_node_key_value", "embedding": null, "metadata": {"file_path": "sphinx/testing/util.py", "file_name": "util.py", "file_type": "text/x-python", "category": "implementation", "start_line": 52, "end_line": 87, "span_ids": ["assert_node"], "tokens": 436}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def assert_node(node: Node, cls: Any = None, xpath: str = \"\", **kwargs: Any) -> None:\n if cls:\n if isinstance(cls, list):\n assert_node(node, cls[0], xpath=xpath, **kwargs)\n if cls[1:]:\n if isinstance(cls[1], tuple):\n assert_node(node, cls[1], xpath=xpath, **kwargs)\n else:\n assert isinstance(node, nodes.Element), \\\n 'The node%s does not have any children' % xpath\n assert len(node) == 1, \\\n 'The node%s has %d child nodes, not one' % (xpath, len(node))\n assert_node(node[0], cls[1:], xpath=xpath + \"[0]\", **kwargs)\n elif isinstance(cls, tuple):\n assert isinstance(node, (list, nodes.Element)), \\\n 'The node%s does not have any items' % xpath\n assert len(node) == len(cls), \\\n 'The node%s has %d child nodes, not %r' % (xpath, len(node), len(cls))\n for i, nodecls in enumerate(cls):\n path = xpath + \"[%d]\" % i\n assert_node(node[i], nodecls, xpath=path, **kwargs)\n elif isinstance(cls, str):\n assert node == cls, 'The node %r is not %r: %r' % (xpath, cls, node)\n else:\n assert isinstance(node, cls), \\\n 'The node%s is not subclass of %r: %r' % (xpath, cls, node)\n\n if kwargs:\n assert isinstance(node, nodes.Element), \\\n 'The node%s does not have any attributes' % xpath\n\n for key, value in kwargs.items():\n assert key in node, \\\n 'The node%s does not have %r attribute: %r' % (xpath, key, node)\n assert node[key] == value, \\\n 'The node%s[%s] is not %r: %r' % (xpath, key, value, node[key])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_etree_parse_SphinxTestApp.__init__.try_.except_Exception_.raise": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_etree_parse_SphinxTestApp.__init__.try_.except_Exception_.raise", "embedding": null, "metadata": {"file_path": "sphinx/testing/util.py", "file_name": "util.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 130, "span_ids": ["SphinxTestApp", "Struct", "etree_parse"], "tokens": 467}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def etree_parse(path: str) -> Any:\n with warnings.catch_warnings(record=False):\n warnings.filterwarnings(\"ignore\", category=DeprecationWarning)\n return ElementTree.parse(path)\n\n\nclass Struct:\n def __init__(self, **kwargs: Any) -> None:\n self.__dict__.update(kwargs)\n\n\nclass SphinxTestApp(application.Sphinx):\n \"\"\"\n A subclass of :class:`Sphinx` that runs on the test root, with some\n better default values for the initialization parameters.\n \"\"\"\n _status: StringIO = None\n _warning: StringIO = None\n\n def __init__(self, buildername: str = 'html', srcdir: path = None, builddir: path = None,\n freshenv: bool = False, confoverrides: Dict = None, status: IO = None,\n warning: IO = None, tags: List[str] = None, docutilsconf: str = None,\n parallel: int = 0) -> None:\n\n if docutilsconf is not None:\n (srcdir / 'docutils.conf').write_text(docutilsconf)\n\n if builddir is None:\n builddir = srcdir / '_build'\n\n confdir = srcdir\n outdir = builddir.joinpath(buildername)\n outdir.makedirs(exist_ok=True)\n doctreedir = builddir.joinpath('doctrees')\n doctreedir.makedirs(exist_ok=True)\n if confoverrides is None:\n confoverrides = {}\n warningiserror = False\n\n self._saved_path = sys.path[:]\n self._saved_directives = directives._directives.copy() # type: ignore\n self._saved_roles = roles._roles.copy() # type: ignore\n\n self._saved_nodeclasses = {v for v in dir(nodes.GenericNodeVisitor)\n if v.startswith('visit_')}\n\n try:\n super().__init__(srcdir, confdir, outdir, doctreedir,\n buildername, confoverrides, status, warning,\n freshenv, warningiserror, tags, parallel=parallel)\n except Exception:\n self.cleanup()\n raise", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_SphinxTestApp.cleanup_SphinxTestApp.__repr__.return._s_buildername_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_SphinxTestApp.cleanup_SphinxTestApp.__repr__.return._s_buildername_r_", "embedding": null, "metadata": {"file_path": "sphinx/testing/util.py", "file_name": "util.py", "file_type": "text/x-python", "category": "implementation", "start_line": 141, "end_line": 155, "span_ids": ["SphinxTestApp.cleanup", "SphinxTestApp.__repr__"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxTestApp(application.Sphinx):\n\n def cleanup(self, doctrees: bool = False) -> None:\n ModuleAnalyzer.cache.clear()\n locale.translators.clear()\n sys.path[:] = self._saved_path\n sys.modules.pop('autodoc_fodder', None)\n directives._directives = self._saved_directives # type: ignore\n roles._roles = self._saved_roles # type: ignore\n for method in dir(nodes.GenericNodeVisitor):\n if method.startswith('visit_') and \\\n method not in self._saved_nodeclasses:\n delattr(nodes.GenericNodeVisitor, 'visit_' + method[6:])\n delattr(nodes.GenericNodeVisitor, 'depart_' + method[6:])\n\n def __repr__(self) -> str:\n return '<%s buildername=%r>' % (self.__class__.__name__, self.builder.name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_SphinxTestAppWrapperForSkipBuilding_SphinxTestAppWrapperForSkipBuilding.build.if_not_self_app_outdir_li._otherwise_we_can_use_b": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py_SphinxTestAppWrapperForSkipBuilding_SphinxTestAppWrapperForSkipBuilding.build.if_not_self_app_outdir_li._otherwise_we_can_use_b", "embedding": null, "metadata": {"file_path": "sphinx/testing/util.py", "file_name": "util.py", "file_type": "text/x-python", "category": "implementation", "start_line": 159, "end_line": 176, "span_ids": ["SphinxTestAppWrapperForSkipBuilding", "SphinxTestAppWrapperForSkipBuilding.__getattr__", "SphinxTestAppWrapperForSkipBuilding.build"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxTestAppWrapperForSkipBuilding:\n \"\"\"\n This class is a wrapper for SphinxTestApp to speed up the test by skipping\n `app.build` process if it is already built and there is even one output\n file.\n \"\"\"\n\n def __init__(self, app_: SphinxTestApp) -> None:\n self.app = app_\n\n def __getattr__(self, name: str) -> Any:\n return getattr(self.app, name)\n\n def build(self, *args: Any, **kwargs: Any) -> None:\n if not self.app.outdir.listdir(): # type: ignore\n # if listdir is empty, do build.\n self.app.build(*args, **kwargs)\n # otherwise, we can use built cache", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py__unicode_literals_re_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py__unicode_literals_re_", "embedding": null, "metadata": {"file_path": "sphinx/testing/util.py", "file_name": "util.py", "file_type": "text/x-python", "category": "implementation", "start_line": 169, "end_line": 192, "span_ids": ["find_files", "simple_decorator", "impl:3", "strip_escseq"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_unicode_literals_re = re.compile(r'u(\".*?\")|u(\\'.*?\\')')\n\n\ndef find_files(root: str, suffix: bool = None) -> Generator[str, None, None]:\n for dirpath, _dirs, files in os.walk(root, followlinks=True):\n dirpath = path(dirpath)\n for f in [f for f in files if not suffix or f.endswith(suffix)]: # type: ignore\n fpath = dirpath / f\n yield relpath(fpath, root)\n\n\ndef strip_escseq(text: str) -> str:\n return re.sub('\\x1b.*?m', '', text)\n\n\ndef simple_decorator(f):\n \"\"\"\n A simple decorator that does nothing, for tests to use.\n \"\"\"\n @functools.wraps(f)\n def wrapper(*args, **kwargs):\n return f(*args, **kwargs)\n return wrapper", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_Theme_Theme.get_theme_dirs.if_self_base_is_None_.else_.return._self_themedir_self_ba": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_Theme_Theme.get_theme_dirs.if_self_base_is_None_.else_.return._self_themedir_self_ba", "embedding": null, "metadata": {"file_path": "sphinx/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 52, "end_line": 96, "span_ids": ["Theme", "Theme.get_theme_dirs"], "tokens": 393}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Theme:\n \"\"\"A Theme is a set of HTML templates and configurations.\n\n This class supports both theme directory and theme archive (zipped theme).\"\"\"\n\n def __init__(self, name: str, theme_path: str, factory: \"HTMLThemeFactory\") -> None:\n self.name = name\n self.base = None\n self.rootdir = None\n\n if path.isdir(theme_path):\n # already a directory, do nothing\n self.rootdir = None\n self.themedir = theme_path\n else:\n # extract the theme to a temp directory\n self.rootdir = tempfile.mkdtemp('sxt')\n self.themedir = path.join(self.rootdir, name)\n extract_zip(theme_path, self.themedir)\n\n self.config = configparser.RawConfigParser()\n self.config.read(path.join(self.themedir, THEMECONF))\n\n try:\n inherit = self.config.get('theme', 'inherit')\n except configparser.NoSectionError as exc:\n raise ThemeError(__('theme %r doesn\\'t have \"theme\" setting') % name) from exc\n except configparser.NoOptionError as exc:\n raise ThemeError(__('theme %r doesn\\'t have \"inherit\" setting') % name) from exc\n\n if inherit != 'none':\n try:\n self.base = factory.create(inherit)\n except ThemeError as exc:\n raise ThemeError(__('no theme named %r found, inherited by %r') %\n (inherit, name)) from exc\n\n def get_theme_dirs(self) -> List[str]:\n \"\"\"Return a list of theme directories, beginning with this theme's,\n then the base theme's, then that one's base theme's, etc.\n \"\"\"\n if self.base is None:\n return [self.themedir]\n else:\n return [self.themedir] + self.base.get_theme_dirs()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_Theme.get_config_Theme.get_config.try_.except_configparser_NoOp.if_default_is_NODEFAULT_.else_.return.default": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_Theme.get_config_Theme.get_config.try_.except_configparser_NoOp.if_default_is_NODEFAULT_.else_.return.default", "embedding": null, "metadata": {"file_path": "sphinx/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 112, "span_ids": ["Theme.get_config"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Theme:\n\n def get_config(self, section: str, name: str, default: Any = NODEFAULT) -> Any:\n \"\"\"Return the value for a theme configuration setting, searching the\n base theme chain.\n \"\"\"\n try:\n return self.config.get(section, name)\n except (configparser.NoOptionError, configparser.NoSectionError) as exc:\n if self.base:\n return self.base.get_config(section, name, default)\n\n if default is NODEFAULT:\n raise ThemeError(__('setting %s.%s occurs in none of the '\n 'searched theme configs') % (section, name)) from exc\n else:\n return default", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_Theme.get_options_is_archived_theme.try_.except_Exception_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_Theme.get_options_is_archived_theme.try_.except_Exception_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 108, "end_line": 145, "span_ids": ["Theme.get_options", "is_archived_theme", "Theme.cleanup"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Theme:\n\n def get_options(self, overrides: Dict[str, Any] = {}) -> Dict[str, Any]:\n \"\"\"Return a dictionary of theme options and their values.\"\"\"\n if self.base:\n options = self.base.get_options()\n else:\n options = {}\n\n try:\n options.update(self.config.items('options'))\n except configparser.NoSectionError:\n pass\n\n for option, value in overrides.items():\n if option not in options:\n logger.warning(__('unsupported theme option %r given') % option)\n else:\n options[option] = value\n\n return options\n\n def cleanup(self) -> None:\n \"\"\"Remove temporary directories.\"\"\"\n if self.rootdir:\n try:\n shutil.rmtree(self.rootdir)\n except Exception:\n pass\n if self.base:\n self.base.cleanup()\n\n\ndef is_archived_theme(filename: str) -> bool:\n \"\"\"Check whether the specified file is an archived theme file or not.\"\"\"\n try:\n with ZipFile(filename) as f:\n return THEMECONF in f.namelist()\n except Exception:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_HTMLThemeFactory.find_themes_HTMLThemeFactory.find_themes.return.themes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_HTMLThemeFactory.find_themes_HTMLThemeFactory.find_themes.return.themes", "embedding": null, "metadata": {"file_path": "sphinx/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 208, "end_line": 227, "span_ids": ["HTMLThemeFactory.find_themes"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLThemeFactory:\n\n def find_themes(self, theme_path: str) -> Dict[str, str]:\n \"\"\"Search themes from specified directory.\"\"\"\n themes: Dict[str, str] = {}\n if not path.isdir(theme_path):\n return themes\n\n for entry in os.listdir(theme_path):\n pathname = path.join(theme_path, entry)\n if path.isfile(pathname) and entry.lower().endswith('.zip'):\n if is_archived_theme(pathname):\n name = entry[:-4]\n themes[name] = pathname\n else:\n logger.warning(__('file %r on theme path is not a valid '\n 'zipfile or contains no theme'), entry)\n else:\n if path.isfile(path.join(pathname, THEMECONF)):\n themes[entry] = pathname\n\n return themes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_HTMLThemeFactory.create_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_HTMLThemeFactory.create_", "embedding": null, "metadata": {"file_path": "sphinx/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 229, "end_line": 244, "span_ids": ["HTMLThemeFactory.create"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLThemeFactory:\n\n def create(self, name: str) -> Theme:\n \"\"\"Create an instance of theme.\"\"\"\n if name not in self.themes:\n self.load_extra_theme(name)\n\n if name not in self.themes and name == 'sphinx_rtd_theme':\n # sphinx_rtd_theme (< 0.2.5) # RemovedInSphinx60Warning\n logger.warning(__('sphinx_rtd_theme (< 0.3.0) found. '\n 'It will not be available since Sphinx-6.0'))\n self.load_sphinx_rtd_theme()\n\n if name not in self.themes:\n raise ThemeError(__('no theme named %r found (missing theme.conf?)') % name)\n\n return Theme(name, self.themes[name], factory=self)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxTransform_SphinxTransform.config.return.self_env_config": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxTransform_SphinxTransform.config.return.self_env_config", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 68, "span_ids": ["SphinxTransform.env", "SphinxTransform.app", "SphinxTransform", "SphinxTransform.config"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxTransform(Transform):\n \"\"\"A base class of Transforms.\n\n Compared with ``docutils.transforms.Transform``, this class improves accessibility to\n Sphinx APIs.\n \"\"\"\n\n @property\n def app(self) -> \"Sphinx\":\n \"\"\"Reference to the :class:`.Sphinx` object.\"\"\"\n return self.env.app\n\n @property\n def env(self) -> \"BuildEnvironment\":\n \"\"\"Reference to the :class:`.BuildEnvironment` object.\"\"\"\n return self.document.settings.env\n\n @property\n def config(self) -> Config:\n \"\"\"Reference to the :class:`.Config` object.\"\"\"\n return self.env.config", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxTransformer_SphinxTransformer.apply_transforms.if_isinstance_self_docume.else_.try_.finally_.self.document.self_document_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxTransformer_SphinxTransformer.apply_transforms.if_isinstance_self_docume.else_.try_.finally_.self.document.self_document_0_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 63, "end_line": 90, "span_ids": ["SphinxTransformer", "SphinxTransformer.apply_transforms", "SphinxTransformer.set_environment"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxTransformer(Transformer):\n \"\"\"\n A transformer for Sphinx.\n \"\"\"\n\n document: nodes.document\n env: Optional[\"BuildEnvironment\"] = None\n\n def set_environment(self, env: \"BuildEnvironment\") -> None:\n self.env = env\n\n def apply_transforms(self) -> None:\n if isinstance(self.document, nodes.document):\n if not hasattr(self.document.settings, 'env') and self.env:\n self.document.settings.env = self.env\n\n super().apply_transforms()\n else:\n # wrap the target node by document node during transforming\n try:\n document = new_document('')\n if self.env:\n document.settings.env = self.env\n document += self.document\n self.document = document\n super().apply_transforms()\n finally:\n self.document = self.document[0]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_DefaultSubstitutions_DefaultSubstitutions.apply.for_ref_in_self_document_.if_refname_in_to_handle_.ref_replace_self_nodes_Te": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_DefaultSubstitutions_DefaultSubstitutions.apply.for_ref_in_self_document_.if_refname_in_to_handle_.ref_replace_self_nodes_Te", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 93, "end_line": 111, "span_ids": ["DefaultSubstitutions", "DefaultSubstitutions.apply"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultSubstitutions(SphinxTransform):\n \"\"\"\n Replace some substitutions if they aren't defined in the document.\n \"\"\"\n # run before the default Substitutions\n default_priority = 210\n\n def apply(self, **kwargs: Any) -> None:\n # only handle those not otherwise defined in the document\n to_handle = default_substitutions - set(self.document.substitution_defs)\n for ref in self.document.findall(nodes.substitution_reference):\n refname = ref['refname']\n if refname in to_handle:\n text = self.config[refname]\n if refname == 'today' and not text:\n # special handling: can also specify a strftime format\n text = format_date(self.config.today_fmt or _('%b %d, %Y'),\n language=self.config.language)\n ref.replace_self(nodes.Text(text, text))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_HandleCodeBlocks_HandleCodeBlocks.apply._del_node_parent_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_HandleCodeBlocks_HandleCodeBlocks.apply._del_node_parent_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 135, "end_line": 156, "span_ids": ["HandleCodeBlocks.apply", "HandleCodeBlocks"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HandleCodeBlocks(SphinxTransform):\n \"\"\"\n Several code block related transformations.\n \"\"\"\n default_priority = 210\n\n def apply(self, **kwargs: Any) -> None:\n # move doctest blocks out of blockquotes\n for node in self.document.findall(nodes.block_quote):\n if all(isinstance(child, nodes.doctest_block) for child\n in node.children):\n node.replace_self(node.children)\n # combine successive doctest blocks\n # for node in self.document.findall(nodes.doctest_block):\n # if node not in node.parent.children:\n # continue\n # parindex = node.parent.index(node)\n # while len(node.parent) > parindex+1 and \\\n # isinstance(node.parent[parindex+1], nodes.doctest_block):\n # node[0] = nodes.Text(node[0] + '\\n\\n' +\n # node.parent[parindex+1][0])\n # del node.parent[parindex+1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_AutoNumbering_AutoNumbering.apply.for_node_in_self_document.if_domain_is_enumerable_.self_document_note_implic": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_AutoNumbering_AutoNumbering.apply.for_node_in_self_document.if_domain_is_enumerable_.self_document_note_implic", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 159, "end_line": 172, "span_ids": ["AutoNumbering", "AutoNumbering.apply"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AutoNumbering(SphinxTransform):\n \"\"\"\n Register IDs of tables, figures and literal_blocks to assign numbers.\n \"\"\"\n default_priority = 210\n\n def apply(self, **kwargs: Any) -> None:\n domain: StandardDomain = self.env.get_domain('std')\n\n for node in self.document.findall(nodes.Element):\n if (domain.is_enumerable_node(node) and\n domain.get_numfig_title(node) is not None and\n node['ids'] == []):\n self.document.note_implicit_target(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SortIds_ApplySourceWorkaround.apply.for_node_in_self_document.if_isinstance_node_node.apply_source_workaround_n": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SortIds_ApplySourceWorkaround.apply.for_node_in_self_document.if_isinstance_node_node.apply_source_workaround_n", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 175, "end_line": 205, "span_ids": ["SortIds.apply", "ApplySourceWorkaround.apply", "impl:6", "SortIds", "ApplySourceWorkaround"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SortIds(SphinxTransform):\n \"\"\"\n Sort section IDs so that the \"id[0-9]+\" one comes last.\n \"\"\"\n default_priority = 261\n\n def apply(self, **kwargs: Any) -> None:\n for node in self.document.findall(nodes.section):\n if len(node['ids']) > 1 and node['ids'][0].startswith('id'):\n node['ids'] = node['ids'][1:] + [node['ids'][0]]\n\n\nTRANSLATABLE_NODES = {\n 'literal-block': nodes.literal_block,\n 'doctest-block': nodes.doctest_block,\n 'raw': nodes.raw,\n 'index': addnodes.index,\n 'image': nodes.image,\n}\n\n\nclass ApplySourceWorkaround(SphinxTransform):\n \"\"\"\n Update source and rawsource attributes\n \"\"\"\n default_priority = 10\n\n def apply(self, **kwargs: Any) -> None:\n for node in self.document.findall(): # type: Node\n if isinstance(node, (nodes.TextElement, nodes.image, nodes.topic)):\n apply_source_workaround(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_AutoIndexUpgrader_AutoIndexUpgrader.apply.for_node_in_self_document.if_entries_in_node_and_.for_i_entry_in_enumerate.if_len_entry_4_.node_entries_i_entr": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_AutoIndexUpgrader_AutoIndexUpgrader.apply.for_node_in_self_document.if_entries_in_node_and_.for_i_entry_in_enumerate.if_len_entry_4_.node_entries_i_entr", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 208, "end_line": 222, "span_ids": ["AutoIndexUpgrader.apply", "AutoIndexUpgrader"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AutoIndexUpgrader(SphinxTransform):\n \"\"\"\n Detect old style (4 column based indices) and automatically upgrade to new style.\n \"\"\"\n default_priority = 210\n\n def apply(self, **kwargs: Any) -> None:\n for node in self.document.findall(addnodes.index):\n if 'entries' in node and any(len(entry) == 4 for entry in node['entries']):\n msg = __('4 column based index found. '\n 'It might be a bug of extensions you use: %r') % node['entries']\n logger.warning(msg, location=node)\n for i, entry in enumerate(node['entries']):\n if len(entry) == 4:\n node['entries'][i] = entry + (None,)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_ExtraTranslatableNodes_ExtraTranslatableNodes.apply.for_node_in_self_document.node_translatable_Tr": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_ExtraTranslatableNodes_ExtraTranslatableNodes.apply.for_node_in_self_document.node_translatable_Tr", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 225, "end_line": 241, "span_ids": ["ExtraTranslatableNodes.apply", "ExtraTranslatableNodes"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExtraTranslatableNodes(SphinxTransform):\n \"\"\"\n Make nodes translatable\n \"\"\"\n default_priority = 10\n\n def apply(self, **kwargs: Any) -> None:\n targets = self.config.gettext_additional_targets\n target_nodes = [v for k, v in TRANSLATABLE_NODES.items() if k in targets]\n if not target_nodes:\n return\n\n def is_translatable_node(node: Node) -> bool:\n return isinstance(node, tuple(target_nodes))\n\n for node in self.document.findall(is_translatable_node): # type: Element\n node['translatable'] = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_UnreferencedFootnotesDetector_UnreferencedFootnotesDetector.apply.None_1.if_not_any_ref_auto_.logger_warning____Footno": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_UnreferencedFootnotesDetector_UnreferencedFootnotesDetector.apply.None_1.if_not_any_ref_auto_.logger_warning____Footno", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 244, "end_line": 264, "span_ids": ["UnreferencedFootnotesDetector.apply", "UnreferencedFootnotesDetector"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class UnreferencedFootnotesDetector(SphinxTransform):\n \"\"\"\n Detect unreferenced footnotes and emit warnings\n \"\"\"\n default_priority = 200\n\n def apply(self, **kwargs: Any) -> None:\n for node in self.document.footnotes:\n if node['names'] == []:\n # footnote having duplicated number. It is already warned at parser.\n pass\n elif node['names'][0] not in self.document.footnote_refs:\n logger.warning(__('Footnote [%s] is not referenced.'), node['names'][0],\n type='ref', subtype='footnote',\n location=node)\n\n for node in self.document.autofootnotes:\n if not any(ref['auto'] == node['auto'] for ref in self.document.autofootnote_refs):\n logger.warning(__('Footnote [#] is not referenced.'),\n type='ref', subtype='footnote',\n location=node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxSmartQuotes_SphinxSmartQuotes.is_available.for_tag_in_normalize_lang.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxSmartQuotes_SphinxSmartQuotes.is_available.for_tag_in_normalize_lang.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 319, "end_line": 359, "span_ids": ["SphinxSmartQuotes.apply", "SphinxSmartQuotes", "SphinxSmartQuotes.is_available"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxSmartQuotes(SmartQuotes, SphinxTransform):\n \"\"\"\n Customized SmartQuotes to avoid transform for some extra node types.\n\n refs: sphinx.parsers.RSTParser\n \"\"\"\n default_priority = 750\n\n def apply(self, **kwargs: Any) -> None:\n if not self.is_available():\n return\n\n # override default settings with :confval:`smartquotes_action`\n self.smartquotes_action = self.config.smartquotes_action\n\n super().apply()\n\n def is_available(self) -> bool:\n builders = self.config.smartquotes_excludes.get('builders', [])\n languages = self.config.smartquotes_excludes.get('languages', [])\n\n if self.document.settings.smart_quotes is False:\n # disabled by 3rd party extension (workaround)\n return False\n elif self.config.smartquotes is False:\n # disabled by confval smartquotes\n return False\n elif self.app.builder.name in builders:\n # disabled by confval smartquotes_excludes['builders']\n return False\n elif self.config.language in languages:\n # disabled by confval smartquotes_excludes['languages']\n return False\n\n # confirm selected language supports smart_quotes or not\n language = self.env.settings['language_code']\n for tag in normalize_language_tag(language):\n if tag in smartchars.quotes:\n return True\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxSmartQuotes.get_tokens_SphinxSmartQuotes.get_tokens.for_txtnode_in_txtnodes_.if_is_smartquotable_txtno.else_.yield_literal_txtnode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_SphinxSmartQuotes.get_tokens_SphinxSmartQuotes.get_tokens.for_txtnode_in_txtnodes_.if_is_smartquotable_txtno.else_.yield_literal_txtnode", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 361, "end_line": 375, "span_ids": ["SphinxSmartQuotes.get_tokens"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxSmartQuotes(SmartQuotes, SphinxTransform):\n\n def get_tokens(self, txtnodes: List[Text]) -> Generator[Tuple[str, str], None, None]:\n # A generator that yields ``(texttype, nodetext)`` tuples for a list\n # of \"Text\" nodes (interface to ``smartquotes.educate_tokens()``).\n for txtnode in txtnodes:\n if is_smartquotable(txtnode):\n if docutils.__version_info__ >= (0, 16):\n # SmartQuotes uses backslash escapes instead of null-escapes\n text = re.sub(r'(?<=\\x00)([-\\\\\\'\".`])', r'\\\\\\1', str(txtnode))\n else:\n text = txtnode.astext()\n\n yield ('plain', text)\n else:\n # skip smart quotes\n yield ('literal', txtnode.astext())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_DoctreeReadEvent_ManpageLink.apply.for_node_in_self_document.node_attributes_update_in": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_DoctreeReadEvent_ManpageLink.apply.for_node_in_self_document.node_attributes_update_in", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 375, "end_line": 398, "span_ids": ["DoctreeReadEvent", "DoctreeReadEvent.apply", "ManpageLink.apply", "ManpageLink"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DoctreeReadEvent(SphinxTransform):\n \"\"\"Emit :event:`doctree-read` event.\"\"\"\n default_priority = 880\n\n def apply(self, **kwargs: Any) -> None:\n self.app.emit('doctree-read', self.document)\n\n\nclass ManpageLink(SphinxTransform):\n \"\"\"Find manpage section numbers and names\"\"\"\n default_priority = 999\n\n def apply(self, **kwargs: Any) -> None:\n for node in self.document.findall(addnodes.manpage):\n manpage = ' '.join([str(x) for x in node.children\n if isinstance(x, nodes.Text)])\n pattern = r'^(?P<path>(?P<page>.+)[\\(\\.](?P<section>[1-9]\\w*)?\\)?)$' # noqa\n info = {'path': manpage,\n 'page': manpage,\n 'section': ''}\n r = re.match(pattern, manpage)\n if r:\n info = r.groupdict()\n node.attributes.update(info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/compact_bullet_list.py_RefOnlyBulletListTransform_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/compact_bullet_list.py_RefOnlyBulletListTransform_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/compact_bullet_list.py", "file_name": "compact_bullet_list.py", "file_type": "text/x-python", "category": "implementation", "start_line": 47, "end_line": 87, "span_ids": ["RefOnlyBulletListTransform", "RefOnlyBulletListTransform.apply", "setup"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RefOnlyBulletListTransform(SphinxTransform):\n \"\"\"Change refonly bullet lists to use compact_paragraphs.\n\n Specifically implemented for 'Indices and Tables' section, which looks\n odd when html_compact_lists is false.\n \"\"\"\n default_priority = 100\n\n def apply(self, **kwargs: Any) -> None:\n if self.config.html_compact_lists:\n return\n\n def check_refonly_list(node: Node) -> bool:\n \"\"\"Check for list with only references in it.\"\"\"\n visitor = RefOnlyListChecker(self.document)\n try:\n node.walk(visitor)\n except nodes.NodeFound:\n return False\n else:\n return True\n\n for node in self.document.findall(nodes.bullet_list):\n if check_refonly_list(node):\n for item in node.findall(nodes.list_item):\n para = cast(nodes.paragraph, item[0])\n ref = cast(nodes.reference, para[0])\n compact_para = addnodes.compact_paragraph()\n compact_para += ref\n item.replace(para, compact_para)\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_transform(RefOnlyBulletListTransform)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_publish_msgstr_publish_msgstr.try_.finally_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_publish_msgstr_publish_msgstr.try_.finally_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/transforms/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 78, "span_ids": ["publish_msgstr"], "tokens": 323}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def publish_msgstr(app: \"Sphinx\", source: str, source_path: str, source_line: int,\n config: Config, settings: Any) -> Element:\n \"\"\"Publish msgstr (single line) into docutils document\n\n :param sphinx.application.Sphinx app: sphinx application\n :param str source: source text\n :param str source_path: source path for warning indication\n :param source_line: source line for warning indication\n :param sphinx.config.Config config: sphinx config\n :param docutils.frontend.Values settings: docutils settings\n :return: document\n :rtype: docutils.nodes.document\n \"\"\"\n try:\n # clear rst_prolog temporarily\n rst_prolog = config.rst_prolog\n config.rst_prolog = None # type: ignore\n\n from sphinx.io import SphinxI18nReader\n reader = SphinxI18nReader()\n reader.setup(app)\n filetype = get_filetype(config.source_suffix, source_path)\n parser = app.registry.create_source_parser(app, filetype)\n doc = reader.read(\n source=StringInput(source=source,\n source_path=\"%s:%s:<translated>\" % (source_path, source_line)),\n parser=parser,\n settings=settings,\n )\n try:\n doc = doc[0] # type: ignore\n except IndexError: # empty node\n pass\n return doc\n finally:\n config.rst_prolog = rst_prolog # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.if_index_in_self_config_Locale.apply.for_translated_in_self_do.translated_delattr_trans": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.if_index_in_self_config_Locale.apply.for_translated_in_self_do.translated_delattr_trans", "embedding": null, "metadata": {"file_path": "sphinx/transforms/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 475, "end_line": 495, "span_ids": ["Locale.apply"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Locale(SphinxTransform):\n\n def apply(self, **kwargs: Any) -> None:\n # ... other code\n\n if 'index' in self.config.gettext_additional_targets:\n # Extract and translate messages for index entries.\n for node, entries in traverse_translatable_index(self.document):\n new_entries: List[Tuple[str, str, str, str, str]] = []\n for type, msg, tid, main, _key in entries:\n msg_parts = split_index_msg(type, msg)\n msgstr_parts = []\n for part in msg_parts:\n msgstr = catalog.gettext(part)\n if not msgstr:\n msgstr = part\n msgstr_parts.append(msgstr)\n\n new_entries.append((type, ';'.join(msgstr_parts), tid, main, None))\n\n node['raw_entries'] = entries\n node['entries'] = new_entries\n\n # remove translated attribute that is used for avoiding double translation.\n for translated in self.document.findall(NodeMatcher(translated=Any)): # type: Element # NOQA\n translated.delattr('translated')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_RemoveTranslatableInline_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_RemoveTranslatableInline_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 498, "end_line": 525, "span_ids": ["RemoveTranslatableInline", "RemoveTranslatableInline.apply", "setup"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RemoveTranslatableInline(SphinxTransform):\n \"\"\"\n Remove inline nodes used for translation as placeholders.\n \"\"\"\n default_priority = 999\n\n def apply(self, **kwargs: Any) -> None:\n from sphinx.builders.gettext import MessageCatalogBuilder\n if isinstance(self.app.builder, MessageCatalogBuilder):\n return\n\n matcher = NodeMatcher(nodes.inline, translatable=Any)\n for inline in list(self.document.findall(matcher)): # type: nodes.inline\n inline.parent.remove(inline)\n inline.parent += inline.children\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_transform(PreserveTranslatableMessages)\n app.add_transform(Locale)\n app.add_transform(RemoveTranslatableInline)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_SphinxPostTransform_SphinxPostTransform.run.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_SphinxPostTransform_SphinxPostTransform.run.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 23, "end_line": 51, "span_ids": ["SphinxPostTransform", "SphinxPostTransform.apply", "SphinxPostTransform.run", "SphinxPostTransform.is_supported"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxPostTransform(SphinxTransform):\n \"\"\"A base class of post-transforms.\n\n Post transforms are invoked to modify the document to restructure it for outputting.\n They resolve references, convert images, do special transformation for each output\n formats and so on. This class helps to implement these post transforms.\n \"\"\"\n builders: Tuple[str, ...] = ()\n formats: Tuple[str, ...] = ()\n\n def apply(self, **kwargs: Any) -> None:\n if self.is_supported():\n self.run(**kwargs)\n\n def is_supported(self) -> bool:\n \"\"\"Check this transform working for current builder.\"\"\"\n if self.builders and self.app.builder.name not in self.builders:\n return False\n if self.formats and self.app.builder.format not in self.formats:\n return False\n\n return True\n\n def run(self, **kwargs: Any) -> None:\n \"\"\"Main method of post transforms.\n\n Subclasses should override this method instead of ``apply()``.\n \"\"\"\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_ReferencesResolver_ReferencesResolver.run.for_node_in_self_document.node_replace_self_newnode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_ReferencesResolver_ReferencesResolver.run.for_node_in_self_document.node_replace_self_newnode", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 54, "end_line": 113, "span_ids": ["ReferencesResolver", "ReferencesResolver.run"], "tokens": 495}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReferencesResolver(SphinxPostTransform):\n \"\"\"\n Resolves cross-references on doctrees.\n \"\"\"\n\n default_priority = 10\n\n def run(self, **kwargs: Any) -> None:\n for node in self.document.findall(addnodes.pending_xref):\n content = self.find_pending_xref_condition(node, (\"resolved\", \"*\"))\n if content:\n contnode = cast(Element, content[0].deepcopy())\n else:\n contnode = cast(Element, node[0].deepcopy())\n\n newnode = None\n\n typ = node['reftype']\n target = node['reftarget']\n node.setdefault('refdoc', self.env.docname)\n refdoc = node.get('refdoc')\n domain = None\n\n try:\n if 'refdomain' in node and node['refdomain']:\n # let the domain try to resolve the reference\n try:\n domain = self.env.domains[node['refdomain']]\n except KeyError as exc:\n raise NoUri(target, typ) from exc\n newnode = domain.resolve_xref(self.env, refdoc, self.app.builder,\n typ, target, node, contnode)\n # really hardwired reference types\n elif typ == 'any':\n newnode = self.resolve_anyref(refdoc, node, contnode)\n # no new node found? try the missing-reference event\n if newnode is None:\n newnode = self.app.emit_firstresult('missing-reference', self.env,\n node, contnode,\n allowed_exceptions=(NoUri,))\n # still not found? warn if node wishes to be warned about or\n # we are in nit-picky mode\n if newnode is None:\n self.warn_missing_reference(refdoc, typ, target, node, domain)\n except NoUri:\n newnode = None\n\n if newnode:\n newnodes: List[Node] = [newnode]\n else:\n newnodes = [contnode]\n if newnode is None and isinstance(node[0], addnodes.pending_xref_condition):\n matched = self.find_pending_xref_condition(node, (\"*\",))\n if matched:\n newnodes = matched\n else:\n logger.warning(__('Could not determine the fallback text for the '\n 'cross-reference. Might be a bug.'), location=node)\n\n node.replace_self(newnodes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_ReferencesResolver.resolve_anyref_ReferencesResolver.resolve_anyref.return.newnode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_ReferencesResolver.resolve_anyref_ReferencesResolver.resolve_anyref.return.newnode", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 115, "end_line": 162, "span_ids": ["ReferencesResolver.resolve_anyref"], "tokens": 573}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReferencesResolver(SphinxPostTransform):\n\n def resolve_anyref(self, refdoc: str, node: pending_xref, contnode: Element) -> Element:\n \"\"\"Resolve reference generated by the \"any\" role.\"\"\"\n stddomain = self.env.get_domain('std')\n target = node['reftarget']\n results: List[Tuple[str, Element]] = []\n # first, try resolving as :doc:\n doc_ref = stddomain.resolve_xref(self.env, refdoc, self.app.builder,\n 'doc', target, node, contnode)\n if doc_ref:\n results.append(('doc', doc_ref))\n # next, do the standard domain (makes this a priority)\n results.extend(stddomain.resolve_any_xref(self.env, refdoc, self.app.builder,\n target, node, contnode))\n for domain in self.env.domains.values():\n if domain.name == 'std':\n continue # we did this one already\n try:\n results.extend(domain.resolve_any_xref(self.env, refdoc, self.app.builder,\n target, node, contnode))\n except NotImplementedError:\n # the domain doesn't yet support the new interface\n # we have to manually collect possible references (SLOW)\n for role in domain.roles:\n res = domain.resolve_xref(self.env, refdoc, self.app.builder,\n role, target, node, contnode)\n if res and len(res) > 0 and isinstance(res[0], nodes.Element):\n results.append(('%s:%s' % (domain.name, role), res))\n # now, see how many matches we got...\n if not results:\n return None\n if len(results) > 1:\n def stringify(name: str, node: Element) -> str:\n reftitle = node.get('reftitle', node.astext())\n return ':%s:`%s`' % (name, reftitle)\n candidates = ' or '.join(stringify(name, role) for name, role in results)\n logger.warning(__('more than one target found for \\'any\\' cross-'\n 'reference %r: could be %s'), target, candidates,\n location=node)\n res_role, newnode = results[0]\n # Override \"any\" class with the actual role type to get the styling\n # approximately correct.\n res_domain = res_role.split(':')[0]\n if (len(newnode) > 0 and\n isinstance(newnode[0], nodes.Element) and\n newnode[0].get('classes')):\n newnode[0]['classes'].append(res_domain)\n newnode[0]['classes'].append(res_role.replace(':', '-'))\n return newnode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_OnlyNodeTransform_OnlyNodeTransform.run.process_only_nodes_self_d": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_OnlyNodeTransform_OnlyNodeTransform.run.process_only_nodes_self_d", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 180, "end_line": 188, "span_ids": ["OnlyNodeTransform", "OnlyNodeTransform.run"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class OnlyNodeTransform(SphinxPostTransform):\n default_priority = 50\n\n def run(self, **kwargs: Any) -> None:\n # A comment on the comment() nodes being inserted: replacing by [] would\n # result in a \"Losing ids\" exception if there is a target node before\n # the only node, so we make sure docutils can transfer the id to\n # something, even if it's just a comment and will lose the id anyway...\n process_only_nodes(self.document, self.app.builder.tags)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py_HighlightLanguageVisitor_HighlightLanguageVisitor.visit_literal_block.if_linenos_not_in_node_.node_linenos_lines_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py_HighlightLanguageVisitor_HighlightLanguageVisitor.visit_literal_block.if_linenos_not_in_node_.node_linenos_lines_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 77, "span_ids": ["HighlightLanguageVisitor.depart_document", "HighlightLanguageVisitor", "HighlightLanguageVisitor.visit_start_of_file", "HighlightLanguageVisitor.visit_highlightlang", "HighlightLanguageVisitor.visit_literal_block", "HighlightLanguageVisitor.visit_document", "HighlightLanguageVisitor.unknown_departure", "HighlightLanguageVisitor.unknown_visit", "HighlightLanguageVisitor.depart_start_of_file"], "tokens": 310}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HighlightLanguageVisitor(nodes.NodeVisitor):\n def __init__(self, document: nodes.document, default_language: str) -> None:\n self.default_setting = HighlightSetting(default_language, False, sys.maxsize)\n self.settings: List[HighlightSetting] = []\n super().__init__(document)\n\n def unknown_visit(self, node: Node) -> None:\n pass\n\n def unknown_departure(self, node: Node) -> None:\n pass\n\n def visit_document(self, node: Node) -> None:\n self.settings.append(self.default_setting)\n\n def depart_document(self, node: Node) -> None:\n self.settings.pop()\n\n def visit_start_of_file(self, node: Node) -> None:\n self.settings.append(self.default_setting)\n\n def depart_start_of_file(self, node: Node) -> None:\n self.settings.pop()\n\n def visit_highlightlang(self, node: addnodes.highlightlang) -> None:\n self.settings[-1] = HighlightSetting(node['lang'],\n node['force'],\n node['linenothreshold'])\n\n def visit_literal_block(self, node: nodes.literal_block) -> None:\n setting = self.settings[-1]\n if 'language' not in node:\n node['language'] = setting.language\n node['force'] = setting.force\n if 'linenos' not in node:\n lines = node.astext().count('\\n')\n node['linenos'] = (lines >= setting.lineno_threshold - 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py_TrimDoctestFlagsTransform_TrimDoctestFlagsTransform.strip_doctest_flags.node_nodes_Text_sou": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py_TrimDoctestFlagsTransform_TrimDoctestFlagsTransform.strip_doctest_flags.node_nodes_Text_sou", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 104, "span_ids": ["TrimDoctestFlagsTransform.strip_doctest_flags", "TrimDoctestFlagsTransform.apply", "TrimDoctestFlagsTransform"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TrimDoctestFlagsTransform(SphinxTransform):\n \"\"\"\n Trim doctest flags like ``# doctest: +FLAG`` from python code-blocks.\n\n see :confval:`trim_doctest_flags` for more information.\n \"\"\"\n default_priority = HighlightLanguageTransform.default_priority + 1\n\n def apply(self, **kwargs: Any) -> None:\n for lbnode in self.document.findall(nodes.literal_block):\n if self.is_pyconsole(lbnode):\n self.strip_doctest_flags(lbnode)\n\n for dbnode in self.document.findall(nodes.doctest_block):\n self.strip_doctest_flags(dbnode)\n\n def strip_doctest_flags(self, node: TextElement) -> None:\n if not node.get('trim_flags', self.config.trim_doctest_flags):\n return\n\n source = node.rawsource\n source = doctest.blankline_re.sub('', source)\n source = doctest.doctestopt_re.sub('', source)\n node.rawsource = source\n node[:] = [nodes.Text(source)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py_TrimDoctestFlagsTransform.is_pyconsole_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py_TrimDoctestFlagsTransform.is_pyconsole_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 114, "end_line": 143, "span_ids": ["TrimDoctestFlagsTransform.is_pyconsole", "setup"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TrimDoctestFlagsTransform(SphinxTransform):\n\n @staticmethod\n def is_pyconsole(node: nodes.literal_block) -> bool:\n if node.rawsource != node.astext():\n return False # skip parsed-literal node\n\n language = node.get('language')\n if language in ('pycon', 'pycon3'):\n return True\n elif language in ('py', 'py3', 'python', 'python3', 'default'):\n return node.rawsource.startswith('>>>')\n elif language == 'guess':\n try:\n lexer = guess_lexer(node.rawsource)\n return isinstance(lexer, PythonConsoleLexer)\n except Exception:\n pass\n\n return False\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_post_transform(HighlightLanguageTransform)\n app.add_post_transform(TrimDoctestFlagsTransform)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageDownloader_ImageDownloader.handle.try_.except_Exception_as_exc_.logger_warning____Could_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageDownloader_ImageDownloader.handle.try_.except_Exception_as_exc_.logger_warning____Could_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/images.py", "file_name": "images.py", "file_type": "text/x-python", "category": "implementation", "start_line": 40, "end_line": 103, "span_ids": ["ImageDownloader.match", "ImageDownloader.handle", "ImageDownloader"], "tokens": 589}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ImageDownloader(BaseImageConverter):\n default_priority = 100\n\n def match(self, node: nodes.image) -> bool:\n if self.app.builder.supported_image_types == []:\n return False\n elif self.app.builder.supported_remote_images:\n return False\n else:\n return '://' in node['uri']\n\n def handle(self, node: nodes.image) -> None:\n try:\n basename = os.path.basename(node['uri'])\n if '?' in basename:\n basename = basename.split('?')[0]\n if basename == '' or len(basename) > MAX_FILENAME_LEN:\n filename, ext = os.path.splitext(node['uri'])\n basename = sha1(filename.encode()).hexdigest() + ext\n basename = re.sub(CRITICAL_PATH_CHAR_RE, \"_\", basename)\n\n dirname = node['uri'].replace('://', '/').translate({ord(\"?\"): \"/\",\n ord(\"&\"): \"/\"})\n if len(dirname) > MAX_FILENAME_LEN:\n dirname = sha1(dirname.encode()).hexdigest()\n ensuredir(os.path.join(self.imagedir, dirname))\n path = os.path.join(self.imagedir, dirname, basename)\n\n headers = {}\n if os.path.exists(path):\n timestamp: float = ceil(os.stat(path).st_mtime)\n headers['If-Modified-Since'] = epoch_to_rfc1123(timestamp)\n\n r = requests.get(node['uri'], headers=headers)\n if r.status_code >= 400:\n logger.warning(__('Could not fetch remote image: %s [%d]') %\n (node['uri'], r.status_code))\n else:\n self.app.env.original_image_uri[path] = node['uri']\n\n if r.status_code == 200:\n with open(path, 'wb') as f:\n f.write(r.content)\n\n last_modified = r.headers.get('last-modified')\n if last_modified:\n timestamp = rfc1123_to_epoch(last_modified)\n os.utime(path, (timestamp, timestamp))\n\n mimetype = guess_mimetype(path, default='*')\n if mimetype != '*' and os.path.splitext(basename)[1] == '':\n # append a suffix if URI does not contain suffix\n ext = get_image_extension(mimetype)\n newpath = os.path.join(self.imagedir, dirname, basename + ext)\n os.replace(path, newpath)\n self.app.env.original_image_uri.pop(path)\n self.app.env.original_image_uri[newpath] = node['uri']\n path = newpath\n node['candidates'].pop('?')\n node['candidates'][mimetype] = path\n node['uri'] = path\n self.app.env.images.add_file(self.env.docname, path)\n except Exception as exc:\n logger.warning(__('Could not fetch remote image: %s [%s]') % (node['uri'], exc))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_DataURIExtractor_get_filename_for.return.os_path_splitext_basename": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_DataURIExtractor_get_filename_for.return.os_path_splitext_basename", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/images.py", "file_name": "images.py", "file_type": "text/x-python", "category": "implementation", "start_line": 116, "end_line": 152, "span_ids": ["get_filename_for", "DataURIExtractor.match", "DataURIExtractor", "DataURIExtractor.handle"], "tokens": 312}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DataURIExtractor(BaseImageConverter):\n default_priority = 150\n\n def match(self, node: nodes.image) -> bool:\n if self.app.builder.supported_remote_images == []:\n return False\n elif self.app.builder.supported_data_uri_images is True:\n return False\n else:\n return node['uri'].startswith('data:')\n\n def handle(self, node: nodes.image) -> None:\n image = parse_data_uri(node['uri'])\n ext = get_image_extension(image.mimetype)\n if ext is None:\n logger.warning(__('Unknown image format: %s...'), node['uri'][:32],\n location=node)\n return\n\n ensuredir(os.path.join(self.imagedir, 'embeded'))\n digest = sha1(image.data).hexdigest()\n path = os.path.join(self.imagedir, 'embeded', digest + ext)\n self.app.env.original_image_uri[path] = node['uri']\n\n with open(path, 'wb') as f:\n f.write(image.data)\n\n node['candidates'].pop('?')\n node['candidates'][image.mimetype] = path\n node['uri'] = path\n self.app.env.images.add_file(self.env.docname, path)\n\n\ndef get_filename_for(filename: str, mimetype: str) -> str:\n basename = os.path.basename(filename)\n basename = re.sub(CRITICAL_PATH_CHAR_RE, \"_\", basename)\n return os.path.splitext(basename)[0] + get_image_extension(mimetype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter.handle_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter.handle_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/images.py", "file_name": "images.py", "file_type": "text/x-python", "category": "implementation", "start_line": 231, "end_line": 272, "span_ids": ["ImageConverter.handle", "ImageConverter.convert", "setup"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ImageConverter(BaseImageConverter):\n\n def handle(self, node: nodes.image) -> None:\n _from, _to = self.get_conversion_rule(node)\n\n if _from in node['candidates']:\n srcpath = node['candidates'][_from]\n else:\n srcpath = node['candidates']['*']\n\n filename = get_filename_for(srcpath, _to)\n ensuredir(self.imagedir)\n destpath = os.path.join(self.imagedir, filename)\n\n abs_srcpath = os.path.join(self.app.srcdir, srcpath)\n if self.convert(abs_srcpath, destpath):\n if '*' in node['candidates']:\n node['candidates']['*'] = destpath\n else:\n node['candidates'][_to] = destpath\n node['uri'] = destpath\n\n self.env.original_image_uri[destpath] = srcpath\n self.env.images.add_file(self.env.docname, destpath)\n\n def convert(self, _from: str, _to: str) -> bool:\n \"\"\"Convert an image file to the expected format.\n\n *_from* is a path of the source image file, and *_to* is a path\n of the destination file.\n \"\"\"\n raise NotImplementedError()\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_post_transform(ImageDownloader)\n app.add_post_transform(DataURIExtractor)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_FilenameUniqDict.purge_doc_FilenameUniqDict.__setstate__.self._existing.state": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_FilenameUniqDict.purge_doc_FilenameUniqDict.__setstate__.self._existing.state", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 133, "span_ids": ["FilenameUniqDict.__getstate__", "FilenameUniqDict.__setstate__", "FilenameUniqDict.merge_other", "FilenameUniqDict.purge_doc"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FilenameUniqDict(dict):\n\n def purge_doc(self, docname: str) -> None:\n for filename, (docs, unique) in list(self.items()):\n docs.discard(docname)\n if not docs:\n del self[filename]\n self._existing.discard(unique)\n\n def merge_other(self, docnames: Set[str], other: Dict[str, Tuple[Set[str], Any]]) -> None:\n for filename, (docs, _unique) in other.items():\n for doc in docs & set(docnames):\n self.add_file(doc, filename)\n\n def __getstate__(self) -> Set[str]:\n return self._existing\n\n def __setstate__(self, state: Set[str]) -> None:\n self._existing = state", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_md5_sha1.try_.except_ValueError_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_md5_sha1.try_.except_ValueError_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 136, "end_line": 163, "span_ids": ["sha1", "md5"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def md5(data=b'', **kwargs):\n \"\"\"Wrapper around hashlib.md5\n\n Attempt call with 'usedforsecurity=False' if we get a ValueError, which happens when\n OpenSSL FIPS mode is enabled:\n ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips\n\n See: https://github.com/sphinx-doc/sphinx/issues/7611\n \"\"\"\n\n try:\n return hashlib.md5(data, **kwargs)\n except ValueError:\n return hashlib.md5(data, **kwargs, usedforsecurity=False) # type: ignore\n\n\ndef sha1(data=b'', **kwargs):\n \"\"\"Wrapper around hashlib.sha1\n\n Attempt call with 'usedforsecurity=False' if we get a ValueError\n\n See: https://github.com/sphinx-doc/sphinx/issues/7611\n \"\"\"\n\n try:\n return hashlib.sha1(data, **kwargs)\n except ValueError:\n return hashlib.sha1(data, **kwargs, usedforsecurity=False) # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_DownloadFiles__DEBUG_HEADER._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_DownloadFiles__DEBUG_HEADER._", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 166, "end_line": 202, "span_ids": ["impl:8", "DownloadFiles.add_file", "DownloadFiles.merge_other", "DownloadFiles", "DownloadFiles.purge_doc"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DownloadFiles(dict):\n \"\"\"A special dictionary for download files.\n\n .. important:: This class would be refactored in nearly future.\n Hence don't hack this directly.\n \"\"\"\n\n def add_file(self, docname: str, filename: str) -> str:\n if filename not in self:\n digest = md5(filename.encode()).hexdigest()\n dest = '%s/%s' % (digest, os.path.basename(filename))\n self[filename] = (set(), dest)\n\n self[filename][0].add(docname)\n return self[filename][1]\n\n def purge_doc(self, docname: str) -> None:\n for filename, (docs, _dest) in list(self.items()):\n docs.discard(docname)\n if not docs:\n del self[filename]\n\n def merge_other(self, docnames: Set[str], other: Dict[str, Tuple[Set[str], Any]]) -> None:\n for filename, (docs, _dest) in other.items():\n for docname in docs & set(docnames):\n self.add_file(docname, filename)\n\n\n_DEBUG_HEADER = '''\\\n# Sphinx version: %s\n# Python version: %s (%s)\n# Docutils version: %s %s\n# Jinja2 version: %s\n# Last messages:\n%s\n# Loaded extensions:\n'''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_save_traceback_save_traceback.return.path": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_save_traceback_save_traceback.return.path", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 205, "end_line": 239, "span_ids": ["save_traceback"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def save_traceback(app: \"Sphinx\") -> str:\n \"\"\"Save the current exception's traceback in a temporary file.\"\"\"\n import platform\n\n import docutils\n import jinja2\n\n import sphinx\n exc = sys.exc_info()[1]\n if isinstance(exc, SphinxParallelError):\n exc_format = '(Error in parallel process)\\n' + exc.traceback\n else:\n exc_format = traceback.format_exc()\n fd, path = tempfile.mkstemp('.log', 'sphinx-err-')\n last_msgs = ''\n if app is not None:\n last_msgs = '\\n'.join(\n '# %s' % strip_colors(s).strip()\n for s in app.messagelog)\n os.write(fd, (_DEBUG_HEADER %\n (sphinx.__display_version__,\n platform.python_version(),\n platform.python_implementation(),\n docutils.__version__, docutils.__version_details__,\n jinja2.__version__,\n last_msgs)).encode())\n if app is not None:\n for ext in app.extensions.values():\n modfile = getattr(ext.module, '__file__', 'unknown')\n if ext.version != 'builtin':\n os.write(fd, ('# %s (%s) from %s\\n' %\n (ext.name, ext.version, modfile)).encode())\n os.write(fd, exc_format.encode())\n os.close(fd)\n return path", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_get_full_modname__coding_re.re_compile_r_coding_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_get_full_modname__coding_re.re_compile_r_coding_s", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 324, "end_line": 342, "span_ids": ["get_full_modname", "impl:10"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_full_modname(modname: str, attribute: str) -> str:\n if modname is None:\n # Prevents a TypeError: if the last getattr() call will return None\n # then it's better to return it directly\n return None\n module = import_module(modname)\n\n # Allow an attribute to have multiple parts and incidentally allow\n # repeated .s in the attribute.\n value = module\n for attr in attribute.split('.'):\n if attr:\n value = getattr(value, attr)\n\n return getattr(value, '__module__', None)\n\n\n# a regex to recognize coding cookies\n_coding_re = re.compile(r'coding[:=]\\s*([-\\w.]+)')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_UnicodeDecodeErrorHandler_UnicodeDecodeErrorHandler.__call__.return._error_end_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_UnicodeDecodeErrorHandler_UnicodeDecodeErrorHandler.__call__.return._error_end_", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 397, "end_line": 414, "span_ids": ["UnicodeDecodeErrorHandler", "UnicodeDecodeErrorHandler.__call__"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class UnicodeDecodeErrorHandler:\n \"\"\"Custom error handler for open() that warns and replaces.\"\"\"\n\n def __init__(self, docname: str) -> None:\n self.docname = docname\n\n def __call__(self, error: UnicodeDecodeError) -> Tuple[str, int]:\n linestart = error.object.rfind(b'\\n', 0, error.start)\n lineend = error.object.find(b'\\n', error.start)\n if lineend == -1:\n lineend = len(error.object)\n lineno = error.object.count(b'\\n', 0, error.start) + 1\n logger.warning(__('undecodable source characters, replacing with \"?\": %r'),\n (error.object[linestart + 1:error.start] + b'>>>' +\n error.object[error.start:error.end] + b'<<<' +\n error.object[error.end:lineend]),\n location=(self.docname, lineno))\n return ('?', error.end)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py__Low_level_utility_funct_Tee.flush.if_hasattr_self_stream2_.self_stream2_flush_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py__Low_level_utility_funct_Tee.flush.if_hasattr_self_stream2_.self_stream2_flush_", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 417, "end_line": 435, "span_ids": ["Tee", "Tee.write", "Tee.flush", "UnicodeDecodeErrorHandler.__call__"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Low-level utility functions and classes.\n\nclass Tee:\n \"\"\"\n File-like object writing to two streams.\n \"\"\"\n def __init__(self, stream1: IO, stream2: IO) -> None:\n self.stream1 = stream1\n self.stream2 = stream2\n\n def write(self, text: str) -> None:\n self.stream1.write(text)\n self.stream2.write(text)\n\n def flush(self) -> None:\n if hasattr(self.stream1, 'flush'):\n self.stream1.flush()\n if hasattr(self.stream2, 'flush'):\n self.stream2.flush()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_parselinenos_parselinenos.return.items": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_parselinenos_parselinenos.return.items", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 438, "end_line": 462, "span_ids": ["parselinenos"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parselinenos(spec: str, total: int) -> List[int]:\n \"\"\"Parse a line number spec (such as \"1,2,4-6\") and return a list of\n wanted line numbers.\n \"\"\"\n items = list()\n parts = spec.split(',')\n for part in parts:\n try:\n begend = part.strip().split('-')\n if ['', ''] == begend:\n raise ValueError\n elif len(begend) == 1:\n items.append(int(begend[0]) - 1)\n elif len(begend) == 2:\n start = int(begend[0] or 1) # left half open (cf. -10)\n end = int(begend[1] or max(start, total)) # right half open (cf. 10-)\n if start > end: # invalid range (cf. 10-1)\n raise ValueError\n items.extend(range(start - 1, end))\n else:\n raise ValueError\n except Exception as exc:\n raise ValueError('invalid line number spec: %r' % spec) from exc\n\n return items", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_split_full_qualified_name_split_full_qualified_name.return.name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_split_full_qualified_name_split_full_qualified_name.return.name_", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 393, "end_line": 420, "span_ids": ["split_full_qualified_name"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def split_full_qualified_name(name: str) -> Tuple[Optional[str], str]:\n \"\"\"Split full qualified name to a pair of modname and qualname.\n\n A qualname is an abbreviation for \"Qualified name\" introduced at PEP-3155\n (https://peps.python.org/pep-3155/). It is a dotted path name\n from the module top-level.\n\n A \"full\" qualified name means a string containing both module name and\n qualified name.\n\n .. note:: This function actually imports the module to check its existence.\n Therefore you need to mock 3rd party modules if needed before\n calling this function.\n \"\"\"\n parts = name.split('.')\n for i, _part in enumerate(parts, 1):\n try:\n modname = \".\".join(parts[:i])\n import_module(modname)\n except ImportError:\n if parts[:i - 1]:\n return \".\".join(parts[:i - 1]), \".\".join(parts[i - 1:])\n else:\n return None, \".\".join(parts)\n except IndexError:\n pass\n\n return name, \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_encode_uri_old_status_iterator.if_l_1_.logger_info_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_encode_uri_old_status_iterator.if_l_1_.logger_info_", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 423, "end_line": 459, "span_ids": ["isurl", "encode_uri", "old_status_iterator", "display_chunk"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def encode_uri(uri: str) -> str:\n split = list(urlsplit(uri))\n split[1] = split[1].encode('idna').decode('ascii')\n split[2] = quote_plus(split[2].encode(), '/')\n query = list((q, v.encode()) for (q, v) in parse_qsl(split[3]))\n split[3] = urlencode(query)\n return urlunsplit(split)\n\n\ndef isurl(url: str) -> bool:\n \"\"\"Check *url* is URL or not.\"\"\"\n if url and '://' in url:\n return True\n else:\n return False\n\n\ndef display_chunk(chunk: Any) -> str:\n if isinstance(chunk, (list, tuple)):\n if len(chunk) == 1:\n return str(chunk[0])\n return '%s .. %s' % (chunk[0], chunk[-1])\n return str(chunk)\n\n\ndef old_status_iterator(iterable: Iterable, summary: str, color: str = \"darkgreen\",\n stringify_func: Callable[[Any], str] = display_chunk) -> Iterator:\n l = 0\n for item in iterable:\n if l == 0:\n logger.info(bold(summary), nonl=True)\n l = 1\n logger.info(stringify_func(item), color=color, nonl=True)\n logger.info(\" \", nonl=True)\n yield item\n if l == 1:\n logger.info('')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py__new_version_with_progre_SkipProgressMessage.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py__new_version_with_progre_SkipProgressMessage.pass", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 660, "end_line": 683, "span_ids": ["SkipProgressMessage", "status_iterator", "old_status_iterator"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# new version with progress info\ndef status_iterator(iterable: Iterable, summary: str, color: str = \"darkgreen\",\n length: int = 0, verbosity: int = 0,\n stringify_func: Callable[[Any], str] = display_chunk) -> Iterable:\n if length == 0:\n yield from old_status_iterator(iterable, summary, color, stringify_func)\n return\n l = 0\n summary = bold(summary)\n for item in iterable:\n l += 1\n s = '%s[%3d%%] %s' % (summary, 100 * l / length, colorize(color, stringify_func(item)))\n if verbosity:\n s += '\\n'\n else:\n s = term_width_line(s)\n logger.info(s, nonl=True)\n yield item\n if l > 0:\n logger.info('')\n\n\nclass SkipProgressMessage(Exception):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_progress_message_progress_message.__call__.return.wrapper": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_progress_message_progress_message.__call__.return.wrapper", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 488, "end_line": 514, "span_ids": ["progress_message.__exit__", "progress_message", "progress_message.__call__", "progress_message.__enter__"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class progress_message:\n def __init__(self, message: str) -> None:\n self.message = message\n\n def __enter__(self) -> None:\n logger.info(bold(self.message + '... '), nonl=True)\n\n def __exit__(self, exc_type: Type[Exception], exc_value: Exception, traceback: Any) -> bool: # NOQA\n if isinstance(exc_value, SkipProgressMessage):\n logger.info(__('skipped'))\n if exc_value.args:\n logger.info(*exc_value.args)\n return True\n elif exc_type:\n logger.info(__('failed'))\n else:\n logger.info(__('done'))\n\n return False\n\n def __call__(self, f: Callable) -> Callable:\n @functools.wraps(f)\n def wrapper(*args: Any, **kwargs: Any) -> Any:\n with self:\n return f(*args, **kwargs)\n\n return wrapper", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_epoch_to_rfc1123_rfc1123_to_epoch.return.mktime_strptime_rfc1123_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_epoch_to_rfc1123_rfc1123_to_epoch.return.mktime_strptime_rfc1123_", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 715, "end_line": 725, "span_ids": ["epoch_to_rfc1123", "rfc1123_to_epoch"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def epoch_to_rfc1123(epoch: float) -> str:\n \"\"\"Convert datetime format epoch to RFC1123.\"\"\"\n from babel.dates import format_datetime\n\n dt = datetime.fromtimestamp(epoch)\n fmt = 'EEE, dd LLL yyyy hh:mm:ss'\n return format_datetime(dt, fmt, locale='en') + ' GMT'\n\n\ndef rfc1123_to_epoch(rfc1123: str) -> float:\n return mktime(strptime(rfc1123, '%a, %d %b %Y %H:%M:%S %Z'))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_xmlname_checker_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_xmlname_checker_", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 728, "end_line": 755, "span_ids": ["xmlname_checker"], "tokens": 350}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def xmlname_checker() -> Pattern:\n # https://www.w3.org/TR/REC-xml/#NT-Name\n name_start_chars = [\n ':', ['A', 'Z'], '_', ['a', 'z'], ['\\u00C0', '\\u00D6'],\n ['\\u00D8', '\\u00F6'], ['\\u00F8', '\\u02FF'], ['\\u0370', '\\u037D'],\n ['\\u037F', '\\u1FFF'], ['\\u200C', '\\u200D'], ['\\u2070', '\\u218F'],\n ['\\u2C00', '\\u2FEF'], ['\\u3001', '\\uD7FF'], ['\\uF900', '\\uFDCF'],\n ['\\uFDF0', '\\uFFFD'], ['\\U00010000', '\\U000EFFFF']]\n\n name_chars = [\n \"\\\\-\", \"\\\\.\", ['0', '9'], '\\u00B7', ['\\u0300', '\\u036F'],\n ['\\u203F', '\\u2040']\n ]\n\n def convert(entries: Any, splitter: str = '|') -> str:\n results = []\n for entry in entries:\n if isinstance(entry, list):\n results.append('[%s]' % convert(entry, '-'))\n else:\n results.append(entry)\n return splitter.join(results)\n\n start_chars_regex = convert(name_start_chars)\n name_chars_regex = convert(name_chars)\n return re.compile('(%s)(%s|%s)*' % (\n start_chars_regex, start_chars_regex, name_chars_regex))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/build_phase.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/build_phase.py__", "embedding": null, "metadata": {"file_path": "sphinx/util/build_phase.py", "file_name": "build_phase.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 13, "span_ids": ["BuildPhase", "docstring", "imports"], "tokens": 67}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Build phase of Sphinx application.\"\"\"\n\nfrom enum import IntEnum\n\n\nclass BuildPhase(IntEnum):\n \"\"\"Build phase of Sphinx application.\"\"\"\n INITIALIZATION = 1\n READING = 2\n CONSISTENCY_CHECK = 3\n RESOLVING = 3\n WRITING = 4", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser_BaseParser.__init__.self.allowFallbackExpressionParsing.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser_BaseParser.__init__.self.allowFallbackExpressionParsing.True", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 211, "end_line": 226, "span_ids": ["BaseParser"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseParser:\n def __init__(self, definition: str, *,\n location: Union[nodes.Node, Tuple[str, int], str],\n config: \"Config\") -> None:\n self.definition = definition.strip()\n self.location = location # for warnings\n self.config = config\n\n self.pos = 0\n self.end = len(self.definition)\n self.last_match: Match = None\n self._previous_state: Tuple[int, Match] = (0, None)\n self.otherErrors: List[DefinitionError] = []\n\n # in our tests the following is set to False to capture bad parsing\n self.allowFallbackExpressionParsing = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser._make_multi_error_BaseParser._make_multi_error.return.DefinitionError_join_r": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser._make_multi_error_BaseParser._make_multi_error.return.DefinitionError_join_r", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 250, "end_line": 270, "span_ids": ["BaseParser._make_multi_error"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseParser:\n\n def _make_multi_error(self, errors: List[Any], header: str) -> DefinitionError:\n if len(errors) == 1:\n if len(header) > 0:\n return DefinitionError(header + '\\n' + str(errors[0][0]))\n else:\n return DefinitionError(str(errors[0][0]))\n result = [header, '\\n']\n for e in errors:\n if len(e[1]) > 0:\n indent = ' '\n result.append(e[1])\n result.append(':\\n')\n for line in str(e[0]).split('\\n'):\n if len(line) == 0:\n continue\n result.append(indent)\n result.append(line)\n result.append('\\n')\n else:\n result.append(str(e[0]))\n return DefinitionError(''.join(result))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser.language_BaseParser.fail.raise_self__make_multi_er": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser.language_BaseParser.fail.raise_self__make_multi_er", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 272, "end_line": 291, "span_ids": ["BaseParser.language", "BaseParser.fail", "BaseParser.status"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseParser:\n\n @property\n def language(self) -> str:\n raise NotImplementedError\n\n def status(self, msg: str) -> None:\n # for debugging\n indicator = '-' * self.pos + '^'\n print(\"%s\\n%s\\n%s\" % (msg, self.definition, indicator))\n\n def fail(self, msg: str) -> None:\n errors = []\n indicator = '-' * self.pos + '^'\n exMain = DefinitionError(\n 'Invalid %s declaration: %s [error at %d]\\n %s\\n %s' %\n (self.language, msg, self.pos, self.definition, indicator))\n errors.append((exMain, \"Main error\"))\n for err in self.otherErrors:\n errors.append((err, \"Potential other error\"))\n self.otherErrors = []\n raise self._make_multi_error(errors, '')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser.warn_BaseParser.paren_attributes.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser.warn_BaseParser.paren_attributes.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 293, "end_line": 370, "span_ids": ["BaseParser.assert_end", "BaseParser.warn", "BaseParser.match", "BaseParser.current_char", "BaseParser.skip_word", "BaseParser.skip_string_and_ws", "BaseParser.skip_string", "BaseParser.skip_word_and_ws", "BaseParser.skip_ws", "BaseParser.paren_attributes", "BaseParser.eof", "BaseParser.id_attributes", "BaseParser.read_rest", "BaseParser.matched_text"], "tokens": 477}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseParser:\n\n def warn(self, msg: str) -> None:\n logger.warning(msg, location=self.location)\n\n def match(self, regex: Pattern) -> bool:\n match = regex.match(self.definition, self.pos)\n if match is not None:\n self._previous_state = (self.pos, self.last_match)\n self.pos = match.end()\n self.last_match = match\n return True\n return False\n\n def skip_string(self, string: str) -> bool:\n strlen = len(string)\n if self.definition[self.pos:self.pos + strlen] == string:\n self.pos += strlen\n return True\n return False\n\n def skip_word(self, word: str) -> bool:\n return self.match(re.compile(r'\\b%s\\b' % re.escape(word)))\n\n def skip_ws(self) -> bool:\n return self.match(_whitespace_re)\n\n def skip_word_and_ws(self, word: str) -> bool:\n if self.skip_word(word):\n self.skip_ws()\n return True\n return False\n\n def skip_string_and_ws(self, string: str) -> bool:\n if self.skip_string(string):\n self.skip_ws()\n return True\n return False\n\n @property\n def eof(self) -> bool:\n return self.pos >= self.end\n\n @property\n def current_char(self) -> str:\n try:\n return self.definition[self.pos]\n except IndexError:\n return 'EOF'\n\n @property\n def matched_text(self) -> str:\n if self.last_match is not None:\n return self.last_match.group()\n else:\n return None\n\n def read_rest(self) -> str:\n rv = self.definition[self.pos:]\n self.pos = self.end\n return rv\n\n def assert_end(self, *, allowSemicolon: bool = False) -> None:\n self.skip_ws()\n if allowSemicolon:\n if not self.eof and self.definition[self.pos:] != ';':\n self.fail('Expected end of definition or ;.')\n else:\n if not self.eof:\n self.fail('Expected end of definition.')\n\n ################################################################################\n\n @property\n def id_attributes(self):\n raise NotImplementedError\n\n @property\n def paren_attributes(self):\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser._parse_balanced_token_seq_BaseParser._parse_balanced_token_seq.return.self_definition_startPos_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser._parse_balanced_token_seq_BaseParser._parse_balanced_token_seq.return.self_definition_startPos_", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 350, "end_line": 368, "span_ids": ["BaseParser._parse_balanced_token_seq"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseParser:\n\n def _parse_balanced_token_seq(self, end: List[str]) -> str:\n # TODO: add handling of string literals and similar\n brackets = {'(': ')', '[': ']', '{': '}'}\n startPos = self.pos\n symbols: List[str] = []\n while not self.eof:\n if len(symbols) == 0 and self.current_char in end:\n break\n if self.current_char in brackets.keys():\n symbols.append(brackets[self.current_char])\n elif len(symbols) > 0 and self.current_char == symbols[-1]:\n symbols.pop()\n elif self.current_char in \")]}\":\n self.fail(\"Unexpected '%s' in balanced-token-seq.\" % self.current_char)\n self.pos += 1\n if self.eof:\n self.fail(\"Could not find end of balanced-token-seq starting at %d.\"\n % startPos)\n return self.definition[startPos:self.pos]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser._parse_attribute_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_BaseParser._parse_attribute_", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 394, "end_line": 452, "span_ids": ["BaseParser._parse_paren_expression_list", "BaseParser._parse_attribute"], "tokens": 491}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseParser:\n\n def _parse_attribute(self) -> Optional[ASTAttribute]:\n self.skip_ws()\n # try C++11 style\n startPos = self.pos\n if self.skip_string_and_ws('['):\n if not self.skip_string('['):\n self.pos = startPos\n else:\n # TODO: actually implement the correct grammar\n arg = self._parse_balanced_token_seq(end=[']'])\n if not self.skip_string_and_ws(']'):\n self.fail(\"Expected ']' in end of attribute.\")\n if not self.skip_string_and_ws(']'):\n self.fail(\"Expected ']' in end of attribute after [[...]\")\n return ASTCPPAttribute(arg)\n\n # try GNU style\n if self.skip_word_and_ws('__attribute__'):\n if not self.skip_string_and_ws('('):\n self.fail(\"Expected '(' after '__attribute__'.\")\n if not self.skip_string_and_ws('('):\n self.fail(\"Expected '(' after '__attribute__('.\")\n attrs = []\n while 1:\n if self.match(identifier_re):\n name = self.matched_text\n exprs = self._parse_paren_expression_list()\n attrs.append(ASTGnuAttribute(name, exprs))\n if self.skip_string_and_ws(','):\n continue\n elif self.skip_string_and_ws(')'):\n break\n else:\n self.fail(\"Expected identifier, ')', or ',' in __attribute__.\")\n if not self.skip_string_and_ws(')'):\n self.fail(\"Expected ')' after '__attribute__((...)'\")\n return ASTGnuAttributeList(attrs)\n\n # try the simple id attributes defined by the user\n for id in self.id_attributes:\n if self.skip_word_and_ws(id):\n return ASTIdAttribute(id)\n\n # try the paren attributes defined by the user\n for id in self.paren_attributes:\n if not self.skip_string_and_ws(id):\n continue\n if not self.skip_string('('):\n self.fail(\"Expected '(' after user-defined paren-attribute.\")\n arg = self._parse_balanced_token_seq(end=[')'])\n if not self.skip_string(')'):\n self.fail(\"Expected ')' to end user-defined paren-attribute.\")\n return ASTParenAttribute(id, arg)\n\n return None\n\n def _parse_paren_expression_list(self) -> ASTBaseParenExprList:\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_colorize_colorize.return.escseq_name_text_esc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_colorize_colorize.return.escseq_name_text_esc", "embedding": null, "metadata": {"file_path": "sphinx/util/console.py", "file_name": "console.py", "file_type": "text/x-python", "category": "implementation", "start_line": 86, "end_line": 99, "span_ids": ["colorize"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def colorize(name: str, text: str, input_mode: bool = False) -> str:\n def escseq(name: str) -> str:\n # Wrap escape sequence with ``\\1`` and ``\\2`` to let readline know\n # it is non-printable characters\n # ref: https://tiswww.case.edu/php/chet/readline/readline.html\n #\n # Note: This hack does not work well in Windows (see #5059)\n escape = codes.get(name, '')\n if input_mode and escape and sys.platform != 'win32':\n return '\\1' + escape + '\\2'\n else:\n return escape\n\n return escseq(name) + text + escseq('reset')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_strip_colors_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_strip_colors_", "embedding": null, "metadata": {"file_path": "sphinx/util/console.py", "file_name": "console.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 143, "span_ids": ["impl:11", "strip_colors", "create_color_func"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def strip_colors(s: str) -> str:\n return re.compile('\\x1b.*?m').sub('', s)\n\n\ndef create_color_func(name: str) -> None:\n def inner(text: str) -> str:\n return colorize(name, text)\n globals()[name] = inner\n\n\n_attrs = {\n 'reset': '39;49;00m',\n 'bold': '01m',\n 'faint': '02m',\n 'standout': '03m',\n 'underline': '04m',\n 'blink': '05m',\n}\n\nfor _name, _value in _attrs.items():\n codes[_name] = '\\x1b[' + _value\n\n_colors = [\n ('black', 'darkgray'),\n ('darkred', 'red'),\n ('darkgreen', 'green'),\n ('brown', 'yellow'),\n ('darkblue', 'blue'),\n ('purple', 'fuchsia'),\n ('turquoise', 'teal'),\n ('lightgray', 'white'),\n]\n\nfor i, (dark, light) in enumerate(_colors, 30):\n codes[dark] = '\\x1b[%im' % i\n codes[light] = '\\x1b[%im' % (i + 60)\n\n_orig_codes = codes.copy()\n\nfor _name in codes:\n create_color_func(_name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field_Field.__init__.self.bodyrolename.bodyrolename": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field_Field.__init__.self.bodyrolename.bodyrolename", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 66, "span_ids": ["Field"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Field:\n \"\"\"A doc field that is never grouped. It can have an argument or not, the\n argument can be linked using a specified *rolename*. Field should be used\n for doc fields that usually don't occur more than once.\n\n The body can be linked using a specified *bodyrolename* if the content is\n just a single inline or text node.\n\n Example::\n\n :returns: description of the return value\n :rtype: description of the return type\n \"\"\"\n is_grouped = False\n is_typed = False\n\n def __init__(self, name: str, names: Tuple[str, ...] = (), label: str = None,\n has_arg: bool = True, rolename: str = None, bodyrolename: str = None) -> None:\n self.name = name\n self.names = names\n self.label = label\n self.has_arg = has_arg\n self.rolename = rolename\n self.bodyrolename = bodyrolename", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field.make_xrefs_Field.make_entry.return._fieldarg_content_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field.make_xrefs_Field.make_entry.return._fieldarg_content_", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 88, "end_line": 96, "span_ids": ["Field.make_xrefs", "Field.make_entry"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Field:\n\n def make_xrefs(self, rolename: str, domain: str, target: str,\n innernode: Type[TextlikeNode] = addnodes.literal_emphasis,\n contnode: Node = None, env: BuildEnvironment = None,\n inliner: Inliner = None, location: Node = None) -> List[Node]:\n return [self.make_xref(rolename, domain, target, innernode, contnode,\n env, inliner, location)]\n\n def make_entry(self, fieldarg: str, content: List[Node]) -> Tuple[str, List[Node]]:\n return (fieldarg, content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field.make_field_Field.make_field.return.nodes_field_fieldname": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field.make_field_Field.make_field.return.nodes_field_fieldname", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 117, "span_ids": ["Field.make_field"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Field:\n\n def make_field(self, types: Dict[str, List[Node]], domain: str,\n item: Tuple, env: BuildEnvironment = None,\n inliner: Inliner = None, location: Node = None) -> nodes.field:\n fieldarg, content = item\n fieldname = nodes.field_name('', self.label)\n if fieldarg:\n fieldname += nodes.Text(' ')\n fieldname.extend(self.make_xrefs(self.rolename, domain,\n fieldarg, nodes.Text,\n env=env, inliner=inliner, location=location))\n\n if len(content) == 1 and (\n isinstance(content[0], nodes.Text) or\n (isinstance(content[0], nodes.inline) and len(content[0]) == 1 and\n isinstance(content[0][0], nodes.Text))):\n content = self.make_xrefs(self.bodyrolename, domain,\n content[0].astext(), contnode=content[0],\n env=env, inliner=inliner, location=location)\n fieldbody = nodes.field_body('', nodes.paragraph('', '', *content))\n return nodes.field('', fieldname, fieldbody)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_GroupedField_GroupedField.__init__.self.can_collapse.can_collapse": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_GroupedField_GroupedField.__init__.self.can_collapse.can_collapse", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 107, "end_line": 126, "span_ids": ["GroupedField"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GroupedField(Field):\n \"\"\"\n A doc field that is grouped; i.e., all fields of that type will be\n transformed into one field with its body being a bulleted list. It always\n has an argument. The argument can be linked using the given *rolename*.\n GroupedField should be used for doc fields that can occur more than once.\n If *can_collapse* is true, this field will revert to a Field if only used\n once.\n\n Example::\n\n :raises ErrorClass: description when it is raised\n \"\"\"\n is_grouped = True\n list_type = nodes.bullet_list\n\n def __init__(self, name: str, names: Tuple[str, ...] = (), label: str = None,\n rolename: str = None, can_collapse: bool = False) -> None:\n super().__init__(name, names, label, True, rolename)\n self.can_collapse = can_collapse", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_GroupedField.make_field_GroupedField.make_field.return.nodes_field_fieldname": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_GroupedField.make_field_GroupedField.make_field.return.nodes_field_fieldname", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 141, "end_line": 161, "span_ids": ["GroupedField.make_field"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GroupedField(Field):\n\n def make_field(self, types: Dict[str, List[Node]], domain: str,\n items: Tuple, env: BuildEnvironment = None,\n inliner: Inliner = None, location: Node = None) -> nodes.field:\n fieldname = nodes.field_name('', self.label)\n listnode = self.list_type()\n for fieldarg, content in items:\n par = nodes.paragraph()\n par.extend(self.make_xrefs(self.rolename, domain, fieldarg,\n addnodes.literal_strong,\n env=env, inliner=inliner, location=location))\n par += nodes.Text(' -- ')\n par += content\n listnode += nodes.list_item('', par)\n\n if len(items) == 1 and self.can_collapse:\n list_item = cast(nodes.list_item, listnode[0])\n fieldbody = nodes.field_body('', list_item[0])\n return nodes.field('', fieldname, fieldbody)\n\n fieldbody = nodes.field_body('', listnode)\n return nodes.field('', fieldname, fieldbody)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_TypedField_TypedField.__init__.self.typerolename.typerolename": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_TypedField_TypedField.__init__.self.typerolename.typerolename", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 149, "end_line": 175, "span_ids": ["TypedField"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TypedField(GroupedField):\n \"\"\"\n A doc field that is grouped and has type information for the arguments. It\n always has an argument. The argument can be linked using the given\n *rolename*, the type using the given *typerolename*.\n\n Two uses are possible: either parameter and type description are given\n separately, using a field from *names* and one from *typenames*,\n respectively, or both are given using a field from *names*, see the example.\n\n Example::\n\n :param foo: description of parameter foo\n :type foo: SomeClass\n\n -- or --\n\n :param SomeClass foo: description of parameter foo\n \"\"\"\n is_typed = True\n\n def __init__(self, name: str, names: Tuple[str, ...] = (), typenames: Tuple[str, ...] = (),\n label: str = None, rolename: str = None, typerolename: str = None,\n can_collapse: bool = False) -> None:\n super().__init__(name, names, label, rolename, can_collapse)\n self.typenames = typenames\n self.typerolename = typerolename", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_TypedField.make_field_TypedField.make_field.return.nodes_field_fieldname": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_TypedField.make_field_TypedField.make_field.return.nodes_field_fieldname", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 192, "end_line": 226, "span_ids": ["TypedField.make_field"], "tokens": 381}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TypedField(GroupedField):\n\n def make_field(self, types: Dict[str, List[Node]], domain: str,\n items: Tuple, env: BuildEnvironment = None,\n inliner: Inliner = None, location: Node = None) -> nodes.field:\n def handle_item(fieldarg: str, content: str) -> nodes.paragraph:\n par = nodes.paragraph()\n par.extend(self.make_xrefs(self.rolename, domain, fieldarg,\n addnodes.literal_strong, env=env))\n if fieldarg in types:\n par += nodes.Text(' (')\n # NOTE: using .pop() here to prevent a single type node to be\n # inserted twice into the doctree, which leads to\n # inconsistencies later when references are resolved\n fieldtype = types.pop(fieldarg)\n if len(fieldtype) == 1 and isinstance(fieldtype[0], nodes.Text):\n typename = fieldtype[0].astext()\n par.extend(self.make_xrefs(self.typerolename, domain, typename,\n addnodes.literal_emphasis, env=env,\n inliner=inliner, location=location))\n else:\n par += fieldtype\n par += nodes.Text(')')\n par += nodes.Text(' -- ')\n par += content\n return par\n\n fieldname = nodes.field_name('', self.label)\n if len(items) == 1 and self.can_collapse:\n fieldarg, content = items[0]\n bodynode: Node = handle_item(fieldarg, content)\n else:\n bodynode = self.list_type()\n for fieldarg, content in items:\n bodynode += nodes.list_item('', handle_item(fieldarg, content))\n fieldbody = nodes.field_body('', bodynode)\n return nodes.field('', fieldname, fieldbody)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docstrings.py_prepare_docstring_prepare_docstring.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docstrings.py_prepare_docstring_prepare_docstring.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/util/docstrings.py", "file_name": "docstrings.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 84, "span_ids": ["prepare_docstring"], "tokens": 349}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def prepare_docstring(s: str, ignore: int = None, tabsize: int = 8) -> List[str]:\n \"\"\"Convert a docstring into lines of parseable reST. Remove common leading\n indentation, where the indentation of a given number of lines (usually just\n one) is ignored.\n\n Return the docstring as a list of lines usable for inserting into a docutils\n ViewList (used as argument of nested_parse().) An empty line is added to\n act as a separator between this docstring and following content.\n \"\"\"\n if ignore is None:\n ignore = 1\n else:\n warnings.warn(\"The 'ignore' argument to prepare_docstring() is deprecated.\",\n RemovedInSphinx50Warning, stacklevel=2)\n\n lines = s.expandtabs(tabsize).splitlines()\n # Find minimum indentation of any non-blank lines after ignored lines.\n margin = sys.maxsize\n for line in lines[ignore:]:\n content = len(line.lstrip())\n if content:\n indent = len(line) - content\n margin = min(margin, indent)\n # Remove indentation from ignored lines.\n for i in range(ignore):\n if i < len(lines):\n lines[i] = lines[i].lstrip()\n if margin < sys.maxsize:\n for i in range(ignore, len(lines)):\n lines[i] = lines[i][margin:]\n # Remove any leading blank lines.\n while lines and not lines[0]:\n lines.pop(0)\n # make sure there is an empty line at the end\n if lines and lines[-1]:\n lines.append('')\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docstrings.py_prepare_commentdoc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docstrings.py_prepare_commentdoc_", "embedding": null, "metadata": {"file_path": "sphinx/util/docstrings.py", "file_name": "docstrings.py", "file_type": "text/x-python", "category": "implementation", "start_line": 87, "end_line": 103, "span_ids": ["prepare_commentdoc"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def prepare_commentdoc(s: str) -> List[str]:\n \"\"\"Extract documentation comment lines (starting with #:) and return them\n as a list of lines. Returns an empty list if there is no documentation.\n \"\"\"\n result = []\n lines = [line.strip() for line in s.expandtabs().splitlines()]\n for line in lines:\n if line.startswith('#:'):\n line = line[2:]\n # the first space after the comment is ignored\n if line and line[0] == ' ':\n line = line[1:]\n result.append(line)\n if result and result[-1]:\n result.append('')\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_unregister_node_unregister_node.if_hasattr_nodes_GenericN.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_unregister_node_unregister_node.if_hasattr_nodes_GenericN.None_3", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 106, "end_line": 115, "span_ids": ["unregister_node"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def unregister_node(node: Type[Element]) -> None:\n \"\"\"Unregister a node from docutils.\n\n This is inverse of ``nodes._add_nodes_class_names()``.\n \"\"\"\n if hasattr(nodes.GenericNodeVisitor, 'visit_' + node.__name__):\n delattr(nodes.GenericNodeVisitor, \"visit_\" + node.__name__)\n delattr(nodes.GenericNodeVisitor, \"depart_\" + node.__name__)\n delattr(nodes.SparseNodeVisitor, 'visit_' + node.__name__)\n delattr(nodes.SparseNodeVisitor, 'depart_' + node.__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_patched_get_language_patched_get_language.try_.finally_.docutils.languages.get_language.get_language": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_patched_get_language_patched_get_language.try_.finally_.docutils.languages.get_language.get_language", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 127, "end_line": 144, "span_ids": ["patched_get_language"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef patched_get_language() -> Generator[None, None, None]:\n \"\"\"Patch docutils.languages.get_language() temporarily.\n\n This ignores the second argument ``reporter`` to suppress warnings.\n refs: https://github.com/sphinx-doc/sphinx/issues/3788\n \"\"\"\n from docutils.languages import get_language\n\n def patched_get_language(language_code: str, reporter: Reporter = None) -> Any:\n return get_language(language_code)\n\n try:\n docutils.languages.get_language = patched_get_language\n yield\n finally:\n # restore original implementations\n docutils.languages.get_language = get_language", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_NullReporter_switch_source_input.try_.finally_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_NullReporter_switch_source_input.try_.finally_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 267, "end_line": 293, "span_ids": ["is_html5_writer_available", "NullReporter", "switch_source_input"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NullReporter(Reporter):\n \"\"\"A dummy reporter; write nothing.\"\"\"\n\n def __init__(self) -> None:\n super().__init__('', 999, 4)\n\n\ndef is_html5_writer_available() -> bool:\n return __version_info__ > (0, 13, 0)\n\n\n@contextmanager\ndef switch_source_input(state: State, content: StringList) -> Generator[None, None, None]:\n \"\"\"Switch current source input of state temporarily.\"\"\"\n try:\n # remember the original ``get_source_and_line()`` method\n get_source_and_line = state.memo.reporter.get_source_and_line # type: ignore\n\n # replace it by new one\n state_machine = StateMachine([], None)\n state_machine.input_lines = content\n state.memo.reporter.get_source_and_line = state_machine.get_source_and_line # type: ignore # NOQA\n\n yield\n finally:\n # restore the method\n state.memo.reporter.get_source_and_line = get_source_and_line # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxFileOutput_SphinxFileOutput.write.return.super_write_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxFileOutput_SphinxFileOutput.write.return.super_write_data_", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 296, "end_line": 311, "span_ids": ["SphinxFileOutput", "SphinxFileOutput.write"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxFileOutput(FileOutput):\n \"\"\"Better FileOutput class for Sphinx.\"\"\"\n\n def __init__(self, **kwargs: Any) -> None:\n self.overwrite_if_changed = kwargs.pop('overwrite_if_changed', False)\n super().__init__(**kwargs)\n\n def write(self, data: str) -> str:\n if (self.destination_path and self.autoclose and 'b' not in self.mode and\n self.overwrite_if_changed and os.path.exists(self.destination_path)):\n with open(self.destination_path, encoding=self.encoding) as f:\n # skip writing: content not changed\n if f.read() == data:\n return data\n\n return super().write(data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxRole_SphinxRole.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxRole_SphinxRole.None_9", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 386, "end_line": 402, "span_ids": ["SphinxRole"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxRole:\n \"\"\"A base class for Sphinx roles.\n\n This class provides helper methods for Sphinx roles.\n\n .. note:: The subclasses of this class might not work with docutils.\n This class is strongly coupled with Sphinx.\n \"\"\"\n name: str #: The role name actually used in the document.\n rawtext: str #: A string containing the entire interpreted text input.\n text: str #: The interpreted text content.\n lineno: int #: The line number where the interpreted text begins.\n inliner: Inliner #: The ``docutils.parsers.rst.states.Inliner`` object.\n options: Dict #: A dictionary of directive options for customization\n #: (from the \"role\" directive).\n content: List[str] #: A list of strings, the directive content for customization\n #: (from the \"role\" directive).", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxRole.__call___SphinxRole.__call__.return.self_run_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxRole.__call___SphinxRole.__call__.return.self_run_", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 404, "end_line": 424, "span_ids": ["SphinxRole.__call__"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxRole:\n\n def __call__(self, name: str, rawtext: str, text: str, lineno: int,\n inliner: Inliner, options: Dict = {}, content: List[str] = []\n ) -> Tuple[List[Node], List[system_message]]:\n self.rawtext = rawtext\n self.text = unescape(text)\n self.lineno = lineno\n self.inliner = inliner\n self.options = options\n self.content = content\n\n # guess role type\n if name:\n self.name = name.lower()\n else:\n self.name = self.env.temp_data.get('default_role', '')\n if not self.name:\n self.name = self.env.config.default_role\n if not self.name:\n raise SphinxError('cannot determine default role!')\n\n return self.run()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_ReferenceRole_ReferenceRole.explicit_title_re.re_compile_r_s_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_ReferenceRole_ReferenceRole.explicit_title_re.re_compile_r_s_", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 452, "end_line": 465, "span_ids": ["ReferenceRole"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReferenceRole(SphinxRole):\n \"\"\"A base class for reference roles.\n\n The reference roles can accept ``link title <target>`` style as a text for\n the role. The parsed result; link title and target will be stored to\n ``self.title`` and ``self.target``.\n \"\"\"\n has_explicit_title: bool #: A boolean indicates the role has explicit title or not.\n disabled: bool #: A boolean indicates the reference is disabled.\n title: str #: The link title for the interpreted text.\n target: str #: The link target for the interpreted text.\n\n # \\x00 means the \"<\" was backslash-escaped\n explicit_title_re = re.compile(r'^(.+?)\\s*(?<!\\x00)<(.*?)>$', re.DOTALL)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_ReferenceRole.__call___ReferenceRole.__call__.return.super___call___name_ra": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_ReferenceRole.__call___ReferenceRole.__call__.return.super___call___name_ra", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 419, "end_line": 435, "span_ids": ["ReferenceRole.__call__"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReferenceRole(SphinxRole):\n\n def __call__(self, name: str, rawtext: str, text: str, lineno: int,\n inliner: Inliner, options: Dict = {}, content: List[str] = []\n ) -> Tuple[List[Node], List[system_message]]:\n # if the first character is a bang, don't cross-reference at all\n self.disabled = text.startswith('!')\n\n matched = self.explicit_title_re.match(text)\n if matched:\n self.has_explicit_title = True\n self.title = unescape(matched.group(1))\n self.target = unescape(matched.group(2))\n else:\n self.has_explicit_title = False\n self.title = unescape(text)\n self.target = unescape(text)\n\n return super().__call__(name, rawtext, text, lineno, inliner, options, content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxTranslator_SphinxTranslator.__init__.self.settings.document_settings": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxTranslator_SphinxTranslator.__init__.self.settings.document_settings", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 438, "end_line": 454, "span_ids": ["SphinxTranslator"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxTranslator(nodes.NodeVisitor):\n \"\"\"A base class for Sphinx translators.\n\n This class adds a support for visitor/departure method for super node class\n if visitor/departure method for node class is not found.\n\n It also provides helper methods for Sphinx translators.\n\n .. note:: The subclasses of this class might not work with docutils.\n This class is strongly coupled with Sphinx.\n \"\"\"\n\n def __init__(self, document: nodes.document, builder: \"Builder\") -> None:\n super().__init__(document)\n self.builder = builder\n self.config = builder.config\n self.settings = document.settings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxTranslator.dispatch_visit_SphinxTranslator.dispatch_visit.for_node_class_in_node___.else_.super_dispatch_visit_no": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxTranslator.dispatch_visit_SphinxTranslator.dispatch_visit.for_node_class_in_node___.else_.super_dispatch_visit_no", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 456, "end_line": 471, "span_ids": ["SphinxTranslator.dispatch_visit"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxTranslator(nodes.NodeVisitor):\n\n def dispatch_visit(self, node: Node) -> None:\n \"\"\"\n Dispatch node to appropriate visitor method.\n The priority of visitor method is:\n\n 1. ``self.visit_{node_class}()``\n 2. ``self.visit_{super_node_class}()``\n 3. ``self.unknown_visit()``\n \"\"\"\n for node_class in node.__class__.__mro__:\n method = getattr(self, 'visit_%s' % (node_class.__name__), None)\n if method:\n method(node)\n break\n else:\n super().dispatch_visit(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/fileutil.py_copy_asset_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/fileutil.py_copy_asset_", "embedding": null, "metadata": {"file_path": "sphinx/util/fileutil.py", "file_name": "fileutil.py", "file_type": "text/x-python", "category": "implementation", "start_line": 58, "end_line": 104, "span_ids": ["copy_asset"], "tokens": 392}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def copy_asset(source: str, destination: str, excluded: PathMatcher = lambda path: False,\n context: Dict = None, renderer: \"BaseRenderer\" = None,\n onerror: Callable[[str, Exception], None] = None) -> None:\n \"\"\"Copy asset files to destination recursively.\n\n On copying, it expands the template variables if context argument is given and\n the asset is a template file.\n\n :param source: The path to source file or directory\n :param destination: The path to destination directory\n :param excluded: The matcher to determine the given path should be copied or not\n :param context: The template variables. If not given, template files are simply copied\n :param renderer: The template engine. If not given, SphinxRenderer is used by default\n :param onerror: The error handler.\n \"\"\"\n if not os.path.exists(source):\n return\n\n if renderer is None:\n from sphinx.util.template import SphinxRenderer\n renderer = SphinxRenderer()\n\n ensuredir(destination)\n if os.path.isfile(source):\n copy_asset_file(source, destination, context, renderer)\n return\n\n for root, dirs, files in os.walk(source, followlinks=True):\n reldir = relative_path(source, root)\n for dir in dirs[:]:\n if excluded(posixpath.join(reldir, dir)):\n dirs.remove(dir)\n else:\n ensuredir(posixpath.join(destination, reldir, dir))\n\n for filename in files:\n if not excluded(posixpath.join(reldir, filename)):\n try:\n copy_asset_file(posixpath.join(root, filename),\n posixpath.join(destination, reldir),\n context, renderer)\n except Exception as exc:\n if onerror:\n onerror(posixpath.join(root, filename), exc)\n else:\n raise", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogInfo_CatalogInfo.is_outdated.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogInfo_CatalogInfo.is_outdated.return._", "embedding": null, "metadata": {"file_path": "sphinx/util/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 40, "end_line": 61, "span_ids": ["CatalogInfo.po_file", "CatalogInfo.is_outdated", "CatalogInfo", "CatalogInfo.mo_file", "CatalogInfo.mo_path", "CatalogInfo.po_path"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CatalogInfo(LocaleFileInfoBase):\n\n @property\n def po_file(self) -> str:\n return self.domain + '.po'\n\n @property\n def mo_file(self) -> str:\n return self.domain + '.mo'\n\n @property\n def po_path(self) -> str:\n return path.join(self.base_dir, self.po_file)\n\n @property\n def mo_path(self) -> str:\n return path.join(self.base_dir, self.mo_file)\n\n def is_outdated(self) -> bool:\n return (\n not path.exists(self.mo_path) or\n path.getmtime(self.mo_path) < path.getmtime(self.po_path))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogInfo.write_mo_CatalogInfo.write_mo.with_open_self_mo_path_.try_.except_Exception_as_exc_.logger_warning____writin": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogInfo.write_mo_CatalogInfo.write_mo.with_open_self_mo_path_.try_.except_Exception_as_exc_.logger_warning____writin", "embedding": null, "metadata": {"file_path": "sphinx/util/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 56, "end_line": 68, "span_ids": ["CatalogInfo.write_mo"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CatalogInfo(LocaleFileInfoBase):\n\n def write_mo(self, locale: str, use_fuzzy: bool = False) -> None:\n with open(self.po_path, encoding=self.charset) as file_po:\n try:\n po = read_po(file_po, locale)\n except Exception as exc:\n logger.warning(__('reading error: %s, %s'), self.po_path, exc)\n return\n\n with open(self.mo_path, 'wb') as file_mo:\n try:\n write_mo(file_mo, po, use_fuzzy)\n except Exception as exc:\n logger.warning(__('writing error: %s, %s'), self.mo_path, exc)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_format_date_format_date.return._join_result_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_format_date_format_date.return._join_result_", "embedding": null, "metadata": {"file_path": "sphinx/util/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 193, "end_line": 229, "span_ids": ["format_date"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def format_date(format: str, date: datetime = None, language: str = None) -> str:\n if date is None:\n # If time is not specified, try to use $SOURCE_DATE_EPOCH variable\n # See https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal\n source_date_epoch = os.getenv('SOURCE_DATE_EPOCH')\n if source_date_epoch is not None:\n date = datetime.utcfromtimestamp(float(source_date_epoch))\n else:\n date = datetime.now(timezone.utc).astimezone()\n\n if language is None:\n warnings.warn('The language argument for format_date() becomes required.',\n RemovedInSphinx70Warning)\n language = 'en'\n\n result = []\n tokens = date_format_re.split(format)\n for token in tokens:\n if token in date_format_mappings:\n babel_format = date_format_mappings.get(token, '')\n\n # Check if we have to use a different babel formatter then\n # format_datetime, because we only want to format a date\n # or a time.\n if token == '%x':\n function = babel.dates.format_date\n elif token == '%X':\n function = babel.dates.format_time\n else:\n function = babel.dates.format_datetime\n\n result.append(babel_format_date(date, babel_format, locale=language,\n formatter=function))\n else:\n result.append(token)\n\n return \"\".join(result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_get_image_filename_for_language_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_get_image_filename_for_language_", "embedding": null, "metadata": {"file_path": "sphinx/util/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 232, "end_line": 259, "span_ids": ["get_image_filename_for_language", "search_image_for_language"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_image_filename_for_language(filename: str, env: \"BuildEnvironment\") -> str:\n filename_format = env.config.figure_language_filename\n d = dict()\n d['root'], d['ext'] = path.splitext(filename)\n dirname = path.dirname(d['root'])\n if dirname and not dirname.endswith(path.sep):\n dirname += path.sep\n docpath = path.dirname(env.docname)\n if docpath and not docpath.endswith(path.sep):\n docpath += path.sep\n d['path'] = dirname\n d['basename'] = path.basename(d['root'])\n d['docpath'] = docpath\n d['language'] = env.config.language\n try:\n return filename_format.format(**d)\n except KeyError as exc:\n raise SphinxError('Invalid figure_language_filename: %r' % exc) from exc\n\n\ndef search_image_for_language(filename: str, env: \"BuildEnvironment\") -> str:\n translated = get_image_filename_for_language(filename, env)\n _, abspath = env.relfn2path(translated)\n if path.exists(abspath):\n return translated\n else:\n return filename", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isstaticmethod_isstaticmethod.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isstaticmethod_isstaticmethod.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 184, "end_line": 200, "span_ids": ["isstaticmethod"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def isstaticmethod(obj: Any, cls: Any = None, name: str = None) -> bool:\n \"\"\"Check if the object is staticmethod.\"\"\"\n if isinstance(obj, staticmethod):\n return True\n elif cls and name:\n # trace __mro__ if the method is defined in parent class\n #\n # .. note:: This only works well with new style classes.\n for basecls in getattr(cls, '__mro__', [cls]):\n meth = basecls.__dict__.get(name)\n if meth:\n if isinstance(meth, staticmethod):\n return True\n else:\n return False\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isdescriptor_is_cython_function_or_method.try_.except_AttributeError_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isdescriptor_is_cython_function_or_method.try_.except_AttributeError_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 228, "end_line": 251, "span_ids": ["isboundmethod", "isabstractmethod", "is_cython_function_or_method", "isdescriptor"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def isdescriptor(x: Any) -> bool:\n \"\"\"Check if the object is some kind of descriptor.\"\"\"\n for item in '__get__', '__set__', '__delete__':\n if callable(safe_getattr(x, item, None)):\n return True\n return False\n\n\ndef isabstractmethod(obj: Any) -> bool:\n \"\"\"Check if the object is an abstractmethod.\"\"\"\n return safe_getattr(obj, '__isabstractmethod__', False) is True\n\n\ndef isboundmethod(method: MethodType) -> bool:\n \"\"\"Check if the method is a bound method.\"\"\"\n return safe_getattr(method, '__self__', None) is not None\n\n\ndef is_cython_function_or_method(obj: Any) -> bool:\n \"\"\"Check if the object is a function or method in cython.\"\"\"\n try:\n return obj.__class__.__name__ == 'cython_function_or_method'\n except AttributeError:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isattributedescriptor_isattributedescriptor.if_inspect_isdatadescript.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isattributedescriptor_isattributedescriptor.if_inspect_isdatadescript.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 224, "end_line": 252, "span_ids": ["isattributedescriptor"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def isattributedescriptor(obj: Any) -> bool:\n \"\"\"Check if the object is an attribute like descriptor.\"\"\"\n if inspect.isdatadescriptor(obj):\n # data descriptor is kind of attribute\n return True\n elif isdescriptor(obj):\n # non data descriptor\n unwrapped = unwrap(obj)\n if isfunction(unwrapped) or isbuiltin(unwrapped) or inspect.ismethod(unwrapped):\n # attribute must not be either function, builtin and method\n return False\n elif is_cython_function_or_method(unwrapped):\n # attribute must not be either function and method (for cython)\n return False\n elif inspect.isclass(unwrapped):\n # attribute must not be a class\n return False\n elif isinstance(unwrapped, (ClassMethodDescriptorType,\n MethodDescriptorType,\n WrapperDescriptorType)):\n # attribute must not be a method descriptor\n return False\n elif type(unwrapped).__name__ == \"instancemethod\":\n # attribute must not be an instancemethod (C-API)\n return False\n else:\n return True\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_is_singledispatch_function_isroutine.return.inspect_isroutine_unwrap_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_is_singledispatch_function_isroutine.return.inspect_isroutine_unwrap_", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 285, "end_line": 317, "span_ids": ["is_singledispatch_function", "isroutine", "is_singledispatch_method", "isfunction", "isbuiltin"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def is_singledispatch_function(obj: Any) -> bool:\n \"\"\"Check if the object is singledispatch function.\"\"\"\n if (inspect.isfunction(obj) and\n hasattr(obj, 'dispatch') and\n hasattr(obj, 'register') and\n obj.dispatch.__module__ == 'functools'): # type: ignore\n return True\n else:\n return False\n\n\ndef is_singledispatch_method(obj: Any) -> bool:\n \"\"\"Check if the object is singledispatch method.\"\"\"\n try:\n from functools import singledispatchmethod # type: ignore\n return isinstance(obj, singledispatchmethod)\n except ImportError: # py36-37\n return False\n\n\ndef isfunction(obj: Any) -> bool:\n \"\"\"Check if the object is function.\"\"\"\n return inspect.isfunction(unwrap_all(obj))\n\n\ndef isbuiltin(obj: Any) -> bool:\n \"\"\"Check if the object is builtin.\"\"\"\n return inspect.isbuiltin(unwrap_all(obj))\n\n\ndef isroutine(obj: Any) -> bool:\n \"\"\"Check is any kind of function or method.\"\"\"\n return inspect.isroutine(unwrap_all(obj))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_object_description_object_description.return.s_replace_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_object_description_object_description.return.s_replace_n_", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 399, "end_line": 436, "span_ids": ["object_description"], "tokens": 333}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def object_description(object: Any) -> str:\n \"\"\"A repr() implementation that returns text safe to use in reST context.\"\"\"\n if isinstance(object, dict):\n try:\n sorted_keys = sorted(object)\n except Exception:\n pass # Cannot sort dict keys, fall back to generic repr\n else:\n items = (\"%s: %s\" %\n (object_description(key), object_description(object[key]))\n for key in sorted_keys)\n return \"{%s}\" % \", \".join(items)\n elif isinstance(object, set):\n try:\n sorted_values = sorted(object)\n except TypeError:\n pass # Cannot sort set values, fall back to generic repr\n else:\n return \"{%s}\" % \", \".join(object_description(x) for x in sorted_values)\n elif isinstance(object, frozenset):\n try:\n sorted_values = sorted(object)\n except TypeError:\n pass # Cannot sort frozenset values, fall back to generic repr\n else:\n return \"frozenset({%s})\" % \", \".join(object_description(x)\n for x in sorted_values)\n elif isinstance(object, enum.Enum):\n return \"%s.%s\" % (object.__class__.__name__, object.name)\n\n try:\n s = repr(object)\n except Exception as exc:\n raise ValueError from exc\n # Strip non-deterministic memory addresses such as\n # ``<__main__.A at 0x7f68cb685710>``\n s = memory_address_re.sub('', s)\n return s.replace('\\n', ' ')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_signature_signature.return.inspect_Signature_paramet": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_signature_signature.return.inspect_Signature_paramet", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 558, "end_line": 621, "span_ids": ["signature"], "tokens": 530}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def signature(subject: Callable, bound_method: bool = False, type_aliases: Dict = {}\n ) -> inspect.Signature:\n \"\"\"Return a Signature object for the given *subject*.\n\n :param bound_method: Specify *subject* is a bound method or not\n \"\"\"\n\n try:\n try:\n if _should_unwrap(subject):\n signature = inspect.signature(subject)\n else:\n signature = inspect.signature(subject, follow_wrapped=True)\n except ValueError:\n # follow built-in wrappers up (ex. functools.lru_cache)\n signature = inspect.signature(subject)\n parameters = list(signature.parameters.values())\n return_annotation = signature.return_annotation\n except IndexError:\n # Until python 3.6.4, cpython has been crashed on inspection for\n # partialmethods not having any arguments.\n # https://bugs.python.org/issue33009\n if hasattr(subject, '_partialmethod'):\n parameters = []\n return_annotation = Parameter.empty\n else:\n raise\n\n try:\n # Resolve annotations using ``get_type_hints()`` and type_aliases.\n localns = TypeAliasNamespace(type_aliases)\n annotations = typing.get_type_hints(subject, None, localns)\n for i, param in enumerate(parameters):\n if param.name in annotations:\n annotation = annotations[param.name]\n if isinstance(annotation, TypeAliasForwardRef):\n annotation = annotation.name\n parameters[i] = param.replace(annotation=annotation)\n if 'return' in annotations:\n if isinstance(annotations['return'], TypeAliasForwardRef):\n return_annotation = annotations['return'].name\n else:\n return_annotation = annotations['return']\n except Exception:\n # ``get_type_hints()`` does not support some kind of objects like partial,\n # ForwardRef and so on.\n pass\n\n if bound_method:\n if inspect.ismethod(subject):\n # ``inspect.signature()`` considers the subject is a bound method and removes\n # first argument from signature. Therefore no skips are needed here.\n pass\n else:\n if len(parameters) > 0:\n parameters.pop(0)\n\n # To allow to create signature object correctly for pure python functions,\n # pass an internal parameter __validate_parameters__=False to Signature\n #\n # For example, this helps a function having a default value `inspect._empty`.\n # refs: https://github.com/sphinx-doc/sphinx/issues/7935\n return inspect.Signature(parameters, return_annotation=return_annotation,\n __validate_parameters__=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getdoc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getdoc_", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 801, "end_line": 852, "span_ids": ["getdoc"], "tokens": 402}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getdoc(obj: Any, attrgetter: Callable = safe_getattr,\n allow_inherited: bool = False, cls: Any = None, name: str = None) -> str:\n \"\"\"Get the docstring for the object.\n\n This tries to obtain the docstring for some kind of objects additionally:\n\n * partial functions\n * inherited docstring\n * inherited decorated methods\n \"\"\"\n def getdoc_internal(obj: Any, attrgetter: Callable = safe_getattr) -> Optional[str]:\n doc = attrgetter(obj, '__doc__', None)\n if isinstance(doc, str):\n return doc\n else:\n return None\n\n if cls and name and isclassmethod(obj, cls, name):\n for basecls in getmro(cls):\n meth = basecls.__dict__.get(name)\n if meth and hasattr(meth, '__func__'):\n doc = getdoc(meth.__func__)\n if doc is not None or not allow_inherited:\n return doc\n\n doc = getdoc_internal(obj)\n if ispartial(obj) and doc == obj.__class__.__doc__:\n return getdoc(obj.func)\n elif doc is None and allow_inherited:\n if cls and name:\n # Check a docstring of the attribute or method from super classes.\n for basecls in getmro(cls):\n meth = safe_getattr(basecls, name, None)\n if meth is not None:\n doc = getdoc_internal(meth)\n if doc is not None:\n break\n\n if doc is None:\n # retry using `inspect.getdoc()`\n for basecls in getmro(cls):\n meth = safe_getattr(basecls, name, None)\n if meth is not None:\n doc = inspect.getdoc(meth)\n if doc is not None:\n break\n\n if doc is None:\n doc = inspect.getdoc(obj)\n\n return doc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py_InventoryFile_InventoryFile.load_v1.return.invdata": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py_InventoryFile_InventoryFile.load_v1.return.invdata", "embedding": null, "metadata": {"file_path": "sphinx/util/inventory.py", "file_name": "inventory.py", "file_type": "text/x-python", "category": "implementation", "start_line": 74, "end_line": 102, "span_ids": ["InventoryFile.load", "InventoryFile", "InventoryFile.load_v1"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InventoryFile:\n @classmethod\n def load(cls, stream: IO, uri: str, joinfunc: Callable) -> Inventory:\n reader = InventoryFileReader(stream)\n line = reader.readline().rstrip()\n if line == '# Sphinx inventory version 1':\n return cls.load_v1(reader, uri, joinfunc)\n elif line == '# Sphinx inventory version 2':\n return cls.load_v2(reader, uri, joinfunc)\n else:\n raise ValueError('invalid inventory header: %s' % line)\n\n @classmethod\n def load_v1(cls, stream: InventoryFileReader, uri: str, join: Callable) -> Inventory:\n invdata: Inventory = {}\n projname = stream.readline().rstrip()[11:]\n version = stream.readline().rstrip()[11:]\n for line in stream.readlines():\n name, type, location = line.rstrip().split(None, 2)\n location = join(uri, location)\n # version 1 did not add anchors to the location\n if type == 'mod':\n type = 'py:module'\n location += '#module-' + name\n else:\n type = 'py:' + type\n location += '#' + name\n invdata.setdefault(type, {})[name] = (projname, version, location, '-')\n return invdata", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py_InventoryFile.load_v2_InventoryFile.load_v2.return.invdata": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py_InventoryFile.load_v2_InventoryFile.load_v2.return.invdata", "embedding": null, "metadata": {"file_path": "sphinx/util/inventory.py", "file_name": "inventory.py", "file_type": "text/x-python", "category": "implementation", "start_line": 104, "end_line": 136, "span_ids": ["InventoryFile.load_v2"], "tokens": 343}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InventoryFile:\n\n @classmethod\n def load_v2(cls, stream: InventoryFileReader, uri: str, join: Callable) -> Inventory:\n invdata: Inventory = {}\n projname = stream.readline().rstrip()[11:]\n version = stream.readline().rstrip()[11:]\n line = stream.readline()\n if 'zlib' not in line:\n raise ValueError('invalid inventory header (not compressed): %s' % line)\n\n for line in stream.read_compressed_lines():\n # be careful to handle names with embedded spaces correctly\n m = re.match(r'(?x)(.+?)\\s+(\\S+)\\s+(-?\\d+)\\s+?(\\S*)\\s+(.*)',\n line.rstrip())\n if not m:\n continue\n name, type, prio, location, dispname = m.groups()\n if ':' not in type:\n # wrong type value. type should be in the form of \"{domain}:{objtype}\"\n #\n # Note: To avoid the regex DoS, this is implemented in python (refs: #8175)\n continue\n if type == 'py:module' and type in invdata and name in invdata[type]:\n # due to a bug in 1.1 and below,\n # two inventory entries are created\n # for Python modules, and the first\n # one is correct\n continue\n if location.endswith('$'):\n location = location[:-1] + name\n location = join(uri, location)\n invdata.setdefault(type, {})[name] = (projname, version,\n location, dispname)\n return invdata", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py_InventoryFile.dump_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py_InventoryFile.dump_", "embedding": null, "metadata": {"file_path": "sphinx/util/inventory.py", "file_name": "inventory.py", "file_type": "text/x-python", "category": "implementation", "start_line": 143, "end_line": 174, "span_ids": ["InventoryFile.dump"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InventoryFile:\n\n @classmethod\n def dump(cls, filename: str, env: \"BuildEnvironment\", builder: \"Builder\") -> None:\n def escape(string: str) -> str:\n return re.sub(\"\\\\s+\", \" \", string)\n\n with open(os.path.join(filename), 'wb') as f:\n # header\n f.write(('# Sphinx inventory version 2\\n'\n '# Project: %s\\n'\n '# Version: %s\\n'\n '# The remainder of this file is compressed using zlib.\\n' %\n (escape(env.config.project),\n escape(env.config.version))).encode())\n\n # body\n compressor = zlib.compressobj(9)\n for domainname, domain in sorted(env.domains.items()):\n for name, dispname, typ, docname, anchor, prio in \\\n sorted(domain.get_objects()):\n if anchor.endswith(name):\n # this can shorten the inventory by as much as 25%\n anchor = anchor[:-len(name)] + '$'\n uri = builder.get_target_uri(docname)\n if anchor:\n uri += '#' + anchor\n if dispname == name:\n dispname = '-'\n entry = ('%s %s:%s %s %s %s\\n' %\n (name, domainname, typ, prio, uri, dispname))\n f.write(compressor.compress(entry.encode()))\n f.write(compressor.flush())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_encode_string_encode_string.return._str_ESCAPE_ASCII_su": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_encode_string_encode_string.return._str_ESCAPE_ASCII_su", "embedding": null, "metadata": {"file_path": "sphinx/util/jsdump.py", "file_name": "jsdump.py", "file_type": "text/x-python", "category": "implementation", "start_line": 35, "end_line": 50, "span_ids": ["encode_string"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def encode_string(s: str) -> str:\n def replace(match: Match) -> str:\n s = match.group(0)\n try:\n return ESCAPE_DICT[s]\n except KeyError:\n n = ord(s)\n if n < 0x10000:\n return '\\\\u%04x' % (n,)\n else:\n # surrogate pair\n n -= 0x10000\n s1 = 0xd800 | ((n >> 10) & 0x3ff)\n s2 = 0xdc00 | (n & 0x3ff)\n return '\\\\u%04x\\\\u%04x' % (s1, s2)\n return '\"' + str(ESCAPE_ASCII.sub(replace, s)) + '\"'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_decode_string_reswords.set_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_decode_string_reswords.set_", "embedding": null, "metadata": {"file_path": "sphinx/util/jsdump.py", "file_name": "jsdump.py", "file_type": "text/x-python", "category": "implementation", "start_line": 53, "end_line": 72, "span_ids": ["decode_string", "impl:15"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def decode_string(s: str) -> str:\n return ESCAPED.sub(lambda m: eval('\"' + m.group() + '\"'), s)\n\n\nreswords = set(\"\"\"\\\nabstract else instanceof switch\nboolean enum int synchronized\nbreak export interface this\nbyte extends long throw\ncase false native throws\ncatch final new transient\nchar finally null true\nclass float package try\nconst for private typeof\ncontinue function protected var\ndebugger goto public void\ndefault if return volatile\ndelete implements short while\ndo import static with\ndouble in super\"\"\".split())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_dumps_dump.f_write_dumps_obj_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_dumps_dump.f_write_dumps_obj_", "embedding": null, "metadata": {"file_path": "sphinx/util/jsdump.py", "file_name": "jsdump.py", "file_type": "text/x-python", "category": "implementation", "start_line": 75, "end_line": 104, "span_ids": ["dump", "dumps"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def dumps(obj: Any, key: bool = False) -> str:\n if key:\n if not isinstance(obj, str):\n obj = str(obj)\n if _nameonly_re.match(obj) and obj not in reswords:\n return obj # return it as a bare word\n else:\n return encode_string(obj)\n if obj is None:\n return 'null'\n elif obj is True or obj is False:\n return 'true' if obj else 'false'\n elif isinstance(obj, (int, float)):\n return str(obj)\n elif isinstance(obj, dict):\n return '{%s}' % ','.join(sorted('%s:%s' % (\n dumps(key, True),\n dumps(value)\n ) for key, value in obj.items()))\n elif isinstance(obj, set):\n return '[%s]' % ','.join(sorted(dumps(x) for x in obj))\n elif isinstance(obj, (tuple, list)):\n return '[%s]' % ','.join(dumps(x) for x in obj)\n elif isinstance(obj, str):\n return encode_string(obj)\n raise TypeError(type(obj))\n\n\ndef dump(obj: Any, f: IO) -> None:\n f.write(dumps(obj))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_loads_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py_loads_", "embedding": null, "metadata": {"file_path": "sphinx/util/jsdump.py", "file_name": "jsdump.py", "file_type": "text/x-python", "category": "implementation", "start_line": 101, "end_line": 195, "span_ids": ["loads", "load"], "tokens": 578}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def loads(x: str) -> Any:\n \"\"\"Loader that can read the JS subset the indexer produces.\"\"\"\n nothing = object()\n i = 0\n n = len(x)\n stack: List[Union[List, Dict]] = []\n obj: Any = nothing\n key = False\n keys = []\n while i < n:\n c = x[i]\n if c == '{':\n obj = {}\n stack.append(obj)\n key = True\n keys.append(nothing)\n i += 1\n elif c == '[':\n obj = []\n stack.append(obj)\n key = False\n keys.append(nothing)\n i += 1\n elif c in '}]':\n if key:\n if keys[-1] is not nothing:\n raise ValueError(\"unfinished dict\")\n # empty dict\n key = False\n oldobj = stack.pop()\n keys.pop()\n if stack:\n obj = stack[-1]\n if isinstance(obj, dict):\n if keys[-1] is nothing:\n raise ValueError(\"invalid key object\", oldobj)\n obj[keys[-1]] = oldobj\n else:\n obj.append(oldobj)\n else:\n break\n i += 1\n elif c == ',':\n if key:\n raise ValueError(\"multiple keys\")\n if isinstance(obj, dict):\n key = True\n i += 1\n elif c == ':':\n if not isinstance(obj, dict):\n raise ValueError(\"colon in list\")\n i += 1\n if not key:\n raise ValueError(\"multiple values\")\n key = False\n else:\n y: Any = None\n m = _str_re.match(x, i)\n if m:\n y = decode_string(m.group()[1:-1])\n else:\n m = _int_re.match(x, i)\n if m:\n y = int(m.group())\n else:\n m = _name_re.match(x, i)\n if m:\n y = m.group()\n if y == 'true':\n y = True\n elif y == 'false':\n y = False\n elif y == 'null':\n y = None\n elif not key:\n raise ValueError(\"bareword as value\")\n else:\n raise ValueError(\"read error at pos %d\" % i)\n i = m.end()\n if isinstance(obj, dict):\n if key:\n keys[-1] = y\n else:\n obj[keys[-1]] = y\n key = False\n else:\n obj.append(y)\n if obj is nothing:\n raise ValueError(\"nothing loaded from string\")\n return obj\n\n\ndef load(f: IO) -> Any:\n return loads(f.read())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_getLogger_getLogger.return.SphinxLoggerAdapter_logge": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_getLogger_getLogger.return.SphinxLoggerAdapter_logge", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 59, "end_line": 78, "span_ids": ["getLogger"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getLogger(name: str) -> \"SphinxLoggerAdapter\":\n \"\"\"Get logger wrapped by :class:`sphinx.util.logging.SphinxLoggerAdapter`.\n\n Sphinx logger always uses ``sphinx.*`` namespace to be independent from\n settings of root logger. It ensures logging is consistent even if a\n third-party extension or imported application resets logger settings.\n\n Example usage::\n\n >>> from sphinx.util import logging\n >>> logger = logging.getLogger(__name__)\n >>> logger.info('Hello, this is an extension!')\n Hello, this is an extension!\n \"\"\"\n # add sphinx prefix to name forcely\n logger = logging.getLogger(NAMESPACE + '.' + name)\n # Forcely enable logger\n logger.disabled = False\n # wrap logger by SphinxLoggerAdapter\n return SphinxLoggerAdapter(logger, {})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_SphinxLoggerAdapter_SphinxLoggerAdapter.handle.self_logger_handle_record": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_SphinxLoggerAdapter_SphinxLoggerAdapter.handle.self_logger_handle_record", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 116, "end_line": 139, "span_ids": ["SphinxLoggerAdapter.handle", "SphinxLoggerAdapter.verbose", "SphinxLoggerAdapter", "SphinxLoggerAdapter.process", "SphinxLoggerAdapter.log"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxLoggerAdapter(logging.LoggerAdapter):\n \"\"\"LoggerAdapter allowing ``type`` and ``subtype`` keywords.\"\"\"\n KEYWORDS = ['type', 'subtype', 'location', 'nonl', 'color', 'once']\n\n def log(self, level: Union[int, str], msg: str, *args: Any, **kwargs: Any) -> None: # type: ignore # NOQA\n if isinstance(level, int):\n super().log(level, msg, *args, **kwargs)\n else:\n levelno = LEVEL_NAMES[level]\n super().log(levelno, msg, *args, **kwargs)\n\n def verbose(self, msg: str, *args: Any, **kwargs: Any) -> None:\n self.log(VERBOSE, msg, *args, **kwargs)\n\n def process(self, msg: str, kwargs: Dict) -> Tuple[str, Dict]: # type: ignore\n extra = kwargs.setdefault('extra', {})\n for keyword in self.KEYWORDS:\n if keyword in kwargs:\n extra[keyword] = kwargs.pop(keyword)\n\n return msg, kwargs\n\n def handle(self, record: logging.LogRecord) -> None:\n self.logger.handle(record)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_WarningStreamHandler_MemoryHandler.clear.return.buffer": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_WarningStreamHandler_MemoryHandler.clear.return.buffer", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 142, "end_line": 189, "span_ids": ["NewLineStreamHandler", "MemoryHandler", "MemoryHandler.flushTo", "WarningStreamHandler", "MemoryHandler.shouldFlush", "MemoryHandler.clear", "NewLineStreamHandler.emit", "MemoryHandler.flush"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WarningStreamHandler(logging.StreamHandler):\n \"\"\"StreamHandler for warnings.\"\"\"\n pass\n\n\nclass NewLineStreamHandler(logging.StreamHandler):\n \"\"\"StreamHandler which switches line terminator by record.nonl flag.\"\"\"\n\n def emit(self, record: logging.LogRecord) -> None:\n try:\n self.acquire()\n if getattr(record, 'nonl', False):\n # skip appending terminator when nonl=True\n self.terminator = ''\n super().emit(record)\n finally:\n self.terminator = '\\n'\n self.release()\n\n\nclass MemoryHandler(logging.handlers.BufferingHandler):\n \"\"\"Handler buffering all logs.\"\"\"\n\n buffer: List[logging.LogRecord]\n\n def __init__(self) -> None:\n super().__init__(-1)\n\n def shouldFlush(self, record: logging.LogRecord) -> bool:\n return False # never flush\n\n def flush(self) -> None:\n # suppress any flushes triggered by importing packages that flush\n # all handlers at initialization time\n pass\n\n def flushTo(self, logger: logging.Logger) -> None:\n self.acquire()\n try:\n for record in self.buffer:\n logger.handle(record)\n self.buffer = []\n finally:\n self.release()\n\n def clear(self) -> List[logging.LogRecord]:\n buffer, self.buffer = self.buffer, []\n return buffer", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_pending_warnings_pending_warnings.try_.finally_.memhandler_flushTo_logger": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_pending_warnings_pending_warnings.try_.finally_.memhandler_flushTo_logger", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 192, "end_line": 217, "span_ids": ["pending_warnings"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef pending_warnings() -> Generator[logging.Handler, None, None]:\n \"\"\"Context manager to postpone logging warnings temporarily.\n\n Similar to :func:`pending_logging`.\n \"\"\"\n logger = logging.getLogger(NAMESPACE)\n memhandler = MemoryHandler()\n memhandler.setLevel(logging.WARNING)\n\n try:\n handlers = []\n for handler in logger.handlers[:]:\n if isinstance(handler, WarningStreamHandler):\n logger.removeHandler(handler)\n handlers.append(handler)\n\n logger.addHandler(memhandler)\n yield memhandler\n finally:\n logger.removeHandler(memhandler)\n\n for handler in handlers:\n logger.addHandler(handler)\n\n memhandler.flushTo(logger)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_suppress_logging_suppress_logging.try_.finally_.for_handler_in_handlers_.logger_addHandler_handler": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_suppress_logging_suppress_logging.try_.finally_.for_handler_in_handlers_.logger_addHandler_handler", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 220, "end_line": 246, "span_ids": ["suppress_logging"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef suppress_logging() -> Generator[MemoryHandler, None, None]:\n \"\"\"Context manager to suppress logging all logs temporarily.\n\n For example::\n\n >>> with suppress_logging():\n >>> logger.warning('Warning message!') # suppressed\n >>> some_long_process()\n >>>\n \"\"\"\n logger = logging.getLogger(NAMESPACE)\n memhandler = MemoryHandler()\n\n try:\n handlers = []\n for handler in logger.handlers[:]:\n logger.removeHandler(handler)\n handlers.append(handler)\n\n logger.addHandler(memhandler)\n yield memhandler\n finally:\n logger.removeHandler(memhandler)\n\n for handler in handlers:\n logger.addHandler(handler)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_pending_logging_pending_logging.try_.finally_.memhandler_flushTo_logger": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_pending_logging_pending_logging.try_.finally_.memhandler_flushTo_logger", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 249, "end_line": 266, "span_ids": ["pending_logging"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef pending_logging() -> Generator[MemoryHandler, None, None]:\n \"\"\"Context manager to postpone logging all logs temporarily.\n\n For example::\n\n >>> with pending_logging():\n >>> logger.warning('Warning message!') # not flushed yet\n >>> some_long_process()\n >>>\n Warning message! # the warning is flushed here\n \"\"\"\n logger = logging.getLogger(NAMESPACE)\n try:\n with suppress_logging() as memhandler:\n yield memhandler\n finally:\n memhandler.flushTo(logger)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_skip_warningiserror_skip_warningiserror.if_skip_is_False_.else_.try_.finally_.for_handler_in_logger_han.handler_removeFilter_disa": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_skip_warningiserror_skip_warningiserror.if_skip_is_False_.else_.try_.finally_.for_handler_in_logger_han.handler_removeFilter_disa", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 269, "end_line": 286, "span_ids": ["skip_warningiserror"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef skip_warningiserror(skip: bool = True) -> Generator[None, None, None]:\n \"\"\"Context manager to skip WarningIsErrorFilter temporarily.\"\"\"\n logger = logging.getLogger(NAMESPACE)\n\n if skip is False:\n yield\n else:\n try:\n disabler = DisableWarningIsErrorFilter()\n for handler in logger.handlers:\n # use internal method; filters.insert() directly to install disabler\n # before WarningIsErrorFilter\n handler.filters.insert(0, disabler)\n yield\n finally:\n for handler in logger.handlers:\n handler.removeFilter(disabler)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_prefixed_warnings_prefixed_warnings.if_prefix_filter_.else_.try_.finally_.warning_handler_removeFil": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_prefixed_warnings_prefixed_warnings.if_prefix_filter_.else_.try_.finally_.warning_handler_removeFil", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 289, "end_line": 332, "span_ids": ["prefixed_warnings"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef prefixed_warnings(prefix: str) -> Generator[None, None, None]:\n \"\"\"Context manager to prepend prefix to all warning log records temporarily.\n\n For example::\n\n >>> with prefixed_warnings(\"prefix:\"):\n >>> logger.warning('Warning message!') # => prefix: Warning message!\n\n .. versionadded:: 2.0\n \"\"\"\n logger = logging.getLogger(NAMESPACE)\n warning_handler = None\n for handler in logger.handlers:\n if isinstance(handler, WarningStreamHandler):\n warning_handler = handler\n break\n else:\n # warning stream not found\n yield\n return\n\n prefix_filter = None\n for _filter in warning_handler.filters:\n if isinstance(_filter, MessagePrefixFilter):\n prefix_filter = _filter\n break\n\n if prefix_filter:\n # already prefixed\n try:\n previous = prefix_filter.prefix\n prefix_filter.prefix = prefix\n yield\n finally:\n prefix_filter.prefix = previous\n else:\n # not prefixed yet\n prefix_filter = MessagePrefixFilter(prefix)\n try:\n warning_handler.addFilter(prefix_filter)\n yield\n finally:\n warning_handler.removeFilter(prefix_filter)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_WarningSuppressor_WarningSuppressor.filter.if_is_suppressed_warning_.else_.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_WarningSuppressor_WarningSuppressor.filter.if_is_suppressed_warning_.else_.return.True", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 372, "end_line": 393, "span_ids": ["WarningSuppressor", "WarningSuppressor.filter"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WarningSuppressor(logging.Filter):\n \"\"\"Filter logs by `suppress_warnings`.\"\"\"\n\n def __init__(self, app: \"Sphinx\") -> None:\n self.app = app\n super().__init__()\n\n def filter(self, record: logging.LogRecord) -> bool:\n type = getattr(record, 'type', None)\n subtype = getattr(record, 'subtype', None)\n\n try:\n suppress_warnings = self.app.config.suppress_warnings\n except AttributeError:\n # config is not initialized yet (ex. in conf.py)\n suppress_warnings = []\n\n if is_suppressed_warning(type, subtype, suppress_warnings):\n return False\n else:\n self.app._warncount += 1\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_WarningIsErrorFilter_WarningIsErrorFilter.filter.if_getattr_record_skip_.else_.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_WarningIsErrorFilter_WarningIsErrorFilter.filter.if_getattr_record_skip_.else_.return.True", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 396, "end_line": 423, "span_ids": ["WarningIsErrorFilter", "WarningIsErrorFilter.filter"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WarningIsErrorFilter(logging.Filter):\n \"\"\"Raise exception if warning emitted.\"\"\"\n\n def __init__(self, app: \"Sphinx\") -> None:\n self.app = app\n super().__init__()\n\n def filter(self, record: logging.LogRecord) -> bool:\n if getattr(record, 'skip_warningsiserror', False):\n # disabled by DisableWarningIsErrorFilter\n return True\n elif self.app.warningiserror:\n location = getattr(record, 'location', '')\n try:\n message = record.msg % record.args\n except (TypeError, ValueError):\n message = record.msg # use record.msg itself\n\n if location:\n exc = SphinxWarning(location + \":\" + str(message))\n else:\n exc = SphinxWarning(message)\n if record.exc_info is not None:\n raise exc from record.exc_info[1]\n else:\n raise exc\n else:\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_DisableWarningIsErrorFilter_OnceFilter.filter.if_not_once_.else_.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_DisableWarningIsErrorFilter_OnceFilter.filter.if_not_once_.else_.return.True", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 430, "end_line": 468, "span_ids": ["OnceFilter.filter", "OnceFilter", "MessagePrefixFilter.filter", "MessagePrefixFilter", "DisableWarningIsErrorFilter.filter", "DisableWarningIsErrorFilter"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DisableWarningIsErrorFilter(logging.Filter):\n \"\"\"Disable WarningIsErrorFilter if this filter installed.\"\"\"\n\n def filter(self, record: logging.LogRecord) -> bool:\n record.skip_warningsiserror = True # type: ignore\n return True\n\n\nclass MessagePrefixFilter(logging.Filter):\n \"\"\"Prepend prefix to all log records.\"\"\"\n\n def __init__(self, prefix: str) -> None:\n self.prefix = prefix\n super().__init__()\n\n def filter(self, record: logging.LogRecord) -> bool:\n if self.prefix:\n record.msg = self.prefix + ' ' + record.msg\n return True\n\n\nclass OnceFilter(logging.Filter):\n \"\"\"Show the message only once.\"\"\"\n\n def __init__(self, name: str = '') -> None:\n super().__init__(name)\n self.messages: Dict[str, List] = {}\n\n def filter(self, record: logging.LogRecord) -> bool:\n once = getattr(record, 'once', '')\n if not once:\n return True\n else:\n params = self.messages.setdefault(record.msg, [])\n if record.args in params:\n return False\n\n params.append(record.args)\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_SphinxLogRecordTranslator_SphinxLogRecordTranslator.filter.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_SphinxLogRecordTranslator_SphinxLogRecordTranslator.filter.return.True", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 471, "end_line": 502, "span_ids": ["SphinxLogRecordTranslator", "SphinxLogRecordTranslator.filter"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxLogRecordTranslator(logging.Filter):\n \"\"\"Converts a log record to one Sphinx expects\n\n * Make a instance of SphinxLogRecord\n * docname to path if location given\n \"\"\"\n LogRecordClass: Type[logging.LogRecord]\n\n def __init__(self, app: \"Sphinx\") -> None:\n self.app = app\n super().__init__()\n\n def filter(self, record: SphinxWarningLogRecord) -> bool: # type: ignore\n if isinstance(record, logging.LogRecord):\n # force subclassing to handle location\n record.__class__ = self.LogRecordClass # type: ignore\n\n location = getattr(record, 'location', None)\n if isinstance(location, tuple):\n docname, lineno = location\n if docname and lineno:\n record.location = '%s:%s' % (self.app.env.doc2path(docname), lineno)\n elif docname:\n record.location = '%s' % self.app.env.doc2path(docname)\n else:\n record.location = None\n elif isinstance(location, nodes.Node):\n record.location = get_node_location(location)\n elif location and ':' not in location:\n record.location = '%s' % self.app.env.doc2path(location)\n\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_InfoLogRecordTranslator_ColorizeFormatter.format.if_color_.else_.return.message": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_InfoLogRecordTranslator_ColorizeFormatter.format.if_color_.else_.return.message", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 505, "end_line": 537, "span_ids": ["ColorizeFormatter", "WarningLogRecordTranslator", "get_node_location", "ColorizeFormatter.format", "InfoLogRecordTranslator"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InfoLogRecordTranslator(SphinxLogRecordTranslator):\n \"\"\"LogRecordTranslator for INFO level log records.\"\"\"\n LogRecordClass = SphinxInfoLogRecord\n\n\nclass WarningLogRecordTranslator(SphinxLogRecordTranslator):\n \"\"\"LogRecordTranslator for WARNING level log records.\"\"\"\n LogRecordClass = SphinxWarningLogRecord\n\n\ndef get_node_location(node: Node) -> Optional[str]:\n (source, line) = get_source_line(node)\n if source and line:\n return \"%s:%s\" % (source, line)\n elif source:\n return \"%s:\" % source\n elif line:\n return \"<unknown>:%s\" % line\n else:\n return None\n\n\nclass ColorizeFormatter(logging.Formatter):\n def format(self, record: logging.LogRecord) -> str:\n message = super().format(record)\n color = getattr(record, 'color', None)\n if color is None:\n color = COLOR_MAP.get(record.levelno)\n\n if color:\n return colorize(color, message)\n else:\n return message", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_SafeEncodingWriter_LastMessagesWriter.write.self_app_messagelog_appen": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_SafeEncodingWriter_LastMessagesWriter.write.self_app_messagelog_appen", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 540, "end_line": 565, "span_ids": ["SafeEncodingWriter.flush", "LastMessagesWriter", "SafeEncodingWriter.write", "LastMessagesWriter.write", "SafeEncodingWriter"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SafeEncodingWriter:\n \"\"\"Stream writer which ignores UnicodeEncodeError silently\"\"\"\n def __init__(self, stream: IO) -> None:\n self.stream = stream\n self.encoding = getattr(stream, 'encoding', 'ascii') or 'ascii'\n\n def write(self, data: str) -> None:\n try:\n self.stream.write(data)\n except UnicodeEncodeError:\n # stream accept only str, not bytes. So, we encode and replace\n # non-encodable characters, then decode them.\n self.stream.write(data.encode(self.encoding, 'replace').decode(self.encoding))\n\n def flush(self) -> None:\n if hasattr(self.stream, 'flush'):\n self.stream.flush()\n\n\nclass LastMessagesWriter:\n \"\"\"Stream writer storing last 10 messages in memory to save trackback\"\"\"\n def __init__(self, app: \"Sphinx\", stream: IO) -> None:\n self.app = app\n\n def write(self, data: str) -> None:\n self.app.messagelog.append(data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 568, "end_line": 600, "span_ids": ["setup"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: \"Sphinx\", status: IO, warning: IO) -> None:\n \"\"\"Setup root logger for Sphinx\"\"\"\n logger = logging.getLogger(NAMESPACE)\n logger.setLevel(logging.DEBUG)\n logger.propagate = False\n\n # clear all handlers\n for handler in logger.handlers[:]:\n logger.removeHandler(handler)\n\n info_handler = NewLineStreamHandler(SafeEncodingWriter(status))\n info_handler.addFilter(InfoFilter())\n info_handler.addFilter(InfoLogRecordTranslator(app))\n info_handler.setLevel(VERBOSITY_MAP[app.verbosity])\n info_handler.setFormatter(ColorizeFormatter())\n\n warning_handler = WarningStreamHandler(SafeEncodingWriter(warning))\n warning_handler.addFilter(WarningSuppressor(app))\n warning_handler.addFilter(WarningLogRecordTranslator(app))\n warning_handler.addFilter(WarningIsErrorFilter(app))\n warning_handler.addFilter(OnceFilter())\n warning_handler.setLevel(logging.WARNING)\n warning_handler.setFormatter(ColorizeFormatter())\n\n messagelog_handler = logging.StreamHandler(LastMessagesWriter(app, status))\n messagelog_handler.addFilter(InfoFilter())\n messagelog_handler.setLevel(VERBOSITY_MAP[app.verbosity])\n messagelog_handler.setFormatter(ColorizeFormatter())\n\n logger.addHandler(info_handler)\n logger.addHandler(warning_handler)\n logger.addHandler(messagelog_handler)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/matching.py_compile_matchers_Matcher.match.return.any_pat_string_for_pat_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/matching.py_compile_matchers_Matcher.match.return.any_pat_string_for_pat_i", "embedding": null, "metadata": {"file_path": "sphinx/util/matching.py", "file_name": "matching.py", "file_type": "text/x-python", "category": "implementation", "start_line": 55, "end_line": 75, "span_ids": ["compile_matchers", "Matcher.__call__", "Matcher", "Matcher.match"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def compile_matchers(patterns: List[str]) -> List[Callable[[str], Optional[Match[str]]]]:\n return [re.compile(_translate_pattern(pat)).match for pat in patterns]\n\n\nclass Matcher:\n \"\"\"A pattern matcher for Multiple shell-style glob patterns.\n\n Note: this modifies the patterns to work with copy_asset().\n For example, \"**/index.rst\" matches with \"index.rst\"\n \"\"\"\n\n def __init__(self, patterns: List[str]) -> None:\n expanded = [pat[3:] for pat in patterns if pat.startswith('**/')]\n self.patterns = compile_matchers(patterns + expanded)\n\n def __call__(self, string: str) -> bool:\n return self.match(string)\n\n def match(self, string: str) -> bool:\n string = canon_path(string)\n return any(pat(string) for pat in self.patterns)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/matching.py_DOTFILES_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/matching.py_DOTFILES_", "embedding": null, "metadata": {"file_path": "sphinx/util/matching.py", "file_name": "matching.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 102, "span_ids": ["patmatch", "impl", "patfilter"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "DOTFILES = Matcher(['**/.*'])\n\n\n_pat_cache: Dict[str, Pattern] = {}\n\n\ndef patmatch(name: str, pat: str) -> Optional[Match[str]]:\n \"\"\"Return if name matches the regular expression (pattern)\n ``pat```. Adapted from fnmatch module.\"\"\"\n if pat not in _pat_cache:\n _pat_cache[pat] = re.compile(_translate_pattern(pat))\n return _pat_cache[pat].match(name)\n\n\ndef patfilter(names: Iterable[str], pat: str) -> List[str]:\n \"\"\"Return the subset of the list ``names`` that match\n the regular expression (pattern) ``pat``.\n\n Adapted from fnmatch module.\n \"\"\"\n if pat not in _pat_cache:\n _pat_cache[pat] = re.compile(_translate_pattern(pat))\n match = _pat_cache[pat].match\n return list(filter(match, names))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/math.py_wrap_displaymath_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/math.py_wrap_displaymath_", "embedding": null, "metadata": {"file_path": "sphinx/util/math.py", "file_name": "math.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 64, "span_ids": ["wrap_displaymath"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def wrap_displaymath(text: str, label: str, numbering: bool) -> str:\n def is_equation(part: str) -> str:\n return part.strip()\n\n if label is None:\n labeldef = ''\n else:\n labeldef = r'\\label{%s}' % label\n numbering = True\n\n parts = list(filter(is_equation, text.split('\\n\\n')))\n equations = []\n if len(parts) == 0:\n return ''\n elif len(parts) == 1:\n if numbering:\n begin = r'\\begin{equation}' + labeldef\n end = r'\\end{equation}'\n else:\n begin = r'\\begin{equation*}' + labeldef\n end = r'\\end{equation*}'\n equations.append('\\\\begin{split}%s\\\\end{split}\\n' % parts[0])\n else:\n if numbering:\n begin = r'\\begin{align}%s\\!\\begin{aligned}' % labeldef\n end = r'\\end{aligned}\\end{align}'\n else:\n begin = r'\\begin{align*}%s\\!\\begin{aligned}' % labeldef\n end = r'\\end{aligned}\\end{align*}'\n for part in parts:\n equations.append('%s\\\\\\\\\\n' % part.strip())\n\n return '%s\\n%s%s' % (begin, ''.join(equations), end)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__b_w_compat_alias_NodeMatcher.__call__.return.self_match_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__b_w_compat_alias_NodeMatcher.__call__.return.self_match_node_", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 29, "end_line": 81, "span_ids": ["impl:2", "NodeMatcher.match", "NodeMatcher.__call__", "NodeMatcher"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": " # b/w compat alias\n\n\nclass NodeMatcher:\n \"\"\"A helper class for Node.findall().\n\n It checks that the given node is an instance of the specified node-classes and\n has the specified node-attributes.\n\n For example, following example searches ``reference`` node having ``refdomain``\n and ``reftype`` attributes::\n\n matcher = NodeMatcher(nodes.reference, refdomain='std', reftype='citation')\n doctree.findall(matcher)\n # => [<reference ...>, <reference ...>, ...]\n\n A special value ``typing.Any`` matches any kind of node-attributes. For example,\n following example searches ``reference`` node having ``refdomain`` attributes::\n\n from typing import Any\n matcher = NodeMatcher(nodes.reference, refdomain=Any)\n doctree.findall(matcher)\n # => [<reference ...>, <reference ...>, ...]\n \"\"\"\n\n def __init__(self, *node_classes: Type[Node], **attrs: Any) -> None:\n self.classes = node_classes\n self.attrs = attrs\n\n def match(self, node: Node) -> bool:\n try:\n if self.classes and not isinstance(node, self.classes):\n return False\n\n if self.attrs:\n if not isinstance(node, nodes.Element):\n return False\n\n for key, value in self.attrs.items():\n if key not in node:\n return False\n elif value is Any:\n continue\n elif node.get(key) != value:\n return False\n\n return True\n except Exception:\n # for non-Element nodes\n return False\n\n def __call__(self, node: Node) -> bool:\n return self.match(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_get_full_module_name_repr_domxml.return.text": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_get_full_module_name_repr_domxml.return.text", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 84, "end_line": 111, "span_ids": ["get_full_module_name", "repr_domxml"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_full_module_name(node: Node) -> str:\n \"\"\"\n Return full module dotted path like: 'docutils.nodes.paragraph'\n\n :param nodes.Node node: target node\n :return: full module dotted path\n \"\"\"\n return '{}.{}'.format(node.__module__, node.__class__.__name__)\n\n\ndef repr_domxml(node: Node, length: int = 80) -> str:\n \"\"\"\n return DOM XML representation of the specified node like:\n '<paragraph translatable=\"False\"><inline classes=\"versionmodified\">New in version...'\n\n :param nodes.Node node: target node\n :param int length:\n length of return value to be striped. if false-value is specified, repr_domxml\n returns full of DOM XML representation.\n :return: DOM XML representation\n \"\"\"\n try:\n text = node.asdom().toxml()\n except Exception:\n text = str(node)\n if length and len(text) > length:\n text = text[:length] + '...'\n return text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_apply_source_workaround_apply_source_workaround.if_isinstance_node_.return": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_apply_source_workaround_apply_source_workaround.if_isinstance_node_.return", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 114, "end_line": 173, "span_ids": ["apply_source_workaround"], "tokens": 763}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def apply_source_workaround(node: Element) -> None:\n # workaround: nodes.term have wrong rawsource if classifier is specified.\n # The behavior of docutils-0.11, 0.12 is:\n # * when ``term text : classifier1 : classifier2`` is specified,\n # * rawsource of term node will have: ``term text : classifier1 : classifier2``\n # * rawsource of classifier node will be None\n if isinstance(node, nodes.classifier) and not node.rawsource:\n logger.debug('[i18n] PATCH: %r to have source, line and rawsource: %s',\n get_full_module_name(node), repr_domxml(node))\n definition_list_item = node.parent\n node.source = definition_list_item.source\n node.line = definition_list_item.line - 1\n node.rawsource = node.astext() # set 'classifier1' (or 'classifier2')\n elif isinstance(node, nodes.classifier) and not node.source:\n # docutils-0.15 fills in rawsource attribute, but not in source.\n node.source = node.parent.source\n if isinstance(node, nodes.image) and node.source is None:\n logger.debug('[i18n] PATCH: %r to have source, line: %s',\n get_full_module_name(node), repr_domxml(node))\n node.source, node.line = node.parent.source, node.parent.line\n if isinstance(node, nodes.title) and node.source is None:\n logger.debug('[i18n] PATCH: %r to have source: %s',\n get_full_module_name(node), repr_domxml(node))\n node.source, node.line = node.parent.source, node.parent.line\n if isinstance(node, nodes.term):\n logger.debug('[i18n] PATCH: %r to have rawsource: %s',\n get_full_module_name(node), repr_domxml(node))\n # strip classifier from rawsource of term\n for classifier in reversed(list(node.parent.findall(nodes.classifier))):\n node.rawsource = re.sub(r'\\s*:\\s*%s' % re.escape(classifier.astext()),\n '', node.rawsource)\n if isinstance(node, nodes.topic) and node.source is None:\n # docutils-0.18 does not fill the source attribute of topic\n logger.debug('[i18n] PATCH: %r to have source, line: %s',\n get_full_module_name(node), repr_domxml(node))\n node.source, node.line = node.parent.source, node.parent.line\n\n # workaround: literal_block under bullet list (#4913)\n if isinstance(node, nodes.literal_block) and node.source is None:\n node.source = get_node_source(node)\n\n # workaround: recommonmark-0.2.0 doesn't set rawsource attribute\n if not node.rawsource:\n node.rawsource = node.astext()\n\n if node.source and node.rawsource:\n return\n\n # workaround: some docutils nodes doesn't have source, line.\n if (isinstance(node, (\n nodes.rubric, # #1305 rubric directive\n nodes.line, # #1477 line node\n nodes.image, # #3093 image directive in substitution\n nodes.field_name, # #3335 field list syntax\n ))):\n logger.debug('[i18n] PATCH: %r to have source and line: %s',\n get_full_module_name(node), repr_domxml(node))\n node.source = get_node_source(node) or ''\n node.line = 0 # need fix docutils to get `node.line`\n return", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_IGNORED_NODES_is_translatable.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_IGNORED_NODES_is_translatable.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 176, "end_line": 235, "span_ids": ["is_pending_meta", "impl:8", "is_translatable"], "tokens": 521}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "IGNORED_NODES = (\n nodes.Invisible,\n nodes.literal_block,\n nodes.doctest_block,\n addnodes.versionmodified,\n # XXX there are probably more\n)\n\n\ndef is_pending_meta(node: Node) -> bool:\n if (isinstance(node, nodes.pending) and\n isinstance(node.details.get('nodes', [None])[0], addnodes.meta)):\n return True\n else:\n return False\n\n\ndef is_translatable(node: Node) -> bool:\n if isinstance(node, addnodes.translatable):\n return True\n\n # image node marked as translatable or having alt text\n if isinstance(node, nodes.image) and (node.get('translatable') or node.get('alt')):\n return True\n\n if isinstance(node, nodes.Inline) and 'translatable' not in node: # type: ignore\n # inline node must not be translated if 'translatable' is not set\n return False\n\n if isinstance(node, nodes.TextElement):\n if not node.source:\n logger.debug('[i18n] SKIP %r because no node.source: %s',\n get_full_module_name(node), repr_domxml(node))\n return False # built-in message\n if isinstance(node, IGNORED_NODES) and 'translatable' not in node:\n logger.debug(\"[i18n] SKIP %r because node is in IGNORED_NODES \"\n \"and no node['translatable']: %s\",\n get_full_module_name(node), repr_domxml(node))\n return False\n if not node.get('translatable', True):\n # not(node['translatable'] == True or node['translatable'] is None)\n logger.debug(\"[i18n] SKIP %r because not node['translatable']: %s\",\n get_full_module_name(node), repr_domxml(node))\n return False\n # <field_name>orphan</field_name>\n # XXX ignore all metadata (== docinfo)\n if isinstance(node, nodes.field_name) and node.children[0] == 'orphan':\n logger.debug('[i18n] SKIP %r because orphan node: %s',\n get_full_module_name(node), repr_domxml(node))\n return False\n return True\n\n if is_pending_meta(node) or isinstance(node, addnodes.meta):\n # docutils-0.17 or older\n return True\n elif isinstance(node, addnodes.docutils_meta):\n # docutils-0.18+\n return True\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_nested_parse_with_titles_nested_parse_with_titles.try_.finally_.state.memo.section_level.surrounding_section_level": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_nested_parse_with_titles_nested_parse_with_titles.try_.finally_.state.memo.section_level.surrounding_section_level", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 326, "end_line": 342, "span_ids": ["nested_parse_with_titles"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def nested_parse_with_titles(state: Any, content: StringList, node: Node) -> str:\n \"\"\"Version of state.nested_parse() that allows titles and does not require\n titles to have the same decoration as the calling document.\n\n This is useful when the parsed content comes from a completely different\n context, such as docstrings.\n \"\"\"\n # hack around title style bookkeeping\n surrounding_title_styles = state.memo.title_styles\n surrounding_section_level = state.memo.section_level\n state.memo.title_styles = []\n state.memo.section_level = 0\n try:\n return state.nested_parse(content, 0, node, match_titles=1)\n finally:\n state.memo.title_styles = surrounding_title_styles\n state.memo.section_level = surrounding_section_level", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_clean_astext_indextypes._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_clean_astext_indextypes._", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 346, "end_line": 366, "span_ids": ["impl:16", "split_explicit_title", "clean_astext"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def clean_astext(node: Element) -> str:\n \"\"\"Like node.astext(), but ignore images.\"\"\"\n node = node.deepcopy()\n for img in node.findall(nodes.image):\n img['alt'] = ''\n for raw in list(node.findall(nodes.raw)):\n raw.parent.remove(raw)\n return node.astext()\n\n\ndef split_explicit_title(text: str) -> Tuple[bool, str, str]:\n \"\"\"Split role content into title and target, if given.\"\"\"\n match = explicit_title_re.match(text)\n if match:\n return True, match.group(1), match.group(2)\n return False, text, text\n\n\nindextypes = [\n 'single', 'pair', 'double', 'triple', 'see', 'seealso',\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_process_index_entry_process_index_entry.return.indexentries": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_process_index_entry_process_index_entry.return.indexentries", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 369, "end_line": 405, "span_ids": ["process_index_entry"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def process_index_entry(entry: str, targetid: str\n ) -> List[Tuple[str, str, str, str, Optional[str]]]:\n from sphinx.domains.python import pairindextypes\n\n indexentries: List[Tuple[str, str, str, str, Optional[str]]] = []\n entry = entry.strip()\n oentry = entry\n main = ''\n if entry.startswith('!'):\n main = 'main'\n entry = entry[1:].lstrip()\n for type in pairindextypes:\n if entry.startswith(type + ':'):\n value = entry[len(type) + 1:].strip()\n value = pairindextypes[type] + '; ' + value\n indexentries.append(('pair', value, targetid, main, None))\n break\n else:\n for type in indextypes:\n if entry.startswith(type + ':'):\n value = entry[len(type) + 1:].strip()\n if type == 'double':\n type = 'pair'\n indexentries.append((type, value, targetid, main, None))\n break\n # shorthand notation for single entries\n else:\n for value in oentry.split(','):\n value = value.strip()\n main = ''\n if value.startswith('!'):\n main = 'main'\n value = value[1:].lstrip()\n if not value:\n continue\n indexentries.append(('single', value, targetid, main, None))\n return indexentries", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_inline_all_toctrees_inline_all_toctrees.return.tree": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_inline_all_toctrees_inline_all_toctrees.return.tree", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 408, "end_line": 439, "span_ids": ["inline_all_toctrees"], "tokens": 352}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def inline_all_toctrees(builder: \"Builder\", docnameset: Set[str], docname: str,\n tree: nodes.document, colorfunc: Callable, traversed: List[str]\n ) -> nodes.document:\n \"\"\"Inline all toctrees in the *tree*.\n\n Record all docnames in *docnameset*, and output docnames with *colorfunc*.\n \"\"\"\n tree = cast(nodes.document, tree.deepcopy())\n for toctreenode in list(tree.findall(addnodes.toctree)):\n newnodes = []\n includefiles = map(str, toctreenode['includefiles'])\n for includefile in includefiles:\n if includefile not in traversed:\n try:\n traversed.append(includefile)\n logger.info(colorfunc(includefile) + \" \", nonl=True)\n subtree = inline_all_toctrees(builder, docnameset, includefile,\n builder.env.get_doctree(includefile),\n colorfunc, traversed)\n docnameset.add(includefile)\n except Exception:\n logger.warning(__('toctree contains ref to nonexisting file %r'),\n includefile, location=docname)\n else:\n sof = addnodes.start_of_file(docname=includefile)\n sof.children = subtree.children\n for sectionnode in sof.findall(nodes.section):\n if 'docname' not in sectionnode:\n sectionnode['docname'] = includefile\n newnodes.append(sof)\n toctreenode.parent.replace(toctreenode, newnodes)\n return tree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__make_id__make_id.return.str_id_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__make_id__make_id.return.str_id_", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 440, "end_line": 464, "span_ids": ["_make_id"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _make_id(string: str) -> str:\n id = string.translate(_non_id_translate_digraphs)\n id = id.translate(_non_id_translate)\n # get rid of non-ascii characters.\n # 'ascii' lowercase to prevent problems with turkish locale.\n id = unicodedata.normalize('NFKD', id).encode('ascii', 'ignore').decode('ascii')\n # shrink runs of whitespace and replace by hyphen\n id = _non_id_chars.sub('-', ' '.join(id.split()))\n id = _non_id_at_ends.sub('', id)\n return str(id)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__non_id_chars__non_id_translate_digraphs._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__non_id_chars__non_id_translate_digraphs._", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 469, "end_line": 512, "span_ids": ["impl:24", "impl:18"], "tokens": 672}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_non_id_chars = re.compile('[^a-zA-Z0-9._]+')\n_non_id_at_ends = re.compile('^[-0-9._]+|-+$')\n_non_id_translate = {\n 0x00f8: 'o', # o with stroke\n 0x0111: 'd', # d with stroke\n 0x0127: 'h', # h with stroke\n 0x0131: 'i', # dotless i\n 0x0142: 'l', # l with stroke\n 0x0167: 't', # t with stroke\n 0x0180: 'b', # b with stroke\n 0x0183: 'b', # b with topbar\n 0x0188: 'c', # c with hook\n 0x018c: 'd', # d with topbar\n 0x0192: 'f', # f with hook\n 0x0199: 'k', # k with hook\n 0x019a: 'l', # l with bar\n 0x019e: 'n', # n with long right leg\n 0x01a5: 'p', # p with hook\n 0x01ab: 't', # t with palatal hook\n 0x01ad: 't', # t with hook\n 0x01b4: 'y', # y with hook\n 0x01b6: 'z', # z with stroke\n 0x01e5: 'g', # g with stroke\n 0x0225: 'z', # z with hook\n 0x0234: 'l', # l with curl\n 0x0235: 'n', # n with curl\n 0x0236: 't', # t with curl\n 0x0237: 'j', # dotless j\n 0x023c: 'c', # c with stroke\n 0x023f: 's', # s with swash tail\n 0x0240: 'z', # z with swash tail\n 0x0247: 'e', # e with stroke\n 0x0249: 'j', # j with stroke\n 0x024b: 'q', # q with hook tail\n 0x024d: 'r', # r with stroke\n 0x024f: 'y', # y with stroke\n}\n_non_id_translate_digraphs = {\n 0x00df: 'sz', # ligature sz\n 0x00e6: 'ae', # ae\n 0x0153: 'oe', # ligature oe\n 0x0238: 'db', # db digraph\n 0x0239: 'qp', # qp digraph\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_make_id_make_id.return.node_id": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_make_id_make_id.return.node_id", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 513, "end_line": 536, "span_ids": ["make_id"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def make_id(env: \"BuildEnvironment\", document: nodes.document,\n prefix: str = '', term: str = None) -> str:\n \"\"\"Generate an appropriate node_id for given *prefix* and *term*.\"\"\"\n node_id = None\n if prefix:\n idformat = prefix + \"-%s\"\n else:\n idformat = (document.settings.id_prefix or \"id\") + \"%s\"\n\n # try to generate node_id by *term*\n if prefix and term:\n node_id = _make_id(idformat % term)\n if node_id == prefix:\n # *term* is not good to generate a node_id.\n node_id = None\n elif term:\n node_id = _make_id(term)\n if node_id == '':\n node_id = None # fallback to None\n\n while node_id is None or node_id in document.ids:\n node_id = idformat % env.new_serialno(prefix)\n\n return node_id", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_relative_uri_relative_uri.return._SEP_len_b2_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_relative_uri_relative_uri.return._SEP_len_b2_", "embedding": null, "metadata": {"file_path": "sphinx/util/osutil.py", "file_name": "osutil.py", "file_type": "text/x-python", "category": "implementation", "start_line": 58, "end_line": 78, "span_ids": ["relative_uri"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def relative_uri(base: str, to: str) -> str:\n \"\"\"Return a relative URL from ``base`` to ``to``.\"\"\"\n if to.startswith(SEP):\n return to\n b2 = base.split('#')[0].split(SEP)\n t2 = to.split('#')[0].split(SEP)\n # remove common segments (except the last segment)\n for x, y in zip(b2[:-1], t2[:-1]):\n if x != y:\n break\n b2.pop(0)\n t2.pop(0)\n if b2 == t2:\n # Special case: relative_uri('f/index.html','f/index.html')\n # returns '', not 'index.html'\n return ''\n if len(b2) == 1 and t2 == ['']:\n # Special case: relative_uri('f/index.html','f/') should\n # return './', not ''\n return '.' + SEP\n return ('..' + SEP) * (len(b2) - 1) + SEP.join(t2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks_ParallelTasks.__init__.self._taskid.0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks_ParallelTasks.__init__.self._taskid.0", "embedding": null, "metadata": {"file_path": "sphinx/util/parallel.py", "file_name": "parallel.py", "file_type": "text/x-python", "category": "implementation", "start_line": 42, "end_line": 60, "span_ids": ["ParallelTasks"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ParallelTasks:\n \"\"\"Executes *nproc* tasks in parallel after forking.\"\"\"\n\n def __init__(self, nproc: int) -> None:\n self.nproc = nproc\n # (optional) function performed by each task on the result of main task\n self._result_funcs: Dict[int, Callable] = {}\n # task arguments\n self._args: Dict[int, Optional[List[Any]]] = {}\n # list of subprocesses (both started and waiting)\n self._procs: Dict[int, multiprocessing.context.ForkProcess] = {}\n # list of receiving pipe connections of running subprocesses\n self._precvs: Dict[int, Any] = {}\n # list of receiving pipe connections of waiting subprocesses\n self._precvsWaiting: Dict[int, Any] = {}\n # number of working subprocesses\n self._pworking = 0\n # task number of each subprocess\n self._taskid = 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks._process_ParallelTasks._process.pipe_send_failed_collec": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks._process_ParallelTasks._process.pipe_send_failed_collec", "embedding": null, "metadata": {"file_path": "sphinx/util/parallel.py", "file_name": "parallel.py", "file_type": "text/x-python", "category": "implementation", "start_line": 77, "end_line": 91, "span_ids": ["ParallelTasks._process"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ParallelTasks:\n\n def _process(self, pipe: Any, func: Callable, arg: Any) -> None:\n try:\n collector = logging.LogCollector()\n with collector.collect():\n if arg is None:\n ret = func()\n else:\n ret = func(arg)\n failed = False\n except BaseException as err:\n failed = True\n errmsg = traceback.format_exception_only(err.__class__, err)[0].strip()\n ret = (errmsg, traceback.format_exc())\n logging.convert_serializable(collector.logs)\n pipe.send((failed, collector.logs, ret))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_make_chunks_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_make_chunks_", "embedding": null, "metadata": {"file_path": "sphinx/util/parallel.py", "file_name": "parallel.py", "file_type": "text/x-python", "category": "implementation", "start_line": 131, "end_line": 145, "span_ids": ["make_chunks"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def make_chunks(arguments: Sequence[str], nproc: int, maxbatch: int = 10) -> List[Any]:\n # determine how many documents to read in one go\n nargs = len(arguments)\n chunksize = nargs // nproc\n if chunksize >= maxbatch:\n # try to improve batch size vs. number of batches\n chunksize = int(sqrt(nargs / nproc * maxbatch))\n if chunksize == 0:\n chunksize = 1\n nchunks, rest = divmod(nargs, chunksize)\n if rest:\n nchunks += 1\n # partition documents in \"chunks\" that will be written by one Process\n return [arguments[i * chunksize:(i + 1) * chunksize] for i in range(nchunks)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/png.py_write_png_depth_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/png.py_write_png_depth_", "embedding": null, "metadata": {"file_path": "sphinx/util/png.py", "file_name": "png.py", "file_type": "text/x-python", "category": "implementation", "start_line": 36, "end_line": 52, "span_ids": ["write_png_depth"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def write_png_depth(filename: str, depth: int) -> None:\n \"\"\"Write the special tEXt chunk indicating the depth to a PNG file.\n\n The chunk is placed immediately before the special IEND chunk.\n \"\"\"\n data = struct.pack('!i', depth)\n with open(filename, 'r+b') as f:\n # seek to the beginning of the IEND chunk\n f.seek(-LEN_IEND, 2)\n # overwrite it with the depth chunk\n f.write(DEPTH_CHUNK_LEN + DEPTH_CHUNK_START + data)\n # calculate the checksum over chunk name and data\n crc = binascii.crc32(DEPTH_CHUNK_START + data) & 0xffffffff\n f.write(struct.pack('!I', crc))\n # replace the IEND chunk\n f.write(IEND_CHUNK)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py__get_tls_cacert__get_tls_cacert.if_not_certs_.else_.return.certs_get_hostname_True_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py__get_tls_cacert__get_tls_cacert.if_not_certs_.else_.return.certs_get_hostname_True_", "embedding": null, "metadata": {"file_path": "sphinx/util/requests.py", "file_name": "requests.py", "file_type": "text/x-python", "category": "implementation", "start_line": 65, "end_line": 84, "span_ids": ["_get_tls_cacert"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_tls_cacert(url: str, config: Config) -> Union[str, bool]:\n \"\"\"Get additional CA cert for a specific URL.\n\n This also returns ``False`` if verification is disabled.\n And returns ``True`` if additional CA cert not found.\n \"\"\"\n if not config.tls_verify:\n return False\n\n certs = getattr(config, 'tls_cacerts', None)\n if not certs:\n return True\n elif isinstance(certs, (str, tuple)):\n return certs # type: ignore\n else:\n hostname = urlsplit(url)[1]\n if '@' in hostname:\n hostname = hostname.split('@')[1]\n\n return certs.get(hostname, True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py__get_user_agent_get.with_ignore_insecure_warn.return.requests_get_url_kwarg": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py__get_user_agent_get.with_ignore_insecure_warn.return.requests_get_url_kwarg", "embedding": null, "metadata": {"file_path": "sphinx/util/requests.py", "file_name": "requests.py", "file_type": "text/x-python", "category": "implementation", "start_line": 87, "end_line": 111, "span_ids": ["get", "_get_user_agent"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_user_agent(config: Config) -> str:\n if config.user_agent:\n return config.user_agent\n else:\n return ' '.join([\n 'Sphinx/%s' % sphinx.__version__,\n 'requests/%s' % requests.__version__,\n 'python/%s' % '.'.join(map(str, sys.version_info[:3])),\n ])\n\n\ndef get(url: str, **kwargs: Any) -> requests.Response:\n \"\"\"Sends a GET request like requests.get().\n\n This sets up User-Agent header and TLS verification automatically.\"\"\"\n headers = kwargs.setdefault('headers', {})\n config = kwargs.pop('config', None)\n if config:\n kwargs.setdefault('verify', _get_tls_cacert(url, config))\n headers.setdefault('User-Agent', _get_user_agent(config))\n else:\n headers.setdefault('User-Agent', useragent_header[0][1])\n\n with ignore_insecure_warning(**kwargs):\n return requests.get(url, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py_head_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py_head_", "embedding": null, "metadata": {"file_path": "sphinx/util/requests.py", "file_name": "requests.py", "file_type": "text/x-python", "category": "implementation", "start_line": 114, "end_line": 128, "span_ids": ["head"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def head(url: str, **kwargs: Any) -> requests.Response:\n \"\"\"Sends a HEAD request like requests.head().\n\n This sets up User-Agent header and TLS verification automatically.\"\"\"\n headers = kwargs.setdefault('headers', {})\n config = kwargs.pop('config', None)\n if config:\n kwargs.setdefault('verify', _get_tls_cacert(url, config))\n headers.setdefault('User-Agent', _get_user_agent(config))\n else:\n headers.setdefault('User-Agent', useragent_header[0][1])\n\n with ignore_insecure_warning(**kwargs):\n return requests.head(url, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/rst.py_prepend_prolog_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/rst.py_prepend_prolog_", "embedding": null, "metadata": {"file_path": "sphinx/util/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 81, "end_line": 114, "span_ids": ["append_epilog", "prepend_prolog"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def prepend_prolog(content: StringList, prolog: str) -> None:\n \"\"\"Prepend a string to content body as prolog.\"\"\"\n if prolog:\n pos = 0\n for line in content:\n if docinfo_re.match(line):\n pos += 1\n else:\n break\n\n if pos > 0:\n # insert a blank line after docinfo\n content.insert(pos, '', '<generated>', 0)\n pos += 1\n\n # insert prolog (after docinfo if exists)\n for lineno, line in enumerate(prolog.splitlines()):\n content.insert(pos + lineno, line, '<rst_prolog>', lineno)\n\n content.insert(pos + lineno + 1, '', '<generated>', 0)\n\n\ndef append_epilog(content: StringList, epilog: str) -> None:\n \"\"\"Append a string to content body as epilog.\"\"\"\n if epilog:\n if 0 < len(content):\n source, lineno = content.info(-1)\n else:\n source = '<generated>'\n lineno = 0\n content.append('', source, lineno + 1)\n for lineno, line in enumerate(epilog.splitlines()):\n content.append(line, '<rst_epilog>', lineno)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_re_langquotes._af_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_re_langquotes._af_", "embedding": null, "metadata": {"file_path": "sphinx/util/smartypants.py", "file_name": "smartypants.py", "file_type": "text/x-python", "category": "implementation", "start_line": 26, "end_line": 125, "span_ids": ["impl", "imports"], "tokens": 1450}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import re\nimport warnings\nfrom typing import Generator, Iterable, Tuple\n\nfrom docutils.utils import smartquotes\n\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.util.docutils import __version_info__ as docutils_version\n\nwarnings.warn('sphinx.util.smartypants is deprecated.',\n RemovedInSphinx60Warning)\n\nlangquotes = {'af': '\u201c\u201d\u2018\u2019',\n 'af-x-altquot': '\u201e\u201d\u201a\u2019',\n 'bg': '\u201e\u201c\u201a\u2018', # Bulgarian, https://bg.wikipedia.org/wiki/\u041a\u0430\u0432\u0438\u0447\u043a\u0438\n 'ca': '\u00ab\u00bb\u201c\u201d',\n 'ca-x-altquot': '\u201c\u201d\u2018\u2019',\n 'cs': '\u201e\u201c\u201a\u2018',\n 'cs-x-altquot': '\u00bb\u00ab\u203a\u2039',\n 'da': '\u00bb\u00ab\u203a\u2039',\n 'da-x-altquot': '\u201e\u201c\u201a\u2018',\n # 'da-x-altquot2': '\u201d\u201d\u2019\u2019',\n 'de': '\u201e\u201c\u201a\u2018',\n 'de-x-altquot': '\u00bb\u00ab\u203a\u2039',\n 'de-ch': '\u00ab\u00bb\u2039\u203a',\n 'el': '\u00ab\u00bb\u201c\u201d',\n 'en': '\u201c\u201d\u2018\u2019',\n 'en-uk-x-altquot': '\u2018\u2019\u201c\u201d', # Attention: \" \u2192 \u2018 and ' \u2192 \u201c !\n 'eo': '\u201c\u201d\u2018\u2019',\n 'es': '\u00ab\u00bb\u201c\u201d',\n 'es-x-altquot': '\u201c\u201d\u2018\u2019',\n 'et': '\u201e\u201c\u201a\u2018', # no secondary quote listed in\n 'et-x-altquot': '\u00ab\u00bb\u2039\u203a', # the sources above (wikipedia.org)\n 'eu': '\u00ab\u00bb\u2039\u203a',\n 'fi': '\u201d\u201d\u2019\u2019',\n 'fi-x-altquot': '\u00bb\u00bb\u203a\u203a',\n 'fr': ('\u00ab\u00a0', '\u00a0\u00bb', '\u201c', '\u201d'), # full no-break space\n 'fr-x-altquot': ('\u00ab\u202f', '\u202f\u00bb', '\u201c', '\u201d'), # narrow no-break space\n 'fr-ch': '\u00ab\u00bb\u2039\u203a',\n 'fr-ch-x-altquot': ('\u00ab\u202f', '\u202f\u00bb', '\u2039\u202f', '\u202f\u203a'), # narrow no-break space\n # http://typoguide.ch/\n 'gl': '\u00ab\u00bb\u201c\u201d',\n 'he': '\u201d\u201c\u00bb\u00ab', # Hebrew is RTL, test position:\n 'he-x-altquot': '\u201e\u201d\u201a\u2019', # low quotation marks are opening.\n # 'he-x-altquot': '\u201c\u201e\u2018\u201a', # RTL: low quotation marks opening\n 'hr': '\u201e\u201d\u2018\u2019', # https://hrvatska-tipografija.com/polunavodnici/\n 'hr-x-altquot': '\u00bb\u00ab\u203a\u2039',\n 'hsb': '\u201e\u201c\u201a\u2018',\n 'hsb-x-altquot': '\u00bb\u00ab\u203a\u2039',\n 'hu': '\u201e\u201d\u00ab\u00bb',\n 'is': '\u201e\u201c\u201a\u2018',\n 'it': '\u00ab\u00bb\u201c\u201d',\n 'it-ch': '\u00ab\u00bb\u2039\u203a',\n 'it-x-altquot': '\u201c\u201d\u2018\u2019',\n # 'it-x-altquot2': '\u201c\u201e\u2018\u201a', # [7] in headlines\n 'ja': '\u300c\u300d\u300e\u300f',\n 'lt': '\u201e\u201c\u201a\u2018',\n 'lv': '\u201e\u201c\u201a\u2018',\n 'mk': '\u201e\u201c\u201a\u2018', # Macedonian,\n # https://mk.wikipedia.org/wiki/\u041f\u0440\u0430\u0432\u043e\u043f\u0438\u0441_\u0438_\u043f\u0440\u0430\u0432\u043e\u0433\u043e\u0432\u043e\u0440_\u043d\u0430_\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438\u043e\u0442_\u0458\u0430\u0437\u0438\u043a\n 'nl': '\u201c\u201d\u2018\u2019',\n 'nl-x-altquot': '\u201e\u201d\u201a\u2019',\n # 'nl-x-altquot2': '\u201d\u201d\u2019\u2019',\n 'nb': '\u00ab\u00bb\u2019\u2019', # Norsk bokm\u00e5l (canonical form 'no')\n 'nn': '\u00ab\u00bb\u2019\u2019', # Nynorsk [10]\n 'nn-x-altquot': '\u00ab\u00bb\u2018\u2019', # [8], [10]\n # 'nn-x-altquot2': '\u00ab\u00bb\u00ab\u00bb', # [9], [10]\n # 'nn-x-altquot3': '\u201e\u201c\u201a\u2018', # [10]\n 'no': '\u00ab\u00bb\u2019\u2019', # Norsk bokm\u00e5l [10]\n 'no-x-altquot': '\u00ab\u00bb\u2018\u2019', # [8], [10]\n # 'no-x-altquot2': '\u00ab\u00bb\u00ab\u00bb', # [9], [10]\n # 'no-x-altquot3': '\u201e\u201c\u201a\u2018', # [10]\n 'pl': '\u201e\u201d\u00ab\u00bb',\n 'pl-x-altquot': '\u00ab\u00bb\u201a\u2019',\n # 'pl-x-altquot2': '\u201e\u201d\u201a\u2019',\n # https://pl.wikipedia.org/wiki/Cudzys%C5%82%C3%B3w\n 'pt': '\u00ab\u00bb\u201c\u201d',\n 'pt-br': '\u201c\u201d\u2018\u2019',\n 'ro': '\u201e\u201d\u00ab\u00bb',\n 'ru': '\u00ab\u00bb\u201e\u201c',\n 'sh': '\u201e\u201d\u201a\u2019', # Serbo-Croatian\n 'sh-x-altquot': '\u00bb\u00ab\u203a\u2039',\n 'sk': '\u201e\u201c\u201a\u2018', # Slovak\n 'sk-x-altquot': '\u00bb\u00ab\u203a\u2039',\n 'sl': '\u201e\u201c\u201a\u2018', # Slovenian\n 'sl-x-altquot': '\u00bb\u00ab\u203a\u2039',\n 'sq': '\u00ab\u00bb\u2039\u203a', # Albanian\n 'sq-x-altquot': '\u201c\u201e\u2018\u201a',\n 'sr': '\u201e\u201d\u2019\u2019',\n 'sr-x-altquot': '\u00bb\u00ab\u203a\u2039',\n 'sv': '\u201d\u201d\u2019\u2019',\n 'sv-x-altquot': '\u00bb\u00bb\u203a\u203a',\n 'tr': '\u201c\u201d\u2018\u2019',\n 'tr-x-altquot': '\u00ab\u00bb\u2039\u203a',\n # 'tr-x-altquot2': '\u201c\u201e\u2018\u201a', # [7] antiquated?\n 'uk': '\u00ab\u00bb\u201e\u201c',\n 'uk-x-altquot': '\u201e\u201c\u201a\u2018',\n 'zh-cn': '\u201c\u201d\u2018\u2019',\n 'zh-tw': '\u300c\u300d\u300e\u300f',\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educateQuotes_educateQuotes.closing_single_quotes_regex_12.re_compile_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educateQuotes_educateQuotes.closing_single_quotes_regex_12.re_compile_r_", "embedding": null, "metadata": {"file_path": "sphinx/util/smartypants.py", "file_name": "smartypants.py", "file_type": "text/x-python", "category": "implementation", "start_line": 126, "end_line": 199, "span_ids": ["educateQuotes"], "tokens": 786}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def educateQuotes(text: str, language: str = 'en') -> str:\n \"\"\"\n Parameter: - text string (unicode or bytes).\n - language (`BCP 47` language tag.)\n Returns: The `text`, with \"educated\" curly quote characters.\n\n Example input: \"Isn't this fun?\"\n Example output: \u201cIsn\u2019t this fun?\u201c;\n \"\"\"\n\n smart = smartquotes.smartchars(language)\n try:\n apostrophe = smart.apostrophe\n except Exception:\n apostrophe = '\u2019'\n\n # oldtext = text\n punct_class = r\"\"\"[!\"#\\$\\%'()*+,-.\\/:;<=>?\\@\\[\\\\\\]\\^_`{|}~]\"\"\"\n\n # Special case if the very first character is a quote\n # followed by punctuation at a non-word-break.\n # Close the quotes by brute force:\n text = re.sub(r\"\"\"^'(?=%s\\\\B)\"\"\" % (punct_class,), smart.csquote, text)\n text = re.sub(r\"\"\"^\"(?=%s\\\\B)\"\"\" % (punct_class,), smart.cpquote, text)\n\n # Special case for double sets of quotes, e.g.:\n # <p>He said, \"'Quoted' words in a larger quote.\"</p>\n text = re.sub(r\"\"\"\"'(?=\\w)\"\"\", smart.opquote + smart.osquote, text)\n text = re.sub(r\"\"\"'\"(?=\\w)\"\"\", smart.osquote + smart.opquote, text)\n\n # Special case for decade abbreviations (the '80s):\n if language.startswith('en'): # TODO similar cases in other languages?\n text = re.sub(r\"\"\"'(?=\\d{2}s)\"\"\", apostrophe, text, flags=re.UNICODE)\n\n close_class = r\"\"\"[^\\ \\t\\r\\n\\[\\{\\(\\-]\"\"\"\n dec_dashes = r\"\"\"–|—\"\"\"\n\n # Get most opening single quotes:\n opening_single_quotes_regex = re.compile(r\"\"\"\n (\n \\s | # a whitespace char, or\n   | # a non-breaking space entity, or\n -- | # dashes, or\n &[mn]dash; | # named dash entities\n %s | # or decimal entities\n &\\#x201[34]; # or hex\n )\n ' # the quote\n (?=\\w) # followed by a word character\n \"\"\" % (dec_dashes,), re.VERBOSE | re.UNICODE)\n text = opening_single_quotes_regex.sub(r'\\1' + smart.osquote, text)\n\n # In many locales, single closing quotes are different from apostrophe:\n if smart.csquote != apostrophe:\n apostrophe_regex = re.compile(r\"(?<=(\\w|\\d))'(?=\\w)\", re.UNICODE)\n text = apostrophe_regex.sub(apostrophe, text)\n # TODO: keep track of quoting level to recognize apostrophe in, e.g.,\n # \"Ich fass' es nicht.\"\n\n closing_single_quotes_regex = re.compile(r\"\"\"\n (%s)\n '\n (?!\\s | # whitespace\n s\\b |\n \\d # digits ('80s)\n )\n \"\"\" % (close_class,), re.VERBOSE | re.UNICODE)\n text = closing_single_quotes_regex.sub(r'\\1' + smart.csquote, text)\n\n closing_single_quotes_regex = re.compile(r\"\"\"\n (%s)\n '\n (\\s | s\\b)\n \"\"\" % (close_class,), re.VERBOSE | re.UNICODE)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educateQuotes.text_13_educateQuotes.return.text": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educateQuotes.text_13_educateQuotes.return.text", "embedding": null, "metadata": {"file_path": "sphinx/util/smartypants.py", "file_name": "smartypants.py", "file_type": "text/x-python", "category": "implementation", "start_line": 200, "end_line": 237, "span_ids": ["educateQuotes"], "tokens": 372}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def educateQuotes(text: str, language: str = 'en') -> str:\n # ... other code\n text = closing_single_quotes_regex.sub(r'\\1%s\\2' % smart.csquote, text)\n\n # Any remaining single quotes should be opening ones:\n text = re.sub(r\"\"\"'\"\"\", smart.osquote, text)\n\n # Get most opening double quotes:\n opening_double_quotes_regex = re.compile(r\"\"\"\n (\n \\s | # a whitespace char, or\n   | # a non-breaking space entity, or\n -- | # dashes, or\n &[mn]dash; | # named dash entities\n %s | # or decimal entities\n &\\#x201[34]; # or hex\n )\n \" # the quote\n (?=\\w) # followed by a word character\n \"\"\" % (dec_dashes,), re.VERBOSE)\n text = opening_double_quotes_regex.sub(r'\\1' + smart.opquote, text)\n\n # Double closing quotes:\n closing_double_quotes_regex = re.compile(r\"\"\"\n #(%s)? # character that indicates the quote should be closing\n \"\n (?=\\s)\n \"\"\" % (close_class,), re.VERBOSE)\n text = closing_double_quotes_regex.sub(smart.cpquote, text)\n\n closing_double_quotes_regex = re.compile(r\"\"\"\n (%s) # character that indicates the quote should be closing\n \"\n \"\"\" % (close_class,), re.VERBOSE)\n text = closing_double_quotes_regex.sub(r'\\1' + smart.cpquote, text)\n\n # Any remaining quotes should be opening ones.\n text = re.sub(r'\"', smart.opquote, text)\n\n return text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educate_tokens_educate_tokens._context_to_curl_leading": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educate_tokens_educate_tokens._context_to_curl_leading", "embedding": null, "metadata": {"file_path": "sphinx/util/smartypants.py", "file_name": "smartypants.py", "file_type": "text/x-python", "category": "implementation", "start_line": 240, "end_line": 319, "span_ids": ["educate_tokens"], "tokens": 765}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def educate_tokens(text_tokens: Iterable[Tuple[str, str]],\n attr: str = smartquotes.default_smartypants_attr,\n language: str = 'en'\n ) -> Generator[str, None, None]:\n \"\"\"Return iterator that \"educates\" the items of `text_tokens`.\n\n This is modified to intercept the ``attr='2'`` as it was used by the\n Docutils 0.13.1 SmartQuotes transform in a hard coded way. Docutils 0.14\n uses ``'qDe'``` and is configurable, and its choice is backported here\n for use by Sphinx with earlier Docutils releases. Similarly ``'1'`` is\n replaced by ``'qde'``.\n\n Use ``attr='qDbe'``, resp. ``'qdbe'`` to recover Docutils effect of ``'2'``,\n resp. ``'1'``.\n\n refs: https://sourceforge.net/p/docutils/mailman/message/35869025/\n \"\"\"\n\n # Parse attributes:\n # 0 : do nothing\n # 1 : set all (but backticks)\n # 2 : set all (but backticks), using old school en- and em- dash shortcuts\n # 3 : set all, using inverted old school en and em- dash shortcuts\n #\n # q : quotes\n # b : backtick quotes (``double'' only)\n # B : backtick quotes (``double'' and `single')\n # d : dashes\n # D : old school dashes\n # i : inverted old school dashes\n # e : ellipses\n # w : convert " entities to \" for Dreamweaver users\n\n convert_quot = False # translate " entities into normal quotes?\n do_dashes = 0\n do_backticks = 0\n do_quotes = False\n do_ellipses = False\n do_stupefy = False\n\n if attr == \"1\": # Do everything, turn all options on.\n do_quotes = True\n # do_backticks = 1\n do_dashes = 1\n do_ellipses = True\n elif attr == \"2\":\n # Do everything, turn all options on, use old school dash shorthand.\n do_quotes = True\n # do_backticks = 1\n do_dashes = 2\n do_ellipses = True\n elif attr == \"3\":\n # Do everything, use inverted old school dash shorthand.\n do_quotes = True\n do_backticks = 1\n do_dashes = 3\n do_ellipses = True\n elif attr == \"-1\": # Special \"stupefy\" mode.\n do_stupefy = True\n else:\n if \"q\" in attr:\n do_quotes = True\n if \"b\" in attr:\n do_backticks = 1\n if \"B\" in attr:\n do_backticks = 2\n if \"d\" in attr:\n do_dashes = 1\n if \"D\" in attr:\n do_dashes = 2\n if \"i\" in attr:\n do_dashes = 3\n if \"e\" in attr:\n do_ellipses = True\n if \"w\" in attr:\n convert_quot = True\n\n prev_token_last_char = \" \"\n # Last character of the previous text token. Used as\n # context to curl leading quote characters correctly.\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educate_tokens.for_ttype_text_in_text_educate_tokens.for_ttype_text_in_text.yield_text": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_educate_tokens.for_ttype_text_in_text_educate_tokens.for_ttype_text_in_text.yield_text", "embedding": null, "metadata": {"file_path": "sphinx/util/smartypants.py", "file_name": "smartypants.py", "file_type": "text/x-python", "category": "implementation", "start_line": 323, "end_line": 375, "span_ids": ["educate_tokens"], "tokens": 443}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def educate_tokens(text_tokens: Iterable[Tuple[str, str]],\n attr: str = smartquotes.default_smartypants_attr,\n language: str = 'en'\n ) -> Generator[str, None, None]:\n # ... other code\n\n for (ttype, text) in text_tokens:\n\n # skip HTML and/or XML tags as well as empty text tokens\n # without updating the last character\n if ttype == 'tag' or not text:\n yield text\n continue\n\n # skip literal text (math, literal, raw, ...)\n if ttype == 'literal':\n prev_token_last_char = text[-1:]\n yield text\n continue\n\n last_char = text[-1:] # Remember last char before processing.\n\n text = smartquotes.processEscapes(text)\n\n if convert_quot:\n text = re.sub('"', '\"', text)\n\n if do_dashes == 1:\n text = smartquotes.educateDashes(text)\n elif do_dashes == 2:\n text = smartquotes.educateDashesOldSchool(text)\n elif do_dashes == 3:\n text = smartquotes.educateDashesOldSchoolInverted(text)\n\n if do_ellipses:\n text = smartquotes.educateEllipses(text)\n\n # Note: backticks need to be processed before quotes.\n if do_backticks:\n text = smartquotes.educateBackticks(text, language)\n\n if do_backticks == 2:\n text = smartquotes.educateSingleBackticks(text, language)\n\n if do_quotes:\n # Replace plain quotes to prevent conversion to\n # 2-character sequence in French.\n context = prev_token_last_char.replace('\"', ';').replace(\"'\", ';')\n text = educateQuotes(context + text, language)[1:]\n\n if do_stupefy:\n text = smartquotes.stupefyEntities(text, language)\n\n # Remember last char as context for the next token\n prev_token_last_char = last_char\n\n text = smartquotes.processEscapes(text, restore=True)\n\n yield text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_if_docutils_version_0__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/smartypants.py_if_docutils_version_0__", "embedding": null, "metadata": {"file_path": "sphinx/util/smartypants.py", "file_name": "smartypants.py", "file_type": "text/x-python", "category": "implementation", "start_line": 378, "end_line": 390, "span_ids": ["impl:4"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "if docutils_version < (0, 13, 2):\n # Monkey patch the old docutils versions to fix the issues mentioned\n # at https://sourceforge.net/p/docutils/bugs/313/\n # at https://sourceforge.net/p/docutils/bugs/317/\n # and more\n smartquotes.educateQuotes = educateQuotes\n smartquotes.educate_tokens = educate_tokens\n\n # Fix the issue with French quotes mentioned at\n # https://sourceforge.net/p/docutils/mailman/message/35760696/\n # Add/fix other languages as well\n smartquotes.smartchars.quotes = langquotes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer_PorterStemmer.__init__._j_is_a_general_offset_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer_PorterStemmer.__init__._j_is_a_general_offset_i", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 47, "span_ids": ["PorterStemmer"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def __init__(self) -> None:\n \"\"\"The main part of the stemming algorithm starts here.\n b is a buffer holding a word to be stemmed. The letters are in b[k0],\n b[k0+1] ... ending at b[k]. In fact k0 = 0 in this demo program. k is\n readjusted downwards as the stemming progresses. Zero termination is\n not in fact used in the algorithm.\n\n Note that only lower case sequences are stemmed. Forcing to lower case\n should be done before stem(...) is called.\n \"\"\"\n\n self.b = \"\" # buffer for word to be stemmed\n self.k = 0\n self.k0 = 0\n self.j = 0 # j is a general offset into the string", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.cons_PorterStemmer.cons.return.1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.cons_PorterStemmer.cons.return.1", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 49, "end_line": 59, "span_ids": ["PorterStemmer.cons"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def cons(self, i: int) -> int:\n \"\"\"cons(i) is TRUE <=> b[i] is a consonant.\"\"\"\n if self.b[i] == 'a' or self.b[i] == 'e' or self.b[i] == 'i' \\\n or self.b[i] == 'o' or self.b[i] == 'u':\n return 0\n if self.b[i] == 'y':\n if i == self.k0:\n return 1\n else:\n return (not self.cons(i - 1))\n return 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.m_PorterStemmer.m.None_1.i_2.i_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.m_PorterStemmer.m.None_1.i_2.i_1", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 96, "span_ids": ["PorterStemmer.m"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def m(self) -> int:\n \"\"\"m() measures the number of consonant sequences between k0 and j.\n if c is a consonant sequence and v a vowel sequence, and <..>\n indicates arbitrary presence,\n\n <c><v> gives 0\n <c>vc<v> gives 1\n <c>vcvc<v> gives 2\n <c>vcvcvc<v> gives 3\n ....\n \"\"\"\n n = 0\n i = self.k0\n while 1:\n if i > self.j:\n return n\n if not self.cons(i):\n break\n i = i + 1\n i = i + 1\n while 1:\n while 1:\n if i > self.j:\n return n\n if self.cons(i):\n break\n i = i + 1\n i = i + 1\n n = n + 1\n while 1:\n if i > self.j:\n return n\n if not self.cons(i):\n break\n i = i + 1\n i = i + 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.vowelinstem_PorterStemmer.doublec.return.self_cons_j_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.vowelinstem_PorterStemmer.doublec.return.self_cons_j_", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 111, "span_ids": ["PorterStemmer.vowelinstem", "PorterStemmer.doublec"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def vowelinstem(self) -> int:\n \"\"\"vowelinstem() is TRUE <=> k0,...j contains a vowel\"\"\"\n for i in range(self.k0, self.j + 1):\n if not self.cons(i):\n return 1\n return 0\n\n def doublec(self, j: int) -> int:\n \"\"\"doublec(j) is TRUE <=> j,(j-1) contain a double consonant.\"\"\"\n if j < (self.k0 + 1):\n return 0\n if (self.b[j] != self.b[j - 1]):\n return 0\n return self.cons(j)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.cvc_PorterStemmer.cvc.return.1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.cvc_PorterStemmer.cvc.return.1", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 109, "end_line": 124, "span_ids": ["PorterStemmer.cvc"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def cvc(self, i: int) -> int:\n \"\"\"cvc(i) is TRUE <=> i-2,i-1,i has the form\n consonant - vowel - consonant\n and also if the second c is not w,x or y. this is used when trying to\n restore an e at the end of a short e.g.\n\n cav(e), lov(e), hop(e), crim(e), but\n snow, box, tray.\n \"\"\"\n if i < (self.k0 + 2) or not self.cons(i) or self.cons(i - 1) \\\n or not self.cons(i - 2):\n return 0\n ch = self.b[i]\n if ch in ('w', 'x', 'y'):\n return 0\n return 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.ends_PorterStemmer.r.if_self_m_0_.self_setto_s_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.ends_PorterStemmer.r.if_self_m_0_.self_setto_s_", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 130, "end_line": 152, "span_ids": ["PorterStemmer.r", "PorterStemmer.ends", "PorterStemmer.setto"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def ends(self, s: str) -> int:\n \"\"\"ends(s) is TRUE <=> k0,...k ends with the string s.\"\"\"\n length = len(s)\n if s[length - 1] != self.b[self.k]: # tiny speed-up\n return 0\n if length > (self.k - self.k0 + 1):\n return 0\n if self.b[self.k - length + 1:self.k + 1] != s:\n return 0\n self.j = self.k - length\n return 1\n\n def setto(self, s: str) -> None:\n \"\"\"setto(s) sets (j+1),...k to the characters in the string s,\n readjusting k.\"\"\"\n length = len(s)\n self.b = self.b[:self.j + 1] + s + self.b[self.j + length + 1:]\n self.k = self.j + length\n\n def r(self, s: str) -> None:\n \"\"\"r(s) is used further down.\"\"\"\n if self.m() > 0:\n self.setto(s)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step1ab_PorterStemmer.step1c.if_self_ends_y_and_se.self.b.self_b_self_k_i_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step1ab_PorterStemmer.step1c.if_self_ends_y_and_se.self.b.self_b_self_k_i_s", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 150, "end_line": 201, "span_ids": ["PorterStemmer.step1c", "PorterStemmer.step1ab"], "tokens": 449}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def step1ab(self) -> None:\n \"\"\"step1ab() gets rid of plurals and -ed or -ing. e.g.\n\n caresses -> caress\n ponies -> poni\n ties -> ti\n caress -> caress\n cats -> cat\n\n feed -> feed\n agreed -> agree\n disabled -> disable\n\n matting -> mat\n mating -> mate\n meeting -> meet\n milling -> mill\n messing -> mess\n\n meetings -> meet\n \"\"\"\n if self.b[self.k] == 's':\n if self.ends(\"sses\"):\n self.k = self.k - 2\n elif self.ends(\"ies\"):\n self.setto(\"i\")\n elif self.b[self.k - 1] != 's':\n self.k = self.k - 1\n if self.ends(\"eed\"):\n if self.m() > 0:\n self.k = self.k - 1\n elif (self.ends(\"ed\") or self.ends(\"ing\")) and self.vowelinstem():\n self.k = self.j\n if self.ends(\"at\"):\n self.setto(\"ate\")\n elif self.ends(\"bl\"):\n self.setto(\"ble\")\n elif self.ends(\"iz\"):\n self.setto(\"ize\")\n elif self.doublec(self.k):\n self.k = self.k - 1\n ch = self.b[self.k]\n if ch in ('l', 's', 'z'):\n self.k = self.k + 1\n elif (self.m() == 1 and self.cvc(self.k)):\n self.setto(\"e\")\n\n def step1c(self) -> None:\n \"\"\"step1c() turns terminal y to i when there is another vowel in\n the stem.\"\"\"\n if (self.ends(\"y\") and self.vowelinstem()):\n self.b = self.b[:self.k] + 'i' + self.b[self.k + 1:]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step2_PorterStemmer.step2._To_match_the_published_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step2_PorterStemmer.step2._To_match_the_published_", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 207, "end_line": 264, "span_ids": ["PorterStemmer.step2"], "tokens": 516}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def step2(self) -> None:\n \"\"\"step2() maps double suffices to single ones.\n so -ization ( = -ize plus -ation) maps to -ize etc. note that the\n string before the suffix must give m() > 0.\n \"\"\"\n if self.b[self.k - 1] == 'a':\n if self.ends(\"ational\"):\n self.r(\"ate\")\n elif self.ends(\"tional\"):\n self.r(\"tion\")\n elif self.b[self.k - 1] == 'c':\n if self.ends(\"enci\"):\n self.r(\"ence\")\n elif self.ends(\"anci\"):\n self.r(\"ance\")\n elif self.b[self.k - 1] == 'e':\n if self.ends(\"izer\"):\n self.r(\"ize\")\n elif self.b[self.k - 1] == 'l':\n if self.ends(\"bli\"):\n self.r(\"ble\") # --DEPARTURE--\n # To match the published algorithm, replace this phrase with\n # if self.ends(\"abli\"): self.r(\"able\")\n elif self.ends(\"alli\"):\n self.r(\"al\")\n elif self.ends(\"entli\"):\n self.r(\"ent\")\n elif self.ends(\"eli\"):\n self.r(\"e\")\n elif self.ends(\"ousli\"):\n self.r(\"ous\")\n elif self.b[self.k - 1] == 'o':\n if self.ends(\"ization\"):\n self.r(\"ize\")\n elif self.ends(\"ation\"):\n self.r(\"ate\")\n elif self.ends(\"ator\"):\n self.r(\"ate\")\n elif self.b[self.k - 1] == 's':\n if self.ends(\"alism\"):\n self.r(\"al\")\n elif self.ends(\"iveness\"):\n self.r(\"ive\")\n elif self.ends(\"fulness\"):\n self.r(\"ful\")\n elif self.ends(\"ousness\"):\n self.r(\"ous\")\n elif self.b[self.k - 1] == 't':\n if self.ends(\"aliti\"):\n self.r(\"al\")\n elif self.ends(\"iviti\"):\n self.r(\"ive\")\n elif self.ends(\"biliti\"):\n self.r(\"ble\")\n elif self.b[self.k - 1] == 'g': # --DEPARTURE--\n if self.ends(\"logi\"):\n self.r(\"log\")\n # To match the published algorithm, delete this phrase", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step3_PorterStemmer.step3.if_self_b_self_k_e_.elif_self_b_self_k_s.if_self_ends_ness_.self_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step3_PorterStemmer.step3.if_self_b_self_k_e_.elif_self_b_self_k_s.if_self_ends_ness_.self_r_", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 266, "end_line": 286, "span_ids": ["PorterStemmer.step3"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def step3(self) -> None:\n \"\"\"step3() dels with -ic-, -full, -ness etc. similar strategy\n to step2.\"\"\"\n if self.b[self.k] == 'e':\n if self.ends(\"icate\"):\n self.r(\"ic\")\n elif self.ends(\"ative\"):\n self.r(\"\")\n elif self.ends(\"alize\"):\n self.r(\"al\")\n elif self.b[self.k] == 'i':\n if self.ends(\"iciti\"):\n self.r(\"ic\")\n elif self.b[self.k] == 'l':\n if self.ends(\"ical\"):\n self.r(\"ic\")\n elif self.ends(\"ful\"):\n self.r(\"\")\n elif self.b[self.k] == 's':\n if self.ends(\"ness\"):\n self.r(\"\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step4_PorterStemmer.step4.if_self_m_1_.self.k.self_j": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step4_PorterStemmer.step4.if_self_m_1_.self.k.self_j", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 288, "end_line": 369, "span_ids": ["PorterStemmer.step4"], "tokens": 521}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def step4(self) -> None:\n \"\"\"step4() takes off -ant, -ence etc., in context <c>vcvc<v>.\"\"\"\n if self.b[self.k - 1] == 'a':\n if self.ends(\"al\"):\n pass\n else:\n return\n elif self.b[self.k - 1] == 'c':\n if self.ends(\"ance\"):\n pass\n elif self.ends(\"ence\"):\n pass\n else:\n return\n elif self.b[self.k - 1] == 'e':\n if self.ends(\"er\"):\n pass\n else:\n return\n elif self.b[self.k - 1] == 'i':\n if self.ends(\"ic\"):\n pass\n else:\n return\n elif self.b[self.k - 1] == 'l':\n if self.ends(\"able\"):\n pass\n elif self.ends(\"ible\"):\n pass\n else:\n return\n elif self.b[self.k - 1] == 'n':\n if self.ends(\"ant\"):\n pass\n elif self.ends(\"ement\"):\n pass\n elif self.ends(\"ment\"):\n pass\n elif self.ends(\"ent\"):\n pass\n else:\n return\n elif self.b[self.k - 1] == 'o':\n if self.ends(\"ion\") and (self.b[self.j] == 's' or\n self.b[self.j] == 't'):\n pass\n elif self.ends(\"ou\"):\n pass\n # takes care of -ous\n else:\n return\n elif self.b[self.k - 1] == 's':\n if self.ends(\"ism\"):\n pass\n else:\n return\n elif self.b[self.k - 1] == 't':\n if self.ends(\"ate\"):\n pass\n elif self.ends(\"iti\"):\n pass\n else:\n return\n elif self.b[self.k - 1] == 'u':\n if self.ends(\"ous\"):\n pass\n else:\n return\n elif self.b[self.k - 1] == 'v':\n if self.ends(\"ive\"):\n pass\n else:\n return\n elif self.b[self.k - 1] == 'z':\n if self.ends(\"ize\"):\n pass\n else:\n return\n else:\n return\n if self.m() > 1:\n self.k = self.j", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step5_PorterStemmer.step5.if_self_b_self_k_l_.self.k.self_k_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.step5_PorterStemmer.step5.if_self_b_self_k_l_.self.k.self_k_1", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 371, "end_line": 381, "span_ids": ["PorterStemmer.step5"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def step5(self) -> None:\n \"\"\"step5() removes a final -e if m() > 1, and changes -ll to -l if\n m() > 1.\n \"\"\"\n self.j = self.k\n if self.b[self.k] == 'e':\n a = self.m()\n if a > 1 or (a == 1 and not self.cvc(self.k - 1)):\n self.k = self.k - 1\n if self.b[self.k] == 'l' and self.doublec(self.k) and self.m() > 1:\n self.k = self.k - 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.stem_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/porter.py_PorterStemmer.stem_", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/porter.py", "file_name": "porter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 383, "end_line": 411, "span_ids": ["PorterStemmer.stem"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PorterStemmer:\n\n def stem(self, p: str, i: int, j: int) -> str:\n \"\"\"In stem(p,i,j), p is a char pointer, and the string to be stemmed\n is from p[i] to p[j] inclusive. Typically i is zero and j is the\n offset to the last character of a string, (p[j+1] == '\\0'). The\n stemmer adjusts the characters p[i] ... p[j] and returns the new\n end-point of the string, k. Stemming never increases word length, so\n i <= k <= j. To turn the stemmer into a module, declare 'stem' as\n extern, and delete the remainder of this file.\n \"\"\"\n # copy the parameters into statics\n self.b = p\n self.k = j\n self.k0 = i\n if self.k <= self.k0 + 1:\n return self.b # --DEPARTURE--\n\n # With this line, strings of length 1 or 2 don't go through the\n # stemming process, although no mention is made of this in the\n # published algorithm. Remove the line to match the published\n # algorithm.\n\n self.step1ab()\n self.step1c()\n self.step2()\n self.step3()\n self.step4()\n self.step5()\n return self.b[self.k0:self.k + 1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/tags.py_from_typing_import_Iterat_BooleanParser.parse_compare.return.node": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/tags.py_from_typing_import_Iterat_BooleanParser.parse_compare.return.node", "embedding": null, "metadata": {"file_path": "sphinx/util/tags.py", "file_name": "tags.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["BooleanParser", "impl", "BooleanParser.parse_compare", "imports"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from typing import Iterator, List\n\nfrom jinja2 import nodes\nfrom jinja2.environment import Environment\nfrom jinja2.nodes import Node\nfrom jinja2.parser import Parser\n\nenv = Environment()\n\n\nclass BooleanParser(Parser):\n \"\"\"\n Only allow condition exprs and/or/not operations.\n \"\"\"\n\n def parse_compare(self) -> Node:\n node: Node\n token = self.stream.current\n if token.type == 'name':\n if token.value in ('true', 'false', 'True', 'False'):\n node = nodes.Const(token.value in ('true', 'True'),\n lineno=token.lineno)\n elif token.value in ('none', 'None'):\n node = nodes.Const(None, lineno=token.lineno)\n else:\n node = nodes.Name(token.value, 'load', lineno=token.lineno)\n next(self.stream)\n elif token.type == 'lparen':\n next(self.stream)\n node = self.parse_expression()\n self.stream.expect('rparen')\n else:\n self.fail(\"unexpected token '%s'\" % (token,), token.lineno)\n return node", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/tags.py_Tags_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/tags.py_Tags_", "embedding": null, "metadata": {"file_path": "sphinx/util/tags.py", "file_name": "tags.py", "file_type": "text/x-python", "category": "implementation", "start_line": 37, "end_line": 80, "span_ids": ["Tags:2", "Tags.eval_condition", "Tags.add", "Tags.remove", "Tags", "Tags.__iter__", "Tags.has"], "tokens": 315}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Tags:\n def __init__(self, tags: List[str] = None) -> None:\n self.tags = dict.fromkeys(tags or [], True)\n\n def has(self, tag: str) -> bool:\n return tag in self.tags\n\n __contains__ = has\n\n def __iter__(self) -> Iterator[str]:\n return iter(self.tags)\n\n def add(self, tag: str) -> None:\n self.tags[tag] = True\n\n def remove(self, tag: str) -> None:\n self.tags.pop(tag, None)\n\n def eval_condition(self, condition: str) -> bool:\n # exceptions are handled by the caller\n parser = BooleanParser(env, condition, state='variable')\n expr = parser.parse_expression()\n if not parser.stream.eos:\n raise ValueError('chunk after expression')\n\n def eval_node(node: Node) -> bool:\n if isinstance(node, nodes.CondExpr):\n if eval_node(node.test):\n return eval_node(node.expr1)\n else:\n return eval_node(node.expr2)\n elif isinstance(node, nodes.And):\n return eval_node(node.left) and eval_node(node.right)\n elif isinstance(node, nodes.Or):\n return eval_node(node.left) or eval_node(node.right)\n elif isinstance(node, nodes.Not):\n return not eval_node(node.node)\n elif isinstance(node, nodes.Name):\n return self.tags.get(node.name, False)\n else:\n raise ValueError('invalid node, check parsing')\n\n return eval_node(expr)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py_FileRenderer_SphinxRenderer.render_from_file.return.FileRenderer_render_from_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py_FileRenderer_SphinxRenderer.render_from_file.return.FileRenderer_render_from_", "embedding": null, "metadata": {"file_path": "sphinx/util/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 40, "end_line": 66, "span_ids": ["SphinxRenderer", "FileRenderer.render_from_file", "SphinxRenderer.render_from_file", "FileRenderer"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FileRenderer(BaseRenderer):\n def __init__(self, search_path: Union[str, List[str]]) -> None:\n if isinstance(search_path, str):\n search_path = [search_path]\n else:\n # filter \"None\" paths\n search_path = list(filter(None, search_path))\n\n loader = SphinxFileSystemLoader(search_path)\n super().__init__(loader)\n\n @classmethod\n def render_from_file(cls, filename: str, context: Dict) -> str:\n dirname = os.path.dirname(filename)\n basename = os.path.basename(filename)\n return cls(dirname).render(basename, context)\n\n\nclass SphinxRenderer(FileRenderer):\n def __init__(self, template_path: Union[str, List[str]] = None) -> None:\n if template_path is None:\n template_path = os.path.join(package_dir, 'templates')\n super().__init__(template_path)\n\n @classmethod\n def render_from_file(cls, filename: str, context: Dict) -> str:\n return FileRenderer.render_from_file(filename, context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py_LaTeXRenderer_ReSTRenderer.__init__.self_env_filters_heading": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py_LaTeXRenderer_ReSTRenderer.__init__.self_env_filters_heading", "embedding": null, "metadata": {"file_path": "sphinx/util/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 69, "end_line": 101, "span_ids": ["ReSTRenderer", "LaTeXRenderer"], "tokens": 315}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXRenderer(SphinxRenderer):\n def __init__(self, template_path: str = None, latex_engine: str = None) -> None:\n if template_path is None:\n template_path = os.path.join(package_dir, 'templates', 'latex')\n super().__init__(template_path)\n\n # use texescape as escape filter\n escape = partial(texescape.escape, latex_engine=latex_engine)\n self.env.filters['e'] = escape\n self.env.filters['escape'] = escape\n self.env.filters['eabbr'] = texescape.escape_abbr\n\n # use JSP/eRuby like tagging instead because curly bracket; the default\n # tagging of jinja2 is not good for LaTeX sources.\n self.env.variable_start_string = '<%='\n self.env.variable_end_string = '%>'\n self.env.block_start_string = '<%'\n self.env.block_end_string = '%>'\n self.env.comment_start_string = '<#'\n self.env.comment_end_string = '#>'\n\n\nclass ReSTRenderer(SphinxRenderer):\n def __init__(self, template_path: Union[str, List[str]] = None, language: str = None) -> None: # NOQA\n super().__init__(template_path)\n\n # add language to environment\n self.env.extend(language=language)\n\n # use texescape as escape filter\n self.env.filters['e'] = rst.escape\n self.env.filters['escape'] = rst.escape\n self.env.filters['heading'] = rst.heading", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py_SphinxTemplateLoader_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py_SphinxTemplateLoader_", "embedding": null, "metadata": {"file_path": "sphinx/util/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 133, "span_ids": ["SphinxTemplateLoader.get_source", "SphinxTemplateLoader"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxTemplateLoader(BaseLoader):\n \"\"\"A loader supporting template inheritance\"\"\"\n\n def __init__(self, confdir: str, templates_paths: List[str],\n system_templates_paths: List[str]) -> None:\n self.loaders = []\n self.sysloaders = []\n\n for templates_path in templates_paths:\n loader = SphinxFileSystemLoader(path.join(confdir, templates_path))\n self.loaders.append(loader)\n\n for templates_path in system_templates_paths:\n loader = SphinxFileSystemLoader(templates_path)\n self.loaders.append(loader)\n self.sysloaders.append(loader)\n\n def get_source(self, environment: Environment, template: str) -> Tuple[str, str, Callable]:\n if template.startswith('!'):\n # search a template from ``system_templates_paths``\n loaders = self.sysloaders\n template = template[1:]\n else:\n loaders = self.loaders\n\n for loader in loaders:\n try:\n return loader.get_source(environment, template)\n except TemplateNotFound:\n pass\n raise TemplateNotFound(template)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py_stringify_stringify.if_sys_version_info_3.else_.return._stringify_py36_annotatio": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py_stringify_stringify.if_sys_version_info_3.else_.return._stringify_py36_annotatio", "embedding": null, "metadata": {"file_path": "sphinx/util/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 330, "end_line": 393, "span_ids": ["stringify"], "tokens": 560}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def stringify(annotation: Any, mode: str = 'fully-qualified-except-typing') -> str:\n \"\"\"Stringify type annotation object.\n\n :param mode: Specify a method how annotations will be stringified.\n\n 'fully-qualified-except-typing'\n Show the module name and qualified name of the annotation except\n the \"typing\" module.\n 'smart'\n Show the name of the annotation.\n 'fully-qualified'\n Show the module name and qualified name of the annotation.\n \"\"\"\n from sphinx.ext.autodoc.mock import ismock, ismockmodule # lazy loading\n from sphinx.util import inspect # lazy loading\n\n if mode == 'smart':\n modprefix = '~'\n else:\n modprefix = ''\n\n if isinstance(annotation, str):\n if annotation.startswith(\"'\") and annotation.endswith(\"'\"):\n # might be a double Forward-ref'ed type. Go unquoting.\n return annotation[1:-1]\n else:\n return annotation\n elif isinstance(annotation, TypeVar):\n if (annotation.__module__ == 'typing' and\n mode in ('fully-qualified-except-typing', 'smart')):\n return annotation.__name__\n else:\n return modprefix + '.'.join([annotation.__module__, annotation.__name__])\n elif inspect.isNewType(annotation):\n if sys.version_info > (3, 10):\n # newtypes have correct module info since Python 3.10+\n return modprefix + '%s.%s' % (annotation.__module__, annotation.__name__)\n else:\n return annotation.__name__\n elif not annotation:\n return repr(annotation)\n elif annotation is NoneType:\n return 'None'\n elif ismockmodule(annotation):\n return modprefix + annotation.__name__\n elif ismock(annotation):\n return modprefix + '%s.%s' % (annotation.__module__, annotation.__name__)\n elif is_invalid_builtin_class(annotation):\n return modprefix + INVALID_BUILTIN_CLASSES[annotation]\n elif str(annotation).startswith('typing.Annotated'): # for py310+\n pass\n elif (getattr(annotation, '__module__', None) == 'builtins' and\n getattr(annotation, '__qualname__', None)):\n if hasattr(annotation, '__args__'): # PEP 585 generic\n return repr(annotation)\n else:\n return annotation.__qualname__\n elif annotation is Ellipsis:\n return '...'\n\n if sys.version_info >= (3, 7): # py37+\n return _stringify_py37(annotation, mode)\n else:\n return _stringify_py36(annotation, mode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_merge_doctrees_merge_doctrees.for_new_node_in_set_new_n.yield_new_node": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_merge_doctrees_merge_doctrees.for_new_node_in_set_new_n.yield_new_node", "embedding": null, "metadata": {"file_path": "sphinx/versioning.py", "file_name": "versioning.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 105, "span_ids": ["merge_doctrees"], "tokens": 608}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def merge_doctrees(old: Node, new: Node, condition: Any) -> Iterator[Node]:\n \"\"\"Merge the `old` doctree with the `new` one while looking at nodes\n matching the `condition`.\n\n Each node which replaces another one or has been added to the `new` doctree\n will be yielded.\n\n :param condition:\n A callable which returns either ``True`` or ``False`` for a given node.\n \"\"\"\n old_iter = old.findall(condition)\n new_iter = new.findall(condition)\n old_nodes = []\n new_nodes = []\n ratios = {}\n seen = set()\n # compare the nodes each doctree in order\n for old_node, new_node in zip_longest(old_iter, new_iter):\n if old_node is None:\n new_nodes.append(new_node)\n continue\n if not getattr(old_node, 'uid', None):\n # maybe config.gettext_uuid has been changed.\n old_node.uid = uuid4().hex\n if new_node is None:\n old_nodes.append(old_node)\n continue\n ratio = get_ratio(old_node.rawsource, new_node.rawsource)\n if ratio == 0:\n new_node.uid = old_node.uid\n seen.add(new_node)\n else:\n ratios[old_node, new_node] = ratio\n old_nodes.append(old_node)\n new_nodes.append(new_node)\n # calculate the ratios for each unequal pair of nodes, should we stumble\n # on a pair which is equal we set the uid and add it to the seen ones\n for old_node, new_node in product(old_nodes, new_nodes):\n if new_node in seen or (old_node, new_node) in ratios:\n continue\n ratio = get_ratio(old_node.rawsource, new_node.rawsource)\n if ratio == 0:\n new_node.uid = old_node.uid\n seen.add(new_node)\n else:\n ratios[old_node, new_node] = ratio\n # choose the old node with the best ratio for each new node and set the uid\n # as long as the ratio is under a certain value, in which case we consider\n # them not changed but different\n ratios = sorted(ratios.items(), key=itemgetter(1)) # type: ignore\n for (old_node, new_node), ratio in ratios:\n if new_node in seen:\n continue\n else:\n seen.add(new_node)\n if ratio < VERSIONING_RATIO:\n new_node.uid = old_node.uid\n else:\n new_node.uid = uuid4().hex\n yield new_node\n # create new uuids for any new node we left out earlier, this happens\n # if one or more nodes are simply added.\n for new_node in set(new_nodes) - seen:\n new_node.uid = uuid4().hex\n yield new_node", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_get_ratio_get_ratio.if_IS_SPEEDUP_.else_.return.levenshtein_distance_old_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_get_ratio_get_ratio.if_IS_SPEEDUP_.else_.return.levenshtein_distance_old_", "embedding": null, "metadata": {"file_path": "sphinx/versioning.py", "file_name": "versioning.py", "file_type": "text/x-python", "category": "implementation", "start_line": 118, "end_line": 128, "span_ids": ["get_ratio"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_ratio(old: str, new: str) -> float:\n \"\"\"Return a \"similarity ratio\" (in percent) representing the similarity\n between the two strings where 0 is equal and anything above less than equal.\n \"\"\"\n if not all([old, new]):\n return VERSIONING_RATIO\n\n if IS_SPEEDUP:\n return Levenshtein.distance(old, new) / (len(old) / 100.0)\n else:\n return levenshtein_distance(old, new) / (len(old) / 100.0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_levenshtein_distance_levenshtein_distance.return.previous_row_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_levenshtein_distance_levenshtein_distance.return.previous_row_1_", "embedding": null, "metadata": {"file_path": "sphinx/versioning.py", "file_name": "versioning.py", "file_type": "text/x-python", "category": "implementation", "start_line": 131, "end_line": 148, "span_ids": ["levenshtein_distance"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def levenshtein_distance(a: str, b: str) -> int:\n \"\"\"Return the Levenshtein edit distance between two strings *a* and *b*.\"\"\"\n if a == b:\n return 0\n if len(a) < len(b):\n a, b = b, a\n if not a:\n return len(b)\n previous_row = list(range(len(b) + 1))\n for i, column1 in enumerate(a):\n current_row = [i + 1]\n for j, column2 in enumerate(b):\n insertions = previous_row[j + 1] + 1\n deletions = current_row[j] + 1\n substitutions = previous_row[j] + (column1 != column2)\n current_row.append(min(insertions, deletions, substitutions))\n previous_row = current_row\n return previous_row[-1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_UIDTransform_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_UIDTransform_", "embedding": null, "metadata": {"file_path": "sphinx/versioning.py", "file_name": "versioning.py", "file_type": "text/x-python", "category": "implementation", "start_line": 151, "end_line": 185, "span_ids": ["UIDTransform", "UIDTransform.apply", "setup"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class UIDTransform(SphinxTransform):\n \"\"\"Add UIDs to doctree for versioning.\"\"\"\n default_priority = 880\n\n def apply(self, **kwargs: Any) -> None:\n env = self.env\n old_doctree = None\n if not env.versioning_condition:\n return\n\n if env.versioning_compare:\n # get old doctree\n try:\n filename = path.join(env.doctreedir, env.docname + '.doctree')\n with open(filename, 'rb') as f:\n old_doctree = pickle.load(f)\n except OSError:\n pass\n\n # add uids for versioning\n if not env.versioning_compare or old_doctree is None:\n list(add_uids(self.document, env.versioning_condition))\n else:\n list(merge_doctrees(old_doctree, self.document, env.versioning_condition))\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_transform(UIDTransform)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/__init__.py__", "embedding": null, "metadata": {"file_path": "sphinx/writers/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 6}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Custom docutils writers.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLWriter_HTMLWriter.translate.self.clean_meta._join_self_visitor_meta": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLWriter_HTMLWriter.translate.self.clean_meta._join_self_visitor_meta", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 46, "end_line": 67, "span_ids": ["HTMLWriter.translate", "HTMLWriter"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLWriter(Writer):\n\n # override embed-stylesheet default value to False.\n settings_default_overrides = {\"embed_stylesheet\": False}\n\n def __init__(self, builder: \"StandaloneHTMLBuilder\") -> None:\n super().__init__()\n self.builder = builder\n\n def translate(self) -> None:\n # sadly, this is mostly copied from parent class\n visitor = self.builder.create_translator(self.document, self.builder)\n self.visitor = cast(HTMLTranslator, visitor)\n self.document.walkabout(visitor)\n self.output = self.visitor.astext()\n for attr in ('head_prefix', 'stylesheet', 'head', 'body_prefix',\n 'body_pre_docinfo', 'docinfo', 'body', 'fragment',\n 'body_suffix', 'meta', 'title', 'subtitle', 'header',\n 'footer', 'html_prolog', 'html_head', 'html_title',\n 'html_subtitle', 'html_body', ):\n setattr(self, attr, getattr(visitor, attr, None))\n self.clean_meta = ''.join(self.visitor.meta[2:])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_reference_HTMLTranslator.visit_reference.if_node_get_secnumber_.self_body_append_s_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_reference_HTMLTranslator.visit_reference.if_node_get_secnumber_.self_body_append_s_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 232, "end_line": 258, "span_ids": ["HTMLTranslator.visit_reference"], "tokens": 318}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n def visit_reference(self, node: Element) -> None:\n atts = {'class': 'reference'}\n if node.get('internal') or 'refuri' not in node:\n atts['class'] += ' internal'\n else:\n atts['class'] += ' external'\n if 'refuri' in node:\n atts['href'] = node['refuri'] or '#'\n if self.settings.cloak_email_addresses and atts['href'].startswith('mailto:'):\n atts['href'] = self.cloak_mailto(atts['href'])\n self.in_mailto = True\n else:\n assert 'refid' in node, \\\n 'References must have \"refuri\" or \"refid\" attribute.'\n atts['href'] = '#' + node['refid']\n if not isinstance(node.parent, nodes.TextElement):\n assert len(node) == 1 and isinstance(node[0], nodes.image)\n atts['class'] += ' image-reference'\n if 'reftitle' in node:\n atts['title'] = node['reftitle']\n if 'target' in node:\n atts['target'] = node['target']\n self.body.append(self.starttag(node, 'a', '', **atts))\n\n if node.get('secnumber'):\n self.body.append(('%s' + self.secnumber_suffix) %\n '.'.join(map(str, node['secnumber'])))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_number_reference_HTMLTranslator.depart_seealso.self_depart_admonition_no": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_number_reference_HTMLTranslator.depart_seealso.self_depart_admonition_no", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 258, "end_line": 283, "span_ids": ["HTMLTranslator.visit_admonition", "HTMLTranslator.visit_comment", "HTMLTranslator.depart_seealso", "HTMLTranslator.depart_number_reference", "HTMLTranslator.depart_admonition", "HTMLTranslator.visit_number_reference", "HTMLTranslator.visit_seealso"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_number_reference(self, node: Element) -> None:\n self.visit_reference(node)\n\n def depart_number_reference(self, node: Element) -> None:\n self.depart_reference(node)\n\n # overwritten -- we don't want source comments to show up in the HTML\n def visit_comment(self, node: Element) -> None: # type: ignore\n raise nodes.SkipNode\n\n # overwritten\n def visit_admonition(self, node: Element, name: str = '') -> None:\n self.body.append(self.starttag(\n node, 'div', CLASS=('admonition ' + name)))\n if name:\n node.insert(0, nodes.title(name, admonitionlabels[name]))\n self.set_first_last(node)\n\n def depart_admonition(self, node: Optional[Element] = None) -> None:\n self.body.append('</div>\\n')\n\n def visit_seealso(self, node: Element) -> None:\n self.visit_admonition(node, 'seealso')\n\n def depart_seealso(self, node: Element) -> None:\n self.depart_admonition(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.get_secnumber_HTMLTranslator.add_secnumber.if_secnumber_.self_body_append_span_c": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.get_secnumber_HTMLTranslator.add_secnumber.if_secnumber_.self_body_append_span_c", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 284, "end_line": 307, "span_ids": ["HTMLTranslator.add_secnumber", "HTMLTranslator.get_secnumber"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def get_secnumber(self, node: Element) -> Tuple[int, ...]:\n if node.get('secnumber'):\n return node['secnumber']\n elif isinstance(node.parent, nodes.section):\n if self.builder.name == 'singlehtml':\n docname = self.docnames[-1]\n anchorname = \"%s/#%s\" % (docname, node.parent['ids'][0])\n if anchorname not in self.builder.secnumbers:\n anchorname = \"%s/\" % docname # try first heading which has no anchor\n else:\n anchorname = '#' + node.parent['ids'][0]\n if anchorname not in self.builder.secnumbers:\n anchorname = '' # try first heading which has no anchor\n\n if self.builder.secnumbers.get(anchorname):\n return self.builder.secnumbers[anchorname]\n\n return None\n\n def add_secnumber(self, node: Element) -> None:\n secnumber = self.get_secnumber(node)\n if secnumber:\n self.body.append('<span class=\"section-number\">%s</span>' %\n ('.'.join(map(str, secnumber)) + self.secnumber_suffix))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.add_fignumber_HTMLTranslator.add_fignumber.if_figtype_.if_len_node_ids_0_.else_.append_fignumber_figtype_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.add_fignumber_HTMLTranslator.add_fignumber.if_figtype_.if_len_node_ids_0_.else_.append_fignumber_figtype_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 299, "end_line": 323, "span_ids": ["HTMLTranslator.add_fignumber"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def add_fignumber(self, node: Element) -> None:\n def append_fignumber(figtype: str, figure_id: str) -> None:\n if self.builder.name == 'singlehtml':\n key = \"%s/%s\" % (self.docnames[-1], figtype)\n else:\n key = figtype\n\n if figure_id in self.builder.fignumbers.get(key, {}):\n self.body.append('<span class=\"caption-number\">')\n prefix = self.config.numfig_format.get(figtype)\n if prefix is None:\n msg = __('numfig_format is not defined for %s') % figtype\n logger.warning(msg)\n else:\n numbers = self.builder.fignumbers[key][figure_id]\n self.body.append(prefix % '.'.join(map(str, numbers)) + ' ')\n self.body.append('</span>')\n\n figtype = self.builder.env.domains['std'].get_enumerable_node_type(node)\n if figtype:\n if len(node['ids']) == 0:\n msg = __('Any IDs not assigned for %s node') % node.tagname\n logger.warning(msg, location=node)\n else:\n append_fignumber(figtype, node['ids'][0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.add_permalink_ref_HTMLTranslator.generate_targets_for_listing.for_id_in_node_ids_1_.node_ids_remove_id_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.add_permalink_ref_HTMLTranslator.generate_targets_for_listing.for_id_in_node_ids_1_.node_ids_remove_id_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 332, "end_line": 350, "span_ids": ["HTMLTranslator.add_permalink_ref", "HTMLTranslator.generate_targets_for_listing"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def add_permalink_ref(self, node: Element, title: str) -> None:\n if node['ids'] and self.config.html_permalinks and self.builder.add_permalinks:\n format = '<a class=\"headerlink\" href=\"#%s\" title=\"%s\">%s</a>'\n self.body.append(format % (node['ids'][0], title,\n self.config.html_permalinks_icon))\n\n def generate_targets_for_listing(self, node: Element) -> None:\n \"\"\"Generate hyperlink targets for listings.\n\n Original visit_bullet_list(), visit_definition_list() and visit_enumerated_list()\n generates hyperlink targets inside listing tags (<ul>, <ol> and <dl>) if multiple\n IDs are assigned to listings. That is invalid DOM structure.\n (This is a bug of docutils <= 0.12)\n\n This exports hyperlink targets before listings to make valid DOM structure.\n \"\"\"\n for id in node['ids'][1:]:\n self.body.append('<span id=\"%s\"></span>' % id)\n node['ids'].remove(id)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_literal_block_HTMLTranslator.visit_literal_block.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_literal_block_HTMLTranslator.visit_literal_block.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 423, "end_line": 444, "span_ids": ["HTMLTranslator.visit_literal_block"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n def visit_literal_block(self, node: Element) -> None:\n if node.rawsource != node.astext():\n # most probably a parsed-literal block -- don't highlight\n return super().visit_literal_block(node)\n\n lang = node.get('language', 'default')\n linenos = node.get('linenos', False)\n highlight_args = node.get('highlight_args', {})\n highlight_args['force'] = node.get('force', False)\n opts = self.config.highlight_options.get(lang, {})\n\n if linenos and self.config.html_codeblock_linenos_style:\n linenos = self.config.html_codeblock_linenos_style\n\n highlighted = self.highlighter.highlight_block(\n node.rawsource, lang, opts=opts, linenos=linenos,\n location=node, **highlight_args\n )\n starttag = self.starttag(node, 'div', suffix='',\n CLASS='highlight-%s notranslate' % lang)\n self.body.append(starttag + highlighted + '</div>\\n')\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_caption_HTMLTranslator.depart_caption.None_1.else_.super_depart_caption_no": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_caption_HTMLTranslator.depart_caption.None_1.else_.super_depart_caption_no", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 457, "end_line": 479, "span_ids": ["HTMLTranslator.depart_caption", "HTMLTranslator.visit_caption"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_caption(self, node: Element) -> None:\n if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):\n self.body.append('<div class=\"code-block-caption\">')\n else:\n super().visit_caption(node)\n self.add_fignumber(node.parent)\n self.body.append(self.starttag(node, 'span', '', CLASS='caption-text'))\n\n def depart_caption(self, node: Element) -> None:\n self.body.append('</span>')\n\n # append permalink if available\n if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):\n self.add_permalink_ref(node.parent, _('Permalink to this code'))\n elif isinstance(node.parent, nodes.figure):\n self.add_permalink_ref(node.parent, _('Permalink to this image'))\n elif node.parent.get('toctree'):\n self.add_permalink_ref(node.parent.parent, _('Permalink to this toctree'))\n\n if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):\n self.body.append('</div>\\n')\n else:\n super().depart_caption(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_doctest_block_HTMLTranslator.depart_literal.if_kbd_in_node_classes.else_.self_body_append_code_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_doctest_block_HTMLTranslator.depart_literal.if_kbd_in_node_classes.else_.self_body_append_code_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 481, "end_line": 506, "span_ids": ["HTMLTranslator.visit_block_quote", "HTMLTranslator.depart_block_quote", "HTMLTranslator.visit_literal", "HTMLTranslator.depart_literal", "HTMLTranslator.visit_doctest_block"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_doctest_block(self, node: Element) -> None:\n self.visit_literal_block(node)\n\n # overwritten to add the <div> (for XHTML compliance)\n def visit_block_quote(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'blockquote') + '<div>')\n\n def depart_block_quote(self, node: Element) -> None:\n self.body.append('</div></blockquote>\\n')\n\n # overwritten\n def visit_literal(self, node: Element) -> None:\n if 'kbd' in node['classes']:\n self.body.append(self.starttag(node, 'kbd', '',\n CLASS='docutils literal notranslate'))\n else:\n self.body.append(self.starttag(node, 'code', '',\n CLASS='docutils literal notranslate'))\n self.protect_literal_text += 1\n\n def depart_literal(self, node: Element) -> None:\n if 'kbd' in node['classes']:\n self.body.append('</kbd>')\n else:\n self.protect_literal_text -= 1\n self.body.append('</code>')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_productionlist_HTMLTranslator.visit_productionlist.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_productionlist_HTMLTranslator.visit_productionlist.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 508, "end_line": 526, "span_ids": ["HTMLTranslator.visit_productionlist"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_productionlist(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'pre'))\n names = []\n productionlist = cast(Iterable[addnodes.production], node)\n for production in productionlist:\n names.append(production['tokenname'])\n maxlen = max(len(name) for name in names)\n lastname = None\n for production in productionlist:\n if production['tokenname']:\n lastname = production['tokenname'].ljust(maxlen)\n self.body.append(self.starttag(production, 'strong', ''))\n self.body.append(lastname + '</strong> ::= ')\n elif lastname is not None:\n self.body.append('%s ' % (' ' * len(lastname)))\n production.walkabout(self)\n self.body.append('\\n')\n self.body.append('</pre>\\n')\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.depart_productionlist_HTMLTranslator.depart_compact_paragraph.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.depart_productionlist_HTMLTranslator.depart_compact_paragraph.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 528, "end_line": 559, "span_ids": ["HTMLTranslator.depart_compact_paragraph", "HTMLTranslator.depart_production", "HTMLTranslator.depart_centered", "HTMLTranslator.visit_centered", "HTMLTranslator.visit_compact_paragraph", "HTMLTranslator.visit_production", "HTMLTranslator.depart_productionlist", "HTMLTranslator.should_be_compact_paragraph"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def depart_productionlist(self, node: Element) -> None:\n pass\n\n def visit_production(self, node: Element) -> None:\n pass\n\n def depart_production(self, node: Element) -> None:\n pass\n\n def visit_centered(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'p', CLASS=\"centered\") +\n '<strong>')\n\n def depart_centered(self, node: Element) -> None:\n self.body.append('</strong></p>')\n\n # overwritten\n def should_be_compact_paragraph(self, node: Node) -> bool:\n \"\"\"Determine if the <p> tags around paragraph can be omitted.\"\"\"\n if isinstance(node.parent, addnodes.desc_content):\n # Never compact desc_content items.\n return False\n if isinstance(node.parent, addnodes.versionmodified):\n # Never compact versionmodified nodes.\n return False\n return super().should_be_compact_paragraph(node)\n\n def visit_compact_paragraph(self, node: Element) -> None:\n pass\n\n def depart_compact_paragraph(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_image_HTMLTranslator.visit_image.super_visit_image_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_image_HTMLTranslator.visit_image.super_visit_image_node_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 584, "end_line": 624, "span_ids": ["HTMLTranslator.visit_image"], "tokens": 431}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n def visit_image(self, node: Element) -> None:\n olduri = node['uri']\n # rewrite the URI if the environment knows about it\n if olduri in self.builder.images:\n node['uri'] = posixpath.join(self.builder.imgpath,\n self.builder.images[olduri])\n\n if 'scale' in node:\n # Try to figure out image height and width. Docutils does that too,\n # but it tries the final file name, which does not necessarily exist\n # yet at the time the HTML file is written.\n if not ('width' in node and 'height' in node):\n size = get_image_size(os.path.join(self.builder.srcdir, olduri))\n if size is None:\n logger.warning(__('Could not obtain image size. :scale: option is ignored.'), # NOQA\n location=node)\n else:\n if 'width' not in node:\n node['width'] = str(size[0])\n if 'height' not in node:\n node['height'] = str(size[1])\n\n uri = node['uri']\n if uri.lower().endswith(('svg', 'svgz')):\n atts = {'src': uri}\n if 'width' in node:\n atts['width'] = node['width']\n if 'height' in node:\n atts['height'] = node['height']\n if 'scale' in node:\n if 'width' in atts:\n atts['width'] = multiply_length(atts['width'], node['scale'])\n if 'height' in atts:\n atts['height'] = multiply_length(atts['height'], node['scale'])\n atts['alt'] = node.get('alt', uri)\n if 'align' in node:\n atts['class'] = 'align-%s' % node['align']\n self.body.append(self.emptytag(node, 'img', '', **atts))\n return\n\n super().visit_image(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_Text_HTMLTranslator.visit_Text.if_self_protect_literal_t.else_.self_body_append_encoded_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_Text_HTMLTranslator.visit_Text.if_self_protect_literal_t.else_.self_body_append_encoded_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 673, "end_line": 692, "span_ids": ["HTMLTranslator.visit_Text"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n def visit_Text(self, node: Text) -> None:\n text = node.astext()\n encoded = self.encode(text)\n if self.protect_literal_text:\n # moved here from base class's visit_literal to support\n # more formatting in literal nodes\n for token in self.words_and_spaces.findall(encoded):\n if token.strip():\n # protect literal text from line wrapping\n self.body.append('<span class=\"pre\">%s</span>' % token)\n elif token in ' \\n':\n # allow breaks at whitespace\n self.body.append(token)\n else:\n # protect runs of multiple spaces; the last one can wrap\n self.body.append(' ' * (len(token) - 1) + ' ')\n else:\n if self.in_mailto and self.settings.cloak_email_addresses:\n encoded = self.cloak_email(encoded)\n self.body.append(encoded)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_reference_HTML5Translator.visit_reference.if_node_get_secnumber_.self_body_append_s_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_reference_HTML5Translator.visit_reference.if_node_get_secnumber_.self_body_append_s_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 204, "end_line": 230, "span_ids": ["HTML5Translator.visit_reference"], "tokens": 319}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n def visit_reference(self, node: Element) -> None:\n atts = {'class': 'reference'}\n if node.get('internal') or 'refuri' not in node:\n atts['class'] += ' internal'\n else:\n atts['class'] += ' external'\n if 'refuri' in node:\n atts['href'] = node['refuri'] or '#'\n if self.settings.cloak_email_addresses and atts['href'].startswith('mailto:'):\n atts['href'] = self.cloak_mailto(atts['href'])\n self.in_mailto = True\n else:\n assert 'refid' in node, \\\n 'References must have \"refuri\" or \"refid\" attribute.'\n atts['href'] = '#' + node['refid']\n if not isinstance(node.parent, nodes.TextElement):\n assert len(node) == 1 and isinstance(node[0], nodes.image)\n atts['class'] += ' image-reference'\n if 'reftitle' in node:\n atts['title'] = node['reftitle']\n if 'target' in node:\n atts['target'] = node['target']\n self.body.append(self.starttag(node, 'a', '', **atts))\n\n if node.get('secnumber'):\n self.body.append(('%s' + self.secnumber_suffix) %\n '.'.join(map(str, node['secnumber'])))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_number_reference_HTML5Translator.depart_seealso.self_depart_admonition_no": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_number_reference_HTML5Translator.depart_seealso.self_depart_admonition_no", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 237, "end_line": 261, "span_ids": ["HTML5Translator.depart_admonition", "HTML5Translator.visit_admonition", "HTML5Translator.visit_seealso", "HTML5Translator.depart_seealso", "HTML5Translator.visit_number_reference", "HTML5Translator.depart_number_reference", "HTML5Translator.visit_comment"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def visit_number_reference(self, node: Element) -> None:\n self.visit_reference(node)\n\n def depart_number_reference(self, node: Element) -> None:\n self.depart_reference(node)\n\n # overwritten -- we don't want source comments to show up in the HTML\n def visit_comment(self, node: Element) -> None: # type: ignore\n raise nodes.SkipNode\n\n # overwritten\n def visit_admonition(self, node: Element, name: str = '') -> None:\n self.body.append(self.starttag(\n node, 'div', CLASS=('admonition ' + name)))\n if name:\n node.insert(0, nodes.title(name, admonitionlabels[name]))\n\n def depart_admonition(self, node: Optional[Element] = None) -> None:\n self.body.append('</div>\\n')\n\n def visit_seealso(self, node: Element) -> None:\n self.visit_admonition(node, 'seealso')\n\n def depart_seealso(self, node: Element) -> None:\n self.depart_admonition(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.get_secnumber_HTML5Translator.add_secnumber.if_secnumber_.self_body_append_span_c": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.get_secnumber_HTML5Translator.add_secnumber.if_secnumber_.self_body_append_span_c", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 255, "end_line": 279, "span_ids": ["HTML5Translator.add_secnumber", "HTML5Translator.get_secnumber"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def get_secnumber(self, node: Element) -> Tuple[int, ...]:\n if node.get('secnumber'):\n return node['secnumber']\n\n if isinstance(node.parent, nodes.section):\n if self.builder.name == 'singlehtml':\n docname = self.docnames[-1]\n anchorname = \"%s/#%s\" % (docname, node.parent['ids'][0])\n if anchorname not in self.builder.secnumbers:\n anchorname = \"%s/\" % docname # try first heading which has no anchor\n else:\n anchorname = '#' + node.parent['ids'][0]\n if anchorname not in self.builder.secnumbers:\n anchorname = '' # try first heading which has no anchor\n\n if self.builder.secnumbers.get(anchorname):\n return self.builder.secnumbers[anchorname]\n\n return None\n\n def add_secnumber(self, node: Element) -> None:\n secnumber = self.get_secnumber(node)\n if secnumber:\n self.body.append('<span class=\"section-number\">%s</span>' %\n ('.'.join(map(str, secnumber)) + self.secnumber_suffix))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.add_fignumber_HTML5Translator.add_fignumber.if_figtype_.if_len_node_ids_0_.else_.append_fignumber_figtype_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.add_fignumber_HTML5Translator.add_fignumber.if_figtype_.if_len_node_ids_0_.else_.append_fignumber_figtype_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 272, "end_line": 296, "span_ids": ["HTML5Translator.add_fignumber"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def add_fignumber(self, node: Element) -> None:\n def append_fignumber(figtype: str, figure_id: str) -> None:\n if self.builder.name == 'singlehtml':\n key = \"%s/%s\" % (self.docnames[-1], figtype)\n else:\n key = figtype\n\n if figure_id in self.builder.fignumbers.get(key, {}):\n self.body.append('<span class=\"caption-number\">')\n prefix = self.config.numfig_format.get(figtype)\n if prefix is None:\n msg = __('numfig_format is not defined for %s') % figtype\n logger.warning(msg)\n else:\n numbers = self.builder.fignumbers[key][figure_id]\n self.body.append(prefix % '.'.join(map(str, numbers)) + ' ')\n self.body.append('</span>')\n\n figtype = self.builder.env.domains['std'].get_enumerable_node_type(node)\n if figtype:\n if len(node['ids']) == 0:\n msg = __('Any IDs not assigned for %s node') % node.tagname\n logger.warning(msg, location=node)\n else:\n append_fignumber(figtype, node['ids'][0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_literal_block_HTML5Translator.visit_literal_block.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_literal_block_HTML5Translator.visit_literal_block.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 376, "end_line": 397, "span_ids": ["HTML5Translator.visit_literal_block"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n def visit_literal_block(self, node: Element) -> None:\n if node.rawsource != node.astext():\n # most probably a parsed-literal block -- don't highlight\n return super().visit_literal_block(node)\n\n lang = node.get('language', 'default')\n linenos = node.get('linenos', False)\n highlight_args = node.get('highlight_args', {})\n highlight_args['force'] = node.get('force', False)\n opts = self.config.highlight_options.get(lang, {})\n\n if linenos and self.config.html_codeblock_linenos_style:\n linenos = self.config.html_codeblock_linenos_style\n\n highlighted = self.highlighter.highlight_block(\n node.rawsource, lang, opts=opts, linenos=linenos,\n location=node, **highlight_args\n )\n starttag = self.starttag(node, 'div', suffix='',\n CLASS='highlight-%s notranslate' % lang)\n self.body.append(starttag + highlighted + '</div>\\n')\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_caption_HTML5Translator.depart_caption.None_1.else_.super_depart_caption_no": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_caption_HTML5Translator.depart_caption.None_1.else_.super_depart_caption_no", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 409, "end_line": 431, "span_ids": ["HTML5Translator.depart_caption", "HTML5Translator.visit_caption"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def visit_caption(self, node: Element) -> None:\n if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):\n self.body.append('<div class=\"code-block-caption\">')\n else:\n super().visit_caption(node)\n self.add_fignumber(node.parent)\n self.body.append(self.starttag(node, 'span', '', CLASS='caption-text'))\n\n def depart_caption(self, node: Element) -> None:\n self.body.append('</span>')\n\n # append permalink if available\n if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):\n self.add_permalink_ref(node.parent, _('Permalink to this code'))\n elif isinstance(node.parent, nodes.figure):\n self.add_permalink_ref(node.parent, _('Permalink to this image'))\n elif node.parent.get('toctree'):\n self.add_permalink_ref(node.parent.parent, _('Permalink to this toctree'))\n\n if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):\n self.body.append('</div>\\n')\n else:\n super().depart_caption(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_doctest_block_HTML5Translator.depart_literal.if_kbd_in_node_classes.else_.self_body_append_code_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_doctest_block_HTML5Translator.depart_literal.if_kbd_in_node_classes.else_.self_body_append_code_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 433, "end_line": 458, "span_ids": ["HTML5Translator.visit_block_quote", "HTML5Translator.depart_literal", "HTML5Translator.depart_block_quote", "HTML5Translator.visit_literal", "HTML5Translator.visit_doctest_block"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def visit_doctest_block(self, node: Element) -> None:\n self.visit_literal_block(node)\n\n # overwritten to add the <div> (for XHTML compliance)\n def visit_block_quote(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'blockquote') + '<div>')\n\n def depart_block_quote(self, node: Element) -> None:\n self.body.append('</div></blockquote>\\n')\n\n # overwritten\n def visit_literal(self, node: Element) -> None:\n if 'kbd' in node['classes']:\n self.body.append(self.starttag(node, 'kbd', '',\n CLASS='docutils literal notranslate'))\n else:\n self.body.append(self.starttag(node, 'code', '',\n CLASS='docutils literal notranslate'))\n self.protect_literal_text += 1\n\n def depart_literal(self, node: Element) -> None:\n if 'kbd' in node['classes']:\n self.body.append('</kbd>')\n else:\n self.protect_literal_text -= 1\n self.body.append('</code>')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_productionlist_HTML5Translator.visit_productionlist.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_productionlist_HTML5Translator.visit_productionlist.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 460, "end_line": 478, "span_ids": ["HTML5Translator.visit_productionlist"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def visit_productionlist(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'pre'))\n names = []\n productionlist = cast(Iterable[addnodes.production], node)\n for production in productionlist:\n names.append(production['tokenname'])\n maxlen = max(len(name) for name in names)\n lastname = None\n for production in productionlist:\n if production['tokenname']:\n lastname = production['tokenname'].ljust(maxlen)\n self.body.append(self.starttag(production, 'strong', ''))\n self.body.append(lastname + '</strong> ::= ')\n elif lastname is not None:\n self.body.append('%s ' % (' ' * len(lastname)))\n production.walkabout(self)\n self.body.append('\\n')\n self.body.append('</pre>\\n')\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_productionlist_HTML5Translator.depart_compact_paragraph.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_productionlist_HTML5Translator.depart_compact_paragraph.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 480, "end_line": 500, "span_ids": ["HTML5Translator.visit_compact_paragraph", "HTML5Translator.visit_production", "HTML5Translator.depart_productionlist", "HTML5Translator.depart_production", "HTML5Translator.depart_centered", "HTML5Translator.depart_compact_paragraph", "HTML5Translator.visit_centered"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def depart_productionlist(self, node: Element) -> None:\n pass\n\n def visit_production(self, node: Element) -> None:\n pass\n\n def depart_production(self, node: Element) -> None:\n pass\n\n def visit_centered(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'p', CLASS=\"centered\") +\n '<strong>')\n\n def depart_centered(self, node: Element) -> None:\n self.body.append('</strong></p>')\n\n def visit_compact_paragraph(self, node: Element) -> None:\n pass\n\n def depart_compact_paragraph(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_image_HTML5Translator.visit_image.super_visit_image_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_image_HTML5Translator.visit_image.super_visit_image_node_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 525, "end_line": 565, "span_ids": ["HTML5Translator.visit_image"], "tokens": 432}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n def visit_image(self, node: Element) -> None:\n olduri = node['uri']\n # rewrite the URI if the environment knows about it\n if olduri in self.builder.images:\n node['uri'] = posixpath.join(self.builder.imgpath,\n self.builder.images[olduri])\n\n if 'scale' in node:\n # Try to figure out image height and width. Docutils does that too,\n # but it tries the final file name, which does not necessarily exist\n # yet at the time the HTML file is written.\n if not ('width' in node and 'height' in node):\n size = get_image_size(os.path.join(self.builder.srcdir, olduri))\n if size is None:\n logger.warning(__('Could not obtain image size. :scale: option is ignored.'), # NOQA\n location=node)\n else:\n if 'width' not in node:\n node['width'] = str(size[0])\n if 'height' not in node:\n node['height'] = str(size[1])\n\n uri = node['uri']\n if uri.lower().endswith(('svg', 'svgz')):\n atts = {'src': uri}\n if 'width' in node:\n atts['width'] = node['width']\n if 'height' in node:\n atts['height'] = node['height']\n if 'scale' in node:\n if 'width' in atts:\n atts['width'] = multiply_length(atts['width'], node['scale'])\n if 'height' in atts:\n atts['height'] = multiply_length(atts['height'], node['scale'])\n atts['alt'] = node.get('alt', uri)\n if 'align' in node:\n atts['class'] = 'align-%s' % node['align']\n self.body.append(self.emptytag(node, 'img', '', **atts))\n return\n\n super().visit_image(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_Text_HTML5Translator.visit_Text.if_self_protect_literal_t.else_.self_body_append_encoded_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_Text_HTML5Translator.visit_Text.if_self_protect_literal_t.else_.self_body_append_encoded_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 610, "end_line": 629, "span_ids": ["HTML5Translator.visit_Text"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n def visit_Text(self, node: Text) -> None:\n text = node.astext()\n encoded = self.encode(text)\n if self.protect_literal_text:\n # moved here from base class's visit_literal to support\n # more formatting in literal nodes\n for token in self.words_and_spaces.findall(encoded):\n if token.strip():\n # protect literal text from line wrapping\n self.body.append('<span class=\"pre\">%s</span>' % token)\n elif token in ' \\n':\n # allow breaks at whitespace\n self.body.append(token)\n else:\n # protect runs of multiple spaces; the last one can wrap\n self.body.append(' ' * (len(token) - 1) + ' ')\n else:\n if self.in_mailto and self.settings.cloak_email_addresses:\n encoded = self.cloak_email(encoded)\n self.body.append(encoded)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_note_HTML5Translator._overwritten_to_add_even": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_note_HTML5Translator._overwritten_to_add_even", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 631, "end_line": 717, "span_ids": ["HTML5Translator.visit_warning", "HTML5Translator.depart_note", "HTML5Translator.visit_error", "HTML5Translator.depart_attention", "HTML5Translator.visit_literal_emphasis", "HTML5Translator.depart_literal_emphasis", "HTML5Translator.visit_caution", "HTML5Translator.visit_note", "HTML5Translator.depart_error", "HTML5Translator.depart_manpage", "HTML5Translator.visit_abbreviation", "HTML5Translator.depart_danger", "HTML5Translator.depart_important", "HTML5Translator.visit_hint", "HTML5Translator.depart_tip", "HTML5Translator.visit_danger", "HTML5Translator.visit_important", "HTML5Translator.visit_literal_strong", "HTML5Translator.visit_tip", "HTML5Translator.depart_hint", "HTML5Translator.depart_warning", "HTML5Translator.visit_attention", "HTML5Translator.depart_caution", "HTML5Translator.depart_abbreviation", "HTML5Translator.visit_manpage", "HTML5Translator.depart_literal_strong"], "tokens": 686}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def visit_note(self, node: Element) -> None:\n self.visit_admonition(node, 'note')\n\n def depart_note(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_warning(self, node: Element) -> None:\n self.visit_admonition(node, 'warning')\n\n def depart_warning(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_attention(self, node: Element) -> None:\n self.visit_admonition(node, 'attention')\n\n def depart_attention(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_caution(self, node: Element) -> None:\n self.visit_admonition(node, 'caution')\n\n def depart_caution(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_danger(self, node: Element) -> None:\n self.visit_admonition(node, 'danger')\n\n def depart_danger(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_error(self, node: Element) -> None:\n self.visit_admonition(node, 'error')\n\n def depart_error(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_hint(self, node: Element) -> None:\n self.visit_admonition(node, 'hint')\n\n def depart_hint(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_important(self, node: Element) -> None:\n self.visit_admonition(node, 'important')\n\n def depart_important(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_tip(self, node: Element) -> None:\n self.visit_admonition(node, 'tip')\n\n def depart_tip(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_literal_emphasis(self, node: Element) -> None:\n return self.visit_emphasis(node)\n\n def depart_literal_emphasis(self, node: Element) -> None:\n return self.depart_emphasis(node)\n\n def visit_literal_strong(self, node: Element) -> None:\n return self.visit_strong(node)\n\n def depart_literal_strong(self, node: Element) -> None:\n return self.depart_strong(node)\n\n def visit_abbreviation(self, node: Element) -> None:\n attrs = {}\n if node.hasattr('explanation'):\n attrs['title'] = node['explanation']\n self.body.append(self.starttag(node, 'abbr', '', **attrs))\n\n def depart_abbreviation(self, node: Element) -> None:\n self.body.append('</abbr>')\n\n def visit_manpage(self, node: Element) -> None:\n self.visit_literal_emphasis(node)\n if self.manpages_url:\n node['refuri'] = self.manpages_url.format(**node.attributes)\n self.visit_reference(node)\n\n def depart_manpage(self, node: Element) -> None:\n if self.manpages_url:\n self.depart_reference(node)\n self.depart_literal_emphasis(node)\n\n # overwritten to add even/odd classes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_table_HTML5Translator.visit_table.self_body_append_tag_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_table_HTML5Translator.visit_table.self_body_append_tag_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 744, "end_line": 757, "span_ids": ["HTML5Translator.visit_table"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def visit_table(self, node: Element) -> None:\n self._table_row_indices.append(0)\n\n atts = {}\n classes = [cls.strip(' \\t\\n') for cls in self.settings.table_style.split(',')]\n classes.insert(0, \"docutils\") # compat\n\n # set align-default if align not specified to give a default style\n classes.append('align-%s' % node.get('align', 'default'))\n\n if 'width' in node:\n atts['style'] = 'width: %s' % node['width']\n tag = self.starttag(node, 'table', CLASS=' '.join(classes), **atts)\n self.body.append(tag)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXWriter_LaTeXWriter.translate.self.output.cast_LaTeXTranslator_vis": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXWriter_LaTeXWriter.translate.self.output.cast_LaTeXTranslator_vis", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 66, "end_line": 87, "span_ids": ["LaTeXWriter.translate", "LaTeXWriter"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXWriter(writers.Writer):\n\n supported = ('sphinxlatex',)\n\n settings_spec = ('LaTeX writer options', '', (\n ('Document name', ['--docname'], {'default': ''}),\n ('Document class', ['--docclass'], {'default': 'manual'}),\n ('Author', ['--author'], {'default': ''}),\n ))\n settings_defaults: Dict = {}\n\n output = None\n\n def __init__(self, builder: \"LaTeXBuilder\") -> None:\n super().__init__()\n self.builder = builder\n self.theme: Theme = None\n\n def translate(self) -> None:\n visitor = self.builder.create_translator(self.document, self.builder, self.theme)\n self.document.walkabout(visitor)\n self.output = cast(LaTeXTranslator, visitor).astext()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py__Helper_classes_Table.is_longtable.return.self_row_30_or_longtab": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py__Helper_classes_Table.is_longtable.return.self_row_30_or_longtab", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 90, "end_line": 119, "span_ids": ["Table.is_longtable", "LaTeXWriter.translate", "Table"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Helper classes\n\nclass Table:\n \"\"\"A table data\"\"\"\n\n def __init__(self, node: Element) -> None:\n self.header: List[str] = []\n self.body: List[str] = []\n self.align = node.get('align', 'default')\n self.classes: List[str] = node.get('classes', [])\n self.colcount = 0\n self.colspec: str = None\n self.colwidths: List[int] = []\n self.has_problematic = False\n self.has_oldproblematic = False\n self.has_verbatim = False\n self.caption: List[str] = None\n self.stubs: List[int] = []\n\n # current position\n self.col = 0\n self.row = 0\n\n # A dict mapping a table location to a cell_id (cell = rectangular area)\n self.cells: Dict[Tuple[int, int], int] = defaultdict(int)\n self.cell_id = 0 # last assigned cell_id\n\n def is_longtable(self) -> bool:\n \"\"\"True if and only if table uses longtable environment.\"\"\"\n return self.row > 30 or 'longtable' in self.classes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_Table.get_table_type_Table.get_table_type.if_self_is_longtable_.else_.return._tabulary_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_Table.get_table_type_Table.get_table_type.if_self_is_longtable_.else_.return._tabulary_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 139, "end_line": 157, "span_ids": ["Table.get_table_type"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Table:\n\n def get_table_type(self) -> str:\n \"\"\"Returns the LaTeX environment name for the table.\n\n The class currently supports:\n\n * longtable\n * tabular\n * tabulary\n \"\"\"\n if self.is_longtable():\n return 'longtable'\n elif self.has_verbatim:\n return 'tabular'\n elif self.colspec:\n return 'tabulary'\n elif self.has_problematic or (self.colwidths and 'colwidths-given' in self.classes):\n return 'tabular'\n else:\n return 'tabulary'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_Table.get_colspec_Table.get_colspec.if_self_colspec_.else_.return._l_self_colco": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_Table.get_colspec_Table.get_colspec.if_self_colspec_.else_.return._l_self_colco", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 141, "end_line": 162, "span_ids": ["Table.get_colspec"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Table:\n\n def get_colspec(self) -> str:\n \"\"\"Returns a column spec of table.\n\n This is what LaTeX calls the 'preamble argument' of the used table environment.\n\n .. note:: the ``\\\\X`` and ``T`` column type specifiers are defined in ``sphinx.sty``.\n \"\"\"\n if self.colspec:\n return self.colspec\n elif self.colwidths and 'colwidths-given' in self.classes:\n total = sum(self.colwidths)\n colspecs = [r'\\X{%d}{%d}' % (width, total) for width in self.colwidths]\n return '{|%s|}' % '|'.join(colspecs) + CR\n elif self.has_problematic:\n return r'{|*{%d}{\\X{1}{%d}|}}' % (self.colcount, self.colcount) + CR\n elif self.get_table_type() == 'tabulary':\n # sphinx.sty sets T to be J by default.\n return '{|' + ('T|' * self.colcount) + '}' + CR\n elif self.has_oldproblematic:\n return r'{|*{%d}{\\X{1}{%d}|}}' % (self.colcount, self.colcount) + CR\n else:\n return '{|' + ('l|' * self.colcount) + '}' + CR", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_Table.add_cell_Table.cell.try_.except_IndexError_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_Table.add_cell_Table.cell.try_.except_IndexError_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 182, "end_line": 206, "span_ids": ["Table.cell", "Table.add_cell"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Table:\n\n def add_cell(self, height: int, width: int) -> None:\n \"\"\"Adds a new cell to a table.\n\n It will be located at current position: (``self.row``, ``self.col``).\n \"\"\"\n self.cell_id += 1\n for col in range(width):\n for row in range(height):\n assert self.cells[(self.row + row, self.col + col)] == 0\n self.cells[(self.row + row, self.col + col)] = self.cell_id\n\n def cell(self, row: int = None, col: int = None) -> \"TableCell\":\n \"\"\"Returns a cell object (i.e. rectangular area) containing given position.\n\n If no option arguments: ``row`` or ``col`` are given, the current position;\n ``self.row`` and ``self.col`` are used to get a cell object by default.\n \"\"\"\n try:\n if row is None:\n row = self.row\n if col is None:\n col = self.col\n return TableCell(self, row, col)\n except IndexError:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_TableCell_escape_abbr.return.re_sub_r_s_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_TableCell_escape_abbr.return.re_sub_r_s_r_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 191, "end_line": 228, "span_ids": ["TableCell.height", "TableCell", "escape_abbr", "TableCell.width"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TableCell:\n \"\"\"Data of a cell in a table.\"\"\"\n\n def __init__(self, table: Table, row: int, col: int) -> None:\n if table.cells[(row, col)] == 0:\n raise IndexError\n\n self.table = table\n self.cell_id = table.cells[(row, col)]\n self.row = row\n self.col = col\n\n # adjust position for multirow/multicol cell\n while table.cells[(self.row - 1, self.col)] == self.cell_id:\n self.row -= 1\n while table.cells[(self.row, self.col - 1)] == self.cell_id:\n self.col -= 1\n\n @property\n def width(self) -> int:\n \"\"\"Returns the cell width.\"\"\"\n width = 0\n while self.table.cells[(self.row, self.col + width)] == self.cell_id:\n width += 1\n return width\n\n @property\n def height(self) -> int:\n \"\"\"Returns the cell height.\"\"\"\n height = 0\n while self.table.cells[(self.row + height, self.col)] == self.cell_id:\n height += 1\n return height\n\n\ndef escape_abbr(text: str) -> str:\n \"\"\"Adjust spacing after abbreviations.\"\"\"\n return re.sub(r'\\.(?=\\s|$)', r'.\\@', text)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_rstdim_to_latexdim_rstdim_to_latexdim.return.res": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_rstdim_to_latexdim_rstdim_to_latexdim.return.res", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 231, "end_line": 256, "span_ids": ["rstdim_to_latexdim"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def rstdim_to_latexdim(width_str: str, scale: int = 100) -> str:\n \"\"\"Convert `width_str` with rst length to LaTeX length.\"\"\"\n match = re.match(r'^(\\d*\\.?\\d*)\\s*(\\S*)$', width_str)\n if not match:\n raise ValueError\n res = width_str\n amount, unit = match.groups()[:2]\n if scale == 100:\n float(amount) # validate amount is float\n if unit in ('', \"px\"):\n res = r\"%s\\sphinxpxdimen\" % amount\n elif unit == 'pt':\n res = '%sbp' % amount # convert to 'bp'\n elif unit == \"%\":\n res = r\"%.3f\\linewidth\" % (float(amount) / 100.0)\n else:\n amount_float = float(amount) * scale / 100.0\n if unit in ('', \"px\"):\n res = r\"%.5f\\sphinxpxdimen\" % amount_float\n elif unit == 'pt':\n res = '%.5fbp' % amount_float\n elif unit == \"%\":\n res = r\"%.5f\\linewidth\" % (amount_float / 100.0)\n else:\n res = \"%.5f%s\" % (amount_float, unit)\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.generate_indices.ret_LaTeXTranslator.generate_indices.return._join_ret_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.generate_indices.ret_LaTeXTranslator.generate_indices.return._join_ret_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 469, "end_line": 486, "span_ids": ["LaTeXTranslator.generate_indices"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def generate_indices(self) -> str:\n # ... other code\n\n ret = []\n # latex_domain_indices can be False/True or a list of index names\n indices_config = self.config.latex_domain_indices\n if indices_config:\n for domain in self.builder.env.domains.values():\n for indexcls in domain.indices:\n indexname = '%s-%s' % (domain.name, indexcls.name)\n if isinstance(indices_config, list):\n if indexname not in indices_config:\n continue\n content, collapsed = indexcls(domain).generate(\n self.builder.docnames)\n if not content:\n continue\n ret.append(r'\\renewcommand{\\indexname}{%s}' % indexcls.localname + CR)\n generate(content, collapsed)\n\n return ''.join(ret)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.render_LaTeXTranslator.table.if_self_tables_.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.render_LaTeXTranslator.table.if_self_tables_.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 542, "end_line": 558, "span_ids": ["LaTeXTranslator.table", "LaTeXTranslator.render"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def render(self, template_name: str, variables: Dict) -> str:\n renderer = LaTeXRenderer(latex_engine=self.config.latex_engine)\n for template_dir in self.config.templates_path:\n template = path.join(self.builder.confdir, template_dir,\n template_name)\n if path.exists(template):\n return renderer.render(template, variables)\n\n return renderer.render(template_name, variables)\n\n @property\n def table(self) -> Table:\n \"\"\"Get current table.\"\"\"\n if self.tables:\n return self.tables[-1]\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_document_LaTeXTranslator.visit_document.self.sectionlevel.self_top_sectionlevel_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_document_LaTeXTranslator.visit_document.self.sectionlevel.self_top_sectionlevel_1", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 506, "end_line": 518, "span_ids": ["LaTeXTranslator.visit_document"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_document(self, node: Element) -> None:\n self.curfilestack.append(node.get('docname', ''))\n if self.first_document == 1:\n # the first document is all the regular content ...\n self.first_document = 0\n elif self.first_document == 0:\n # ... and all others are the appendices\n self.body.append(CR + r'\\appendix' + CR)\n self.first_document = -1\n if 'docname' in node:\n self.body.append(self.hypertarget(':doc'))\n # \"- 1\" because the level is increased before the title is visited\n self.sectionlevel = self.top_sectionlevel - 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_document_LaTeXTranslator.depart_transition.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_document_LaTeXTranslator.depart_transition.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 520, "end_line": 585, "span_ids": ["LaTeXTranslator.visit_transition", "LaTeXTranslator.depart_problematic", "LaTeXTranslator.depart_glossary", "LaTeXTranslator.depart_productionlist", "LaTeXTranslator.depart_start_of_file", "LaTeXTranslator.visit_problematic", "LaTeXTranslator.depart_document", "LaTeXTranslator.visit_section", "LaTeXTranslator.visit_productionlist", "LaTeXTranslator.depart_topic", "LaTeXTranslator.depart_transition", "LaTeXTranslator.depart_section", "LaTeXTranslator.visit_start_of_file", "LaTeXTranslator.visit_topic", "LaTeXTranslator.visit_production", "LaTeXTranslator:8", "LaTeXTranslator.depart_production", "LaTeXTranslator.visit_glossary"], "tokens": 558}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_document(self, node: Element) -> None:\n pass\n\n def visit_start_of_file(self, node: Element) -> None:\n self.curfilestack.append(node['docname'])\n self.body.append(CR + r'\\sphinxstepscope' + CR)\n\n def depart_start_of_file(self, node: Element) -> None:\n self.curfilestack.pop()\n\n def visit_section(self, node: Element) -> None:\n if not self.this_is_the_title:\n self.sectionlevel += 1\n self.body.append(BLANKLINE)\n\n def depart_section(self, node: Element) -> None:\n self.sectionlevel = max(self.sectionlevel - 1,\n self.top_sectionlevel - 1)\n\n def visit_problematic(self, node: Element) -> None:\n self.body.append(r'{\\color{red}\\bfseries{}')\n\n def depart_problematic(self, node: Element) -> None:\n self.body.append('}')\n\n def visit_topic(self, node: Element) -> None:\n self.in_minipage = 1\n self.body.append(CR + r'\\begin{sphinxShadowBox}' + CR)\n\n def depart_topic(self, node: Element) -> None:\n self.in_minipage = 0\n self.body.append(r'\\end{sphinxShadowBox}' + CR)\n visit_sidebar = visit_topic\n depart_sidebar = depart_topic\n\n def visit_glossary(self, node: Element) -> None:\n pass\n\n def depart_glossary(self, node: Element) -> None:\n pass\n\n def visit_productionlist(self, node: Element) -> None:\n self.body.append(BLANKLINE)\n self.body.append(r'\\begin{productionlist}' + CR)\n self.in_production_list = 1\n\n def depart_productionlist(self, node: Element) -> None:\n self.body.append(r'\\end{productionlist}' + BLANKLINE)\n self.in_production_list = 0\n\n def visit_production(self, node: Element) -> None:\n if node['tokenname']:\n tn = node['tokenname']\n self.body.append(self.hypertarget('grammar-token-' + tn))\n self.body.append(r'\\production{%s}{' % self.encode(tn))\n else:\n self.body.append(r'\\productioncont{')\n\n def depart_production(self, node: Element) -> None:\n self.body.append('}' + CR)\n\n def visit_transition(self, node: Element) -> None:\n self.body.append(self.elements['transition'])\n\n def depart_transition(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_title_LaTeXTranslator.visit_title.self.in_title.1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_title_LaTeXTranslator.visit_title.self.in_title.1", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 587, "end_line": 633, "span_ids": ["LaTeXTranslator.visit_title"], "tokens": 449}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_title(self, node: Element) -> None:\n parent = node.parent\n if isinstance(parent, addnodes.seealso):\n # the environment already handles this\n raise nodes.SkipNode\n elif isinstance(parent, nodes.section):\n if self.this_is_the_title:\n if len(node.children) != 1 and not isinstance(node.children[0],\n nodes.Text):\n logger.warning(__('document title is not a single Text node'),\n location=node)\n if not self.elements['title']:\n # text needs to be escaped since it is inserted into\n # the output literally\n self.elements['title'] = self.escape(node.astext())\n self.this_is_the_title = 0\n raise nodes.SkipNode\n else:\n short = ''\n if any(node.findall(nodes.image)):\n short = ('[%s]' % self.escape(' '.join(clean_astext(node).split())))\n\n try:\n self.body.append(r'\\%s%s{' % (self.sectionnames[self.sectionlevel], short))\n except IndexError:\n # just use \"subparagraph\", it's not numbered anyway\n self.body.append(r'\\%s%s{' % (self.sectionnames[-1], short))\n self.context.append('}' + CR + self.hypertarget_to(node.parent))\n elif isinstance(parent, nodes.topic):\n self.body.append(r'\\sphinxstyletopictitle{')\n self.context.append('}' + CR)\n elif isinstance(parent, nodes.sidebar):\n self.body.append(r'\\sphinxstylesidebartitle{')\n self.context.append('}' + CR)\n elif isinstance(parent, nodes.Admonition):\n self.body.append('{')\n self.context.append('}' + CR)\n elif isinstance(parent, nodes.table):\n # Redirect body output until title is finished.\n self.pushbody([])\n else:\n logger.warning(__('encountered title node not in section, topic, table, '\n 'admonition or sidebar'),\n location=node)\n self.body.append(r'\\sphinxstyleothertitle{')\n self.context.append('}' + CR)\n self.in_title = 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_table_LaTeXTranslator.visit_table.self.next_table_colspec.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_table_LaTeXTranslator.visit_table.self.next_table_colspec.None", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 844, "end_line": 865, "span_ids": ["LaTeXTranslator.visit_table"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_table(self, node: Element) -> None:\n if len(self.tables) == 1:\n if self.table.get_table_type() == 'longtable':\n raise UnsupportedError(\n '%s:%s: longtable does not support nesting a table.' %\n (self.curfilestack[-1], node.line or ''))\n else:\n # change type of parent table to tabular\n # see https://groups.google.com/d/msg/sphinx-users/7m3NeOBixeo/9LKP2B4WBQAJ\n self.table.has_problematic = True\n elif len(self.tables) > 2:\n raise UnsupportedError(\n '%s:%s: deeply nested tables are not implemented.' %\n (self.curfilestack[-1], node.line or ''))\n\n self.tables.append(Table(node))\n if self.next_table_colspec:\n self.table.colspec = '{%s}' % self.next_table_colspec + CR\n if 'colwidths-given' in node.get('classes', []):\n logger.info(__('both tabularcolumns and :widths: option are given. '\n ':widths: is ignored.'), location=node)\n self.next_table_colspec = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_table_LaTeXTranslator.depart_tbody.self_popbody_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_table_LaTeXTranslator.depart_tbody.self_popbody_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 867, "end_line": 906, "span_ids": ["LaTeXTranslator.visit_tbody", "LaTeXTranslator.visit_thead", "LaTeXTranslator.depart_colspec", "LaTeXTranslator.depart_tbody", "LaTeXTranslator.visit_colspec", "LaTeXTranslator.depart_tgroup", "LaTeXTranslator.visit_tgroup", "LaTeXTranslator.depart_thead", "LaTeXTranslator.depart_table"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_table(self, node: Element) -> None:\n labels = self.hypertarget_to(node)\n table_type = self.table.get_table_type()\n table = self.render(table_type + '.tex_t',\n dict(table=self.table, labels=labels))\n self.body.append(BLANKLINE)\n self.body.append(table)\n self.body.append(CR)\n\n self.tables.pop()\n\n def visit_colspec(self, node: Element) -> None:\n self.table.colcount += 1\n if 'colwidth' in node:\n self.table.colwidths.append(node['colwidth'])\n if 'stub' in node:\n self.table.stubs.append(self.table.colcount - 1)\n\n def depart_colspec(self, node: Element) -> None:\n pass\n\n def visit_tgroup(self, node: Element) -> None:\n pass\n\n def depart_tgroup(self, node: Element) -> None:\n pass\n\n def visit_thead(self, node: Element) -> None:\n # Redirect head output until header is finished.\n self.pushbody(self.table.header)\n\n def depart_thead(self, node: Element) -> None:\n self.popbody()\n\n def visit_tbody(self, node: Element) -> None:\n # Redirect body output until table is finished.\n self.pushbody(self.table.body)\n\n def depart_tbody(self, node: Element) -> None:\n self.popbody()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_row_LaTeXTranslator.depart_row.self_table_row_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_row_LaTeXTranslator.depart_row.self_table_row_1", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 927, "end_line": 942, "span_ids": ["LaTeXTranslator.depart_row"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_row(self, node: Element) -> None:\n self.body.append(r'\\\\' + CR)\n cells = [self.table.cell(self.table.row, i) for i in range(self.table.colcount)]\n underlined = [cell.row + cell.height == self.table.row + 1 for cell in cells]\n if all(underlined):\n self.body.append(r'\\hline')\n else:\n i = 0\n underlined.extend([False]) # sentinel\n while i < len(underlined):\n if underlined[i] is True:\n j = underlined[i:].index(False)\n self.body.append(r'\\cline{%d-%d}' % (i + 1, i + j))\n i += j\n i += 1\n self.table.row += 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_entry_LaTeXTranslator.visit_entry.self_context_append_conte": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_entry_LaTeXTranslator.visit_entry.self_context_append_conte", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 944, "end_line": 979, "span_ids": ["LaTeXTranslator.visit_entry"], "tokens": 498}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_entry(self, node: Element) -> None:\n if self.table.col > 0:\n self.body.append('&')\n self.table.add_cell(node.get('morerows', 0) + 1, node.get('morecols', 0) + 1)\n cell = self.table.cell()\n context = ''\n if cell.width > 1:\n if self.config.latex_use_latex_multicolumn:\n if self.table.col == 0:\n self.body.append(r'\\multicolumn{%d}{|l|}{%%' % cell.width + CR)\n else:\n self.body.append(r'\\multicolumn{%d}{l|}{%%' % cell.width + CR)\n context = '}%' + CR\n else:\n self.body.append(r'\\sphinxstartmulticolumn{%d}%%' % cell.width + CR)\n context = r'\\sphinxstopmulticolumn' + CR\n if cell.height > 1:\n # \\sphinxmultirow 2nd arg \"cell_id\" will serve as id for LaTeX macros as well\n self.body.append(r'\\sphinxmultirow{%d}{%d}{%%' % (cell.height, cell.cell_id) + CR)\n context = '}%' + CR + context\n if cell.width > 1 or cell.height > 1:\n self.body.append(r'\\begin{varwidth}[t]{\\sphinxcolwidth{%d}{%d}}'\n % (cell.width, self.table.colcount) + CR)\n context = (r'\\par' + CR + r'\\vskip-\\baselineskip'\n r'\\vbox{\\hbox{\\strut}}\\end{varwidth}%' + CR + context)\n self.needs_linetrimming = 1\n if len(list(node.findall(nodes.paragraph))) >= 2:\n self.table.has_oldproblematic = True\n if isinstance(node.parent.parent, nodes.thead) or (cell.col in self.table.stubs):\n if len(node) == 1 and isinstance(node[0], nodes.paragraph) and node.astext() == '':\n pass\n else:\n self.body.append(r'\\sphinxstyletheadfamily ')\n if self.needs_linetrimming:\n self.pushbody([])\n self.context.append(context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_enumerated_list_LaTeXTranslator.visit_enumerated_list.if_self_table_.self.table.has_problematic.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_enumerated_list_LaTeXTranslator.visit_enumerated_list.if_self_table_.self.table.has_problematic.True", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1033, "end_line": 1062, "span_ids": ["LaTeXTranslator.visit_enumerated_list"], "tokens": 334}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_enumerated_list(self, node: Element) -> None:\n def get_enumtype(node: Element) -> str:\n enumtype = node.get('enumtype', 'arabic')\n if 'alpha' in enumtype and 26 < node.get('start', 0) + len(node):\n # fallback to arabic if alphabet counter overflows\n enumtype = 'arabic'\n\n return enumtype\n\n def get_nested_level(node: Element) -> int:\n if node is None:\n return 0\n elif isinstance(node, nodes.enumerated_list):\n return get_nested_level(node.parent) + 1\n else:\n return get_nested_level(node.parent)\n\n enum = \"enum%s\" % toRoman(get_nested_level(node)).lower()\n enumnext = \"enum%s\" % toRoman(get_nested_level(node) + 1).lower()\n style = ENUMERATE_LIST_STYLE.get(get_enumtype(node))\n prefix = node.get('prefix', '')\n suffix = node.get('suffix', '.')\n\n self.body.append(r'\\begin{enumerate}' + CR)\n self.body.append(r'\\sphinxsetlistlabels{%s}{%s}{%s}{%s}{%s}%%' %\n (style, enum, enumnext, prefix, suffix) + CR)\n if 'start' in node:\n self.body.append(r'\\setcounter{%s}{%d}' % (enum, node['start'] - 1) + CR)\n if self.table:\n self.table.has_problematic = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_enumerated_list_LaTeXTranslator.depart_field_body.depart_definition": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_enumerated_list_LaTeXTranslator.depart_field_body.depart_definition", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1064, "end_line": 1134, "span_ids": ["LaTeXTranslator.depart_field", "LaTeXTranslator.depart_definition_list_item", "LaTeXTranslator.visit_classifier", "LaTeXTranslator:12", "LaTeXTranslator.visit_definition_list", "LaTeXTranslator.visit_term", "LaTeXTranslator.depart_list_item", "LaTeXTranslator.depart_definition_list", "LaTeXTranslator.visit_list_item", "LaTeXTranslator.depart_definition", "LaTeXTranslator.visit_field_list", "LaTeXTranslator.visit_definition_list_item", "LaTeXTranslator.depart_enumerated_list", "LaTeXTranslator.depart_classifier", "LaTeXTranslator.visit_definition", "LaTeXTranslator.visit_field", "LaTeXTranslator.depart_term", "LaTeXTranslator.depart_field_list"], "tokens": 549}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_enumerated_list(self, node: Element) -> None:\n self.body.append(r'\\end{enumerate}' + CR)\n\n def visit_list_item(self, node: Element) -> None:\n # Append \"{}\" in case the next character is \"[\", which would break\n # LaTeX's list environment (no numbering and the \"[\" is not printed).\n self.body.append(r'\\item {} ')\n\n def depart_list_item(self, node: Element) -> None:\n self.body.append(CR)\n\n def visit_definition_list(self, node: Element) -> None:\n self.body.append(r'\\begin{description}' + CR)\n if self.table:\n self.table.has_problematic = True\n\n def depart_definition_list(self, node: Element) -> None:\n self.body.append(r'\\end{description}' + CR)\n\n def visit_definition_list_item(self, node: Element) -> None:\n pass\n\n def depart_definition_list_item(self, node: Element) -> None:\n pass\n\n def visit_term(self, node: Element) -> None:\n self.in_term += 1\n ctx = ''\n if node.get('ids'):\n ctx = r'\\phantomsection'\n for node_id in node['ids']:\n ctx += self.hypertarget(node_id, anchor=False)\n ctx += r'}'\n self.body.append(r'\\sphinxlineitem{')\n self.context.append(ctx)\n\n def depart_term(self, node: Element) -> None:\n self.body.append(self.context.pop())\n self.in_term -= 1\n\n def visit_classifier(self, node: Element) -> None:\n self.body.append('{[}')\n\n def depart_classifier(self, node: Element) -> None:\n self.body.append('{]}')\n\n def visit_definition(self, node: Element) -> None:\n pass\n\n def depart_definition(self, node: Element) -> None:\n self.body.append(CR)\n\n def visit_field_list(self, node: Element) -> None:\n self.body.append(r'\\begin{quote}\\begin{description}' + CR)\n if self.table:\n self.table.has_problematic = True\n\n def depart_field_list(self, node: Element) -> None:\n self.body.append(r'\\end{description}\\end{quote}' + CR)\n\n def visit_field(self, node: Element) -> None:\n pass\n\n def depart_field(self, node: Element) -> None:\n pass\n\n visit_field_name = visit_term\n depart_field_name = depart_term\n\n visit_field_body = visit_definition\n depart_field_body = depart_definition", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_figure_LaTeXTranslator.depart_versionmodified.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_figure_LaTeXTranslator.depart_versionmodified.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1322, "end_line": 1390, "span_ids": ["LaTeXTranslator.visit_caption", "LaTeXTranslator.visit_versionmodified", "LaTeXTranslator.visit_legend", "LaTeXTranslator.visit_admonition", "LaTeXTranslator.depart_figure", "LaTeXTranslator._visit_named_admonition", "LaTeXTranslator._depart_named_admonition", "LaTeXTranslator.depart_caption", "LaTeXTranslator.depart_admonition", "LaTeXTranslator.depart_versionmodified", "LaTeXTranslator.depart_legend", "LaTeXTranslator:20"], "tokens": 683}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_figure(self, node: Element) -> None:\n self.body.append(self.context.pop())\n\n def visit_caption(self, node: Element) -> None:\n self.in_caption += 1\n if isinstance(node.parent, captioned_literal_block):\n self.body.append(r'\\sphinxSetupCaptionForVerbatim{')\n elif self.in_minipage and isinstance(node.parent, nodes.figure):\n self.body.append(r'\\captionof{figure}{')\n elif self.table and node.parent.tagname == 'figure':\n self.body.append(r'\\sphinxfigcaption{')\n else:\n self.body.append(r'\\caption{')\n\n def depart_caption(self, node: Element) -> None:\n self.body.append('}')\n if isinstance(node.parent, nodes.figure):\n labels = self.hypertarget_to(node.parent)\n self.body.append(labels)\n self.in_caption -= 1\n\n def visit_legend(self, node: Element) -> None:\n self.body.append(CR + r'\\begin{sphinxlegend}')\n\n def depart_legend(self, node: Element) -> None:\n self.body.append(r'\\end{sphinxlegend}' + CR)\n\n def visit_admonition(self, node: Element) -> None:\n self.body.append(CR + r'\\begin{sphinxadmonition}{note}')\n self.no_latex_floats += 1\n\n def depart_admonition(self, node: Element) -> None:\n self.body.append(r'\\end{sphinxadmonition}' + CR)\n self.no_latex_floats -= 1\n\n def _visit_named_admonition(self, node: Element) -> None:\n label = admonitionlabels[node.tagname]\n self.body.append(CR + r'\\begin{sphinxadmonition}{%s}{%s:}' %\n (node.tagname, label))\n self.no_latex_floats += 1\n\n def _depart_named_admonition(self, node: Element) -> None:\n self.body.append(r'\\end{sphinxadmonition}' + CR)\n self.no_latex_floats -= 1\n\n visit_attention = _visit_named_admonition\n depart_attention = _depart_named_admonition\n visit_caution = _visit_named_admonition\n depart_caution = _depart_named_admonition\n visit_danger = _visit_named_admonition\n depart_danger = _depart_named_admonition\n visit_error = _visit_named_admonition\n depart_error = _depart_named_admonition\n visit_hint = _visit_named_admonition\n depart_hint = _depart_named_admonition\n visit_important = _visit_named_admonition\n depart_important = _depart_named_admonition\n visit_note = _visit_named_admonition\n depart_note = _depart_named_admonition\n visit_tip = _visit_named_admonition\n depart_tip = _depart_named_admonition\n visit_warning = _visit_named_admonition\n depart_warning = _depart_named_admonition\n\n def visit_versionmodified(self, node: Element) -> None:\n pass\n\n def depart_versionmodified(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_target_LaTeXTranslator.visit_target.add_target.self_body_append_self_hyp": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_target_LaTeXTranslator.visit_target.add_target.self_body_append_self_hyp", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1392, "end_line": 1411, "span_ids": ["LaTeXTranslator.visit_target"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_target(self, node: Element) -> None:\n def add_target(id: str) -> None:\n # indexing uses standard LaTeX index markup, so the targets\n # will be generated differently\n if id.startswith('index-'):\n return\n\n # equations also need no extra blank line nor hypertarget\n # TODO: fix this dependency on mathbase extension internals\n if id.startswith('equation-'):\n return\n\n # insert blank line, if the target follows a paragraph node\n index = node.parent.index(node)\n if index > 0 and isinstance(node.parent[index - 1], nodes.paragraph):\n self.body.append(CR)\n\n # do not generate \\phantomsection in \\section{}\n anchor = not self.in_title\n self.body.append(self.hypertarget(id, anchor=anchor))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_index_LaTeXTranslator.visit_index.entries.node_entries_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_index_LaTeXTranslator.visit_index.entries.node_entries_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1448, "end_line": 1468, "span_ids": ["LaTeXTranslator.visit_index"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_index(self, node: Element) -> None:\n def escape(value: str) -> str:\n value = self.encode(value)\n value = value.replace(r'\\{', r'\\sphinxleftcurlybrace{}')\n value = value.replace(r'\\}', r'\\sphinxrightcurlybrace{}')\n value = value.replace('\"', '\"\"')\n value = value.replace('@', '\"@')\n value = value.replace('!', '\"!')\n value = value.replace('|', r'\\textbar{}')\n return value\n\n def style(string: str) -> str:\n match = EXTRA_RE.match(string)\n if match:\n return match.expand(r'\\\\spxentry{\\1}\\\\spxextra{\\2}')\n else:\n return r'\\spxentry{%s}' % string\n\n if not node.get('inline', True):\n self.body.append(CR)\n entries = node['entries']\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_raw_LaTeXTranslator.visit_reference.if_self_in_title_or_not_u.else_.if_len_node_1_and_uri.else_.self_context_append_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_raw_LaTeXTranslator.visit_reference.if_self_in_title_or_not_u.else_.if_len_node_1_and_uri.else_.self_context_append_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1514, "end_line": 1577, "span_ids": ["LaTeXTranslator.visit_reference", "LaTeXTranslator.visit_raw"], "tokens": 620}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_raw(self, node: Element) -> None:\n if not self.is_inline(node):\n self.body.append(CR)\n if 'latex' in node.get('format', '').split():\n self.body.append(node.astext())\n if not self.is_inline(node):\n self.body.append(CR)\n raise nodes.SkipNode\n\n def visit_reference(self, node: Element) -> None:\n if not self.in_title:\n for id in node.get('ids'):\n anchor = not self.in_caption\n self.body += self.hypertarget(id, anchor=anchor)\n if not self.is_inline(node):\n self.body.append(CR)\n uri = node.get('refuri', '')\n if not uri and node.get('refid'):\n uri = '%' + self.curfilestack[-1] + '#' + node['refid']\n if self.in_title or not uri:\n self.context.append('')\n elif uri.startswith('#'):\n # references to labels in the same document\n id = self.curfilestack[-1] + ':' + uri[1:]\n self.body.append(self.hyperlink(id))\n self.body.append(r'\\emph{')\n if self.config.latex_show_pagerefs and not \\\n self.in_production_list:\n self.context.append('}}} (%s)' % self.hyperpageref(id))\n else:\n self.context.append('}}}')\n elif uri.startswith('%'):\n # references to documents or labels inside documents\n hashindex = uri.find('#')\n if hashindex == -1:\n # reference to the document\n id = uri[1:] + '::doc'\n else:\n # reference to a label\n id = uri[1:].replace('#', ':')\n self.body.append(self.hyperlink(id))\n if (len(node) and\n isinstance(node[0], nodes.Element) and\n 'std-term' in node[0].get('classes', [])):\n # don't add a pageref for glossary terms\n self.context.append('}}}')\n # mark up as termreference\n self.body.append(r'\\sphinxtermref{')\n else:\n self.body.append(r'\\sphinxcrossref{')\n if self.config.latex_show_pagerefs and not self.in_production_list:\n self.context.append('}}} (%s)' % self.hyperpageref(id))\n else:\n self.context.append('}}}')\n else:\n if len(node) == 1 and uri == node[0]:\n if node.get('nolinkurl'):\n self.body.append(r'\\sphinxnolinkurl{%s}' % self.encode_uri(uri))\n else:\n self.body.append(r'\\sphinxurl{%s}' % self.encode_uri(uri))\n raise nodes.SkipNode\n else:\n self.body.append(r'\\sphinxhref{%s}{' % self.encode_uri(uri))\n self.context.append('}')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_reference_LaTeXTranslator.visit_number_reference.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_reference_LaTeXTranslator.visit_number_reference.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1579, "end_line": 1602, "span_ids": ["LaTeXTranslator.depart_reference", "LaTeXTranslator.visit_number_reference"], "tokens": 297}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_reference(self, node: Element) -> None:\n self.body.append(self.context.pop())\n if not self.is_inline(node):\n self.body.append(CR)\n\n def visit_number_reference(self, node: Element) -> None:\n if node.get('refid'):\n id = self.curfilestack[-1] + ':' + node['refid']\n else:\n id = node.get('refuri', '')[1:].replace('#', ':')\n\n title = self.escape(node.get('title', '%s')).replace(r'\\%s', '%s')\n if r'\\{name\\}' in title or r'\\{number\\}' in title:\n # new style format (cf. \"Fig.%{number}\")\n title = title.replace(r'\\{name\\}', '{name}').replace(r'\\{number\\}', '{number}')\n text = escape_abbr(title).format(name=r'\\nameref{%s}' % self.idescape(id),\n number=r'\\ref{%s}' % self.idescape(id))\n else:\n # old style format (cf. \"Fig.%{number}\")\n text = escape_abbr(title) % (r'\\ref{%s}' % self.idescape(id))\n hyperref = r'\\hyperref[%s]{%s}' % (self.idescape(id), text)\n self.body.append(hyperref)\n\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_download_reference_LaTeXTranslator.depart_title_reference.self_body_append_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_download_reference_LaTeXTranslator.depart_title_reference.self_body_append_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1611, "end_line": 1670, "span_ids": ["LaTeXTranslator.depart_strong", "LaTeXTranslator.depart_literal_strong", "LaTeXTranslator.visit_title_reference", "LaTeXTranslator.depart_literal_emphasis", "LaTeXTranslator.depart_download_reference", "LaTeXTranslator.visit_download_reference", "LaTeXTranslator.visit_literal_strong", "LaTeXTranslator.depart_emphasis", "LaTeXTranslator.visit_literal_emphasis", "LaTeXTranslator.visit_strong", "LaTeXTranslator.visit_abbreviation", "LaTeXTranslator.depart_abbreviation", "LaTeXTranslator.depart_manpage", "LaTeXTranslator.visit_pending_xref", "LaTeXTranslator.depart_title_reference", "LaTeXTranslator.visit_manpage", "LaTeXTranslator.visit_emphasis", "LaTeXTranslator.depart_pending_xref"], "tokens": 496}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_download_reference(self, node: Element) -> None:\n pass\n\n def depart_download_reference(self, node: Element) -> None:\n pass\n\n def visit_pending_xref(self, node: Element) -> None:\n pass\n\n def depart_pending_xref(self, node: Element) -> None:\n pass\n\n def visit_emphasis(self, node: Element) -> None:\n self.body.append(r'\\sphinxstyleemphasis{')\n\n def depart_emphasis(self, node: Element) -> None:\n self.body.append('}')\n\n def visit_literal_emphasis(self, node: Element) -> None:\n self.body.append(r'\\sphinxstyleliteralemphasis{\\sphinxupquote{')\n\n def depart_literal_emphasis(self, node: Element) -> None:\n self.body.append('}}')\n\n def visit_strong(self, node: Element) -> None:\n self.body.append(r'\\sphinxstylestrong{')\n\n def depart_strong(self, node: Element) -> None:\n self.body.append('}')\n\n def visit_literal_strong(self, node: Element) -> None:\n self.body.append(r'\\sphinxstyleliteralstrong{\\sphinxupquote{')\n\n def depart_literal_strong(self, node: Element) -> None:\n self.body.append('}}')\n\n def visit_abbreviation(self, node: Element) -> None:\n abbr = node.astext()\n self.body.append(r'\\sphinxstyleabbreviation{')\n # spell out the explanation once\n if node.hasattr('explanation') and abbr not in self.handled_abbrs:\n self.context.append('} (%s)' % self.encode(node['explanation']))\n self.handled_abbrs.add(abbr)\n else:\n self.context.append('}')\n\n def depart_abbreviation(self, node: Element) -> None:\n self.body.append(self.context.pop())\n\n def visit_manpage(self, node: Element) -> None:\n return self.visit_literal_emphasis(node)\n\n def depart_manpage(self, node: Element) -> None:\n return self.depart_literal_emphasis(node)\n\n def visit_title_reference(self, node: Element) -> None:\n self.body.append(r'\\sphinxtitleref{')\n\n def depart_title_reference(self, node: Element) -> None:\n self.body.append('}')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_thebibliography_LaTeXTranslator.depart_captioned_literal_block.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_thebibliography_LaTeXTranslator.depart_captioned_literal_block.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1676, "end_line": 1734, "span_ids": ["LaTeXTranslator.depart_thebibliography", "LaTeXTranslator.depart_footnotemark", "LaTeXTranslator.visit_citation_reference", "LaTeXTranslator.visit_captioned_literal_block", "LaTeXTranslator.depart_footnotetext", "LaTeXTranslator.depart_captioned_literal_block", "LaTeXTranslator.visit_citation", "LaTeXTranslator.visit_footnote_reference", "LaTeXTranslator.visit_literal", "LaTeXTranslator.visit_footnotetext", "LaTeXTranslator.visit_footnotemark", "LaTeXTranslator.depart_literal", "LaTeXTranslator.depart_citation", "LaTeXTranslator.depart_citation_reference"], "tokens": 563}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_thebibliography(self, node: Element) -> None:\n self.body.append(r'\\end{sphinxthebibliography}' + CR)\n\n def visit_citation(self, node: Element) -> None:\n label = cast(nodes.label, node[0])\n self.body.append(r'\\bibitem[%s]{%s:%s}' % (self.encode(label.astext()),\n node['docname'], node['ids'][0]))\n\n def depart_citation(self, node: Element) -> None:\n pass\n\n def visit_citation_reference(self, node: Element) -> None:\n if self.in_title:\n pass\n else:\n self.body.append(r'\\sphinxcite{%s:%s}' % (node['docname'], node['refname']))\n raise nodes.SkipNode\n\n def depart_citation_reference(self, node: Element) -> None:\n pass\n\n def visit_literal(self, node: Element) -> None:\n if self.in_title:\n self.body.append(r'\\sphinxstyleliteralintitle{\\sphinxupquote{')\n elif 'kbd' in node['classes']:\n self.body.append(r'\\sphinxkeyboard{\\sphinxupquote{')\n else:\n self.body.append(r'\\sphinxcode{\\sphinxupquote{')\n\n def depart_literal(self, node: Element) -> None:\n self.body.append('}}')\n\n def visit_footnote_reference(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_footnotemark(self, node: Element) -> None:\n self.body.append(r'\\sphinxfootnotemark[')\n\n def depart_footnotemark(self, node: Element) -> None:\n self.body.append(']')\n\n def visit_footnotetext(self, node: Element) -> None:\n label = cast(nodes.label, node[0])\n self.body.append('%' + CR)\n self.body.append(r'\\begin{footnotetext}[%s]'\n r'\\phantomsection\\label{\\thesphinxscope.%s}%%'\n % (label.astext(), label.astext()) + CR)\n self.body.append(r'\\sphinxAtStartFootnote' + CR)\n\n def depart_footnotetext(self, node: Element) -> None:\n # the \\ignorespaces in particular for after table header use\n self.body.append('%' + CR)\n self.body.append(r'\\end{footnotetext}\\ignorespaces ')\n\n def visit_captioned_literal_block(self, node: Element) -> None:\n pass\n\n def depart_captioned_literal_block(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_literal_block_LaTeXTranslator.visit_literal_block.if_node_rawsource_node.else_.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_literal_block_LaTeXTranslator.visit_literal_block.if_node_rawsource_node.else_.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1736, "end_line": 1785, "span_ids": ["LaTeXTranslator.visit_literal_block"], "tokens": 552}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_literal_block(self, node: Element) -> None:\n if node.rawsource != node.astext():\n # most probably a parsed-literal block -- don't highlight\n self.in_parsed_literal += 1\n self.body.append(r'\\begin{sphinxalltt}' + CR)\n else:\n labels = self.hypertarget_to(node)\n if isinstance(node.parent, captioned_literal_block):\n labels += self.hypertarget_to(node.parent)\n if labels and not self.in_footnote:\n self.body.append(CR + r'\\def\\sphinxLiteralBlockLabel{' + labels + '}')\n\n lang = node.get('language', 'default')\n linenos = node.get('linenos', False)\n highlight_args = node.get('highlight_args', {})\n highlight_args['force'] = node.get('force', False)\n opts = self.config.highlight_options.get(lang, {})\n\n hlcode = self.highlighter.highlight_block(\n node.rawsource, lang, opts=opts, linenos=linenos,\n location=node, **highlight_args\n )\n if self.in_footnote:\n self.body.append(CR + r'\\sphinxSetupCodeBlockInFootnote')\n hlcode = hlcode.replace(r'\\begin{Verbatim}',\n r'\\begin{sphinxVerbatim}')\n # if in table raise verbatim flag to avoid \"tabulary\" environment\n # and opt for sphinxVerbatimintable to handle caption & long lines\n elif self.table:\n self.table.has_problematic = True\n self.table.has_verbatim = True\n hlcode = hlcode.replace(r'\\begin{Verbatim}',\n r'\\begin{sphinxVerbatimintable}')\n else:\n hlcode = hlcode.replace(r'\\begin{Verbatim}',\n r'\\begin{sphinxVerbatim}')\n # get consistent trailer\n hlcode = hlcode.rstrip()[:-14] # strip \\end{Verbatim}\n if self.table and not self.in_footnote:\n hlcode += r'\\end{sphinxVerbatimintable}'\n else:\n hlcode += r'\\end{sphinxVerbatim}'\n\n hllines = str(highlight_args.get('hl_lines', []))[1:-1]\n if hllines:\n self.body.append(CR + r'\\fvset{hllines={, %s,}}%%' % hllines)\n self.body.append(CR + hlcode + CR)\n if hllines:\n self.body.append(r'\\sphinxresetverbatimhllines' + CR)\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_block_quote_LaTeXTranslator.visit_block_quote.if_not_done_.if_self_table_.self.table.has_problematic.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_block_quote_LaTeXTranslator.visit_block_quote.if_not_done_.if_self_table_.self.table.has_problematic.True", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1811, "end_line": 1823, "span_ids": ["LaTeXTranslator.visit_block_quote"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_block_quote(self, node: Element) -> None:\n # If the block quote contains a single object and that object\n # is a list, then generate a list not a block quote.\n # This lets us indent lists.\n done = 0\n if len(node.children) == 1:\n child = node.children[0]\n if isinstance(child, (nodes.bullet_list, nodes.enumerated_list)):\n done = 1\n if not done:\n self.body.append(r'\\begin{quote}' + CR)\n if self.table:\n self.table.has_problematic = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_block_quote_LaTeXTranslator.depart_subscript.self_body_append_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_block_quote_LaTeXTranslator.depart_subscript.self_body_append_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1825, "end_line": 1896, "span_ids": ["LaTeXTranslator.depart_option_group", "LaTeXTranslator.depart_superscript", "LaTeXTranslator.visit_option", "LaTeXTranslator.depart_subscript", "LaTeXTranslator.depart_option", "LaTeXTranslator.visit_option_list_item", "LaTeXTranslator.depart_description", "LaTeXTranslator.depart_block_quote", "LaTeXTranslator.depart_option_argument", "LaTeXTranslator.visit_option_list", "LaTeXTranslator.visit_subscript", "LaTeXTranslator.visit_superscript", "LaTeXTranslator.visit_option_string", "LaTeXTranslator.visit_option_argument", "LaTeXTranslator.depart_option_list", "LaTeXTranslator.visit_option_group", "LaTeXTranslator.visit_description", "LaTeXTranslator.depart_option_list_item"], "tokens": 565}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_block_quote(self, node: Element) -> None:\n done = 0\n if len(node.children) == 1:\n child = node.children[0]\n if isinstance(child, (nodes.bullet_list, nodes.enumerated_list)):\n done = 1\n if not done:\n self.body.append(r'\\end{quote}' + CR)\n\n # option node handling copied from docutils' latex writer\n\n def visit_option(self, node: Element) -> None:\n if self.context[-1]:\n # this is not the first option\n self.body.append(', ')\n\n def depart_option(self, node: Element) -> None:\n # flag that the first option is done.\n self.context[-1] += 1\n\n def visit_option_argument(self, node: Element) -> None:\n \"\"\"The delimiter between an option and its argument.\"\"\"\n self.body.append(node.get('delimiter', ' '))\n\n def depart_option_argument(self, node: Element) -> None:\n pass\n\n def visit_option_group(self, node: Element) -> None:\n self.body.append(r'\\item [')\n # flag for first option\n self.context.append(0)\n\n def depart_option_group(self, node: Element) -> None:\n self.context.pop() # the flag\n self.body.append('] ')\n\n def visit_option_list(self, node: Element) -> None:\n self.body.append(r'\\begin{optionlist}{3cm}' + CR)\n if self.table:\n self.table.has_problematic = True\n\n def depart_option_list(self, node: Element) -> None:\n self.body.append(r'\\end{optionlist}' + CR)\n\n def visit_option_list_item(self, node: Element) -> None:\n pass\n\n def depart_option_list_item(self, node: Element) -> None:\n pass\n\n def visit_option_string(self, node: Element) -> None:\n ostring = node.astext()\n self.body.append(self.encode(ostring))\n raise nodes.SkipNode\n\n def visit_description(self, node: Element) -> None:\n self.body.append(' ')\n\n def depart_description(self, node: Element) -> None:\n pass\n\n def visit_superscript(self, node: Element) -> None:\n self.body.append(r'$^{\\text{')\n\n def depart_superscript(self, node: Element) -> None:\n self.body.append('}}$')\n\n def visit_subscript(self, node: Element) -> None:\n self.body.append(r'$_{\\text{')\n\n def depart_subscript(self, node: Element) -> None:\n self.body.append('}}$')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_inline_LaTeXTranslator.visit_inline.if_classes_in_menusele.else_.self_context_append_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_inline_LaTeXTranslator.visit_inline.if_classes_in_menusele.else_.self_context_append_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1907, "end_line": 1922, "span_ids": ["LaTeXTranslator.visit_inline"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_inline(self, node: Element) -> None:\n classes = node.get('classes', [])\n if classes in [['menuselection']]:\n self.body.append(r'\\sphinxmenuselection{')\n self.context.append('}')\n elif classes in [['guilabel']]:\n self.body.append(r'\\sphinxguilabel{')\n self.context.append('}')\n elif classes in [['accelerator']]:\n self.body.append(r'\\sphinxaccelerator{')\n self.context.append('}')\n elif classes and not self.in_title:\n self.body.append(r'\\DUrole{%s}{' % ','.join(classes))\n self.context.append('}')\n else:\n self.context.append('')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_math_block_LaTeXTranslator.visit_math_block.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_math_block_LaTeXTranslator.visit_math_block.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2000, "end_line": 2014, "span_ids": ["LaTeXTranslator.visit_math_block"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_math_block(self, node: Element) -> None:\n if node.get('label'):\n label = \"equation:%s:%s\" % (node['docname'], node['label'])\n else:\n label = None\n\n if node.get('nowrap'):\n if label:\n self.body.append(r'\\label{%s}' % label)\n self.body.append(node.astext())\n else:\n from sphinx.util.math import wrap_displaymath\n self.body.append(wrap_displaymath(node.astext(), label,\n self.config.math_number_all))\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_productionlist_ManualPageTranslator.visit_productionlist.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_productionlist_ManualPageTranslator.visit_productionlist.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 253, "end_line": 276, "span_ids": ["ManualPageTranslator.visit_productionlist"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ManualPageTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_productionlist(self, node: Element) -> None:\n self.ensure_eol()\n names = []\n self.in_productionlist += 1\n self.body.append('.sp\\n.nf\\n')\n productionlist = cast(Iterable[addnodes.production], node)\n for production in productionlist:\n names.append(production['tokenname'])\n maxlen = max(len(name) for name in names)\n lastname = None\n for production in productionlist:\n if production['tokenname']:\n lastname = production['tokenname'].ljust(maxlen)\n self.body.append(self.defs['strong'][0])\n self.body.append(self.deunicode(lastname))\n self.body.append(self.defs['strong'][1])\n self.body.append(' ::= ')\n elif lastname is not None:\n self.body.append('%s ' % (' ' * len(lastname)))\n production.walkabout(self)\n self.body.append('\\n')\n self.body.append('\\n.fi\\n')\n self.in_productionlist -= 1\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_production_ManualPageTranslator._overwritten_don_t_vi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_production_ManualPageTranslator._overwritten_don_t_vi", "embedding": null, "metadata": {"file_path": "sphinx/writers/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 278, "end_line": 291, "span_ids": ["ManualPageTranslator.visit_production", "ManualPageTranslator.depart_production", "ManualPageTranslator.visit_image"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ManualPageTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_production(self, node: Element) -> None:\n pass\n\n def depart_production(self, node: Element) -> None:\n pass\n\n # overwritten -- don't emit a warning for images\n def visit_image(self, node: Element) -> None:\n if 'alt' in node.attributes:\n self.body.append(_('[image: %s]') % node['alt'] + '\\n')\n self.body.append(_('[image]') + '\\n')\n raise nodes.SkipNode\n\n # overwritten -- don't visit inner marked up nodes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_reference_ManualPageTranslator.visit_reference.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_reference_ManualPageTranslator.visit_reference.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 279, "end_line": 297, "span_ids": ["ManualPageTranslator.visit_reference"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ManualPageTranslator(SphinxTranslator, BaseTranslator):\n def visit_reference(self, node: Element) -> None:\n self.body.append(self.defs['reference'][0])\n # avoid repeating escaping code... fine since\n # visit_Text calls astext() and only works on that afterwards\n self.visit_Text(node) # type: ignore\n self.body.append(self.defs['reference'][1])\n\n uri = node.get('refuri', '')\n if uri.startswith('mailto:') or uri.startswith('http:') or \\\n uri.startswith('https:') or uri.startswith('ftp:'):\n # if configured, put the URL after the link\n if self.config.man_show_urls and node.astext() != uri:\n if uri.startswith('mailto:'):\n uri = uri[7:]\n self.body.extend([\n ' <',\n self.defs['strong'][0], uri, self.defs['strong'][1],\n '>'])\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_title_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_title_", "embedding": null, "metadata": {"file_path": "sphinx/writers/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 412, "end_line": 457, "span_ids": ["ManualPageTranslator.visit_title", "ManualPageTranslator.visit_raw", "ManualPageTranslator.visit_math_block", "ManualPageTranslator.visit_inline", "ManualPageTranslator.depart_math_block", "ManualPageTranslator.depart_math", "ManualPageTranslator.depart_inline", "ManualPageTranslator.visit_meta", "ManualPageTranslator.depart_title", "ManualPageTranslator.visit_math"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ManualPageTranslator(SphinxTranslator, BaseTranslator):\n def visit_title(self, node: Element) -> None:\n if isinstance(node.parent, addnodes.seealso):\n self.body.append('.IP \"')\n return\n elif isinstance(node.parent, nodes.section):\n if self.section_level == 0:\n # skip the document title\n raise nodes.SkipNode\n elif self.section_level == 1:\n self.body.append('.SH %s\\n' %\n self.deunicode(node.astext().upper()))\n raise nodes.SkipNode\n return super().visit_title(node)\n\n def depart_title(self, node: Element) -> None:\n if isinstance(node.parent, addnodes.seealso):\n self.body.append('\"\\n')\n return\n return super().depart_title(node)\n\n def visit_raw(self, node: Element) -> None:\n if 'manpage' in node.get('format', '').split():\n self.body.append(node.astext())\n raise nodes.SkipNode\n\n def visit_meta(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_inline(self, node: Element) -> None:\n pass\n\n def depart_inline(self, node: Element) -> None:\n pass\n\n def visit_math(self, node: Element) -> None:\n pass\n\n def depart_math(self, node: Element) -> None:\n pass\n\n def visit_math_block(self, node: Element) -> None:\n self.visit_centered(node)\n\n def depart_math_block(self, node: Element) -> None:\n self.depart_centered(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoWriter_TexinfoWriter.translate.for_attr_in_self_visitor_.setattr_self_attr_getat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoWriter_TexinfoWriter.translate.for_attr_in_self_visitor_.setattr_self_attr_getat", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 104, "end_line": 132, "span_ids": ["TexinfoWriter", "TexinfoWriter.translate"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoWriter(writers.Writer):\n \"\"\"Texinfo writer for generating Texinfo documents.\"\"\"\n supported = ('texinfo', 'texi')\n\n settings_spec: Tuple[str, Any, Tuple[Tuple[str, List[str], Dict[str, str]], ...]] = (\n 'Texinfo Specific Options', None, (\n (\"Name of the Info file\", ['--texinfo-filename'], {'default': ''}),\n ('Dir entry', ['--texinfo-dir-entry'], {'default': ''}),\n ('Description', ['--texinfo-dir-description'], {'default': ''}),\n ('Category', ['--texinfo-dir-category'], {'default':\n 'Miscellaneous'})))\n\n settings_defaults: Dict = {}\n\n output: str = None\n\n visitor_attributes = ('output', 'fragment')\n\n def __init__(self, builder: \"TexinfoBuilder\") -> None:\n super().__init__()\n self.builder = builder\n\n def translate(self) -> None:\n visitor = self.builder.create_translator(self.document, self.builder)\n self.visitor = cast(TexinfoTranslator, visitor)\n self.document.walkabout(visitor)\n self.visitor.finish()\n for attr in self.visitor_attributes:\n setattr(self, attr, getattr(self.visitor, attr))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.finish_TexinfoTranslator._Helper_routines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.finish_TexinfoTranslator._Helper_routines", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 204, "end_line": 223, "span_ids": ["TexinfoTranslator.finish"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def finish(self) -> None:\n if self.previous_section is None:\n self.add_menu('Top')\n for index in self.indices:\n name, content = index\n pointers = tuple([name] + self.rellinks[name])\n self.body.append('\\n@node %s,%s,%s,%s\\n' % pointers)\n self.body.append('@unnumbered %s\\n\\n%s\\n' % (name, content))\n\n while self.referenced_ids:\n # handle xrefs with missing anchors\n r = self.referenced_ids.pop()\n if r not in self.written_ids:\n self.body.append('@anchor{%s}@w{%s}\\n' % (r, ' ' * 30))\n self.ensure_eol()\n self.fragment = ''.join(self.body)\n self.elements['body'] = self.fragment\n self.output = TEMPLATE % self.elements\n\n # -- Helper routines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.init_settings_TexinfoTranslator.init_settings.elements_update_self_sett": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.init_settings_TexinfoTranslator.init_settings.elements_update_self_sett", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 210, "end_line": 250, "span_ids": ["TexinfoTranslator.init_settings"], "tokens": 433}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def init_settings(self) -> None:\n elements = self.elements = self.default_elements.copy()\n elements.update({\n # if empty, the title is set to the first section title\n 'title': self.settings.title,\n 'author': self.settings.author,\n # if empty, use basename of input file\n 'filename': self.settings.texinfo_filename,\n 'release': self.escape(self.config.release),\n 'project': self.escape(self.config.project),\n 'copyright': self.escape(self.config.copyright),\n 'date': self.escape(self.config.today or\n format_date(self.config.today_fmt or _('%b %d, %Y'),\n language=self.config.language))\n })\n # title\n title: str = self.settings.title\n if not title:\n title_node = self.document.next_node(nodes.title)\n title = title_node.astext() if title_node else '<untitled>'\n elements['title'] = self.escape_id(title) or '<untitled>'\n # filename\n if not elements['filename']:\n elements['filename'] = self.document.get('source') or 'untitled'\n if elements['filename'][-4:] in ('.txt', '.rst'): # type: ignore\n elements['filename'] = elements['filename'][:-4] # type: ignore\n elements['filename'] += '.info' # type: ignore\n # direntry\n if self.settings.texinfo_dir_entry:\n entry = self.format_menu_entry(\n self.escape_menu(self.settings.texinfo_dir_entry),\n '(%s)' % elements['filename'],\n self.escape_arg(self.settings.texinfo_dir_description))\n elements['direntry'] = ('@dircategory %s\\n'\n '@direntry\\n'\n '%s'\n '@end direntry\\n') % (\n self.escape_id(self.settings.texinfo_dir_category), entry)\n elements['copying'] = COPYING % elements\n # allow the user to override them all\n elements.update(self.settings.texinfo_elements)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_node_names_TexinfoTranslator.collect_node_names.for_section_in_self_docum.section_node_name_ad": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_node_names_TexinfoTranslator.collect_node_names.for_section_in_self_docum.section_node_name_ad", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 252, "end_line": 280, "span_ids": ["TexinfoTranslator.collect_node_names"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def collect_node_names(self) -> None:\n \"\"\"Generates a unique id for each section.\n\n Assigns the attribute ``node_name`` to each section.\"\"\"\n\n def add_node_name(name: str) -> str:\n node_id = self.escape_id(name)\n nth, suffix = 1, ''\n while node_id + suffix in self.written_ids or \\\n node_id + suffix in self.node_names:\n nth += 1\n suffix = '<%s>' % nth\n node_id += suffix\n self.written_ids.add(node_id)\n self.node_names[node_id] = name\n return node_id\n\n # must have a \"Top\" node\n self.document['node_name'] = 'Top'\n add_node_name('Top')\n add_node_name('top')\n # each index is a node\n self.indices = [(add_node_name(name), content)\n for name, content in self.indices]\n # each section is also a node\n for section in self.document.findall(nodes.section):\n title = cast(nodes.TextElement, section.next_node(nodes.Titular))\n name = title.astext() if title else '<untitled>'\n section['node_name'] = add_node_name(name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_rellinks_TexinfoTranslator.collect_rellinks.try_.else_.rellinks_first_1_Top": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_rellinks_TexinfoTranslator.collect_rellinks.try_.else_.rellinks_first_1_Top", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 307, "end_line": 333, "span_ids": ["TexinfoTranslator.collect_rellinks"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def collect_rellinks(self) -> None:\n \"\"\"Collect the relative links (next, previous, up) for each \"node\".\"\"\"\n rellinks = self.rellinks\n node_menus = self.node_menus\n for id in node_menus:\n rellinks[id] = ['', '', '']\n # up's\n for id, entries in node_menus.items():\n for e in entries:\n rellinks[e][2] = id\n # next's and prev's\n for id, entries in node_menus.items():\n for i, id in enumerate(entries):\n # First child's prev is empty\n if i != 0:\n rellinks[id][1] = entries[i - 1]\n # Last child's next is empty\n if i != len(entries) - 1:\n rellinks[id][0] = entries[i + 1]\n # top's next is its first child\n try:\n first = node_menus['Top'][0]\n except IndexError:\n pass\n else:\n rellinks['Top'][0] = first\n rellinks[first][1] = 'Top'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator._Escaping_TexinfoTranslator.ensure_eol.if_self_body_and_self_bod.self_body_append_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator._Escaping_TexinfoTranslator.ensure_eol.if_self_body_and_self_bod.self_body_append_n_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 353, "end_line": 399, "span_ids": ["TexinfoTranslator.collect_rellinks", "TexinfoTranslator.escape", "TexinfoTranslator.ensure_eol", "TexinfoTranslator.escape_menu", "TexinfoTranslator.escape_id", "TexinfoTranslator.escape_arg"], "tokens": 422}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n # -- Escaping\n # Which characters to escape depends on the context. In some cases,\n # namely menus and node names, it's not possible to escape certain\n # characters.\n\n def escape(self, s: str) -> str:\n \"\"\"Return a string with Texinfo command characters escaped.\"\"\"\n s = s.replace('@', '@@')\n s = s.replace('{', '@{')\n s = s.replace('}', '@}')\n # prevent `` and '' quote conversion\n s = s.replace('``', \"`@w{`}\")\n s = s.replace(\"''\", \"'@w{'}\")\n return s\n\n def escape_arg(self, s: str) -> str:\n \"\"\"Return an escaped string suitable for use as an argument\n to a Texinfo command.\"\"\"\n s = self.escape(s)\n # commas are the argument delimiters\n s = s.replace(',', '@comma{}')\n # normalize white space\n s = ' '.join(s.split()).strip()\n return s\n\n def escape_id(self, s: str) -> str:\n \"\"\"Return an escaped string suitable for node names and anchors.\"\"\"\n bad_chars = ',:()'\n for bc in bad_chars:\n s = s.replace(bc, ' ')\n if re.search('[^ .]', s):\n # remove DOTs if name contains other characters\n s = s.replace('.', ' ')\n s = ' '.join(s.split()).strip()\n return self.escape(s)\n\n def escape_menu(self, s: str) -> str:\n \"\"\"Return an escaped string suitable for menu entries.\"\"\"\n s = self.escape_arg(s)\n s = s.replace(':', ';')\n s = ' '.join(s.split()).strip()\n return s\n\n def ensure_eol(self) -> None:\n \"\"\"Ensure the last line in body is terminated by new line.\"\"\"\n if self.body and self.body[-1][-1:] != '\\n':\n self.body.append('\\n')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.format_menu_entry_TexinfoTranslator.format_menu_entry.return.s_wdesc_strip_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.format_menu_entry_TexinfoTranslator.format_menu_entry.return.s_wdesc_strip_n_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 398, "end_line": 406, "span_ids": ["TexinfoTranslator.format_menu_entry"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def format_menu_entry(self, name: str, node_name: str, desc: str) -> str:\n if name == node_name:\n s = '* %s:: ' % (name,)\n else:\n s = '* %s: %s. ' % (name, node_name)\n offset = max((24, (len(name) + 4) % 78))\n wdesc = '\\n'.join(' ' * offset + l for l in\n textwrap.wrap(desc, width=78 - offset))\n return s + wdesc.strip() + '\\n'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.add_menu_entries_TexinfoTranslator.add_menu_entries.for_entry_in_entries_.self_body_append_self_for": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.add_menu_entries_TexinfoTranslator.add_menu_entries.for_entry_in_entries_.self_body_append_self_for", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 408, "end_line": 424, "span_ids": ["TexinfoTranslator.add_menu_entries"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def add_menu_entries(self, entries: List[str], reg: Pattern = re.compile(r'\\s+---?\\s+')\n ) -> None:\n for entry in entries:\n name = self.node_names[entry]\n # special formatting for entries that are divided by an em-dash\n try:\n parts = reg.split(name, 1)\n except TypeError:\n # could be a gettext proxy\n parts = [name]\n if len(parts) == 2:\n name, desc = parts\n else:\n desc = ''\n name = self.escape_menu(name)\n desc = self.escape(desc)\n self.body.append(self.format_menu_entry(name, entry, desc))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.add_menu_TexinfoTranslator.add_menu.self_body_append_n_end_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.add_menu_TexinfoTranslator.add_menu.self_body_append_n_end_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 428, "end_line": 454, "span_ids": ["TexinfoTranslator.add_menu"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def add_menu(self, node_name: str) -> None:\n entries = self.node_menus[node_name]\n if not entries:\n return\n self.body.append('\\n@menu\\n')\n self.add_menu_entries(entries)\n if (node_name != 'Top' or\n not self.node_menus[entries[0]] or\n self.config.texinfo_no_detailmenu):\n self.body.append('\\n@end menu\\n')\n return\n\n def _add_detailed_menu(name: str) -> None:\n entries = self.node_menus[name]\n if not entries:\n return\n self.body.append('\\n%s\\n\\n' % (self.escape(self.node_names[name],)))\n self.add_menu_entries(entries)\n for subentry in entries:\n _add_detailed_menu(subentry)\n\n self.body.append('\\n@detailmenu\\n'\n ' --- The Detailed Node Listing ---\\n')\n for entry in entries:\n _add_detailed_menu(entry)\n self.body.append('\\n@end detailmenu\\n'\n '@end menu\\n')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.tex_image_length_TexinfoTranslator.tex_image_length.return.res": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.tex_image_length_TexinfoTranslator.tex_image_length.return.res", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 454, "end_line": 467, "span_ids": ["TexinfoTranslator.tex_image_length"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def tex_image_length(self, width_str: str) -> str:\n match = re.match(r'(\\d*\\.?\\d*)\\s*(\\S*)', width_str)\n if not match:\n # fallback\n return width_str\n res = width_str\n amount, unit = match.groups()[:2]\n if not unit or unit == \"px\":\n # pixels: let TeX alone\n return ''\n elif unit == \"%\":\n # a4paper: textwidth=418.25368pt\n res = \"%d.0pt\" % (float(amount) * 4.1825368)\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_indices_TexinfoTranslator.collect_indices.generate.return._join_ret_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_indices_TexinfoTranslator.collect_indices.generate.return._join_ret_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 454, "end_line": 467, "span_ids": ["TexinfoTranslator.collect_indices"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def collect_indices(self) -> None:\n def generate(content: List[Tuple[str, List[IndexEntry]]], collapsed: bool) -> str:\n ret = ['\\n@menu\\n']\n for _letter, entries in content:\n for entry in entries:\n if not entry[3]:\n continue\n name = self.escape_menu(entry[0])\n sid = self.get_short_id('%s:%s' % (entry[2], entry[3]))\n desc = self.escape_arg(entry[6])\n me = self.format_menu_entry(name, sid, desc)\n ret.append(me)\n ret.append('@end menu\\n')\n return ''.join(ret)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_indices.indices_config_TexinfoTranslator.collect_indices.for_docname_in_self_build.if_domain_entries_docname.break": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_indices.indices_config_TexinfoTranslator.collect_indices.for_docname_in_self_build.if_domain_entries_docname.break", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 486, "end_line": 505, "span_ids": ["TexinfoTranslator.collect_indices"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def collect_indices(self) -> None:\n # ... other code\n\n indices_config = self.config.texinfo_domain_indices\n if indices_config:\n for domain in self.builder.env.domains.values():\n for indexcls in domain.indices:\n indexname = '%s-%s' % (domain.name, indexcls.name)\n if isinstance(indices_config, list):\n if indexname not in indices_config:\n continue\n content, collapsed = indexcls(domain).generate(\n self.builder.docnames)\n if not content:\n continue\n self.indices.append((indexcls.localname,\n generate(content, collapsed)))\n # only add the main Index if it's not empty\n domain = cast(IndexDomain, self.builder.env.get_domain('index'))\n for docname in self.builder.docnames:\n if domain.entries[docname]:\n self.indices.append((_('Index'), '\\n@printindex ge\\n'))\n break", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator._this_is_copied_from_the_TexinfoTranslator.collect_footnotes.return.fnotes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator._this_is_copied_from_the_TexinfoTranslator.collect_footnotes.return.fnotes", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 490, "end_line": 508, "span_ids": ["TexinfoTranslator.collect_indices", "TexinfoTranslator.collect_footnotes"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n # this is copied from the latex writer\n # TODO: move this to sphinx.util\n\n def collect_footnotes(self, node: Element) -> Dict[str, List[Union[collected_footnote, bool]]]: # NOQA\n def footnotes_under(n: Element) -> Iterator[nodes.footnote]:\n if isinstance(n, nodes.footnote):\n yield n\n else:\n for c in n.children:\n if isinstance(c, addnodes.start_of_file):\n continue\n elif isinstance(c, nodes.Element):\n yield from footnotes_under(c)\n fnotes: Dict[str, List[Union[collected_footnote, bool]]] = {}\n for fn in footnotes_under(node):\n label = cast(nodes.label, fn[0])\n num = label.astext().strip()\n fnotes[num] = [collected_footnote('', *fn.children), False]\n return fnotes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator._xref_handling_TexinfoTranslator.depart_Text.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator._xref_handling_TexinfoTranslator.depart_Text.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 510, "end_line": 566, "span_ids": ["TexinfoTranslator.visit_document", "TexinfoTranslator.depart_Text", "TexinfoTranslator.depart_document", "TexinfoTranslator.add_xref", "TexinfoTranslator.visit_Text", "TexinfoTranslator.get_short_id", "TexinfoTranslator.add_anchor", "TexinfoTranslator.collect_footnotes"], "tokens": 481}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n # -- xref handling\n\n def get_short_id(self, id: str) -> str:\n \"\"\"Return a shorter 'id' associated with ``id``.\"\"\"\n # Shorter ids improve paragraph filling in places\n # that the id is hidden by Emacs.\n try:\n sid = self.short_ids[id]\n except KeyError:\n sid = hex(len(self.short_ids))[2:]\n self.short_ids[id] = sid\n return sid\n\n def add_anchor(self, id: str, node: Node) -> None:\n if id.startswith('index-'):\n return\n id = self.curfilestack[-1] + ':' + id\n eid = self.escape_id(id)\n sid = self.get_short_id(id)\n for id in (eid, sid):\n if id not in self.written_ids:\n self.body.append('@anchor{%s}' % id)\n self.written_ids.add(id)\n\n def add_xref(self, id: str, name: str, node: Node) -> None:\n name = self.escape_menu(name)\n sid = self.get_short_id(id)\n if self.config.texinfo_cross_references:\n self.body.append('@ref{%s,,%s}' % (sid, name))\n self.referenced_ids.add(sid)\n self.referenced_ids.add(self.escape_id(id))\n else:\n self.body.append(name)\n\n # -- Visiting\n\n def visit_document(self, node: Element) -> None:\n self.footnotestack.append(self.collect_footnotes(node))\n self.curfilestack.append(node.get('docname', ''))\n if 'docname' in node:\n self.add_anchor(':doc', node)\n\n def depart_document(self, node: Element) -> None:\n self.footnotestack.pop()\n self.curfilestack.pop()\n\n def visit_Text(self, node: Text) -> None:\n s = self.escape(node.astext())\n if self.escape_newlines:\n s = s.replace('\\n', ' ')\n if self.escape_hyphens:\n # prevent \"--\" and \"---\" conversion\n s = s.replace('-', '@w{-}')\n self.body.append(s)\n\n def depart_Text(self, node: Text) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_section_TexinfoTranslator.rubrics._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_section_TexinfoTranslator.rubrics._", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 580, "end_line": 614, "span_ids": ["TexinfoTranslator.depart_section", "TexinfoTranslator:8", "TexinfoTranslator.visit_section"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_section(self, node: Element) -> None:\n self.next_section_ids.update(node.get('ids', []))\n if not self.seen_title:\n return\n if self.previous_section:\n self.add_menu(self.previous_section['node_name'])\n else:\n self.add_menu('Top')\n\n node_name = node['node_name']\n pointers = tuple([node_name] + self.rellinks[node_name])\n self.body.append('\\n@node %s,%s,%s,%s\\n' % pointers)\n for id in sorted(self.next_section_ids):\n self.add_anchor(id, node)\n\n self.next_section_ids.clear()\n self.previous_section = cast(nodes.section, node)\n self.section_level += 1\n\n def depart_section(self, node: Element) -> None:\n self.section_level -= 1\n\n headings = (\n '@unnumbered',\n '@chapter',\n '@section',\n '@subsection',\n '@subsubsection',\n )\n\n rubrics = (\n '@heading',\n '@subheading',\n '@subsubheading',\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_title_TexinfoTranslator.visit_title.if_isinstance_parent_no.else_.self_body_append_n_s_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_title_TexinfoTranslator.visit_title.if_isinstance_parent_no.else_.self_body_append_n_s_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 619, "end_line": 638, "span_ids": ["TexinfoTranslator.visit_title"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_title(self, node: Element) -> None:\n if not self.seen_title:\n self.seen_title = True\n raise nodes.SkipNode\n parent = node.parent\n if isinstance(parent, nodes.table):\n return\n if isinstance(parent, (nodes.Admonition, nodes.sidebar, nodes.topic)):\n raise nodes.SkipNode\n elif not isinstance(parent, nodes.section):\n logger.warning(__('encountered title node not in section, topic, table, '\n 'admonition or sidebar'),\n location=node)\n self.visit_rubric(node)\n else:\n try:\n heading = self.headings[self.section_level]\n except IndexError:\n heading = self.headings[-1]\n self.body.append('\\n%s ' % heading)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_title_TexinfoTranslator._References": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_title_TexinfoTranslator._References", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 637, "end_line": 660, "span_ids": ["TexinfoTranslator.visit_rubric", "TexinfoTranslator.depart_rubric", "TexinfoTranslator.visit_subtitle", "TexinfoTranslator.depart_title", "TexinfoTranslator.depart_subtitle"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def depart_title(self, node: Element) -> None:\n self.body.append('\\n\\n')\n\n def visit_rubric(self, node: Element) -> None:\n if len(node) == 1 and node.astext() in ('Footnotes', _('Footnotes')):\n raise nodes.SkipNode\n try:\n rubric = self.rubrics[self.section_level]\n except IndexError:\n rubric = self.rubrics[-1]\n self.body.append('\\n%s ' % rubric)\n self.escape_newlines += 1\n\n def depart_rubric(self, node: Element) -> None:\n self.escape_newlines -= 1\n self.body.append('\\n\\n')\n\n def visit_subtitle(self, node: Element) -> None:\n self.body.append('\\n\\n@noindent\\n')\n\n def depart_subtitle(self, node: Element) -> None:\n self.body.append('\\n\\n')\n\n # -- References", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_target_TexinfoTranslator.depart_target.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_target_TexinfoTranslator.depart_target.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 662, "end_line": 687, "span_ids": ["TexinfoTranslator.visit_target", "TexinfoTranslator.depart_target"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_target(self, node: Element) -> None:\n # postpone the labels until after the sectioning command\n parindex = node.parent.index(node)\n try:\n try:\n next = node.parent[parindex + 1]\n except IndexError:\n # last node in parent, look at next after parent\n # (for section of equal level)\n next = node.parent.parent[node.parent.parent.index(node.parent)]\n if isinstance(next, nodes.section):\n if node.get('refid'):\n self.next_section_ids.add(node['refid'])\n self.next_section_ids.update(node['ids'])\n return\n except (IndexError, AttributeError):\n pass\n if 'refuri' in node:\n return\n if node.get('refid'):\n self.add_anchor(node['refid'], node)\n for id in node['ids']:\n self.add_anchor(id, node)\n\n def depart_target(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_reference_TexinfoTranslator.visit_reference.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_reference_TexinfoTranslator.visit_reference.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 691, "end_line": 752, "span_ids": ["TexinfoTranslator.visit_reference"], "tokens": 606}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_reference(self, node: Element) -> None:\n # an xref's target is displayed in Info so we ignore a few\n # cases for the sake of appearance\n if isinstance(node.parent, (nodes.title, addnodes.desc_type)):\n return\n if isinstance(node[0], nodes.image):\n return\n name = node.get('name', node.astext()).strip()\n uri = node.get('refuri', '')\n if not uri and node.get('refid'):\n uri = '%' + self.curfilestack[-1] + '#' + node['refid']\n if not uri:\n return\n if uri.startswith('mailto:'):\n uri = self.escape_arg(uri[7:])\n name = self.escape_arg(name)\n if not name or name == uri:\n self.body.append('@email{%s}' % uri)\n else:\n self.body.append('@email{%s,%s}' % (uri, name))\n elif uri.startswith('#'):\n # references to labels in the same document\n id = self.curfilestack[-1] + ':' + uri[1:]\n self.add_xref(id, name, node)\n elif uri.startswith('%'):\n # references to documents or labels inside documents\n hashindex = uri.find('#')\n if hashindex == -1:\n # reference to the document\n id = uri[1:] + '::doc'\n else:\n # reference to a label\n id = uri[1:].replace('#', ':')\n self.add_xref(id, name, node)\n elif uri.startswith('info:'):\n # references to an external Info file\n uri = uri[5:].replace('_', ' ')\n uri = self.escape_arg(uri)\n id = 'Top'\n if '#' in uri:\n uri, id = uri.split('#', 1)\n id = self.escape_id(id)\n name = self.escape_menu(name)\n if name == id:\n self.body.append('@ref{%s,,,%s}' % (id, uri))\n else:\n self.body.append('@ref{%s,,%s,%s}' % (id, name, uri))\n else:\n uri = self.escape_arg(uri)\n name = self.escape_arg(name)\n show_urls = self.config.texinfo_show_urls\n if self.in_footnote:\n show_urls = 'inline'\n if not name or uri == name:\n self.body.append('@indicateurl{%s}' % uri)\n elif show_urls == 'inline':\n self.body.append('@uref{%s,%s}' % (uri, name))\n elif show_urls == 'no':\n self.body.append('@uref{%s,,%s}' % (uri, name))\n else:\n self.body.append('%s@footnote{%s}' % (name, uri))\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_image_TexinfoTranslator._Sphinx_specific": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_image_TexinfoTranslator._Sphinx_specific", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1214, "end_line": 1279, "span_ids": ["TexinfoTranslator.visit_substitution_reference", "TexinfoTranslator.visit_substitution_definition", "TexinfoTranslator.visit_system_message", "TexinfoTranslator.visit_comment", "TexinfoTranslator.unknown_departure", "TexinfoTranslator.visit_label", "TexinfoTranslator.depart_compound", "TexinfoTranslator.depart_legend", "TexinfoTranslator.visit_problematic", "TexinfoTranslator.visit_sidebar", "TexinfoTranslator.depart_substitution_reference", "TexinfoTranslator.visit_legend", "TexinfoTranslator.visit_compound", "TexinfoTranslator.unimplemented_visit", "TexinfoTranslator.depart_label", "TexinfoTranslator.depart_problematic", "TexinfoTranslator.depart_sidebar", "TexinfoTranslator.depart_image"], "tokens": 453}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def depart_image(self, node: Element) -> None:\n pass\n\n def visit_compound(self, node: Element) -> None:\n pass\n\n def depart_compound(self, node: Element) -> None:\n pass\n\n def visit_sidebar(self, node: Element) -> None:\n self.visit_topic(node)\n\n def depart_sidebar(self, node: Element) -> None:\n self.depart_topic(node)\n\n def visit_label(self, node: Element) -> None:\n # label numbering is automatically generated by Texinfo\n if self.in_footnote:\n raise nodes.SkipNode\n else:\n self.body.append('@w{(')\n\n def depart_label(self, node: Element) -> None:\n self.body.append(')} ')\n\n def visit_legend(self, node: Element) -> None:\n pass\n\n def depart_legend(self, node: Element) -> None:\n pass\n\n def visit_substitution_reference(self, node: Element) -> None:\n pass\n\n def depart_substitution_reference(self, node: Element) -> None:\n pass\n\n def visit_substitution_definition(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_system_message(self, node: Element) -> None:\n self.body.append('\\n@verbatim\\n'\n '<SYSTEM MESSAGE: %s>\\n'\n '@end verbatim\\n' % node.astext())\n raise nodes.SkipNode\n\n def visit_comment(self, node: Element) -> None:\n self.body.append('\\n')\n for line in node.astext().splitlines():\n self.body.append('@c %s\\n' % line)\n raise nodes.SkipNode\n\n def visit_problematic(self, node: Element) -> None:\n self.body.append('>>')\n\n def depart_problematic(self, node: Element) -> None:\n self.body.append('<<')\n\n def unimplemented_visit(self, node: Element) -> None:\n logger.warning(__(\"unimplemented node type: %r\"), node,\n location=node)\n\n def unknown_departure(self, node: Node) -> None:\n pass\n\n # -- Sphinx specific", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_productionlist_TexinfoTranslator.visit_productionlist.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_productionlist_TexinfoTranslator.visit_productionlist.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1273, "end_line": 1290, "span_ids": ["TexinfoTranslator.visit_productionlist"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_productionlist(self, node: Element) -> None:\n self.visit_literal_block(None)\n names = []\n productionlist = cast(Iterable[addnodes.production], node)\n for production in productionlist:\n names.append(production['tokenname'])\n maxlen = max(len(name) for name in names)\n for production in productionlist:\n if production['tokenname']:\n for id in production.get('ids'):\n self.add_anchor(id, production)\n s = production['tokenname'].ljust(maxlen) + ' ::='\n else:\n s = '%s ' % (' ' * maxlen)\n self.body.append(self.escape(s))\n self.body.append(self.escape(production.astext() + '\\n'))\n self.depart_literal_block(None)\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_production_TexinfoTranslator.depart_desc.self_body_append_end_de": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_production_TexinfoTranslator.depart_desc.self_body_append_end_de", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1300, "end_line": 1388, "span_ids": ["TexinfoTranslator.visit_meta", "TexinfoTranslator.visit_desc", "TexinfoTranslator.visit_index", "TexinfoTranslator.visit_start_of_file", "TexinfoTranslator.depart_desc", "TexinfoTranslator.depart_production", "TexinfoTranslator.depart_literal_emphasis", "TexinfoTranslator.visit_production", "TexinfoTranslator.depart_literal_strong", "TexinfoTranslator.visit_seealso", "TexinfoTranslator.depart_versionmodified", "TexinfoTranslator.visit_literal_emphasis", "TexinfoTranslator.depart_start_of_file", "TexinfoTranslator.visit_centered", "TexinfoTranslator.depart_glossary", "TexinfoTranslator.visit_glossary", "TexinfoTranslator.visit_versionmodified", "TexinfoTranslator.depart_seealso", "TexinfoTranslator.visit_acks", "TexinfoTranslator.visit_literal_strong"], "tokens": 699}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_production(self, node: Element) -> None:\n pass\n\n def depart_production(self, node: Element) -> None:\n pass\n\n def visit_literal_emphasis(self, node: Element) -> None:\n self.body.append('@code{')\n\n def depart_literal_emphasis(self, node: Element) -> None:\n self.body.append('}')\n\n def visit_literal_strong(self, node: Element) -> None:\n self.body.append('@code{')\n\n def depart_literal_strong(self, node: Element) -> None:\n self.body.append('}')\n\n def visit_index(self, node: Element) -> None:\n # terminate the line but don't prevent paragraph breaks\n if isinstance(node.parent, nodes.paragraph):\n self.ensure_eol()\n else:\n self.body.append('\\n')\n for entry in node['entries']:\n typ, text, tid, text2, key_ = entry\n text = self.escape_menu(text)\n self.body.append('@geindex %s\\n' % text)\n\n def visit_versionmodified(self, node: Element) -> None:\n self.body.append('\\n')\n\n def depart_versionmodified(self, node: Element) -> None:\n self.body.append('\\n')\n\n def visit_start_of_file(self, node: Element) -> None:\n # add a document target\n self.next_section_ids.add(':doc')\n self.curfilestack.append(node['docname'])\n self.footnotestack.append(self.collect_footnotes(node))\n\n def depart_start_of_file(self, node: Element) -> None:\n self.curfilestack.pop()\n self.footnotestack.pop()\n\n def visit_centered(self, node: Element) -> None:\n txt = self.escape_arg(node.astext())\n self.body.append('\\n\\n@center %s\\n\\n' % txt)\n raise nodes.SkipNode\n\n def visit_seealso(self, node: Element) -> None:\n self.body.append('\\n\\n@subsubheading %s\\n\\n' %\n admonitionlabels['seealso'])\n\n def depart_seealso(self, node: Element) -> None:\n self.body.append('\\n')\n\n def visit_meta(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_glossary(self, node: Element) -> None:\n pass\n\n def depart_glossary(self, node: Element) -> None:\n pass\n\n def visit_acks(self, node: Element) -> None:\n bullet_list = cast(nodes.bullet_list, node[0])\n list_items = cast(Iterable[nodes.list_item], bullet_list)\n self.body.append('\\n\\n')\n self.body.append(', '.join(n.astext() for n in list_items) + '.')\n self.body.append('\\n\\n')\n raise nodes.SkipNode\n\n #############################################################\n # Domain-specific object descriptions\n #############################################################\n\n # Top-level nodes for descriptions\n ##################################\n\n def visit_desc(self, node: addnodes.desc) -> None:\n self.descs.append(node)\n self.at_deffnx = '@deffn'\n\n def depart_desc(self, node: addnodes.desc) -> None:\n self.descs.pop()\n self.ensure_eol()\n self.body.append('@end deffn\\n')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_desc_signature_TexinfoTranslator.visit_desc_signature.self.desc_type_name.name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_desc_signature_TexinfoTranslator.visit_desc_signature.self.desc_type_name.name", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1388, "end_line": 1405, "span_ids": ["TexinfoTranslator.visit_desc_signature"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_desc_signature(self, node: Element) -> None:\n self.escape_hyphens += 1\n objtype = node.parent['objtype']\n if objtype != 'describe':\n for id in node.get('ids'):\n self.add_anchor(id, node)\n # use the full name of the objtype for the category\n try:\n domain = self.builder.env.get_domain(node.parent['domain'])\n name = domain.get_type_name(domain.object_types[objtype],\n self.config.primary_domain == domain.name)\n except (KeyError, ExtensionError):\n name = objtype\n # by convention, the deffn category should be capitalized like a title\n category = self.escape_arg(smart_capwords(name))\n self.body.append('\\n%s {%s} ' % (self.at_deffnx, category))\n self.at_deffnx = '@deffnx'\n self.desc_type_name = name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_desc_signature_TexinfoTranslator.depart_desc_optional.self_body_append_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_desc_signature_TexinfoTranslator.depart_desc_optional.self_body_append_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1409, "end_line": 1481, "span_ids": ["TexinfoTranslator.visit_desc_optional", "TexinfoTranslator.depart_desc_parameterlist", "TexinfoTranslator.depart_desc_name", "TexinfoTranslator.visit_desc_inline", "TexinfoTranslator.depart_desc_signature_line", "TexinfoTranslator.visit_desc_parameterlist", "TexinfoTranslator.depart_desc_inline", "TexinfoTranslator.visit_desc_type", "TexinfoTranslator.depart_desc_optional", "TexinfoTranslator.depart_desc_signature", "TexinfoTranslator.depart_desc_returns", "TexinfoTranslator.visit_desc_addname", "TexinfoTranslator.depart_desc_addname", "TexinfoTranslator.visit_desc_name", "TexinfoTranslator.depart_desc_content", "TexinfoTranslator.visit_desc_signature_line", "TexinfoTranslator.depart_desc_type", "TexinfoTranslator.visit_desc_content", "TexinfoTranslator.visit_desc_parameter", "TexinfoTranslator.visit_desc_returns"], "tokens": 484}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def depart_desc_signature(self, node: Element) -> None:\n self.body.append(\"\\n\")\n self.escape_hyphens -= 1\n self.desc_type_name = None\n\n def visit_desc_signature_line(self, node: Element) -> None:\n pass\n\n def depart_desc_signature_line(self, node: Element) -> None:\n pass\n\n def visit_desc_content(self, node: Element) -> None:\n pass\n\n def depart_desc_content(self, node: Element) -> None:\n pass\n\n def visit_desc_inline(self, node: Element) -> None:\n pass\n\n def depart_desc_inline(self, node: Element) -> None:\n pass\n\n # Nodes for high-level structure in signatures\n ##############################################\n\n def visit_desc_name(self, node: Element) -> None:\n pass\n\n def depart_desc_name(self, node: Element) -> None:\n pass\n\n def visit_desc_addname(self, node: Element) -> None:\n pass\n\n def depart_desc_addname(self, node: Element) -> None:\n pass\n\n def visit_desc_type(self, node: Element) -> None:\n pass\n\n def depart_desc_type(self, node: Element) -> None:\n pass\n\n def visit_desc_returns(self, node: Element) -> None:\n self.body.append(' -> ')\n\n def depart_desc_returns(self, node: Element) -> None:\n pass\n\n def visit_desc_parameterlist(self, node: Element) -> None:\n self.body.append(' (')\n self.first_param = 1\n\n def depart_desc_parameterlist(self, node: Element) -> None:\n self.body.append(')')\n\n def visit_desc_parameter(self, node: Element) -> None:\n if not self.first_param:\n self.body.append(', ')\n else:\n self.first_param = 0\n text = self.escape(node.astext())\n # replace no-break spaces with normal ones\n text = text.replace('\u00a0', '@w{ }')\n self.body.append(text)\n raise nodes.SkipNode\n\n def visit_desc_optional(self, node: Element) -> None:\n self.body.append('[')\n\n def depart_desc_optional(self, node: Element) -> None:\n self.body.append(']')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_desc_annotation_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_desc_annotation_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1494, "end_line": 1557, "span_ids": ["TexinfoTranslator.visit_pending_xref", "TexinfoTranslator.visit_manpage", "TexinfoTranslator.visit_hlist", "TexinfoTranslator.depart_pending_xref", "TexinfoTranslator.depart_abbreviation", "TexinfoTranslator.visit_download_reference", "TexinfoTranslator.visit_math_block", "TexinfoTranslator.depart_download_reference", "TexinfoTranslator.depart_hlistcol", "TexinfoTranslator.visit_math", "TexinfoTranslator.depart_manpage", "TexinfoTranslator.depart_inline", "TexinfoTranslator.visit_abbreviation", "TexinfoTranslator.depart_hlist", "TexinfoTranslator.visit_inline", "TexinfoTranslator.visit_hlistcol", "TexinfoTranslator.depart_desc_annotation"], "tokens": 463}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def depart_desc_annotation(self, node: Element) -> None:\n pass\n\n ##############################################\n\n def visit_inline(self, node: Element) -> None:\n pass\n\n def depart_inline(self, node: Element) -> None:\n pass\n\n def visit_abbreviation(self, node: Element) -> None:\n abbr = node.astext()\n self.body.append('@abbr{')\n if node.hasattr('explanation') and abbr not in self.handled_abbrs:\n self.context.append(',%s}' % self.escape_arg(node['explanation']))\n self.handled_abbrs.add(abbr)\n else:\n self.context.append('}')\n\n def depart_abbreviation(self, node: Element) -> None:\n self.body.append(self.context.pop())\n\n def visit_manpage(self, node: Element) -> None:\n return self.visit_literal_emphasis(node)\n\n def depart_manpage(self, node: Element) -> None:\n return self.depart_literal_emphasis(node)\n\n def visit_download_reference(self, node: Element) -> None:\n pass\n\n def depart_download_reference(self, node: Element) -> None:\n pass\n\n def visit_hlist(self, node: Element) -> None:\n self.visit_bullet_list(node)\n\n def depart_hlist(self, node: Element) -> None:\n self.depart_bullet_list(node)\n\n def visit_hlistcol(self, node: Element) -> None:\n pass\n\n def depart_hlistcol(self, node: Element) -> None:\n pass\n\n def visit_pending_xref(self, node: Element) -> None:\n pass\n\n def depart_pending_xref(self, node: Element) -> None:\n pass\n\n def visit_math(self, node: Element) -> None:\n self.body.append('@math{' + self.escape_arg(node.astext()) + '}')\n raise nodes.SkipNode\n\n def visit_math_block(self, node: Element) -> None:\n if node.get('label'):\n self.add_anchor(node['label'], node)\n self.body.append('\\n\\n@example\\n%s\\n@end example\\n\\n' %\n self.escape_arg(node.astext()))\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Cell_Cell.wrap.self.wrapped.my_wrap_self_text_width_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Cell_Cell.wrap.self.wrapped.my_wrap_self_text_width_", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 22, "end_line": 43, "span_ids": ["Cell.__hash__", "Cell.wrap", "Cell.__repr__", "Cell"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Cell:\n \"\"\"Represents a cell in a table.\n It can span multiple columns or multiple lines.\n \"\"\"\n def __init__(self, text: str = \"\", rowspan: int = 1, colspan: int = 1) -> None:\n self.text = text\n self.wrapped: List[str] = []\n self.rowspan = rowspan\n self.colspan = colspan\n self.col: Optional[int] = None\n self.row: Optional[int] = None\n\n def __repr__(self) -> str:\n return \"<Cell {!r} {}v{}/{}>{}>\".format(\n self.text, self.row, self.rowspan, self.col, self.colspan\n )\n\n def __hash__(self) -> int:\n return hash((self.col, self.row))\n\n def wrap(self, width: int) -> None:\n self.wrapped = my_wrap(self.text, width)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table_Table.set_separator.self.separator.len_self_lines_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table_Table.set_separator.self.separator.len_self_lines_", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 46, "end_line": 108, "span_ids": ["Table.add_row", "Table", "Table.set_separator"], "tokens": 505}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Table:\n \"\"\"Represents a table, handling cells that can span multiple lines\n or rows, like::\n\n +-----------+-----+\n | AAA | BBB |\n +-----+-----+ |\n | | XXX | |\n | +-----+-----+\n | DDD | CCC |\n +-----+-----------+\n\n This class can be used in two ways, either:\n\n - With absolute positions: call ``table[line, col] = Cell(...)``,\n this overwrites any existing cell(s) at these positions.\n\n - With relative positions: call the ``add_row()`` and\n ``add_cell(Cell(...))`` as needed.\n\n Cells spanning multiple rows or multiple columns (having a\n colspan or rowspan greater than one) are automatically referenced\n by all the table cells they cover. This is a useful\n representation as we can simply check\n ``if self[x, y] is self[x, y+1]`` to recognize a rowspan.\n\n Colwidth is not automatically computed, it has to be given, either\n at construction time, or during the table construction.\n\n Example usage::\n\n table = Table([6, 6])\n table.add_cell(Cell(\"foo\"))\n table.add_cell(Cell(\"bar\"))\n table.set_separator()\n table.add_row()\n table.add_cell(Cell(\"FOO\"))\n table.add_cell(Cell(\"BAR\"))\n print(table)\n +--------+--------+\n | foo | bar |\n |========|========|\n | FOO | BAR |\n +--------+--------+\n\n \"\"\"\n def __init__(self, colwidth: List[int] = None) -> None:\n self.lines: List[List[Cell]] = []\n self.separator = 0\n self.colwidth: List[int] = (colwidth if colwidth is not None else [])\n self.current_line = 0\n self.current_col = 0\n\n def add_row(self) -> None:\n \"\"\"Add a row to the table, to use with ``add_cell()``. It is not needed\n to call ``add_row()`` before the first ``add_cell()``.\n \"\"\"\n self.current_line += 1\n self.current_col = 0\n\n def set_separator(self) -> None:\n \"\"\"Sets the separator below the current line.\"\"\"\n self.separator = len(self.lines)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.add_cell_Table.add_cell.self_current_col_cell_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.add_cell_Table.add_cell.self_current_col_cell_", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 110, "end_line": 119, "span_ids": ["Table.add_cell"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Table:\n\n def add_cell(self, cell: Cell) -> None:\n \"\"\"Add a cell to the current line, to use with ``add_row()``. To add\n a cell spanning multiple lines or rows, simply set the\n ``cell.colspan`` or ``cell.rowspan`` BEFORE inserting it into\n the table.\n \"\"\"\n while self[self.current_line, self.current_col]:\n self.current_col += 1\n self[self.current_line, self.current_col] = cell\n self.current_col += cell.colspan", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.rewrap_Table.physical_lines_for_line.return.physical_lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.rewrap_Table.physical_lines_for_line.return.physical_lines", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 168, "end_line": 188, "span_ids": ["Table.physical_lines_for_line", "Table.rewrap"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Table:\n\n def rewrap(self) -> None:\n \"\"\"Call ``cell.wrap()`` on all cells, and measure each column width\n after wrapping (result written in ``self.measured_widths``).\n \"\"\"\n self.measured_widths = self.colwidth[:]\n for cell in self.cells:\n cell.wrap(width=self.cell_width(cell, self.colwidth))\n if not cell.wrapped:\n continue\n width = math.ceil(max(column_width(x) for x in cell.wrapped) / cell.colspan)\n for col in range(cell.col, cell.col + cell.colspan):\n self.measured_widths[col] = max(self.measured_widths[col], width)\n\n def physical_lines_for_line(self, line: List[Cell]) -> int:\n \"\"\"For a given line, compute the number of physical lines it spans\n due to text wrapping.\n \"\"\"\n physical_lines = 1\n for cell in line:\n physical_lines = max(physical_lines, len(cell.wrapped))\n return physical_lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.__str__.for_lineno_line_in_enume_Table.__str__.return._n_join_out_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.__str__.for_lineno_line_in_enume_Table.__str__.return._n_join_out_", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 228, "end_line": 253, "span_ids": ["Table.__str__"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Table:\n\n def __str__(self) -> str:\n # ... other code\n\n for lineno, line in enumerate(self.lines):\n if self.separator and lineno == self.separator:\n out.append(writesep(\"=\", lineno))\n else:\n out.append(writesep(\"-\", lineno))\n for physical_line in range(self.physical_lines_for_line(line)):\n linestr = [\"|\"]\n for colno, cell in enumerate(line):\n if cell.col != colno:\n continue\n if lineno != cell.row:\n physical_text = \"\"\n elif physical_line >= len(cell.wrapped):\n physical_text = \"\"\n else:\n physical_text = cell.wrapped[physical_line]\n adjust_len = len(physical_text) - column_width(physical_text)\n linestr.append(\n \" \" +\n physical_text.ljust(\n self.cell_width(cell, self.measured_widths) + 1 + adjust_len\n ) + \"|\"\n )\n out.append(\"\".join(linestr))\n out.append(writesep(\"-\"))\n return \"\\n\".join(out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper_TextWrapper._em_dash": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper_TextWrapper._em_dash", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 256, "end_line": 263, "span_ids": ["TextWrapper"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextWrapper(textwrap.TextWrapper):\n \"\"\"Custom subclass that uses a different word separator regex.\"\"\"\n\n wordsep_re = re.compile(\n r'(\\s+|' # any whitespace\n r'(?<=\\s)(?::[a-z-]+:)?`\\S+|' # interpreted text start\n r'[^\\s\\w]*\\w+[a-zA-Z]-(?=\\w+[a-zA-Z])|' # hyphenated words\n r'(?<=[\\w\\!\\\"\\'\\&\\.\\,\\?])-{2,}(?=\\w))') # em-dash", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper._wrap_chunks_TextWrapper._wrap_chunks.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper._wrap_chunks_TextWrapper._wrap_chunks.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 254, "end_line": 299, "span_ids": ["TextWrapper._wrap_chunks"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextWrapper(textwrap.TextWrapper):\n\n def _wrap_chunks(self, chunks: List[str]) -> List[str]:\n \"\"\"_wrap_chunks(chunks : [string]) -> [string]\n\n The original _wrap_chunks uses len() to calculate width.\n This method respects wide/fullwidth characters for width adjustment.\n \"\"\"\n lines: List[str] = []\n if self.width <= 0:\n raise ValueError(\"invalid width %r (must be > 0)\" % self.width)\n\n chunks.reverse()\n\n while chunks:\n cur_line = []\n cur_len = 0\n\n if lines:\n indent = self.subsequent_indent\n else:\n indent = self.initial_indent\n\n width = self.width - column_width(indent)\n\n if self.drop_whitespace and chunks[-1].strip() == '' and lines:\n del chunks[-1]\n\n while chunks:\n l = column_width(chunks[-1])\n\n if cur_len + l <= width:\n cur_line.append(chunks.pop())\n cur_len += l\n\n else:\n break\n\n if chunks and column_width(chunks[-1]) > width:\n self._handle_long_word(chunks, cur_line, cur_len, width)\n\n if self.drop_whitespace and cur_line and cur_line[-1].strip() == '':\n del cur_line[-1]\n\n if cur_line:\n lines.append(indent + ''.join(cur_line))\n\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper._break_word_TextWrapper._split.return.chunks": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper._break_word_TextWrapper._split.return.chunks", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 301, "end_line": 328, "span_ids": ["TextWrapper._break_word", "TextWrapper._split"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextWrapper(textwrap.TextWrapper):\n\n def _break_word(self, word: str, space_left: int) -> Tuple[str, str]:\n \"\"\"_break_word(word : string, space_left : int) -> (string, string)\n\n Break line by unicode width instead of len(word).\n \"\"\"\n total = 0\n for i, c in enumerate(word):\n total += column_width(c)\n if total > space_left:\n return word[:i - 1], word[i - 1:]\n return word, ''\n\n def _split(self, text: str) -> List[str]:\n \"\"\"_split(text : string) -> [string]\n\n Override original method that only split by 'wordsep_re'.\n This '_split' splits wide-characters into chunks by one character.\n \"\"\"\n def split(t: str) -> List[str]:\n return super(TextWrapper, self)._split(t)\n chunks: List[str] = []\n for chunk in split(text):\n for w, g in groupby(chunk, column_width):\n if w == 1:\n chunks.extend(split(''.join(g)))\n else:\n chunks.extend(list(g))\n return chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper._handle_long_word_TextWrapper._handle_long_word.if_self_break_long_words_.elif_not_cur_line_.cur_line_append_reversed_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextWrapper._handle_long_word_TextWrapper._handle_long_word.if_self_break_long_words_.elif_not_cur_line_.cur_line_append_reversed_", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 341, "end_line": 356, "span_ids": ["TextWrapper._handle_long_word"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextWrapper(textwrap.TextWrapper):\n\n def _handle_long_word(self, reversed_chunks: List[str], cur_line: List[str],\n cur_len: int, width: int) -> None:\n \"\"\"_handle_long_word(chunks : [string],\n cur_line : [string],\n cur_len : int, width : int)\n\n Override original method for using self._break_word() instead of slice.\n \"\"\"\n space_left = max(width - cur_len, 1)\n if self.break_long_words:\n l, r = self._break_word(reversed_chunks[-1], space_left)\n cur_line.append(l)\n reversed_chunks[-1] = r\n\n elif not cur_line:\n cur_line.append(reversed_chunks.pop())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_MAXWIDTH_TextWriter.translate.self.output.cast_TextTranslator_visi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_MAXWIDTH_TextWriter.translate.self.output.cast_TextTranslator_visi", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 348, "end_line": 371, "span_ids": ["impl:2", "TextWriter.translate", "TextWriter", "my_wrap"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "MAXWIDTH = 70\nSTDINDENT = 3\n\n\ndef my_wrap(text: str, width: int = MAXWIDTH, **kwargs: Any) -> List[str]:\n w = TextWrapper(width=width, **kwargs)\n return w.wrap(text)\n\n\nclass TextWriter(writers.Writer):\n supported = ('text',)\n settings_spec = ('No options here.', '', ())\n settings_defaults: Dict = {}\n\n output: str = None\n\n def __init__(self, builder: \"TextBuilder\") -> None:\n super().__init__()\n self.builder = builder\n\n def translate(self) -> None:\n visitor = self.builder.create_translator(self.document, self.builder)\n self.document.walkabout(visitor)\n self.output = cast(TextTranslator, visitor).body", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator_TextTranslator.new_state.self_stateindent_append_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator_TextTranslator.new_state.self_stateindent_append_i", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 374, "end_line": 402, "span_ids": ["TextTranslator.new_state", "TextTranslator", "TextTranslator.add_text"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n builder: \"TextBuilder\" = None\n\n def __init__(self, document: nodes.document, builder: \"TextBuilder\") -> None:\n super().__init__(document, builder)\n\n newlines = self.config.text_newlines\n if newlines == 'windows':\n self.nl = '\\r\\n'\n elif newlines == 'native':\n self.nl = os.linesep\n else:\n self.nl = '\\n'\n self.sectionchars = self.config.text_sectionchars\n self.add_secnumbers = self.config.text_add_secnumbers\n self.secnumber_suffix = self.config.text_secnumber_suffix\n self.states: List[List[Tuple[int, Union[str, List[str]]]]] = [[]]\n self.stateindent = [0]\n self.list_counter: List[int] = []\n self.sectionlevel = 0\n self.lineblocklevel = 0\n self.table: Table = None\n\n def add_text(self, text: str) -> None:\n self.states[-1].append((-1, text))\n\n def new_state(self, indent: int = STDINDENT) -> None:\n self.states.append([])\n self.stateindent.append(indent)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.end_state_TextTranslator.end_state.self_states_1_extend_re": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.end_state_TextTranslator.end_state.self_states_1_extend_re", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 404, "end_line": 438, "span_ids": ["TextTranslator.end_state"], "tokens": 321}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def end_state(self, wrap: bool = True, end: List[str] = [''], first: str = None) -> None:\n content = self.states.pop()\n maxindent = sum(self.stateindent)\n indent = self.stateindent.pop()\n result: List[Tuple[int, List[str]]] = []\n toformat: List[str] = []\n\n def do_format() -> None:\n if not toformat:\n return\n if wrap:\n res = my_wrap(''.join(toformat), width=MAXWIDTH - maxindent)\n else:\n res = ''.join(toformat).splitlines()\n if end:\n res += end\n result.append((indent, res))\n for itemindent, item in content:\n if itemindent == -1:\n toformat.append(item) # type: ignore\n else:\n do_format()\n result.append((indent + itemindent, item)) # type: ignore\n toformat = []\n do_format()\n if first is not None and result:\n # insert prefix into first line (ex. *, [1], See also, etc.)\n newindent = result[0][0] - indent\n if result[0][1] == ['']:\n result.insert(0, (newindent, [first]))\n else:\n text = first + result[0][1].pop(0)\n result.insert(0, (newindent, [text]))\n\n self.states[-1].extend(result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_document_TextTranslator.get_section_number_string.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_document_TextTranslator.get_section_number_string.return._", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 451, "end_line": 511, "span_ids": ["TextTranslator.depart_rubric", "TextTranslator.visit_section", "TextTranslator.depart_compound", "TextTranslator.depart_section", "TextTranslator.depart_document", "TextTranslator.visit_document", "TextTranslator.visit_title", "TextTranslator:4", "TextTranslator.get_section_number_string", "TextTranslator.depart_glossary", "TextTranslator.visit_rubric", "TextTranslator.visit_compound", "TextTranslator.visit_topic", "TextTranslator.depart_topic", "TextTranslator.visit_glossary"], "tokens": 455}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def visit_document(self, node: Element) -> None:\n self.new_state(0)\n\n def depart_document(self, node: Element) -> None:\n self.end_state()\n self.body = self.nl.join(line and (' ' * indent + line)\n for indent, lines in self.states[0]\n for line in lines)\n # XXX header/footer?\n\n def visit_section(self, node: Element) -> None:\n self._title_char = self.sectionchars[self.sectionlevel]\n self.sectionlevel += 1\n\n def depart_section(self, node: Element) -> None:\n self.sectionlevel -= 1\n\n def visit_topic(self, node: Element) -> None:\n self.new_state(0)\n\n def depart_topic(self, node: Element) -> None:\n self.end_state()\n\n visit_sidebar = visit_topic\n depart_sidebar = depart_topic\n\n def visit_rubric(self, node: Element) -> None:\n self.new_state(0)\n self.add_text('-[ ')\n\n def depart_rubric(self, node: Element) -> None:\n self.add_text(' ]-')\n self.end_state()\n\n def visit_compound(self, node: Element) -> None:\n pass\n\n def depart_compound(self, node: Element) -> None:\n pass\n\n def visit_glossary(self, node: Element) -> None:\n pass\n\n def depart_glossary(self, node: Element) -> None:\n pass\n\n def visit_title(self, node: Element) -> None:\n if isinstance(node.parent, nodes.Admonition):\n self.add_text(node.astext() + ': ')\n raise nodes.SkipNode\n self.new_state(0)\n\n def get_section_number_string(self, node: Element) -> str:\n if isinstance(node.parent, nodes.section):\n anchorname = '#' + node.parent['ids'][0]\n numbers = self.builder.secnumbers.get(anchorname)\n if numbers is None:\n numbers = self.builder.secnumbers.get('')\n if numbers is not None:\n return '.'.join(map(str, numbers)) + self.secnumber_suffix\n return ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.depart_title_TextTranslator.depart_title.self_states_1_append_0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.depart_title_TextTranslator.depart_title.self_states_1_append_0", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 513, "end_line": 527, "span_ids": ["TextTranslator.depart_title"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def depart_title(self, node: Element) -> None:\n if isinstance(node.parent, nodes.section):\n char = self._title_char\n else:\n char = '^'\n text = ''\n text = ''.join(x[1] for x in self.states.pop() if x[0] == -1) # type: ignore\n if self.add_secnumbers:\n text = self.get_section_number_string(node) + text\n self.stateindent.pop()\n title = ['', text, '%s' % (char * column_width(text)), '']\n if len(self.states) == 2 and len(self.states[-1]) == 0:\n # remove an empty line before title if it is first section title in the document\n title.pop(0)\n self.states[-1].append((0, title))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_subtitle_TextTranslator.depart_caption.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_subtitle_TextTranslator.depart_caption.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 518, "end_line": 635, "span_ids": ["TextTranslator.depart_desc_parameterlist", "TextTranslator.visit_desc_signature_line", "TextTranslator.depart_desc_signature", "TextTranslator.visit_desc_name", "TextTranslator.depart_desc_optional", "TextTranslator.visit_caption", "TextTranslator.depart_subtitle", "TextTranslator.depart_desc_returns", "TextTranslator.depart_desc_signature_line", "TextTranslator.depart_desc_inline", "TextTranslator.depart_desc_name", "TextTranslator.visit_desc_optional", "TextTranslator.visit_attribution", "TextTranslator.visit_desc_annotation", "TextTranslator.depart_desc_type", "TextTranslator.visit_desc_returns", "TextTranslator.visit_desc_inline", "TextTranslator.depart_desc_content", "TextTranslator.visit_figure", "TextTranslator.depart_figure", "TextTranslator.visit_desc", "TextTranslator.visit_desc_addname", "TextTranslator.depart_attribution", "TextTranslator.visit_desc_parameter", "TextTranslator.visit_desc_content", "TextTranslator.visit_subtitle", "TextTranslator.depart_desc_addname", "TextTranslator.visit_desc_signature", "TextTranslator.depart_caption", "TextTranslator.depart_desc", "TextTranslator.visit_desc_type", "TextTranslator.depart_desc_annotation", "TextTranslator.visit_desc_parameterlist"], "tokens": 716}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def visit_subtitle(self, node: Element) -> None:\n pass\n\n def depart_subtitle(self, node: Element) -> None:\n pass\n\n def visit_attribution(self, node: Element) -> None:\n self.add_text('-- ')\n\n def depart_attribution(self, node: Element) -> None:\n pass\n\n #############################################################\n # Domain-specific object descriptions\n #############################################################\n\n # Top-level nodes\n #################\n\n def visit_desc(self, node: Element) -> None:\n pass\n\n def depart_desc(self, node: Element) -> None:\n pass\n\n def visit_desc_signature(self, node: Element) -> None:\n self.new_state(0)\n\n def depart_desc_signature(self, node: Element) -> None:\n # XXX: wrap signatures in a way that makes sense\n self.end_state(wrap=False, end=None)\n\n def visit_desc_signature_line(self, node: Element) -> None:\n pass\n\n def depart_desc_signature_line(self, node: Element) -> None:\n self.add_text('\\n')\n\n def visit_desc_content(self, node: Element) -> None:\n self.new_state()\n self.add_text(self.nl)\n\n def depart_desc_content(self, node: Element) -> None:\n self.end_state()\n\n def visit_desc_inline(self, node: Element) -> None:\n pass\n\n def depart_desc_inline(self, node: Element) -> None:\n pass\n\n # Nodes for high-level structure in signatures\n ##############################################\n\n def visit_desc_name(self, node: Element) -> None:\n pass\n\n def depart_desc_name(self, node: Element) -> None:\n pass\n\n def visit_desc_addname(self, node: Element) -> None:\n pass\n\n def depart_desc_addname(self, node: Element) -> None:\n pass\n\n def visit_desc_type(self, node: Element) -> None:\n pass\n\n def depart_desc_type(self, node: Element) -> None:\n pass\n\n def visit_desc_returns(self, node: Element) -> None:\n self.add_text(' -> ')\n\n def depart_desc_returns(self, node: Element) -> None:\n pass\n\n def visit_desc_parameterlist(self, node: Element) -> None:\n self.add_text('(')\n self.first_param = 1\n\n def depart_desc_parameterlist(self, node: Element) -> None:\n self.add_text(')')\n\n def visit_desc_parameter(self, node: Element) -> None:\n if not self.first_param:\n self.add_text(', ')\n else:\n self.first_param = 0\n self.add_text(node.astext())\n raise nodes.SkipNode\n\n def visit_desc_optional(self, node: Element) -> None:\n self.add_text('[')\n\n def depart_desc_optional(self, node: Element) -> None:\n self.add_text(']')\n\n def visit_desc_annotation(self, node: Element) -> None:\n pass\n\n def depart_desc_annotation(self, node: Element) -> None:\n pass\n\n ##############################################\n\n def visit_figure(self, node: Element) -> None:\n self.new_state()\n\n def depart_figure(self, node: Element) -> None:\n self.end_state()\n\n def visit_caption(self, node: Element) -> None:\n pass\n\n def depart_caption(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_productionlist_TextTranslator.visit_productionlist.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_productionlist_TextTranslator.visit_productionlist.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 630, "end_line": 646, "span_ids": ["TextTranslator.visit_productionlist"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def visit_productionlist(self, node: Element) -> None:\n self.new_state()\n names = []\n productionlist = cast(Iterable[addnodes.production], node)\n for production in productionlist:\n names.append(production['tokenname'])\n maxlen = max(len(name) for name in names)\n lastname = None\n for production in productionlist:\n if production['tokenname']:\n self.add_text(production['tokenname'].ljust(maxlen) + ' ::=')\n lastname = production['tokenname']\n elif lastname is not None:\n self.add_text('%s ' % (' ' * len(lastname)))\n self.add_text(production.astext() + self.nl)\n self.end_state(wrap=False)\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_footnote_TextTranslator.depart_entry.self.entry.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_footnote_TextTranslator.depart_entry.self.entry.None", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 648, "end_line": 765, "span_ids": ["TextTranslator.depart_option_list", "TextTranslator.depart_thead", "TextTranslator.depart_footnote", "TextTranslator.visit_option", "TextTranslator.visit_option_list_item", "TextTranslator.visit_description", "TextTranslator.visit_tgroup", "TextTranslator.visit_tabular_col_spec", "TextTranslator.depart_row", "TextTranslator.visit_option_argument", "TextTranslator.visit_option_group", "TextTranslator.depart_option_argument", "TextTranslator.visit_option_list", "TextTranslator.visit_tbody", "TextTranslator.depart_citation", "TextTranslator.visit_colspec", "TextTranslator.depart_tbody", "TextTranslator.depart_tgroup", "TextTranslator.depart_option", "TextTranslator.visit_row", "TextTranslator.visit_legend", "TextTranslator.depart_entry", "TextTranslator.depart_option_list_item", "TextTranslator.depart_option_group", "TextTranslator.visit_footnote", "TextTranslator.depart_description", "TextTranslator.visit_thead", "TextTranslator.visit_label", "TextTranslator.visit_entry", "TextTranslator.visit_option_string", "TextTranslator.visit_citation", "TextTranslator.depart_legend", "TextTranslator.depart_option_string"], "tokens": 839}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def visit_footnote(self, node: Element) -> None:\n label = cast(nodes.label, node[0])\n self._footnote = label.astext().strip()\n self.new_state(len(self._footnote) + 3)\n\n def depart_footnote(self, node: Element) -> None:\n self.end_state(first='[%s] ' % self._footnote)\n\n def visit_citation(self, node: Element) -> None:\n if len(node) and isinstance(node[0], nodes.label):\n self._citlabel = node[0].astext()\n else:\n self._citlabel = ''\n self.new_state(len(self._citlabel) + 3)\n\n def depart_citation(self, node: Element) -> None:\n self.end_state(first='[%s] ' % self._citlabel)\n\n def visit_label(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_legend(self, node: Element) -> None:\n pass\n\n def depart_legend(self, node: Element) -> None:\n pass\n\n # XXX: option list could use some better styling\n\n def visit_option_list(self, node: Element) -> None:\n pass\n\n def depart_option_list(self, node: Element) -> None:\n pass\n\n def visit_option_list_item(self, node: Element) -> None:\n self.new_state(0)\n\n def depart_option_list_item(self, node: Element) -> None:\n self.end_state()\n\n def visit_option_group(self, node: Element) -> None:\n self._firstoption = True\n\n def depart_option_group(self, node: Element) -> None:\n self.add_text(' ')\n\n def visit_option(self, node: Element) -> None:\n if self._firstoption:\n self._firstoption = False\n else:\n self.add_text(', ')\n\n def depart_option(self, node: Element) -> None:\n pass\n\n def visit_option_string(self, node: Element) -> None:\n pass\n\n def depart_option_string(self, node: Element) -> None:\n pass\n\n def visit_option_argument(self, node: Element) -> None:\n self.add_text(node['delimiter'])\n\n def depart_option_argument(self, node: Element) -> None:\n pass\n\n def visit_description(self, node: Element) -> None:\n pass\n\n def depart_description(self, node: Element) -> None:\n pass\n\n def visit_tabular_col_spec(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_colspec(self, node: Element) -> None:\n self.table.colwidth.append(node[\"colwidth\"])\n raise nodes.SkipNode\n\n def visit_tgroup(self, node: Element) -> None:\n pass\n\n def depart_tgroup(self, node: Element) -> None:\n pass\n\n def visit_thead(self, node: Element) -> None:\n pass\n\n def depart_thead(self, node: Element) -> None:\n pass\n\n def visit_tbody(self, node: Element) -> None:\n self.table.set_separator()\n\n def depart_tbody(self, node: Element) -> None:\n pass\n\n def visit_row(self, node: Element) -> None:\n if self.table.lines:\n self.table.add_row()\n\n def depart_row(self, node: Element) -> None:\n pass\n\n def visit_entry(self, node: Element) -> None:\n self.entry = Cell(\n rowspan=node.get(\"morerows\", 0) + 1, colspan=node.get(\"morecols\", 0) + 1\n )\n self.new_state(0)\n\n def depart_entry(self, node: Element) -> None:\n text = self.nl.join(self.nl.join(x[1]) for x in self.states.pop())\n self.stateindent.pop()\n self.entry.text = text\n self.table.add_cell(self.entry)\n self.entry = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_table_TextTranslator.depart_field.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_table_TextTranslator.depart_field.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 774, "end_line": 881, "span_ids": ["TextTranslator.depart_bullet_list", "TextTranslator.depart_field", "TextTranslator.depart_classifier", "TextTranslator.visit_image", "TextTranslator.visit_enumerated_list", "TextTranslator.depart_enumerated_list", "TextTranslator.depart_field_list", "TextTranslator.depart_table", "TextTranslator.visit_definition", "TextTranslator.visit_definition_list", "TextTranslator.depart_term", "TextTranslator.visit_definition_list_item", "TextTranslator.visit_acks", "TextTranslator.depart_list_item", "TextTranslator.visit_field_list", "TextTranslator.depart_definition", "TextTranslator.visit_bullet_list", "TextTranslator.visit_transition", "TextTranslator.depart_definition_list", "TextTranslator.visit_classifier", "TextTranslator.visit_list_item", "TextTranslator.depart_definition_list_item", "TextTranslator.visit_field", "TextTranslator.visit_table", "TextTranslator.visit_term"], "tokens": 830}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def visit_table(self, node: Element) -> None:\n if self.table:\n raise NotImplementedError('Nested tables are not supported.')\n self.new_state(0)\n self.table = Table()\n\n def depart_table(self, node: Element) -> None:\n self.add_text(str(self.table))\n self.table = None\n self.end_state(wrap=False)\n\n def visit_acks(self, node: Element) -> None:\n bullet_list = cast(nodes.bullet_list, node[0])\n list_items = cast(Iterable[nodes.list_item], bullet_list)\n self.new_state(0)\n self.add_text(', '.join(n.astext() for n in list_items) + '.')\n self.end_state()\n raise nodes.SkipNode\n\n def visit_image(self, node: Element) -> None:\n if 'alt' in node.attributes:\n self.add_text(_('[image: %s]') % node['alt'])\n self.add_text(_('[image]'))\n raise nodes.SkipNode\n\n def visit_transition(self, node: Element) -> None:\n indent = sum(self.stateindent)\n self.new_state(0)\n self.add_text('=' * (MAXWIDTH - indent))\n self.end_state()\n raise nodes.SkipNode\n\n def visit_bullet_list(self, node: Element) -> None:\n self.list_counter.append(-1)\n\n def depart_bullet_list(self, node: Element) -> None:\n self.list_counter.pop()\n\n def visit_enumerated_list(self, node: Element) -> None:\n self.list_counter.append(node.get('start', 1) - 1)\n\n def depart_enumerated_list(self, node: Element) -> None:\n self.list_counter.pop()\n\n def visit_definition_list(self, node: Element) -> None:\n self.list_counter.append(-2)\n\n def depart_definition_list(self, node: Element) -> None:\n self.list_counter.pop()\n\n def visit_list_item(self, node: Element) -> None:\n if self.list_counter[-1] == -1:\n # bullet list\n self.new_state(2)\n elif self.list_counter[-1] == -2:\n # definition list\n pass\n else:\n # enumerated list\n self.list_counter[-1] += 1\n self.new_state(len(str(self.list_counter[-1])) + 2)\n\n def depart_list_item(self, node: Element) -> None:\n if self.list_counter[-1] == -1:\n self.end_state(first='* ')\n elif self.list_counter[-1] == -2:\n pass\n else:\n self.end_state(first='%s. ' % self.list_counter[-1])\n\n def visit_definition_list_item(self, node: Element) -> None:\n self._classifier_count_in_li = len(list(node.findall(nodes.classifier)))\n\n def depart_definition_list_item(self, node: Element) -> None:\n pass\n\n def visit_term(self, node: Element) -> None:\n self.new_state(0)\n\n def depart_term(self, node: Element) -> None:\n if not self._classifier_count_in_li:\n self.end_state(end=None)\n\n def visit_classifier(self, node: Element) -> None:\n self.add_text(' : ')\n\n def depart_classifier(self, node: Element) -> None:\n self._classifier_count_in_li -= 1\n if not self._classifier_count_in_li:\n self.end_state(end=None)\n\n def visit_definition(self, node: Element) -> None:\n self.new_state()\n\n def depart_definition(self, node: Element) -> None:\n self.end_state()\n\n def visit_field_list(self, node: Element) -> None:\n pass\n\n def depart_field_list(self, node: Element) -> None:\n pass\n\n def visit_field(self, node: Element) -> None:\n pass\n\n def depart_field(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_field_name_TextTranslator._visit_admonition.self_new_state_2_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_field_name_TextTranslator._visit_admonition.self_new_state_2_", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 876, "end_line": 914, "span_ids": ["TextTranslator.depart_hlistcol", "TextTranslator.depart_field_body", "TextTranslator.visit_admonition", "TextTranslator.visit_field_body", "TextTranslator.depart_admonition", "TextTranslator.visit_hlistcol", "TextTranslator.depart_field_name", "TextTranslator.visit_field_name", "TextTranslator.visit_centered", "TextTranslator.visit_hlist", "TextTranslator._visit_admonition", "TextTranslator.depart_hlist", "TextTranslator.depart_centered"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def visit_field_name(self, node: Element) -> None:\n self.new_state(0)\n\n def depart_field_name(self, node: Element) -> None:\n self.add_text(':')\n self.end_state(end=None)\n\n def visit_field_body(self, node: Element) -> None:\n self.new_state()\n\n def depart_field_body(self, node: Element) -> None:\n self.end_state()\n\n def visit_centered(self, node: Element) -> None:\n pass\n\n def depart_centered(self, node: Element) -> None:\n pass\n\n def visit_hlist(self, node: Element) -> None:\n pass\n\n def depart_hlist(self, node: Element) -> None:\n pass\n\n def visit_hlistcol(self, node: Element) -> None:\n pass\n\n def depart_hlistcol(self, node: Element) -> None:\n pass\n\n def visit_admonition(self, node: Element) -> None:\n self.new_state(0)\n\n def depart_admonition(self, node: Element) -> None:\n self.end_state()\n\n def _visit_admonition(self, node: Element) -> None:\n self.new_state(2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator._depart_admonition_TextTranslator._depart_admonition.if_len_self_states_1_.else_.self_end_state_first_labe": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator._depart_admonition_TextTranslator._depart_admonition.if_len_self_states_1_.else_.self_end_state_first_labe", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 916, "end_line": 928, "span_ids": ["TextTranslator._depart_admonition"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def _depart_admonition(self, node: Element) -> None:\n label = admonitionlabels[node.tagname]\n indent = sum(self.stateindent) + len(label)\n if (len(self.states[-1]) == 1 and\n self.states[-1][0][0] == 0 and\n MAXWIDTH - indent >= sum(len(s) for s in self.states[-1][0][1])):\n # short text: append text after admonition label\n self.stateindent[-1] += len(label)\n self.end_state(first=label + ': ')\n else:\n # long text: append label before the block\n self.states[-1].insert(0, (0, [self.nl]))\n self.end_state(first=label + ':')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_raw_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_raw_", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1166, "end_line": 1184, "span_ids": ["TextTranslator.depart_math_block", "TextTranslator.depart_math", "TextTranslator.visit_math_block", "TextTranslator.visit_raw", "TextTranslator.visit_math"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def visit_raw(self, node: Element) -> None:\n if 'text' in node.get('format', '').split():\n self.new_state(0)\n self.add_text(node.astext())\n self.end_state(wrap = False)\n raise nodes.SkipNode\n\n def visit_math(self, node: Element) -> None:\n pass\n\n def depart_math(self, node: Element) -> None:\n pass\n\n def visit_math_block(self, node: Element) -> None:\n self.new_state()\n\n def depart_math_block(self, node: Element) -> None:\n self.end_state()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/xml.py_PseudoXMLWriter_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/xml.py_PseudoXMLWriter_", "embedding": null, "metadata": {"file_path": "sphinx/writers/xml.py", "file_name": "xml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 54, "span_ids": ["PseudoXMLWriter", "PseudoXMLWriter.translate", "PseudoXMLWriter.supports"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PseudoXMLWriter(BaseXMLWriter):\n\n supported = ('pprint', 'pformat', 'pseudoxml')\n \"\"\"Formats this writer supports.\"\"\"\n\n config_section = 'pseudoxml writer'\n config_section_dependencies = ('writers',)\n\n output = None\n \"\"\"Final translated form of `document`.\"\"\"\n\n def __init__(self, builder: Builder) -> None:\n super().__init__()\n self.builder = builder\n\n def translate(self) -> None:\n self.output = self.document.pformat()\n\n def supports(self, format: str) -> bool:\n \"\"\"This writer supports all format-specific elements.\"\"\"\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/conftest.py_os_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/conftest.py_os_", "embedding": null, "metadata": {"file_path": "tests/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 9, "end_line": 56, "span_ids": ["pytest_assertrepr_compare", "impl", "_initialize_test_directory", "pytest_sessionstart", "rootdir", "imports", "pytest_report_header"], "tokens": 267}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport shutil\n\nimport docutils\nimport pytest\n\nimport sphinx\nfrom sphinx.testing import comparer\nfrom sphinx.testing.path import path\n\npytest_plugins = 'sphinx.testing.fixtures'\n\n# Exclude 'roots' dirs for pytest test collector\ncollect_ignore = ['roots']\n\n\n@pytest.fixture(scope='session')\ndef rootdir():\n return path(__file__).parent.abspath() / 'roots'\n\n\ndef pytest_report_header(config):\n header = (\"libraries: Sphinx-%s, docutils-%s\" %\n (sphinx.__display_version__, docutils.__version__))\n if hasattr(config, '_tmp_path_factory'):\n header += \"\\nbase tempdir: %s\" % config._tmp_path_factory.getbasetemp()\n\n return header\n\n\ndef pytest_assertrepr_compare(op, left, right):\n comparer.pytest_assertrepr_compare(op, left, right)\n\n\ndef _initialize_test_directory(session):\n if 'SPHINX_TEST_TEMPDIR' in os.environ:\n tempdir = os.path.abspath(os.getenv('SPHINX_TEST_TEMPDIR'))\n print('Temporary files will be placed in %s.' % tempdir)\n\n if os.path.exists(tempdir):\n shutil.rmtree(tempdir)\n\n os.makedirs(tempdir)\n\n\ndef pytest_sessionstart(session):\n _initialize_test_directory(session)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_enumerable_node/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_enumerable_node/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-add_enumerable_node/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["impl", "imports"], "tokens": 28}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\nextensions = ['enumerable_node']\n\nnumfig = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_enumerable_node/enumerable_node.py_from_docutils_import_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_enumerable_node/enumerable_node.py_from_docutils_import_node_", "embedding": null, "metadata": {"file_path": "tests/roots/test-add_enumerable_node/enumerable_node.py", "file_name": "enumerable_node.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 63, "span_ids": ["visit_numbered_text", "my_figure", "NumberedText.run", "setup", "visit_my_figure", "depart_my_figure", "imports", "get_title", "NumberedText", "numbered_text", "MyFigure.run", "MyFigure"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from docutils import nodes\nfrom docutils.parsers.rst import Directive\n\n\nclass my_figure(nodes.figure):\n pass\n\n\ndef visit_my_figure(self, node):\n self.visit_figure(node)\n\n\ndef depart_my_figure(self, node):\n self.depart_figure(node)\n\n\nclass MyFigure(Directive):\n required_arguments = 1\n has_content = True\n\n def run(self):\n figure_node = my_figure()\n figure_node += nodes.image(uri=self.arguments[0])\n figure_node += nodes.caption(text=''.join(self.content))\n return [figure_node]\n\n\nclass numbered_text(nodes.Element):\n pass\n\n\ndef visit_numbered_text(self, node):\n self.body.append(self.starttag(node, 'div'))\n self.add_fignumber(node)\n self.body.append(node['title'])\n self.body.append('</div>')\n raise nodes.SkipNode\n\n\ndef get_title(node):\n return node['title']\n\n\nclass NumberedText(Directive):\n required_arguments = 1\n final_argument_whitespace = True\n\n def run(self):\n return [numbered_text(title=self.arguments[0])]\n\n\ndef setup(app):\n # my-figure\n app.add_enumerable_node(my_figure, 'figure',\n html=(visit_my_figure, depart_my_figure))\n app.add_directive('my-figure', MyFigure)\n\n # numbered_label\n app.add_enumerable_node(numbered_text, 'original', get_title,\n html=(visit_numbered_text, None))\n app.add_directive('numbered-text', NumberedText)\n app.config.numfig_format.setdefault('original', 'No.%s')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-add_source_parser/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["impl", "imports"], "tokens": 29}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\n\nextensions = ['source_parser']\nsource_suffix = ['.rst']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser/source_parser.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser/source_parser.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-add_source_parser/source_parser.py", "file_name": "source_parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 11, "span_ids": ["imports", "TestSourceParser", "setup"], "tokens": 44}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from docutils.parsers import Parser\n\n\nclass TestSourceParser(Parser):\n supported = ('test',)\n\n\ndef setup(app):\n app.add_source_suffix('.test', 'test')\n app.add_source_parser(TestSourceParser)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser-conflicts-with-users-setting/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser-conflicts-with-users-setting/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-add_source_parser-conflicts-with-users-setting/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["impl", "impl:2", "impl:3", "imports", "DummyTestParser"], "tokens": 66}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nfrom docutils.parsers import Parser\n\nsys.path.insert(0, os.path.abspath('.'))\n\n\nclass DummyTestParser(Parser):\n supported = ('dummy',)\n\n\nextensions = ['source_parser']\nsource_suffix = ['.rst', '.test']\nsource_parsers = {\n '.test': DummyTestParser\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser-conflicts-with-users-setting/source_parser.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-add_source_parser-conflicts-with-users-setting/source_parser.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-add_source_parser-conflicts-with-users-setting/source_parser.py", "file_name": "source_parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 11, "span_ids": ["imports", "TestSourceParser", "setup"], "tokens": 44}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from docutils.parsers import Parser\n\n\nclass TestSourceParser(Parser):\n supported = ('test',)\n\n\ndef setup(app):\n app.add_source_suffix('.test', 'test')\n app.add_source_parser(TestSourceParser)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/conf.py__set_this_by_test_ConfPseudoXMLTranslator.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/conf.py__set_this_by_test_ConfPseudoXMLTranslator.pass", "embedding": null, "metadata": {"file_path": "tests/roots/test-api-set-translator/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 58, "span_ids": ["ConfHTMLTranslator", "impl", "ConfLaTeXTranslator", "ConfSingleHTMLTranslator", "ConfTextTranslator", "ConfXMLTranslator", "ConfPseudoXMLTranslator", "ConfPickleTranslator", "ConfJsonTranslator", "docstring", "ConfManualPageTranslator", "imports", "ConfDirHTMLTranslator", "ConfTexinfoTranslator"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# set this by test\n# import os\n# import sys\n# sys.path.insert(0, os.path.abspath('.'))\n\nfrom docutils.writers.docutils_xml import XMLTranslator\n\nfrom sphinx.writers.html import HTMLTranslator\nfrom sphinx.writers.latex import LaTeXTranslator\nfrom sphinx.writers.manpage import ManualPageTranslator\nfrom sphinx.writers.texinfo import TexinfoTranslator\nfrom sphinx.writers.text import TextTranslator\n\nproject = 'test'\n\n\nclass ConfHTMLTranslator(HTMLTranslator):\n pass\n\n\nclass ConfDirHTMLTranslator(HTMLTranslator):\n pass\n\n\nclass ConfSingleHTMLTranslator(HTMLTranslator):\n pass\n\n\nclass ConfPickleTranslator(HTMLTranslator):\n pass\n\n\nclass ConfJsonTranslator(HTMLTranslator):\n pass\n\n\nclass ConfLaTeXTranslator(LaTeXTranslator):\n pass\n\n\nclass ConfManualPageTranslator(ManualPageTranslator):\n pass\n\n\nclass ConfTexinfoTranslator(TexinfoTranslator):\n pass\n\n\nclass ConfTextTranslator(TextTranslator):\n pass\n\n\nclass ConfXMLTranslator(XMLTranslator):\n pass\n\n\nclass ConfPseudoXMLTranslator(XMLTranslator):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/conf.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/conf.py_setup_", "embedding": null, "metadata": {"file_path": "tests/roots/test-api-set-translator/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 74, "span_ids": ["setup"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app):\n app.set_translator('html', ConfHTMLTranslator)\n app.set_translator('dirhtml', ConfDirHTMLTranslator)\n app.set_translator('singlehtml', ConfSingleHTMLTranslator)\n app.set_translator('pickle', ConfPickleTranslator)\n app.set_translator('json', ConfJsonTranslator)\n app.set_translator('latex', ConfLaTeXTranslator)\n app.set_translator('man', ConfManualPageTranslator)\n app.set_translator('texinfo', ConfTexinfoTranslator)\n app.set_translator('text', ConfTextTranslator)\n app.set_translator('xml', ConfXMLTranslator)\n app.set_translator('pseudoxml', ConfPseudoXMLTranslator)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/nonext/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/nonext/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-api-set-translator/nonext/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["impl", "imports"], "tokens": 25}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.dirname(os.path.abspath('.')))\n\nproject = 'test'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/translator.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-api-set-translator/translator.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-api-set-translator/translator.py", "file_name": "translator.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["ExtHTMLTranslator", "imports"], "tokens": 20}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from sphinx.writers.html import HTMLTranslator\n\n\nclass ExtHTMLTranslator(HTMLTranslator):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/c/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/c/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-apidoc-pep420/a/b/c/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 4}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"Package C\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/c/d.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/c/d.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-apidoc-pep420/a/b/c/d.py", "file_name": "d.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 4}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"Module d\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/e/f.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/e/f.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-apidoc-pep420/a/b/e/f.py", "file_name": "f.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 4}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"Module f\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/x/y.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-pep420/a/b/x/y.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-apidoc-pep420/a/b/x/y.py", "file_name": "y.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 4}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"Module y\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-subpackage-in-toc/parent/child/foo.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-subpackage-in-toc/parent/child/foo.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-apidoc-subpackage-in-toc/parent/child/foo.py", "file_name": "foo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 3}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"foo\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-toc/mypackage/main.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-toc/mypackage/main.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-apidoc-toc/mypackage/main.py", "file_name": "main.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["impl", "docstring", "imports"], "tokens": 96}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "#!/usr/bin/env python3\n\nimport os\n\nimport mod_resource\nimport mod_something\n\nif __name__ == \"__main__\":\n print(\"Hello, world! -> something returns: {}\".format(mod_something.something()))\n\n res_path = \\\n os.path.join(os.path.dirname(mod_resource.__file__), 'resource.txt')\n with open(res_path) as f:\n text = f.read()\n print(\"From mod_resource:resource.txt -> {}\".format(text))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-toc/mypackage/no_init/foo.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-toc/mypackage/no_init/foo.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-apidoc-toc/mypackage/no_init/foo.py", "file_name": "foo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 21}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "MESSAGE = \"There's no __init__.py in this folder, hence we should be left out\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-toc/mypackage/something/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-toc/mypackage/something/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-apidoc-toc/mypackage/something/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 5}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"Subpackage Something\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-trailing-underscore/package_/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-trailing-underscore/package_/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-apidoc-trailing-underscore/package_/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\" A package with trailing underscores \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-trailing-underscore/package_/module_.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-apidoc-trailing-underscore/package_/module_.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-apidoc-trailing-underscore/package_/module_.py", "file_name": "module_.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 10, "span_ids": ["some_function_", "SomeClass_", "docstring"], "tokens": 45}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\" A module with a trailing underscore \"\"\"\n\n\nclass SomeClass_:\n \"\"\" A class with a trailing underscore \"\"\"\n\n\ndef some_function_(some_arg_):\n \"\"\" A function with a trailing underscore in name and argument \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-autosummary/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 13, "span_ids": ["impl", "imports"], "tokens": 55}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\nextensions = ['sphinx.ext.autosummary']\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\nautosummary_generate = True\n\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/dummy_module.py___module_attr.1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/dummy_module.py___module_attr.1", "embedding": null, "metadata": {"file_path": "tests/roots/test-autosummary/dummy_module.py", "file_name": "dummy_module.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 40, "span_ids": ["impl", "noSentence", "withSentence", "docstring", "emptyLine"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\n.. autosummary::\n\n module_attr\n C.class_attr\n C.instance_attr\n C.prop_attr1\n C.prop_attr2\n C.C2\n\"\"\"\n\n\ndef withSentence():\n '''I have a sentence which\n spans multiple lines. Then I have\n more stuff\n '''\n pass\n\n\ndef noSentence():\n '''this doesn't start with a\n capital. so it's not considered\n a sentence\n '''\n pass\n\n\ndef emptyLine():\n '''This is the real summary\n\n However, it did't end with a period.\n '''\n pass\n\n\n#: This is a module attribute\n#:\n#: value is integer.\nmodule_attr = 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/dummy_module.py_C_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/dummy_module.py_C_", "embedding": null, "metadata": {"file_path": "tests/roots/test-autosummary/dummy_module.py", "file_name": "dummy_module.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 86, "span_ids": ["C.C2", "C", "C._prop_attr_get", "C:5", "func"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class C:\n '''\n My C class\n\n with class_attr attribute\n '''\n\n #: This is a class attribute\n #:\n #: value is integer.\n class_attr = 42\n\n def __init__(self):\n #: This is an instance attribute\n #:\n #: value is a string\n self.instance_attr = \"42\"\n\n def _prop_attr_get(self):\n \"\"\"\n This is a function docstring\n\n return value is string.\n \"\"\"\n return 'spam egg'\n\n prop_attr1 = property(_prop_attr_get)\n\n prop_attr2 = property(_prop_attr_get)\n \"\"\"\n This is a attribute docstring\n\n value is string.\n \"\"\"\n\n class C2:\n '''\n This is a nested inner class docstring\n '''\n\n\ndef func(arg_, *args, **kwargs):\n \"\"\"Test function take an argument ended with underscore.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/underscore_module_.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-autosummary/underscore_module_.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-autosummary/underscore_module_.py", "file_name": "underscore_module_.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["class_.method_", "class_", "function_", "docstring"], "tokens": 43}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nmodule with trailing underscores everywhere\n\"\"\"\n\n\nclass class_(object):\n \"\"\" Class \"\"\"\n def method_(_arg):\n \"\"\" Method \"\"\"\n pass\n\n\ndef function_(_arg):\n \"\"\" Function \"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-basic/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-basic/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-basic/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl"], "tokens": 28}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "latex_documents = [\n ('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-build-html-translator/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-build-html-translator/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-build-html-translator/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["ConfHTMLTranslator", "impl", "ConfHTMLTranslator.depart_admonition", "setup", "imports"], "tokens": 85}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from sphinx.writers.html import HTMLTranslator\n\nproject = 'test'\n\n\nclass ConfHTMLTranslator(HTMLTranslator):\n depart_with_node = 0\n\n def depart_admonition(self, node=None):\n if node is not None:\n self.depart_with_node += 1\n HTMLTranslator.depart_admonition(self, node)\n\n\ndef setup(app):\n app.set_translator('html', ConfHTMLTranslator)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-build-text/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-build-text/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-build-text/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 13}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "source_suffix = '.txt'\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-builder-gettext-dont-rebuild-mo/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-builder-gettext-dont-rebuild-mo/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-builder-gettext-dont-rebuild-mo/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 5}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "language = 'xx'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-changes/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-changes/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-changes/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["impl", "docstring"], "tokens": 49}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# -*- coding: utf-8 -*-\n\nproject = 'Sphinx ChangesBuilder tests'\ncopyright = '2007-2022 by the Sphinx team, see AUTHORS'\nversion = '0.6'\nrelease = '0.6alpha1'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-config/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-config/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-config/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl"], "tokens": 24}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "project = 'Sphinx <Tests>'\nrelease = '0.6alpha1'\ntemplates_path = ['_templates']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-correct-year/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-correct-year/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-correct-year/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2, "end_line": 3, "span_ids": ["impl"], "tokens": 11}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "copyright = '2006-2009, Author'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-directive-code/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-directive-code/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-directive-code/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 11}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\nnumfig = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-directive-only/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-directive-only/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-directive-only/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2, "end_line": 4, "span_ids": ["impl"], "tokens": 15}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "project = 'test-directive-only'\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-c/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-c/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-domain-c/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-cpp/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-cpp/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-domain-cpp/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-js/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-js/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-domain-js/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-py/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-py/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-domain-py/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-double-inheriting-theme/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-double-inheriting-theme/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-double-inheriting-theme/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl"], "tokens": 32}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "templates_path = ['_templates']\nhtml_theme = 'base_theme2'\nhtml_theme_path = ['base_themes_dir']\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-epub-anchor-id/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-epub-anchor-id/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-epub-anchor-id/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["setup"], "tokens": 22}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app):\n app.add_crossref_type(directivename=\"setting\", rolename=\"setting\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/autodoc_dummy_bar.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/autodoc_dummy_bar.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/autodoc_dummy_bar.py", "file_name": "autodoc_dummy_bar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports", "Bar"], "tokens": 30}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from bug2437.autodoc_dummy_foo import Foo\n\n\nclass Bar(object):\n \"\"\"Dummy class Bar with alias.\"\"\"\n my_name = Foo", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/autodoc_dummy_module.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/autodoc_dummy_module.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/autodoc_dummy_module.py", "file_name": "autodoc_dummy_module.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["test", "docstring", "imports"], "tokens": 28}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dummy import * # NOQA\n\n\ndef test():\n \"\"\"Dummy function using dummy.*\"\"\"\n dummy_function() # NOQA", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/bug2437/autodoc_dummy_foo.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/bug2437/autodoc_dummy_foo.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/bug2437/autodoc_dummy_foo.py", "file_name": "autodoc_dummy_foo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["Foo"], "tokens": 12}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Foo(object):\n \"\"\"Dummy class Foo.\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["impl", "imports"], "tokens": 58}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\nextensions = ['sphinx.ext.autodoc']\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\nautodoc_mock_imports = [\n 'dummy'\n]\n\nnitpicky = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_enum__funky_classmethod.return.classmethod_function_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_enum__funky_classmethod.return.classmethod_function_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 33, "span_ids": ["raises", "impl", "CustomEx", "_funky_classmethod", "imports", "CustomEx.f"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import enum\nfrom io import StringIO\n\nfrom sphinx.util import save_traceback # NOQA\n\n__all__ = ['Class']\n\n#: documentation for the integer\ninteger = 1\n\n\ndef raises(exc, func, *args, **kwds):\n \"\"\"Raise AssertionError if ``func(*args, **kwds)`` does not raise *exc*.\"\"\"\n pass\n\n\nclass CustomEx(Exception):\n \"\"\"My custom exception.\"\"\"\n\n def f(self):\n \"\"\"Exception method.\"\"\"\n\n\ndef _funky_classmethod(name, b, c, d, docstring=None):\n \"\"\"Generates a classmethod for a class from a template by filling out\n some arguments.\"\"\"\n def template(cls, a, b, c, d=4, e=5, f=6):\n return a, b, c, d, e, f\n from functools import partial\n function = partial(template, b=b, c=c, d=d)\n function.__name__ = name\n function.__doc__ = docstring\n return classmethod(function)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_Class_Class.__special2__.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_Class_Class.__special2__.pass", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 37, "end_line": 86, "span_ids": ["Class:3", "Class.skipmeth", "Class.undocmeth", "Class.__special2__", "Class.excludemeth", "Class.meth", "Class.__special1__", "Class"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Class(object):\n \"\"\"Class to document.\"\"\"\n\n def meth(self):\n \"\"\"Function.\"\"\"\n\n def undocmeth(self):\n pass\n\n def skipmeth(self):\n \"\"\"Method that should be skipped.\"\"\"\n\n def excludemeth(self):\n \"\"\"Method that should be excluded.\"\"\"\n\n # should not be documented\n skipattr = 'foo'\n\n #: should be documented -- s\u00fc\u00df\n attr = 'bar'\n\n docattr = 'baz'\n \"\"\"should likewise be documented -- s\u00fc\u00df\"\"\"\n\n udocattr = 'quux'\n \"\"\"should be documented as well - s\u00fc\u00df\"\"\"\n\n # initialized to any class imported from another module\n mdocattr = StringIO()\n \"\"\"should be documented as well - s\u00fc\u00df\"\"\"\n\n roger = _funky_classmethod(\"roger\", 2, 3, 4)\n\n moore = _funky_classmethod(\"moore\", 9, 8, 7,\n docstring=\"moore(a, e, f) -> happiness\")\n\n def __init__(self, arg):\n self.inst_attr_inline = None #: an inline documented instance attr\n #: a documented instance attribute\n self.inst_attr_comment = None\n self.inst_attr_string = None\n \"\"\"a documented instance attribute\"\"\"\n self._private_inst_attr = None #: a private instance attribute\n\n def __special1__(self):\n \"\"\"documented special method\"\"\"\n\n def __special2__(self):\n # undocumented special method\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/abstractmethods.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/abstractmethods.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/abstractmethods.py", "file_name": "abstractmethods.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["Base.abstractmeth", "Base", "Base.coroutinemeth", "Base.prop", "Base.staticmeth", "imports", "Base.meth", "Base.classmeth"], "tokens": 94}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from abc import abstractmethod\n\n\nclass Base():\n def meth(self):\n pass\n\n @abstractmethod\n def abstractmeth(self):\n pass\n\n @staticmethod\n @abstractmethod\n def staticmeth():\n pass\n\n @classmethod\n @abstractmethod\n def classmeth(cls):\n pass\n\n @property\n @abstractmethod\n def prop(self):\n pass\n\n @abstractmethod\n async def coroutinemeth(self):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/annotated.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/annotated.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/annotated.py", "file_name": "annotated.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["hello", "imports"], "tokens": 27}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from typing import Annotated\n\n\ndef hello(name: Annotated[str, \"attribute\"]) -> None:\n \"\"\"docstring\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/autoclass_content.py_A_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/autoclass_content.py_A_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/autoclass_content.py", "file_name": "autoclass_content.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 48, "span_ids": ["D.__new__", "E", "D", "C", "F.__new__", "H", "G", "E.__new__", "B", "A", "F"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class A:\n \"\"\"A class having no __init__, no __new__\"\"\"\n\n\nclass B:\n \"\"\"A class having __init__(no docstring), no __new__\"\"\"\n def __init__(self):\n pass\n\n\nclass C:\n \"\"\"A class having __init__, no __new__\"\"\"\n def __init__(self):\n \"\"\"__init__ docstring\"\"\"\n\n\nclass D:\n \"\"\"A class having no __init__, __new__(no docstring)\"\"\"\n def __new__(cls):\n pass\n\n\nclass E:\n \"\"\"A class having no __init__, __new__\"\"\"\n def __new__(cls):\n \"\"\"__new__ docstring\"\"\"\n\n\nclass F:\n \"\"\"A class having both __init__ and __new__\"\"\"\n def __init__(self):\n \"\"\"__init__ docstring\"\"\"\n\n def __new__(cls):\n \"\"\"__new__ docstring\"\"\"\n\n\nclass G(C):\n \"\"\"A class inherits __init__ without docstring.\"\"\"\n def __init__(self):\n pass\n\n\nclass H(E):\n \"\"\"A class inherits __new__ without docstring.\"\"\"\n def __init__(self):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/bound_method.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/bound_method.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/bound_method.py", "file_name": "bound_method.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["impl", "Cls", "Cls.method"], "tokens": 25}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Cls:\n def method(self):\n \"\"\"Method docstring\"\"\"\n pass\n\n\nbound_method = Cls().method", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/callable.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/callable.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/callable.py", "file_name": "callable.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 14, "span_ids": ["impl", "Callable.method", "Callable", "Callable.__call__"], "tokens": 64}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Callable():\n \"\"\"A callable object that behaves like a function.\"\"\"\n\n def __call__(self, arg1, arg2, **kwargs):\n pass\n\n def method(self, arg1, arg2):\n \"\"\"docstring of Callable.method().\"\"\"\n pass\n\n\nfunction = Callable()\nmethod = function.method", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/coroutine.py_asyncio_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/coroutine.py_asyncio_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/coroutine.py", "file_name": "coroutine.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["AsyncClass.do_asyncgen", "impl", "AsyncClass", "_other_coro_func", "AsyncClass.do_coroutine3", "imports", "AsyncClass.do_coroutine2", "AsyncClass.do_coroutine", "myawait"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import asyncio\nfrom functools import wraps\n\n\nclass AsyncClass:\n async def do_coroutine(self):\n \"\"\"A documented coroutine function\"\"\"\n attr_coro_result = await _other_coro_func() # NOQA\n\n @classmethod\n async def do_coroutine2(cls):\n \"\"\"A documented coroutine classmethod\"\"\"\n pass\n\n @staticmethod\n async def do_coroutine3():\n \"\"\"A documented coroutine staticmethod\"\"\"\n pass\n\n async def do_asyncgen(self):\n \"\"\"A documented async generator\"\"\"\n yield\n\n\nasync def _other_coro_func():\n return \"run\"\n\n\ndef myawait(f):\n @wraps(f)\n def wrapper(*args, **kwargs):\n awaitable = f(*args, **kwargs)\n return asyncio.run(awaitable)\n return wrapper\n\n\nsync_func = myawait(_other_coro_func)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/descriptor.py_CustomDataDescriptor_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/descriptor.py_CustomDataDescriptor_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/descriptor.py", "file_name": "descriptor.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["CustomDataDescriptor.__get__", "CustomDataDescriptor2", "CustomDataDescriptorMeta", "Class.prop", "CustomDataDescriptor", "CustomDataDescriptor.meth", "Class"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CustomDataDescriptor(object):\n \"\"\"Descriptor class docstring.\"\"\"\n\n def __init__(self, doc):\n self.__doc__ = doc\n\n def __get__(self, obj, type=None):\n if obj is None:\n return self\n return 42\n\n def meth(self):\n \"\"\"Function.\"\"\"\n return \"The Answer\"\n\n\nclass CustomDataDescriptorMeta(type):\n \"\"\"Descriptor metaclass docstring.\"\"\"\n\n\nclass CustomDataDescriptor2(CustomDataDescriptor):\n \"\"\"Descriptor class with custom metaclass docstring.\"\"\"\n __metaclass__ = CustomDataDescriptorMeta\n\n\nclass Class:\n descr = CustomDataDescriptor(\"Descriptor instance docstring.\")\n\n @property\n def prop(self):\n \"\"\"Property.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/final.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/final.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/final.py", "file_name": "final.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["Class", "Class.meth1", "imports", "Class.meth2"], "tokens": 46}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import typing\nfrom typing import final\n\n\n@typing.final\nclass Class:\n \"\"\"docstring\"\"\"\n\n @final\n def meth1(self):\n \"\"\"docstring\"\"\"\n\n def meth2(self):\n \"\"\"docstring\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/functions.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/functions.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/functions.py", "file_name": "functions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["impl", "func", "imports", "coroutinefunc", "asyncgenerator"], "tokens": 55}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from functools import partial\n\n\ndef func():\n pass\n\n\nasync def coroutinefunc():\n pass\n\n\nasync def asyncgenerator():\n yield\n\npartial_func = partial(func)\npartial_coroutinefunc = partial(coroutinefunc)\n\nbuiltin_func = print\npartial_builtin_func = partial(print)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/imported_members.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/imported_members.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/imported_members.py", "file_name": "imported_members.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["imports"], "tokens": 10}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from .partialfunction import func2, func3", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/inheritance.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/inheritance.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/inheritance.py", "file_name": "inheritance.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["Base", "Derived.inheritedmeth", "Base.inheritedstaticmeth", "Base.inheritedclassmeth", "Base.inheritedmeth", "Derived"], "tokens": 72}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Base(object):\n def inheritedmeth(self):\n \"\"\"Inherited function.\"\"\"\n\n @classmethod\n def inheritedclassmeth(cls):\n \"\"\"Inherited class method.\"\"\"\n\n @staticmethod\n def inheritedstaticmeth(cls):\n \"\"\"Inherited static method.\"\"\"\n\n\nclass Derived(Base):\n def inheritedmeth(self):\n # no docstring here\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/methods.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/methods.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/methods.py", "file_name": "methods.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["Base:2", "Base", "Base.coroutinemeth", "Base.prop", "Base:4", "Base.staticmeth", "imports", "Inherited", "Base.meth", "Base.classmeth"], "tokens": 96}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from functools import partialmethod\n\n\nclass Base():\n def meth(self):\n pass\n\n @staticmethod\n def staticmeth():\n pass\n\n @classmethod\n def classmeth(cls):\n pass\n\n @property\n def prop(self):\n pass\n\n partialmeth = partialmethod(meth)\n\n async def coroutinemeth(self):\n pass\n\n partial_coroutinemeth = partialmethod(coroutinemeth)\n\n\nclass Inherited(Base):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/need_mocks.py_missing_module_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/need_mocks.py_missing_module_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/need_mocks.py", "file_name": "need_mocks.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2, "end_line": 44, "span_ids": ["docstring:6", "docstring:7", "impl", "docstring:4", "docstring:3", "docstring", "docstring:2", "docstring:5", "TestAutodoc.decoratedMethod", "imports:3", "imports:5", "imports:6", "decoratedFunction", "imports:4", "Inherited", "impl:2", "func", "imports", "TestAutodoc", "imports:7", "imports:2"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import missing_module # NOQA\nimport missing_package1.missing_module1 # NOQA\nfrom missing_module import missing_name # NOQA\nfrom missing_package2 import missing_module2 # NOQA\nfrom missing_package3.missing_module3 import missing_name # NOQA\n\nimport sphinx.missing_module4 # NOQA\nfrom sphinx.missing_module4 import missing_name2 # NOQA\n\n\n@missing_name(int)\ndef decoratedFunction():\n \"\"\"decoratedFunction docstring\"\"\"\n return None\n\n\ndef func(arg: missing_module.Class):\n \"\"\"a function takes mocked object as an argument\"\"\"\n pass\n\n\nclass TestAutodoc(object):\n \"\"\"TestAutodoc docstring.\"\"\"\n\n #: docstring\n Alias = missing_module2.Class\n\n @missing_name\n def decoratedMethod(self):\n \"\"\"TestAutodoc::decoratedMethod docstring\"\"\"\n return None\n\n\nclass Inherited(missing_module.Class):\n \"\"\"docstring\"\"\"\n pass\n\n\nsphinx.missing_module4.missing_function(len(missing_name2))\n\n#: docstring\nAlias = missing_module2.Class", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/partialfunction.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/partialfunction.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/partialfunction.py", "file_name": "partialfunction.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 13, "span_ids": ["func1", "impl", "imports"], "tokens": 68}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from functools import partial\n\n\ndef func1(a, b, c):\n \"\"\"docstring of func1\"\"\"\n pass\n\n\nfunc2 = partial(func1, 1)\nfunc3 = partial(func2, 2)\nfunc3.__doc__ = \"docstring of func3\"\nfunc4 = partial(func3, 3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/partialmethod.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/partialmethod.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/partialmethod.py", "file_name": "partialmethod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["Cell.set_state", "Cell", "docstring", "imports", "Cell:3"], "tokens": 107}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# for py34 or above\nfrom functools import partialmethod\n\n\nclass Cell(object):\n \"\"\"An example for partialmethod.\n\n refs: https://docs.python.jp/3/library/functools.html#functools.partialmethod\n \"\"\"\n\n def set_state(self, state):\n \"\"\"Update state of cell to *state*.\"\"\"\n\n #: Make a cell alive.\n set_alive = partialmethod(set_state, True)\n\n # a partialmethod with no docstring\n set_dead = partialmethod(set_state, False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/pep570.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/pep570.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/pep570.py", "file_name": "pep570.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 12, "span_ids": ["baz", "bar", "qux", "foo"], "tokens": 49}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def foo(*, a, b):\n pass\n\ndef bar(a, b, /, c, d):\n pass\n\ndef baz(a, /, *, b):\n pass\n\ndef qux(a, b, /):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/private.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/private.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/private.py", "file_name": "private.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["impl", "private_function", "_public_function"], "tokens": 66}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def private_function(name):\n \"\"\"private_function is a docstring().\n\n :meta private:\n \"\"\"\n\ndef _public_function(name):\n \"\"\"public_function is a docstring().\n\n :meta public:\n \"\"\"\n\n\nPRIVATE_CONSTANT = None #: :meta private:\n_PUBLIC_CONSTANT = None #: :meta public:", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/process_docstring.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/process_docstring.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/process_docstring.py", "file_name": "process_docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["func"], "tokens": 23}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def func():\n \"\"\"\n first line\n ---\n second line\n ---\n third line\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/singledispatchmethod.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/singledispatchmethod.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/singledispatchmethod.py", "file_name": "singledispatchmethod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["Foo._meth_int", "Foo", "Foo._meth_str", "imports", "Foo.meth"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from functools import singledispatchmethod\n\n\nclass Foo:\n \"\"\"docstring\"\"\"\n\n @singledispatchmethod\n def meth(self, arg, kwarg=None):\n \"\"\"A method for general use.\"\"\"\n pass\n\n @meth.register(int)\n @meth.register(float)\n def _meth_int(self, arg, kwarg=None):\n \"\"\"A method for int.\"\"\"\n pass\n\n @meth.register(str)\n def _meth_str(self, arg, kwarg=None):\n \"\"\"A method for str.\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/slots.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/slots.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/slots.py", "file_name": "slots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["Baz", "Foo", "Bar"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Foo:\n \"\"\"docstring\"\"\"\n\n __slots__ = ['attr']\n\n\nclass Bar:\n \"\"\"docstring\"\"\"\n\n __slots__ = {'attr1': 'docstring of attr1',\n 'attr2': 'docstring of attr2',\n 'attr3': None}\n __annotations__ = {'attr1': int}\n\n def __init__(self):\n self.attr2 = None #: docstring of instance attr2\n\n\nclass Baz:\n \"\"\"docstring\"\"\"\n\n __slots__ = 'attr'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typed_vars.py__attr1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typed_vars.py__attr1_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/typed_vars.py", "file_name": "typed_vars.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["_Descriptor", "impl", "_Descriptor.__get__", "impl:7", "Derived", "docstring", "impl:6", "Class"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "#: attr1\nattr1: str = ''\n#: attr2\nattr2: str\n#: attr3\nattr3 = '' # type: str\n\n\nclass _Descriptor:\n def __init__(self, name):\n self.__doc__ = \"This is {}\".format(name)\n def __get__(self):\n pass\n\n\nclass Class:\n attr1: int = 0\n attr2: int\n attr3 = 0 # type: int\n\n descr4: int = _Descriptor(\"descr4\")\n\n def __init__(self):\n self.attr4: int = 0 #: attr4\n self.attr5: int #: attr5\n self.attr6 = 0 # type: int\n \"\"\"attr6\"\"\"\n\n\nclass Derived(Class):\n attr7: int\n\n\nAlias = Derived", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typehints.py_tuple_args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typehints.py_tuple_args_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/typehints.py", "file_name": "typehints.py", "file_type": "text/x-python", "category": "implementation", "start_line": 46, "end_line": 91, "span_ids": ["_MetaclassWithCall.__call__", "SignatureFromMetaclass", "_ClassWithDocumentedInit", "NewComment.__new__", "tuple_args", "_MetaclassWithCall", "NewComment", "missing_attr", "complex_func", "NewAnnotation", "NewAnnotation.__new__"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def tuple_args(x: Tuple[int, Union[int, str]]) -> Tuple[int, int]:\n pass\n\n\nclass NewAnnotation:\n def __new__(cls, i: int) -> 'NewAnnotation':\n pass\n\n\nclass NewComment:\n def __new__(cls, i):\n # type: (int) -> NewComment\n pass\n\n\nclass _MetaclassWithCall(type):\n def __call__(cls, a: int):\n pass\n\n\nclass SignatureFromMetaclass(metaclass=_MetaclassWithCall):\n pass\n\n\ndef complex_func(arg1, arg2, arg3=None, *args, **kwargs):\n # type: (str, List[int], Tuple[int, Union[str, Unknown]], *str, **str) -> None\n pass\n\n\ndef missing_attr(c,\n a, # type: str\n b=None # type: Optional[str]\n ):\n # type: (...) -> str\n return a + (b or \"\")\n\n\nclass _ClassWithDocumentedInit:\n \"\"\"Class docstring.\"\"\"\n\n def __init__(self, x: int) -> None:\n \"\"\"Init docstring.\n\n :param x: Some integer\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/wrappedfunction.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/wrappedfunction.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/wrappedfunction.py", "file_name": "wrappedfunction.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["slow_function", "feeling_good", "imports"], "tokens": 76}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from contextlib import contextmanager\nfrom functools import lru_cache\nfrom typing import Generator\n\n\n@lru_cache(maxsize=None)\ndef slow_function(message, timeout):\n \"\"\"This function is slow.\"\"\"\n print(message)\n\n\n@contextmanager\ndef feeling_good(x: int, y: int) -> Generator:\n \"\"\"You'll feel better in this context!\"\"\"\n yield", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosectionlabel/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosectionlabel/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosectionlabel/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 11}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.autosectionlabel']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosectionlabel-prefix-document/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosectionlabel-prefix-document/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosectionlabel-prefix-document/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 19}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.autosectionlabel']\nautosectionlabel_prefix_document = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary/autosummary_importfail.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary/autosummary_importfail.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary/autosummary_importfail.py", "file_name": "autosummary_importfail.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl", "docstring", "imports"], "tokens": 17}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import sys\n\n# Fail module import in a catastrophic way\nsys.exit(1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 11, "span_ids": ["impl", "imports"], "tokens": 48}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\nextensions = ['sphinx.ext.autosummary']\nautosummary_generate = True\n\n# The suffix of source filenames.\nsource_suffix = '.rst'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-imported_members/autosummary_dummy_package/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-imported_members/autosummary_dummy_package/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-imported_members/autosummary_dummy_package/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["imports"], "tokens": 11}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from .autosummary_dummy_module import Bar, foo", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-imported_members/autosummary_dummy_package/autosummary_dummy_module.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-imported_members/autosummary_dummy_package/autosummary_dummy_module.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-imported_members/autosummary_dummy_package/autosummary_dummy_module.py", "file_name": "autosummary_dummy_module.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["foo", "Bar"], "tokens": 21}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Bar:\n \"\"\"Bar class\"\"\"\n pass\n\n\ndef foo():\n \"\"\"Foo function\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-imported_members/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-imported_members/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-imported_members/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["impl", "imports"], "tokens": 43}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\nextensions = ['sphinx.ext.autosummary']\nautosummary_generate = True\nautosummary_imported_members = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-mock_imports/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-mock_imports/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-mock_imports/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["impl", "imports"], "tokens": 45}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\nextensions = ['sphinx.ext.autosummary']\nautosummary_generate = True\nautosummary_mock_imports = ['unknown']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-mock_imports/foo.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-mock_imports/foo.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-mock_imports/foo.py", "file_name": "foo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["Foo", "imports"], "tokens": 16}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import unknown\n\n\nclass Foo(unknown.Class):\n \"\"\"Foo class\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-recursive/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["impl", "imports"], "tokens": 34}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\nextensions = ['sphinx.ext.autosummary']\nautosummary_generate = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package/module.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package/module.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-recursive/package/module.py", "file_name": "module.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 14, "span_ids": ["docstring", "Foo", "Foo.baz", "imports", "Foo.bar"], "tokens": 41}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from os import * # NOQA\n\n\nclass Foo:\n def __init__(self):\n pass\n\n def bar(self):\n pass\n\n @property\n def baz(self):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package/module_importfail.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package/module_importfail.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-recursive/package/module_importfail.py", "file_name": "module_importfail.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl", "docstring", "imports"], "tokens": 17}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import sys\n\n# Fail module import in a catastrophic way\nsys.exit(1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package/package/module.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package/package/module.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-recursive/package/package/module.py", "file_name": "module.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 14, "span_ids": ["docstring", "Foo", "Foo.baz", "imports", "Foo.bar"], "tokens": 41}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from os import * # NOQA\n\n\nclass Foo:\n def __init__(self):\n pass\n\n def bar(self):\n pass\n\n @property\n def baz(self):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package2/module.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-recursive/package2/module.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-recursive/package2/module.py", "file_name": "module.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 14, "span_ids": ["docstring", "Foo", "Foo.baz", "imports", "Foo.bar"], "tokens": 41}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from os import * # NOQA\n\n\nclass Foo:\n def __init__(self):\n pass\n\n def bar(self):\n pass\n\n @property\n def baz(self):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-skip-member/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-skip-member/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-skip-member/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["impl", "imports", "skip_member", "setup"], "tokens": 104}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\n\nextensions = ['sphinx.ext.autosummary']\nautosummary_generate = True\nautodoc_default_options = {'members': True}\n\n\ndef skip_member(app, what, name, obj, skip, options):\n if name == 'skipmeth':\n return True\n elif name == '_privatemeth':\n return False\n\n\ndef setup(app):\n app.connect('autodoc-skip-member', skip_member)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-skip-member/target.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-skip-member/target.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-skip-member/target.py", "file_name": "target.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["Foo.skipmeth", "Foo._privatemeth", "Foo", "Foo.meth"], "tokens": 62}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Foo:\n \"\"\"docstring of Foo.\"\"\"\n\n def meth(self):\n \"\"\"docstring of meth.\"\"\"\n pass\n\n def skipmeth(self):\n \"\"\"docstring of skipmeth.\"\"\"\n pass\n\n def _privatemeth(self):\n \"\"\"docstring of _privatemeth.\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-template/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-template/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-template/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 11, "span_ids": ["impl", "imports"], "tokens": 53}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\n\nextensions = ['sphinx.ext.autosummary']\nautosummary_generate = True\nautodoc_default_options = {'members': True}\ntemplates_path = ['_templates']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-template/target.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-template/target.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-template/target.py", "file_name": "target.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["Foo"], "tokens": 10}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Foo:\n \"\"\"docstring of Foo.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-coverage/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-coverage/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-coverage/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 13, "span_ids": ["impl", "imports"], "tokens": 71}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage']\n\ncoverage_ignore_pyobjects = [\n r'^coverage_ignored(\\..*)?$',\n r'\\.Ignored$',\n r'\\.Documented\\.ignored\\d$',\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-coverage/coverage_ignored.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-coverage/coverage_ignored.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-coverage/coverage_ignored.py", "file_name": "coverage_ignored.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["Documented.ignored2", "Documented.not_ignored2", "Documented", "Documented.not_ignored1", "Ignored", "NotIgnored", "Documented.ignored1"], "tokens": 63}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documented:\n \"\"\"Documented\"\"\"\n\n def ignored1(self):\n pass\n\n def ignored2(self):\n pass\n\n def not_ignored1(self):\n pass\n\n def not_ignored2(self):\n pass\n\n\nclass Ignored:\n pass\n\n\nclass NotIgnored:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-coverage/coverage_not_ignored.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-coverage/coverage_not_ignored.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-coverage/coverage_not_ignored.py", "file_name": "coverage_not_ignored.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["Documented.ignored2", "Documented.not_ignored2", "Documented", "Documented.not_ignored1", "Ignored", "NotIgnored", "Documented.ignored1"], "tokens": 63}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documented:\n \"\"\"Documented\"\"\"\n\n def ignored1(self):\n pass\n\n def ignored2(self):\n pass\n\n def not_ignored1(self):\n pass\n\n def not_ignored2(self):\n pass\n\n\nclass Ignored:\n pass\n\n\nclass NotIgnored:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-doctest/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["impl"], "tokens": 38}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.doctest']\n\nproject = 'test project for doctest'\nroot_doc = 'doctest'\nsource_suffix = '.txt'\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-skipif/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-skipif/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-doctest-skipif/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["impl"], "tokens": 91}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.doctest']\n\nproject = 'test project for the doctest :skipif: directive'\nroot_doc = 'skipif'\nsource_suffix = '.txt'\nexclude_patterns = ['_build']\n\ndoctest_global_setup = '''\nfrom tests.test_ext_doctest import record\n\nrecord('doctest_global_setup', 'body', True)\n'''\n\ndoctest_global_cleanup = '''\nrecord('doctest_global_cleanup', 'body', True)\n'''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-with-autodoc/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-with-autodoc/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-doctest-with-autodoc/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["impl", "imports"], "tokens": 53}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import sys\nfrom os import path\n\nsys.path.insert(0, path.abspath(path.dirname(__file__)))\n\nproject = 'test project for doctest + autodoc reporting'\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-with-autodoc/dir/bar.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-with-autodoc/dir/bar.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-doctest-with-autodoc/dir/bar.py", "file_name": "bar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["docstring"], "tokens": 10}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\n>>> 'dir/bar.py:2'\n\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-with-autodoc/foo.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-doctest-with-autodoc/foo.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-doctest-with-autodoc/foo.py", "file_name": "foo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["docstring"], "tokens": 9}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\n\n>>> 'foo.py:3'\n\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-githubpages/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-githubpages/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-githubpages/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 9}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.githubpages']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-graphviz/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-graphviz/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-graphviz/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 16}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.graphviz']\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-ifconfig/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-ifconfig/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-ifconfig/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 10, "span_ids": ["impl", "setup"], "tokens": 54}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.ifconfig']\nexclude_patterns = ['_build']\n\nconfval1 = True\n\n\ndef setup(app):\n app.add_config_value('confval1', False, None)\n app.add_config_value('confval2', False, None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-imgconverter/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-imgconverter/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-imgconverter/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 9}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.imgconverter']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-inheritance_diagram/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["impl", "imports"], "tokens": 28}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\nextensions = ['sphinx.ext.inheritance_diagram']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/example/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/example/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-inheritance_diagram/example/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring"], "tokens": 3}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# example.py", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/example/sphinx.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/example/sphinx.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-inheritance_diagram/example/sphinx.py", "file_name": "sphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["DummyClass", "docstring"], "tokens": 12}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# example.sphinx\n\n\nclass DummyClass(object):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/test.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-inheritance_diagram/test.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-inheritance_diagram/test.py", "file_name": "test.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["Baz", "Qux", "Foo", "Bar"], "tokens": 31}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Foo(object):\n pass\n\n\nclass Bar(Foo):\n pass\n\n\nclass Baz(Bar):\n pass\n\n\nclass Qux(Foo):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-intersphinx-cppdomain/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-intersphinx-cppdomain/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-intersphinx-cppdomain/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 10}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.intersphinx']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-math-compat/conf.py_from_docutils_import_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-math-compat/conf.py_from_docutils_import_node_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-math-compat/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["impl", "setup", "MyMathDirective", "MyMathDirective.run", "imports", "my_math_role"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from docutils import nodes\nfrom docutils.parsers.rst import Directive\n\nextensions = ['sphinx.ext.mathjax']\n\n\ndef my_math_role(role, rawtext, text, lineno, inliner, options={}, content=[]):\n text = 'E = mc^2'\n return [nodes.math(text, text)], []\n\n\nclass MyMathDirective(Directive):\n def run(self):\n text = 'E = mc^2'\n return [nodes.math_block(text, text)]\n\n\ndef setup(app):\n app.add_role('my_math', my_math_role)\n app.add_directive('my-math', MyMathDirective)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-todo/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-todo/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-todo/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 8}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.todo']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/conf.py_os_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/conf.py_os_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-viewcode/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 25, "span_ids": ["impl", "imports"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsource_dir = os.path.abspath('.')\nif source_dir not in sys.path:\n sys.path.insert(0, source_dir)\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']\nexclude_patterns = ['_build']\n\n\nif 'test_linkcode' in tags: # NOQA\n extensions.remove('sphinx.ext.viewcode')\n extensions.append('sphinx.ext.linkcode')\n\n def linkcode_resolve(domain, info):\n if domain == 'py':\n fn = info['module'].replace('.', '/')\n return \"http://foobar/source/%s.py\" % fn\n elif domain == \"js\":\n return \"http://foobar/js/\" + info['fullname']\n elif domain in (\"c\", \"cpp\"):\n return \"http://foobar/%s/%s\" % (domain, \"\".join(info['names']))\n else:\n raise AssertionError()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-viewcode/spam/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["imports:2", "docstring:2", "docstring", "imports"], "tokens": 29}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from .mod1 import Class1, func1 # NOQA\nfrom .mod2 import Class2, func2 # NOQA", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/mod1.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/mod1.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-viewcode/spam/mod1.py", "file_name": "mod1.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["decorator", "Class3", "docstring", "func1", "Class1"], "tokens": 92}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nmod1\n\"\"\"\n\n\ndef decorator(f):\n return f\n\n\n@decorator\ndef func1(a, b):\n \"\"\"\n this is func1\n \"\"\"\n return a, b\n\n\n@decorator\nclass Class1(object):\n \"\"\"\n this is Class1\n \"\"\"\n\n\nclass Class3(object):\n \"\"\"\n this is Class3\n \"\"\"\n class_attr = 42\n \"\"\"this is the class attribute class_attr\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/mod2.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/mod2.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-viewcode/spam/mod2.py", "file_name": "mod2.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["decorator", "docstring", "Class2", "func2"], "tokens": 59}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nmod2\n\"\"\"\n\n\ndef decorator(f):\n return f\n\n\n@decorator\ndef func2(a, b):\n \"\"\"\n this is func2\n \"\"\"\n return a, b\n\n\n@decorator\nclass Class2(object):\n \"\"\"\n this is Class2\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/mod3.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode/spam/mod3.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-viewcode/spam/mod3.py", "file_name": "mod3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl", "imports"], "tokens": 17}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from spam.mod1 import Class3\n\n__all__ = ('Class3',)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode-find/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode-find/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-viewcode-find/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl"], "tokens": 24}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.viewcode']\nexclude_patterns = ['_build']\nviewcode_follow_imported_members = False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode-find/not_a_package/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode-find/not_a_package/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-viewcode-find/not_a_package/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["docstring", "imports"], "tokens": 14}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from .submodule import Class1, func1 # NOQA", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode-find/not_a_package/submodule.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-viewcode-find/not_a_package/submodule.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-viewcode-find/not_a_package/submodule.py", "file_name": "submodule.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["decorator", "impl", "Class3", "docstring", "Class1", "func1"], "tokens": 102}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nsubmodule\n\"\"\"\nraise RuntimeError('This module should not get imported')\n\n\ndef decorator(f):\n return f\n\n\n@decorator\ndef func1(a, b):\n \"\"\"\n this is func1\n \"\"\"\n return a, b\n\n\n@decorator\nclass Class1(object):\n \"\"\"\n this is Class1\n \"\"\"\n\n\nclass Class3(object):\n \"\"\"\n this is Class3\n \"\"\"\n class_attr = 42\n \"\"\"this is the class attribute class_attr\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-extensions/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl", "imports"], "tokens": 17}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/read_parallel.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/read_parallel.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-extensions/read_parallel.py", "file_name": "read_parallel.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["setup"], "tokens": 17}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app):\n return {\n 'parallel_read_safe': True\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/read_serial.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/read_serial.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-extensions/read_serial.py", "file_name": "read_serial.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["setup"], "tokens": 17}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app):\n return {\n 'parallel_read_safe': False\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/write_parallel.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/write_parallel.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-extensions/write_parallel.py", "file_name": "write_parallel.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["setup"], "tokens": 17}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app):\n return {\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/write_serial.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-extensions/write_serial.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-extensions/write_serial.py", "file_name": "write_serial.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["setup"], "tokens": 17}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app):\n return {\n 'parallel_write_safe': False\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-footnotes/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-footnotes/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-footnotes/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-gettext-template/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-gettext-template/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-gettext-template/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "templates_path = ['_templates']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_assets/conf.py_project_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_assets/conf.py_project_", "embedding": null, "metadata": {"file_path": "tests/roots/test-html_assets/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 13, "span_ids": ["impl"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "project = 'Sphinx'\nversion = '1.4.4'\n\nhtml_static_path = ['static', 'subdir']\nhtml_extra_path = ['extra', 'subdir']\nhtml_css_files = ['css/style.css',\n ('https://example.com/custom.css',\n {'title': 'title', 'media': 'print', 'priority': 400})]\nhtml_js_files = ['js/custom.js',\n ('https://example.com/script.js',\n {'async': 'async', 'priority': 400})]\nexclude_patterns = ['**/_build', '**/.htpasswd']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_entity/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_entity/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-html_entity/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 13}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "html_theme = 'classic'\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_style/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_style/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-html_style/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 15}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "html_style = 'default.css'\nhtml_static_path = ['_static']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-image-in-parsed-literal/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-image-in-parsed-literal/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-image-in-parsed-literal/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 10, "span_ids": ["impl"], "tokens": 50}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\n\nrst_epilog = '''\n.. |picture| image:: pic.png\n :height: 1cm\n :scale: 200%\n :align: middle\n :alt: alternative_text\n'''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-image-in-section/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-image-in-section/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-image-in-section/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["impl"], "tokens": 45}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\n\nrst_epilog = '''\n.. |picture| image:: pic.png\n :width: 15pt\n :height: 15pt\n :alt: alternative_text\n'''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-inheritance/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-inheritance/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-inheritance/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["impl", "imports"], "tokens": 34}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\nextensions = ['sphinx.ext.inheritance_diagram']\nsource_suffix = '.rst'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-inheritance/dummy/test.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-inheritance/dummy/test.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-inheritance/dummy/test.py", "file_name": "test.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["E", "D", "C", "docstring", "B", "A", "F"], "tokens": 78}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "r\"\"\"\n\n Test with a class diagram like this::\n\n A\n / \\\n B C\n / \\ / \\\n E D F\n\n\"\"\"\n\n\nclass A(object):\n pass\n\n\nclass B(A):\n pass\n\n\nclass C(A):\n pass\n\n\nclass D(B, C):\n pass\n\n\nclass E(B):\n pass\n\n\nclass F(C):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-inheritance/dummy/test_nested.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-inheritance/dummy/test_nested.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-inheritance/dummy/test_nested.py", "file_name": "test_nested.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 12, "span_ids": ["C", "A.B", "docstring", "A"], "tokens": 26}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test with nested classes.\n\"\"\"\n\n\nclass A(object):\n class B(object):\n pass\n\n\nclass C(A.B):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-intl/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-intl/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-intl/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["impl"], "tokens": 62}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "project = 'Sphinx intl <Tests>'\nsource_suffix = '.txt'\nkeep_warnings = True\ntemplates_path = ['_templates']\nhtml_additional_pages = {'contents': 'contents.html'}\nrelease = version = '2013.120'\ngettext_additional_targets = ['index']\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-keep_warnings/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-keep_warnings/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-keep_warnings/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 4}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "keep_warnings = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-babel/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-babel/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-latex-babel/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["impl"], "tokens": 34}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "numfig_format = {\n 'figure': 'Fig. %s',\n 'table': 'Table. %s',\n 'code-block': 'List.',\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-equations/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-equations/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-latex-equations/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 16}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "root_doc = 'equations'\nextensions = ['sphinx.ext.imgmath']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-figure-in-admonition/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-figure-in-admonition/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-latex-figure-in-admonition/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-numfig/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-numfig/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-latex-numfig/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["impl"], "tokens": 75}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.imgmath'] # for math_numfig\n\nlatex_documents = [\n ('indexmanual', 'SphinxManual.tex', 'Test numfig manual',\n 'Sphinx', 'manual'),\n ('indexhowto', 'SphinxHowTo.tex', 'Test numfig howto',\n 'Sphinx', 'howto'),\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-theme/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-theme/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-latex-theme/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 13}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "latex_theme = 'custom'\nlatex_theme_path = ['theme']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-title/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-title/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-latex-title/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl", "docstring"], "tokens": 39}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# set empty string to the third column to use the first section title to document title\nlatex_documents = [\n ('index', 'test.tex', '', 'Sphinx', 'report')\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-linkcheck/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl"], "tokens": 25}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "root_doc = 'links'\nsource_suffix = '.txt'\nexclude_patterns = ['_build']\nlinkcheck_anchors = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-manpage_url/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-manpage_url/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-manpage_url/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-markup-citation/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-markup-citation/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-markup-citation/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl"], "tokens": 28}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "latex_documents = [\n ('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-markup-rubric/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-markup-rubric/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-markup-rubric/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl"], "tokens": 28}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "latex_documents = [\n ('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-maxlistdepth/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-maxlistdepth/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-maxlistdepth/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["impl"], "tokens": 21}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\n\nlatex_elements = {\n 'maxlistdepth': '10',\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-need-escaped/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-need-escaped/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-need-escaped/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 17}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "project = 'need <b>\"escaped\"</b> project'\nsmartquotes = False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-numfig/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-numfig/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-numfig/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-productionlist/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-productionlist/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-productionlist/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-prolog/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-prolog/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-prolog/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 11, "span_ids": ["impl", "imports"], "tokens": 52}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\n\nextensions = ['prolog_markdown_parser']\n\nrst_prolog = '*Hello world*.\\n\\n'\nrst_epilog = '\\n\\n*Good-bye world*.'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-prolog/prolog_markdown_parser.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-prolog/prolog_markdown_parser.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-prolog/prolog_markdown_parser.py", "file_name": "prolog_markdown_parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 14, "span_ids": ["DummyMarkdownParser", "DummyMarkdownParser.parse", "imports", "setup"], "tokens": 63}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from docutils.parsers import Parser\n\n\nclass DummyMarkdownParser(Parser):\n supported = ('markdown',)\n\n def parse(self, inputstring, document):\n document.rawsource = inputstring\n\n\ndef setup(app):\n app.add_source_suffix('.md', 'markdown')\n app.add_source_parser(DummyMarkdownParser)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-pycode-egg/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-pycode-egg/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-pycode-egg/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["impl", "imports"], "tokens": 41}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('sample-0.0.0-py3.7.egg'))\nextensions = ['sphinx.ext.autodoc']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-pycode-egg/src/sample.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-pycode-egg/src/sample.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-pycode-egg/src/sample.py", "file_name": "sample.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["hello", "impl", "docstring"], "tokens": 26}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "#: constant on sample.py\nCONSTANT = 1\n\n\ndef hello(s):\n print('Hello %s' % s)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-pycode-egg/src/setup.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-pycode-egg/src/setup.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-pycode-egg/src/setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl", "imports"], "tokens": 16}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from setuptools import setup\n\nsetup(name='sample',\n py_modules=['sample'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-refonly_bullet_list/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-refonly_bullet_list/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-refonly_bullet_list/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 6}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "html_compact_lists = False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-roles-download/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-roles-download/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-roles-download/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl"], "tokens": 28}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "latex_documents = [\n ('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_enum_CustomDataDescriptor2.__metaclass__.CustomDataDescriptorMeta": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_enum_CustomDataDescriptor2.__metaclass__.CustomDataDescriptorMeta", "embedding": null, "metadata": {"file_path": "tests/roots/test-root/autodoc_target.py", "file_name": "autodoc_target.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 44, "span_ids": ["raises", "impl", "CustomDataDescriptor.__get__", "CustomDataDescriptor2", "CustomEx", "CustomDataDescriptorMeta", "CustomDataDescriptor", "imports", "CustomDataDescriptor.meth", "CustomEx.f"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import enum\nfrom io import StringIO\n\n__all__ = ['Class']\n\n#: documentation for the integer\ninteger = 1\n\n\ndef raises(exc, func, *args, **kwds):\n \"\"\"Raise AssertionError if ``func(*args, **kwds)`` does not raise *exc*.\"\"\"\n pass\n\n\nclass CustomEx(Exception):\n \"\"\"My custom exception.\"\"\"\n\n def f(self):\n \"\"\"Exception method.\"\"\"\n\n\nclass CustomDataDescriptor(object):\n \"\"\"Descriptor class docstring.\"\"\"\n\n def __init__(self, doc):\n self.__doc__ = doc\n\n def __get__(self, obj, type=None):\n if obj is None:\n return self\n return 42\n\n def meth(self):\n \"\"\"Function.\"\"\"\n return \"The Answer\"\n\n\nclass CustomDataDescriptorMeta(type):\n \"\"\"Descriptor metaclass docstring.\"\"\"\n\n\nclass CustomDataDescriptor2(CustomDataDescriptor):\n \"\"\"Descriptor class with custom metaclass docstring.\"\"\"\n __metaclass__ = CustomDataDescriptorMeta", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py__funky_classmethod_Derived.inheritedmeth.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py__funky_classmethod_Derived.inheritedmeth.pass", "embedding": null, "metadata": {"file_path": "tests/roots/test-root/autodoc_target.py", "file_name": "autodoc_target.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 68, "span_ids": ["Base", "Derived.inheritedmeth", "_funky_classmethod", "Base.inheritedmeth", "Derived"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _funky_classmethod(name, b, c, d, docstring=None):\n \"\"\"Generates a classmethod for a class from a template by filling out\n some arguments.\"\"\"\n def template(cls, a, b, c, d=4, e=5, f=6):\n return a, b, c, d, e, f\n from functools import partial\n function = partial(template, b=b, c=c, d=d)\n function.__name__ = name\n function.__doc__ = docstring\n return classmethod(function)\n\n\nclass Base(object):\n def inheritedmeth(self):\n \"\"\"Inherited function.\"\"\"\n\n\nclass Derived(Base):\n def inheritedmeth(self):\n # no docstring here\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_Class_Class.__special2__.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_Class_Class.__special2__.pass", "embedding": null, "metadata": {"file_path": "tests/roots/test-root/autodoc_target.py", "file_name": "autodoc_target.py", "file_type": "text/x-python", "category": "implementation", "start_line": 71, "end_line": 126, "span_ids": ["Class.skipmeth", "Class.undocmeth", "Class.__special2__", "Class.prop", "Class.excludemeth", "Class.meth", "Class:5", "Class.__special1__", "Class", "Class:9"], "tokens": 338}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Class(Base):\n \"\"\"Class to document.\"\"\"\n\n descr = CustomDataDescriptor(\"Descriptor instance docstring.\")\n\n def meth(self):\n \"\"\"Function.\"\"\"\n\n def undocmeth(self):\n pass\n\n def skipmeth(self):\n \"\"\"Method that should be skipped.\"\"\"\n\n def excludemeth(self):\n \"\"\"Method that should be excluded.\"\"\"\n\n # should not be documented\n skipattr = 'foo'\n\n #: should be documented -- s\u00fc\u00df\n attr = 'bar'\n\n @property\n def prop(self):\n \"\"\"Property.\"\"\"\n\n docattr = 'baz'\n \"\"\"should likewise be documented -- s\u00fc\u00df\"\"\"\n\n udocattr = 'quux'\n \"\"\"should be documented as well - s\u00fc\u00df\"\"\"\n\n # initialized to any class imported from another module\n mdocattr = StringIO()\n \"\"\"should be documented as well - s\u00fc\u00df\"\"\"\n\n roger = _funky_classmethod(\"roger\", 2, 3, 4)\n\n moore = _funky_classmethod(\"moore\", 9, 8, 7,\n docstring=\"moore(a, e, f) -> happiness\")\n\n def __init__(self, arg):\n self.inst_attr_inline = None #: an inline documented instance attr\n #: a documented instance attribute\n self.inst_attr_comment = None\n self.inst_attr_string = None\n \"\"\"a documented instance attribute\"\"\"\n self._private_inst_attr = None #: a private instance attribute\n\n def __special1__(self):\n \"\"\"documented special method\"\"\"\n\n def __special2__(self):\n # undocumented special method\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_CustomDict_DocstringSig.prop2.return.456": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_CustomDict_DocstringSig.prop2.return.456", "embedding": null, "metadata": {"file_path": "tests/roots/test-root/autodoc_target.py", "file_name": "autodoc_target.py", "file_type": "text/x-python", "category": "implementation", "start_line": 129, "end_line": 180, "span_ids": ["Outer.Inner.meth", "function", "Outer.Inner", "DocstringSig.prop2", "Outer", "Outer:3", "DocstringSig.meth2", "DocstringSig.prop1", "DocstringSig", "DocstringSig.meth", "CustomDict"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CustomDict(dict):\n \"\"\"Docstring.\"\"\"\n\n\ndef function(foo, *args, **kwds):\n \"\"\"\n Return spam.\n \"\"\"\n pass\n\n\nclass Outer(object):\n \"\"\"Foo\"\"\"\n\n class Inner(object):\n \"\"\"Foo\"\"\"\n\n def meth(self):\n \"\"\"Foo\"\"\"\n\n # should be documented as an alias\n factory = dict\n\n\nclass DocstringSig(object):\n def meth(self):\n \"\"\"meth(FOO, BAR=1) -> BAZ\nFirst line of docstring\n\n rest of docstring\n \"\"\"\n\n def meth2(self):\n \"\"\"First line, no signature\n Second line followed by indentation::\n\n indented line\n \"\"\"\n\n @property\n def prop1(self):\n \"\"\"DocstringSig.prop1(self)\n First line of docstring\n \"\"\"\n return 123\n\n @property\n def prop2(self):\n \"\"\"First line of docstring\n Second line of docstring\n \"\"\"\n return 456", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_StrRepr_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/autodoc_target.py_StrRepr_", "embedding": null, "metadata": {"file_path": "tests/roots/test-root/autodoc_target.py", "file_name": "autodoc_target.py", "file_type": "text/x-python", "category": "implementation", "start_line": 183, "end_line": 223, "span_ids": ["StrRepr.__repr__", "StrRepr", "InstAttCls", "AttCls", "EnumCls"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StrRepr(str):\n def __repr__(self):\n return self\n\n\nclass AttCls(object):\n a1 = StrRepr('hello\\nworld')\n a2 = None\n\n\nclass InstAttCls(object):\n \"\"\"Class with documented class and instance attributes.\"\"\"\n\n #: Doc comment for class attribute InstAttCls.ca1.\n #: It can have multiple lines.\n ca1 = 'a'\n\n ca2 = 'b' #: Doc comment for InstAttCls.ca2. One line only.\n\n ca3 = 'c'\n \"\"\"Docstring for class attribute InstAttCls.ca3.\"\"\"\n\n def __init__(self):\n #: Doc comment for instance attribute InstAttCls.ia1\n self.ia1 = 'd'\n\n self.ia2 = 'e'\n \"\"\"Docstring for instance attribute InstAttCls.ia2.\"\"\"\n\n\nclass EnumCls(enum.Enum):\n \"\"\"\n this is enum class\n \"\"\"\n\n #: doc for val1\n val1 = 12\n val2 = 23 #: doc for val2\n val3 = 34\n \"\"\"doc for val3\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/conf.py_os_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/conf.py_os_", "embedding": null, "metadata": {"file_path": "tests/roots/test-root/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 77, "span_ids": ["ClassDirective", "impl", "ClassDirective.run", "setup", "imports", "userdesc_parse"], "tokens": 584}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nfrom docutils import nodes\nfrom docutils.parsers.rst import Directive\n\nfrom sphinx import addnodes\n\nsys.path.append(os.path.abspath('.'))\n\nextensions = ['sphinx.ext.autodoc',\n 'sphinx.ext.todo',\n 'sphinx.ext.coverage',\n 'sphinx.ext.extlinks']\n\njsmath_path = 'dummy.js'\n\ntemplates_path = ['_templates']\n\nsource_suffix = ['.txt', '.add', '.foo']\n\nproject = 'Sphinx <Tests>'\ncopyright = '2010-2016, Georg Brandl & Team'\n# If this is changed, remember to update the versionchanges!\nversion = '0.6'\nrelease = '0.6alpha1'\ntoday_fmt = '%B %d, %Y'\nexclude_patterns = ['_build', '**/excluded.*']\nkeep_warnings = True\npygments_style = 'sphinx'\nshow_authors = True\nnumfig = True\n\nhtml_sidebars = {'**': ['localtoc.html', 'relations.html', 'sourcelink.html',\n 'customsb.html', 'searchbox.html'],\n 'index': ['contentssb.html', 'localtoc.html', 'globaltoc.html']}\nhtml_last_updated_fmt = '%b %d, %Y'\nhtml_context = {'hckey': 'hcval', 'hckey_co': 'wrong_hcval_co'}\n\nlatex_additional_files = ['svgimg.svg']\n\ncoverage_c_path = ['special/*.h']\ncoverage_c_regexes = {'function': r'^PyAPI_FUNC\\(.*\\)\\s+([^_][\\w_]+)'}\n\nextlinks = {'issue': ('http://bugs.python.org/issue%s', 'issue %s'),\n 'pyurl': ('http://python.org/%s', None)}\n\n# modify tags from conf.py\ntags.add('confpytag') # NOQA\n\n\n# -- extension API\ndef userdesc_parse(env, sig, signode):\n x, y = sig.split(':')\n signode += addnodes.desc_name(x, x)\n signode += addnodes.desc_parameterlist()\n signode[-1] += addnodes.desc_parameter(y, y)\n return x\n\n\nclass ClassDirective(Directive):\n option_spec = {'opt': lambda x: x}\n\n def run(self):\n return [nodes.strong(text='from class: %s' % self.options['opt'])]\n\n\ndef setup(app):\n import parsermod\n\n app.add_directive('clsdir', ClassDirective)\n app.add_object_type('userdesc', 'userdescrole', '%s (userdesc)',\n userdesc_parse, objname='user desc')\n app.add_js_file('file://moo.js')\n app.add_source_suffix('.foo', 'foo')\n app.add_source_parser(parsermod.Parser)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/parsermod.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/parsermod.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-root/parsermod.py", "file_name": "parsermod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["Parser.get_transforms", "Parser", "Parser.parse", "imports"], "tokens": 71}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from docutils import nodes\nfrom docutils.parsers import Parser\n\n\nclass Parser(Parser):\n supported = ('foo',)\n\n def parse(self, input, document):\n section = nodes.section(ids=['id1'])\n section += nodes.title('Generated section', 'Generated section')\n document += section\n\n def get_transforms(self):\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/special/code.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-root/special/code.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-root/special/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 12}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "print(\"line 1\")\nprint(\"line 2\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-search/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-search/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-search/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 14}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\nhtml_search_language = 'en'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-setup/doc/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-setup/doc/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-setup/doc/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl"], "tokens": 26}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "project = 'Sphinx smallest project'\nsource_suffix = '.txt'\nkeep_warnings = True\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-setup/setup.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-setup/setup.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-setup/setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 11, "span_ids": ["impl", "imports"], "tokens": 42}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from setuptools import setup\n\nfrom sphinx.setup_command import BuildDoc\n\ncmdclass = {'build_sphinx': BuildDoc}\n\nsetup(\n name='sphinxdoc',\n cmdclass=cmdclass,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-stylesheets/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-stylesheets/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-stylesheets/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 10, "span_ids": ["impl", "setup"], "tokens": 73}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "html_theme = 'classic'\ntemplates_path = ['_templates']\n\n\ndef setup(app):\n app.add_css_file('persistent.css')\n app.add_css_file('default.css', title=\"Default\")\n app.add_css_file('alternate1.css', title=\"Alternate\", rel=\"alternate stylesheet\")\n app.add_css_file('alternate2.css', rel=\"alternate stylesheet\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-templating/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-templating/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-templating/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 10, "span_ids": ["impl"], "tokens": 69}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "project = 'Sphinx templating <Tests>'\nsource_suffix = '.txt'\nkeep_warnings = True\ntemplates_path = ['_templates']\nrelease = version = '2013.120'\nexclude_patterns = ['_build']\n\nextensions = ['sphinx.ext.autosummary']\nautosummary_generate = ['autosummary_templating']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-tocdepth/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-tocdepth/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-tocdepth/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 13}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "html_theme = 'classic'\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-toctree-empty/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-toctree-empty/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-toctree-empty/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 14}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\ntemplates_path = ['_templates']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-toctree-glob/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-toctree-glob/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-toctree-glob/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-toctree-maxdepth/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-toctree-maxdepth/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-toctree-maxdepth/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-trim_doctest_flags/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-trim_doctest_flags/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-trim_doctest_flags/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 9}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.doctest']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-versioning/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-versioning/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-versioning/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl"], "tokens": 21}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "project = 'versioning test root'\nsource_suffix = '.txt'\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-warnings/autodoc_fodder.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-warnings/autodoc_fodder.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-warnings/autodoc_fodder.py", "file_name": "autodoc_fodder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2, "end_line": 8, "span_ids": ["MarkupError"], "tokens": 34}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MarkupError(object):\n \"\"\"\n .. note:: This is a docstring with a\n small markup error which should have\n correct location information.\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-warnings/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-warnings/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-warnings/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["impl", "imports"], "tokens": 24}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.append(os.path.abspath('.'))\n\nextensions = ['sphinx.ext.autodoc']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_emit_with_nonascii_name_node_test_extension_in_blacklist.assert_msg_startswith_WA": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_emit_with_nonascii_name_node_test_extension_in_blacklist.assert_msg_startswith_WA", "embedding": null, "metadata": {"file_path": "tests/test_application.py", "file_name": "test_application.py", "file_type": "text/x-python", "category": "test", "start_line": 46, "end_line": 60, "span_ids": ["test_emit_with_nonascii_name_node", "test_extensions", "test_extension_in_blacklist"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_emit_with_nonascii_name_node(app, status, warning):\n node = nodes.section(names=['\\u65e5\\u672c\\u8a9e'])\n app.emit('my_event', node)\n\n\ndef test_extensions(app, status, warning):\n app.setup_extension('shutil')\n warning = strip_escseq(warning.getvalue())\n assert \"extension 'shutil' has no setup() function\" in warning\n\n\ndef test_extension_in_blacklist(app, status, warning):\n app.setup_extension('sphinxjp.themecore')\n msg = strip_escseq(warning.getvalue())\n assert msg.startswith(\"WARNING: the extension 'sphinxjp.themecore' was\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_add_source_parser_test_add_source_parser.assert_app_registry_get_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_add_source_parser_test_add_source_parser.assert_app_registry_get_s", "embedding": null, "metadata": {"file_path": "tests/test_application.py", "file_name": "test_application.py", "file_type": "text/x-python", "category": "test", "start_line": 63, "end_line": 74, "span_ids": ["test_add_source_parser"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='add_source_parser')\ndef test_add_source_parser(app, status, warning):\n assert set(app.config.source_suffix) == {'.rst', '.test'}\n\n # .rst; only in :confval:`source_suffix`\n assert '.rst' not in app.registry.get_source_parsers()\n assert app.registry.source_suffix['.rst'] is None\n\n # .test; configured by API\n assert app.registry.source_suffix['.test'] == 'test'\n assert 'test' in app.registry.get_source_parsers()\n assert app.registry.get_source_parsers()['test'].__name__ == 'TestSourceParser'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_add_is_parallel_allowed_test_add_is_parallel_allowed.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_add_is_parallel_allowed_test_add_is_parallel_allowed.None_2", "embedding": null, "metadata": {"file_path": "tests/test_application.py", "file_name": "test_application.py", "file_type": "text/x-python", "category": "test", "start_line": 77, "end_line": 113, "span_ids": ["test_add_is_parallel_allowed"], "tokens": 352}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='extensions')\ndef test_add_is_parallel_allowed(app, status, warning):\n logging.setup(app, status, warning)\n\n assert app.is_parallel_allowed('read') is True\n assert app.is_parallel_allowed('write') is True\n assert warning.getvalue() == ''\n\n app.setup_extension('read_parallel')\n assert app.is_parallel_allowed('read') is True\n assert app.is_parallel_allowed('write') is True\n assert warning.getvalue() == ''\n app.extensions.pop('read_parallel')\n\n app.setup_extension('write_parallel')\n assert app.is_parallel_allowed('read') is False\n assert app.is_parallel_allowed('write') is True\n assert (\"the write_parallel extension does not declare if it is safe \"\n \"for parallel reading, assuming it isn't - please \") in warning.getvalue()\n app.extensions.pop('write_parallel')\n warning.truncate(0) # reset warnings\n\n app.setup_extension('read_serial')\n assert app.is_parallel_allowed('read') is False\n assert \"the read_serial extension is not safe for parallel reading\" in warning.getvalue()\n warning.truncate(0) # reset warnings\n assert app.is_parallel_allowed('write') is True\n assert warning.getvalue() == ''\n app.extensions.pop('read_serial')\n\n app.setup_extension('write_serial')\n assert app.is_parallel_allowed('read') is False\n assert app.is_parallel_allowed('write') is False\n assert (\"the write_serial extension does not declare if it is safe \"\n \"for parallel reading, assuming it isn't - please \") in warning.getvalue()\n app.extensions.pop('write_serial')\n warning.truncate(0) # reset warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_build_specific_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py_test_build_specific_", "embedding": null, "metadata": {"file_path": "tests/test_application.py", "file_name": "test_application.py", "file_type": "text/x-python", "category": "test", "start_line": 116, "end_line": 133, "span_ids": ["test_build_specific"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='root')\ndef test_build_specific(app):\n app.builder.build = Mock()\n filenames = [app.srcdir / 'index.txt', # normal\n app.srcdir / 'images', # without suffix\n app.srcdir / 'notfound.txt', # not found\n app.srcdir / 'img.png', # unknown suffix\n '/index.txt', # external file\n app.srcdir / 'subdir', # directory\n app.srcdir / 'subdir/includes.txt', # file on subdir\n app.srcdir / 'subdir/../subdir/excluded.txt'] # not normalized\n app.build(False, filenames)\n\n expected = ['index', 'img.png', 'subdir/includes', 'subdir/excluded']\n app.builder.build.assert_called_with(expected,\n method='specific',\n summary='4 source files given on command line')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py__note_this_test_skips_b_test_build_all.app_build_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py__note_this_test_skips_b_test_build_all.app_build_", "embedding": null, "metadata": {"file_path": "tests/test_build.py", "file_name": "test_build.py", "file_type": "text/x-python", "category": "test", "start_line": 56, "end_line": 67, "span_ids": ["nonascii_srcdir", "test_build_all"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# note: this test skips building docs for some builders because they have independent testcase.\n# (html, changes, epub, latex, texinfo and manpage)\n@pytest.mark.parametrize(\n \"buildername\",\n ['dirhtml', 'singlehtml', 'text', 'xml', 'pseudoxml', 'linkcheck'],\n)\n@mock.patch('sphinx.builders.linkcheck.requests.head',\n side_effect=request_session_head)\n@pytest.mark.xfail(sys.platform == 'win32', reason=\"Not working on windows\")\ndef test_build_all(requests_head, make_app, nonascii_srcdir, buildername):\n app = make_app(buildername, srcdir=nonascii_srcdir)\n app.build()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py_test_image_glob_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py_test_image_glob_", "embedding": null, "metadata": {"file_path": "tests/test_build.py", "file_name": "test_build.py", "file_type": "text/x-python", "category": "test", "start_line": 98, "end_line": 144, "span_ids": ["test_image_glob"], "tokens": 578}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(buildername='dummy', testroot='images')\ndef test_image_glob(app, status, warning):\n app.builder.build_all()\n\n # index.rst\n doctree = app.env.get_doctree('index')\n\n assert isinstance(doctree[0][1], nodes.image)\n assert doctree[0][1]['candidates'] == {'*': 'rimg.png'}\n assert doctree[0][1]['uri'] == 'rimg.png'\n\n assert isinstance(doctree[0][2], nodes.figure)\n assert isinstance(doctree[0][2][0], nodes.image)\n assert doctree[0][2][0]['candidates'] == {'*': 'rimg.png'}\n assert doctree[0][2][0]['uri'] == 'rimg.png'\n\n assert isinstance(doctree[0][3], nodes.image)\n assert doctree[0][3]['candidates'] == {'application/pdf': 'img.pdf',\n 'image/gif': 'img.gif',\n 'image/png': 'img.png'}\n assert doctree[0][3]['uri'] == 'img.*'\n\n assert isinstance(doctree[0][4], nodes.figure)\n assert isinstance(doctree[0][4][0], nodes.image)\n assert doctree[0][4][0]['candidates'] == {'application/pdf': 'img.pdf',\n 'image/gif': 'img.gif',\n 'image/png': 'img.png'}\n assert doctree[0][4][0]['uri'] == 'img.*'\n\n # subdir/index.rst\n doctree = app.env.get_doctree('subdir/index')\n\n assert isinstance(doctree[0][1], nodes.image)\n assert doctree[0][1]['candidates'] == {'*': 'subdir/rimg.png'}\n assert doctree[0][1]['uri'] == 'subdir/rimg.png'\n\n assert isinstance(doctree[0][2], nodes.image)\n assert doctree[0][2]['candidates'] == {'application/pdf': 'subdir/svgimg.pdf',\n 'image/svg+xml': 'subdir/svgimg.svg'}\n assert doctree[0][2]['uri'] == 'subdir/svgimg.*'\n\n assert isinstance(doctree[0][3], nodes.figure)\n assert isinstance(doctree[0][3][0], nodes.image)\n assert doctree[0][3][0]['candidates'] == {'application/pdf': 'subdir/svgimg.pdf',\n 'image/svg+xml': 'subdir/svgimg.svg'}\n assert doctree[0][3][0]['uri'] == 'subdir/svgimg.*'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_build_epub_test_build_epub.for_i_item_in_enumerate_.assert_item_get_id_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_build_epub_test_build_epub.for_i_item_in_enumerate_.assert_item_get_id_", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 67, "end_line": 129, "span_ids": ["test_build_epub"], "tokens": 803}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='basic')\ndef test_build_epub(app):\n app.build()\n assert (app.outdir / 'mimetype').read_text() == 'application/epub+zip'\n assert (app.outdir / 'META-INF' / 'container.xml').exists()\n\n # toc.ncx\n toc = EPUBElementTree.fromstring((app.outdir / 'toc.ncx').read_text())\n assert toc.find(\"./ncx:docTitle/ncx:text\").text == 'Python'\n\n # toc.ncx / head\n meta = list(toc.find(\"./ncx:head\"))\n assert meta[0].attrib == {'name': 'dtb:uid', 'content': 'unknown'}\n assert meta[1].attrib == {'name': 'dtb:depth', 'content': '1'}\n assert meta[2].attrib == {'name': 'dtb:totalPageCount', 'content': '0'}\n assert meta[3].attrib == {'name': 'dtb:maxPageNumber', 'content': '0'}\n\n # toc.ncx / navMap\n navpoints = toc.findall(\"./ncx:navMap/ncx:navPoint\")\n assert len(navpoints) == 1\n assert navpoints[0].attrib == {'id': 'navPoint1', 'playOrder': '1'}\n assert navpoints[0].find(\"./ncx:content\").attrib == {'src': 'index.xhtml'}\n\n navlabel = navpoints[0].find(\"./ncx:navLabel/ncx:text\")\n assert navlabel.text == 'The basic Sphinx documentation for testing'\n\n # content.opf\n opf = EPUBElementTree.fromstring((app.outdir / 'content.opf').read_text())\n\n # content.opf / metadata\n metadata = opf.find(\"./idpf:metadata\")\n assert metadata.find(\"./dc:language\").text == 'en'\n assert metadata.find(\"./dc:title\").text == 'Python'\n assert metadata.find(\"./dc:description\").text == 'unknown'\n assert metadata.find(\"./dc:creator\").text == 'unknown'\n assert metadata.find(\"./dc:contributor\").text == 'unknown'\n assert metadata.find(\"./dc:publisher\").text == 'unknown'\n assert metadata.find(\"./dc:rights\").text is None\n assert metadata.find(\"./idpf:meta[@property='ibooks:version']\").text is None\n assert metadata.find(\"./idpf:meta[@property='ibooks:specified-fonts']\").text == 'true'\n assert metadata.find(\"./idpf:meta[@property='ibooks:binding']\").text == 'true'\n assert metadata.find(\"./idpf:meta[@property='ibooks:scroll-axis']\").text == 'vertical'\n\n # content.opf / manifest\n manifest = opf.find(\"./idpf:manifest\")\n items = list(manifest)\n assert items[0].attrib == {'id': 'ncx',\n 'href': 'toc.ncx',\n 'media-type': 'application/x-dtbncx+xml'}\n assert items[1].attrib == {'id': 'nav',\n 'href': 'nav.xhtml',\n 'media-type': 'application/xhtml+xml',\n 'properties': 'nav'}\n assert items[2].attrib == {'id': 'epub-0',\n 'href': 'genindex.xhtml',\n 'media-type': 'application/xhtml+xml'}\n assert items[3].attrib == {'id': 'epub-1',\n 'href': 'index.xhtml',\n 'media-type': 'application/xhtml+xml'}\n\n for i, item in enumerate(items[2:]):\n # items are named as epub-NN\n assert item.get('id') == 'epub-%d' % i\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_build_epub._content_opf_spine_test_build_epub.None_38": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_build_epub._content_opf_spine_test_build_epub.None_38", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 131, "end_line": 157, "span_ids": ["test_build_epub"], "tokens": 357}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='basic')\ndef test_build_epub(app):\n\n # content.opf / spine\n spine = opf.find(\"./idpf:spine\")\n itemrefs = list(spine)\n assert spine.get('toc') == 'ncx'\n assert spine.get('page-progression-direction') == 'ltr'\n assert itemrefs[0].get('idref') == 'epub-1'\n assert itemrefs[1].get('idref') == 'epub-0'\n\n # content.opf / guide\n reference = opf.find(\"./idpf:guide/idpf:reference\")\n assert reference.get('type') == 'toc'\n assert reference.get('title') == 'Table of Contents'\n assert reference.get('href') == 'index.xhtml'\n\n # nav.xhtml\n nav = EPUBElementTree.fromstring((app.outdir / 'nav.xhtml').read_text())\n assert nav.attrib == {'lang': 'en',\n '{http://www.w3.org/XML/1998/namespace}lang': 'en'}\n assert nav.find(\"./xhtml:head/xhtml:title\").text == 'Table of Contents'\n\n # nav.xhtml / nav\n navlist = nav.find(\"./xhtml:body/xhtml:nav\")\n toc = navlist.findall(\"./xhtml:ol/xhtml:li\")\n assert navlist.find(\"./xhtml:h1\").text == 'Table of Contents'\n assert len(toc) == 1\n assert toc[0].find(\"./xhtml:a\").get(\"href\") == 'index.xhtml'\n assert toc[0].find(\"./xhtml:a\").text == 'The basic Sphinx documentation for testing'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_cover_test_epub_cover.assert_cover_get_content": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_cover_test_epub_cover.assert_cover_get_content", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 170, "span_ids": ["test_epub_cover"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='footnotes',\n confoverrides={'epub_cover': ('_images/rimg.png', None)})\ndef test_epub_cover(app):\n app.build()\n\n # content.opf / metadata\n opf = EPUBElementTree.fromstring((app.outdir / 'content.opf').read_text())\n cover_image = opf.find(\"./idpf:manifest/idpf:item[@href='%s']\" % app.config.epub_cover[0])\n cover = opf.find(\"./idpf:metadata/idpf:meta[@name='cover']\")\n assert cover\n assert cover.get('content') == cover_image.get('id')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_nested_toc_test_nested_toc.assert_navinfo_grandchild": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_nested_toc_test_nested_toc.assert_navinfo_grandchild", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 173, "end_line": 225, "span_ids": ["test_nested_toc"], "tokens": 700}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='toctree')\ndef test_nested_toc(app):\n app.build()\n\n # toc.ncx\n toc = EPUBElementTree.fromstring((app.outdir / 'toc.ncx').read_bytes())\n assert toc.find(\"./ncx:docTitle/ncx:text\").text == 'Python'\n\n # toc.ncx / navPoint\n def navinfo(elem):\n label = elem.find(\"./ncx:navLabel/ncx:text\")\n content = elem.find(\"./ncx:content\")\n return (elem.get('id'), elem.get('playOrder'),\n content.get('src'), label.text)\n\n navpoints = toc.findall(\"./ncx:navMap/ncx:navPoint\")\n assert len(navpoints) == 4\n assert navinfo(navpoints[0]) == ('navPoint1', '1', 'index.xhtml',\n \"Welcome to Sphinx Tests\u2019s documentation!\")\n assert navpoints[0].findall(\"./ncx:navPoint\") == []\n\n # toc.ncx / nested navPoints\n assert navinfo(navpoints[1]) == ('navPoint2', '2', 'foo.xhtml', 'foo')\n navchildren = navpoints[1].findall(\"./ncx:navPoint\")\n assert len(navchildren) == 4\n assert navinfo(navchildren[0]) == ('navPoint3', '2', 'foo.xhtml', 'foo')\n assert navinfo(navchildren[1]) == ('navPoint4', '3', 'quux.xhtml', 'quux')\n assert navinfo(navchildren[2]) == ('navPoint5', '4', 'foo.xhtml#foo-1', 'foo.1')\n assert navinfo(navchildren[3]) == ('navPoint8', '6', 'foo.xhtml#foo-2', 'foo.2')\n\n # nav.xhtml / nav\n def navinfo(elem):\n anchor = elem.find(\"./xhtml:a\")\n return (anchor.get('href'), anchor.text)\n\n nav = EPUBElementTree.fromstring((app.outdir / 'nav.xhtml').read_bytes())\n toc = nav.findall(\"./xhtml:body/xhtml:nav/xhtml:ol/xhtml:li\")\n assert len(toc) == 4\n assert navinfo(toc[0]) == ('index.xhtml',\n \"Welcome to Sphinx Tests\u2019s documentation!\")\n assert toc[0].findall(\"./xhtml:ol\") == []\n\n # nav.xhtml / nested toc\n assert navinfo(toc[1]) == ('foo.xhtml', 'foo')\n tocchildren = toc[1].findall(\"./xhtml:ol/xhtml:li\")\n assert len(tocchildren) == 3\n assert navinfo(tocchildren[0]) == ('quux.xhtml', 'quux')\n assert navinfo(tocchildren[1]) == ('foo.xhtml#foo-1', 'foo.1')\n assert navinfo(tocchildren[2]) == ('foo.xhtml#foo-2', 'foo.2')\n\n grandchild = tocchildren[1].findall(\"./xhtml:ol/xhtml:li\")\n assert len(grandchild) == 1\n assert navinfo(grandchild[0]) == ('foo.xhtml#foo-1-1', 'foo.1-1')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_escaped_toc_test_escaped_toc.assert_navinfo_grandchild": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_escaped_toc_test_escaped_toc.assert_navinfo_grandchild", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 228, "end_line": 280, "span_ids": ["test_escaped_toc"], "tokens": 711}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='need-escaped')\ndef test_escaped_toc(app):\n app.build()\n\n # toc.ncx\n toc = EPUBElementTree.fromstring((app.outdir / 'toc.ncx').read_bytes())\n assert toc.find(\"./ncx:docTitle/ncx:text\").text == 'need <b>\"escaped\"</b> project'\n\n # toc.ncx / navPoint\n def navinfo(elem):\n label = elem.find(\"./ncx:navLabel/ncx:text\")\n content = elem.find(\"./ncx:content\")\n return (elem.get('id'), elem.get('playOrder'),\n content.get('src'), label.text)\n\n navpoints = toc.findall(\"./ncx:navMap/ncx:navPoint\")\n assert len(navpoints) == 4\n assert navinfo(navpoints[0]) == ('navPoint1', '1', 'index.xhtml',\n \"Welcome to Sphinx Tests's documentation!\")\n assert navpoints[0].findall(\"./ncx:navPoint\") == []\n\n # toc.ncx / nested navPoints\n assert navinfo(navpoints[1]) == ('navPoint2', '2', 'foo.xhtml', '<foo>')\n navchildren = navpoints[1].findall(\"./ncx:navPoint\")\n assert len(navchildren) == 4\n assert navinfo(navchildren[0]) == ('navPoint3', '2', 'foo.xhtml', '<foo>')\n assert navinfo(navchildren[1]) == ('navPoint4', '3', 'quux.xhtml', 'quux')\n assert navinfo(navchildren[2]) == ('navPoint5', '4', 'foo.xhtml#foo-1', 'foo \u201c1\u201d')\n assert navinfo(navchildren[3]) == ('navPoint8', '6', 'foo.xhtml#foo-2', 'foo.2')\n\n # nav.xhtml / nav\n def navinfo(elem):\n anchor = elem.find(\"./xhtml:a\")\n return (anchor.get('href'), anchor.text)\n\n nav = EPUBElementTree.fromstring((app.outdir / 'nav.xhtml').read_bytes())\n toc = nav.findall(\"./xhtml:body/xhtml:nav/xhtml:ol/xhtml:li\")\n assert len(toc) == 4\n assert navinfo(toc[0]) == ('index.xhtml',\n \"Welcome to Sphinx Tests's documentation!\")\n assert toc[0].findall(\"./xhtml:ol\") == []\n\n # nav.xhtml / nested toc\n assert navinfo(toc[1]) == ('foo.xhtml', '<foo>')\n tocchildren = toc[1].findall(\"./xhtml:ol/xhtml:li\")\n assert len(tocchildren) == 3\n assert navinfo(tocchildren[0]) == ('quux.xhtml', 'quux')\n assert navinfo(tocchildren[1]) == ('foo.xhtml#foo-1', 'foo \u201c1\u201d')\n assert navinfo(tocchildren[2]) == ('foo.xhtml#foo-2', 'foo.2')\n\n grandchild = tocchildren[1].findall(\"./xhtml:ol/xhtml:li\")\n assert len(grandchild) == 1\n assert navinfo(grandchild[0]) == ('foo.xhtml#foo-1-1', 'foo.1-1')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_writing_mode_test_epub_writing_mode.assert_writing_mode_ver": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_writing_mode_test_epub_writing_mode.assert_writing_mode_ver", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 283, "end_line": 315, "span_ids": ["test_epub_writing_mode"], "tokens": 353}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='basic')\ndef test_epub_writing_mode(app):\n # horizontal (default)\n app.build()\n\n # horizontal / page-progression-direction\n opf = EPUBElementTree.fromstring((app.outdir / 'content.opf').read_text())\n assert opf.find(\"./idpf:spine\").get('page-progression-direction') == 'ltr'\n\n # horizontal / ibooks:scroll-axis\n metadata = opf.find(\"./idpf:metadata\")\n assert metadata.find(\"./idpf:meta[@property='ibooks:scroll-axis']\").text == 'vertical'\n\n # horizontal / writing-mode (CSS)\n css = (app.outdir / '_static' / 'epub.css').read_text()\n assert 'writing-mode: horizontal-tb;' in css\n\n # vertical\n app.config.epub_writing_mode = 'vertical'\n (app.outdir / 'index.xhtml').unlink() # forcely rebuild\n app.build()\n\n # vertical / page-progression-direction\n opf = EPUBElementTree.fromstring((app.outdir / 'content.opf').read_text())\n assert opf.find(\"./idpf:spine\").get('page-progression-direction') == 'rtl'\n\n # vertical / ibooks:scroll-axis\n metadata = opf.find(\"./idpf:metadata\")\n assert metadata.find(\"./idpf:meta[@property='ibooks:scroll-axis']\").text == 'horizontal'\n\n # vertical / writing-mode (CSS)\n css = (app.outdir / '_static' / 'epub.css').read_text()\n assert 'writing-mode: vertical-rl;' in css", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_anchor_id_test_epub_anchor_id.assert_see_a_class_ref": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_anchor_id_test_epub_anchor_id.assert_see_a_class_ref", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 318, "end_line": 327, "span_ids": ["test_epub_anchor_id"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='epub-anchor-id')\ndef test_epub_anchor_id(app):\n app.build()\n\n html = (app.outdir / 'index.xhtml').read_text()\n assert ('<p id=\"std-setting-STATICFILES_FINDERS\">'\n 'blah blah blah</p>' in html)\n assert ('<span id=\"std-setting-STATICFILES_SECTION\"></span>'\n '<h1>blah blah blah</h1>' in html)\n assert 'see <a class=\"reference internal\" href=\"#std-setting-STATICFILES_FINDERS\">' in html", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_assets_test_epub_assets.assert_link_media_pri": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_assets_test_epub_assets.assert_link_media_pri", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 330, "end_line": 339, "span_ids": ["test_epub_assets"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='html_assets')\ndef test_epub_assets(app):\n app.builder.build_all()\n\n # epub_sytlesheets (same as html_css_files)\n content = (app.outdir / 'index.xhtml').read_text()\n assert ('<link rel=\"stylesheet\" type=\"text/css\" href=\"_static/css/style.css\" />'\n in content)\n assert ('<link media=\"print\" rel=\"stylesheet\" title=\"title\" type=\"text/css\" '\n 'href=\"https://example.com/custom.css\" />' in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_css_files_test_epub_css_files.assert_link_media_pri": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_epub_css_files_test_epub_css_files.assert_link_media_pri", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 332, "end_line": 345, "span_ids": ["test_epub_css_files"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='html_assets',\n confoverrides={'epub_css_files': ['css/epub.css']})\ndef test_epub_css_files(app):\n app.builder.build_all()\n\n # epub_css_files\n content = (app.outdir / 'index.xhtml').read_text()\n assert '<link rel=\"stylesheet\" type=\"text/css\" href=\"_static/css/epub.css\" />' in content\n\n # files in html_css_files are not outputted\n assert ('<link rel=\"stylesheet\" type=\"text/css\" href=\"_static/css/style.css\" />'\n not in content)\n assert ('<link media=\"print\" rel=\"stylesheet\" title=\"title\" type=\"text/css\" '\n 'href=\"https://example.com/custom.css\" />' not in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_html_download_role_test_html_download_role.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_html_download_role_test_html_download_role.None_3", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 348, "end_line": 361, "span_ids": ["test_html_download_role"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='roles-download')\ndef test_html_download_role(app, status, warning):\n app.build()\n assert not (app.outdir / '_downloads' / 'dummy.dat').exists()\n\n content = (app.outdir / 'index.xhtml').read_text()\n assert ('<li><p><code class=\"xref download docutils literal notranslate\">'\n '<span class=\"pre\">dummy.dat</span></code></p></li>' in content)\n assert ('<li><p><code class=\"xref download docutils literal notranslate\">'\n '<span class=\"pre\">not_found.dat</span></code></p></li>' in content)\n assert ('<li><p><code class=\"xref download docutils literal notranslate\">'\n '<span class=\"pre\">Sphinx</span> <span class=\"pre\">logo</span></code>'\n '<span class=\"link-target\"> [http://www.sphinx-doc.org/en/master'\n '/_static/sphinxheader.png]</span></p></li>' in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_duplicated_toctree_entry_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py_test_duplicated_toctree_entry_", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 376, "end_line": 397, "span_ids": ["test_run_epubcheck", "test_duplicated_toctree_entry"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='toctree-duplicated')\ndef test_duplicated_toctree_entry(app, status, warning):\n app.build()\n assert 'WARNING: duplicated ToC entry found: foo.xhtml' in warning.getvalue()\n\n\n@pytest.mark.skipif('DO_EPUBCHECK' not in os.environ,\n reason='Skipped because DO_EPUBCHECK is not set')\n@pytest.mark.sphinx('epub')\ndef test_run_epubcheck(app):\n app.build()\n\n epubcheck = os.environ.get('EPUBCHECK_PATH', '/usr/share/java/epubcheck.jar')\n if runnable(['java', '-version']) and os.path.exists(epubcheck):\n try:\n subprocess.run(['java', '-jar', epubcheck, app.outdir / 'SphinxTests.epub'],\n stdout=PIPE, stderr=PIPE, check=True)\n except CalledProcessError as exc:\n print(exc.stdout.decode('utf-8'))\n print(exc.stderr.decode('utf-8'))\n assert False, 'epubcheck exited with return code %s' % exc.returncode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_msgfmt_test_msgfmt.assert___Testing_various": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_msgfmt_test_msgfmt.assert___Testing_various", "embedding": null, "metadata": {"file_path": "tests/test_build_gettext.py", "file_name": "test_build_gettext.py", "file_type": "text/x-python", "category": "test", "start_line": 38, "end_line": 69, "span_ids": ["test_msgfmt"], "tokens": 339}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('gettext', srcdir='root-gettext')\ndef test_msgfmt(app):\n app.builder.build_all()\n (app.outdir / 'en' / 'LC_MESSAGES').makedirs()\n with cd(app.outdir):\n try:\n args = ['msginit', '--no-translator', '-i', 'markup.pot', '--locale', 'en_US']\n subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True)\n except OSError:\n pytest.skip() # most likely msginit was not found\n except CalledProcessError as exc:\n print(exc.stdout)\n print(exc.stderr)\n assert False, 'msginit exited with return code %s' % exc.returncode\n\n assert (app.outdir / 'en_US.po').isfile(), 'msginit failed'\n try:\n args = ['msgfmt', 'en_US.po',\n '-o', os.path.join('en', 'LC_MESSAGES', 'test_root.mo')]\n subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True)\n except OSError:\n pytest.skip() # most likely msgfmt was not found\n except CalledProcessError as exc:\n print(exc.stdout)\n print(exc.stderr)\n assert False, 'msgfmt exited with return code %s' % exc.returncode\n\n mo = app.outdir / 'en' / 'LC_MESSAGES' / 'test_root.mo'\n assert mo.isfile(), 'msgfmt failed'\n\n _ = gettext.translation('test_root', app.outdir, languages=['en']).gettext\n assert _(\"Testing various markup\") == \"Testing various markup\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_gettext_index_entries_test_gettext_index_entries.assert_msgids_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_gettext_index_entries_test_gettext_index_entries.assert_msgids_", "embedding": null, "metadata": {"file_path": "tests/test_build_gettext.py", "file_name": "test_build_gettext.py", "file_type": "text/x-python", "category": "test", "start_line": 72, "end_line": 117, "span_ids": ["test_gettext_index_entries"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'gettext', testroot='intl', srcdir='gettext',\n confoverrides={'gettext_compact': False})\ndef test_gettext_index_entries(app):\n # regression test for #976\n app.builder.build(['index_entries'])\n\n _msgid_getter = re.compile(r'msgid \"(.*)\"').search\n\n def msgid_getter(msgid):\n m = _msgid_getter(msgid)\n if m:\n return m.groups()[0]\n return None\n\n pot = (app.outdir / 'index_entries.pot').read_text()\n msgids = [_f for _f in map(msgid_getter, pot.splitlines()) if _f]\n\n expected_msgids = [\n \"i18n with index entries\",\n \"index target section\",\n \"this is :index:`Newsletter` target paragraph.\",\n \"various index entries\",\n \"That's all.\",\n \"Mailing List\",\n \"Newsletter\",\n \"Recipients List\",\n \"First\",\n \"Second\",\n \"Third\",\n \"Entry\",\n \"See\",\n \"Module\",\n \"Keyword\",\n \"Operator\",\n \"Object\",\n \"Exception\",\n \"Statement\",\n \"Builtin\",\n ]\n for expect in expected_msgids:\n assert expect in msgids\n msgids.remove(expect)\n\n # unexpected msgid existent\n assert msgids == []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_gettext_disable_index_entries_test_gettext_disable_index_entries.assert_msgids_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_gettext_disable_index_entries_test_gettext_disable_index_entries.assert_msgids_", "embedding": null, "metadata": {"file_path": "tests/test_build_gettext.py", "file_name": "test_build_gettext.py", "file_type": "text/x-python", "category": "test", "start_line": 120, "end_line": 151, "span_ids": ["test_gettext_disable_index_entries"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'gettext', testroot='intl', srcdir='gettext',\n confoverrides={'gettext_compact': False,\n 'gettext_additional_targets': []})\ndef test_gettext_disable_index_entries(app):\n # regression test for #976\n app.builder.build(['index_entries'])\n\n _msgid_getter = re.compile(r'msgid \"(.*)\"').search\n\n def msgid_getter(msgid):\n m = _msgid_getter(msgid)\n if m:\n return m.groups()[0]\n return None\n\n pot = (app.outdir / 'index_entries.pot').read_text()\n msgids = [_f for _f in map(msgid_getter, pot.splitlines()) if _f]\n\n expected_msgids = [\n \"i18n with index entries\",\n \"index target section\",\n \"this is :index:`Newsletter` target paragraph.\",\n \"various index entries\",\n \"That's all.\",\n ]\n for expect in expected_msgids:\n assert expect in msgids\n msgids.remove(expect)\n\n # unexpected msgid existent\n assert msgids == []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_download_role_test_html_translator.assert_app_builder_docwri": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_download_role_test_html_translator.assert_app_builder_docwri", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 506, "end_line": 537, "span_ids": ["test_html_translator", "test_html_download_role"], "tokens": 428}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='roles-download')\ndef test_html_download_role(app, status, warning):\n app.build()\n digest = md5(b'dummy.dat').hexdigest()\n assert (app.outdir / '_downloads' / digest / 'dummy.dat').exists()\n digest_another = md5(b'another/dummy.dat').hexdigest()\n assert (app.outdir / '_downloads' / digest_another / 'dummy.dat').exists()\n\n content = (app.outdir / 'index.html').read_text()\n assert (('<li><p><a class=\"reference download internal\" download=\"\" '\n 'href=\"_downloads/%s/dummy.dat\">'\n '<code class=\"xref download docutils literal notranslate\">'\n '<span class=\"pre\">dummy.dat</span></code></a></p></li>' % digest)\n in content)\n assert (('<li><p><a class=\"reference download internal\" download=\"\" '\n 'href=\"_downloads/%s/dummy.dat\">'\n '<code class=\"xref download docutils literal notranslate\">'\n '<span class=\"pre\">another/dummy.dat</span></code></a></p></li>' %\n digest_another) in content)\n assert ('<li><p><code class=\"xref download docutils literal notranslate\">'\n '<span class=\"pre\">not_found.dat</span></code></p></li>' in content)\n assert ('<li><p><a class=\"reference download external\" download=\"\" '\n 'href=\"http://www.sphinx-doc.org/en/master/_static/sphinxheader.png\">'\n '<code class=\"xref download docutils literal notranslate\">'\n '<span class=\"pre\">Sphinx</span> <span class=\"pre\">logo</span>'\n '</code></a></p></li>' in content)\n\n\n@pytest.mark.sphinx('html', testroot='build-html-translator')\ndef test_html_translator(app):\n app.build()\n assert app.builder.docwriter.visitor.depart_with_node == 10", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_tocdepth_test_tocdepth.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_tocdepth_test_tocdepth.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 540, "end_line": 589, "span_ids": ["test_tocdepth"], "tokens": 811}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (\".//li[@class='toctree-l3']/a\", '1.1.1. Foo A1', True),\n (\".//li[@class='toctree-l3']/a\", '1.2.1. Foo B1', True),\n (\".//li[@class='toctree-l3']/a\", '2.1.1. Bar A1', False),\n (\".//li[@class='toctree-l3']/a\", '2.2.1. Bar B1', False),\n ],\n 'foo.html': [\n (\".//h1\", 'Foo', True),\n (\".//h2\", 'Foo A', True),\n (\".//h3\", 'Foo A1', True),\n (\".//h2\", 'Foo B', True),\n (\".//h3\", 'Foo B1', True),\n\n (\".//h1//span[@class='section-number']\", '1. ', True),\n (\".//h2//span[@class='section-number']\", '1.1. ', True),\n (\".//h3//span[@class='section-number']\", '1.1.1. ', True),\n (\".//h2//span[@class='section-number']\", '1.2. ', True),\n (\".//h3//span[@class='section-number']\", '1.2.1. ', True),\n\n (\".//div[@class='sphinxsidebarwrapper']//li/a\", '1.1. Foo A', True),\n (\".//div[@class='sphinxsidebarwrapper']//li/a\", '1.1.1. Foo A1', True),\n (\".//div[@class='sphinxsidebarwrapper']//li/a\", '1.2. Foo B', True),\n (\".//div[@class='sphinxsidebarwrapper']//li/a\", '1.2.1. Foo B1', True),\n ],\n 'bar.html': [\n (\".//h1\", 'Bar', True),\n (\".//h2\", 'Bar A', True),\n (\".//h2\", 'Bar B', True),\n (\".//h3\", 'Bar B1', True),\n (\".//h1//span[@class='section-number']\", '2. ', True),\n (\".//h2//span[@class='section-number']\", '2.1. ', True),\n (\".//h2//span[@class='section-number']\", '2.2. ', True),\n (\".//h3//span[@class='section-number']\", '2.2.1. ', True),\n (\".//div[@class='sphinxsidebarwrapper']//li/a\", '2. Bar', True),\n (\".//div[@class='sphinxsidebarwrapper']//li/a\", '2.1. Bar A', True),\n (\".//div[@class='sphinxsidebarwrapper']//li/a\", '2.2. Bar B', True),\n (\".//div[@class='sphinxsidebarwrapper']//li/a\", '2.2.1. Bar B1', False),\n ],\n 'baz.html': [\n (\".//h1\", 'Baz A', True),\n (\".//h1//span[@class='section-number']\", '2.1.1. ', True),\n ],\n}))\n@pytest.mark.sphinx('html', testroot='tocdepth')\n@pytest.mark.test_params(shared_result='test_build_html_tocdepth')\ndef test_tocdepth(app, cached_etree_parse, fname, expect):\n app.build()\n # issue #1251\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_tocdepth_singlehtml_test_tocdepth_singlehtml.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_tocdepth_singlehtml_test_tocdepth_singlehtml.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 592, "end_line": 633, "span_ids": ["test_tocdepth_singlehtml"], "tokens": 600}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (\".//li[@class='toctree-l3']/a\", '1.1.1. Foo A1', True),\n (\".//li[@class='toctree-l3']/a\", '1.2.1. Foo B1', True),\n (\".//li[@class='toctree-l3']/a\", '2.1.1. Bar A1', False),\n (\".//li[@class='toctree-l3']/a\", '2.2.1. Bar B1', False),\n\n # index.rst\n (\".//h1\", 'test-tocdepth', True),\n\n # foo.rst\n (\".//h2\", 'Foo', True),\n (\".//h3\", 'Foo A', True),\n (\".//h4\", 'Foo A1', True),\n (\".//h3\", 'Foo B', True),\n (\".//h4\", 'Foo B1', True),\n (\".//h2//span[@class='section-number']\", '1. ', True),\n (\".//h3//span[@class='section-number']\", '1.1. ', True),\n (\".//h4//span[@class='section-number']\", '1.1.1. ', True),\n (\".//h3//span[@class='section-number']\", '1.2. ', True),\n (\".//h4//span[@class='section-number']\", '1.2.1. ', True),\n\n # bar.rst\n (\".//h2\", 'Bar', True),\n (\".//h3\", 'Bar A', True),\n (\".//h3\", 'Bar B', True),\n (\".//h4\", 'Bar B1', True),\n (\".//h2//span[@class='section-number']\", '2. ', True),\n (\".//h3//span[@class='section-number']\", '2.1. ', True),\n (\".//h3//span[@class='section-number']\", '2.2. ', True),\n (\".//h4//span[@class='section-number']\", '2.2.1. ', True),\n\n # baz.rst\n (\".//h4\", 'Baz A', True),\n (\".//h4//span[@class='section-number']\", '2.1.1. ', True),\n ],\n}))\n@pytest.mark.sphinx('singlehtml', testroot='tocdepth')\n@pytest.mark.test_params(shared_result='test_build_html_tocdepth')\ndef test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect):\n app.build()\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_disabled_warn_test_numfig_disabled_warn.assert_index_rst_57_WAR": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_disabled_warn_test_numfig_disabled_warn.assert_index_rst_57_WAR", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 583, "end_line": 590, "span_ids": ["test_numfig_disabled_warn"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='numfig')\n@pytest.mark.test_params(shared_result='test_build_html_numfig')\ndef test_numfig_disabled_warn(app, warning):\n app.build()\n warnings = warning.getvalue()\n assert 'index.rst:47: WARNING: numfig is disabled. :numref: is ignored.' in warnings\n assert 'index.rst:56: WARNING: invalid numfig_format: invalid' not in warnings\n assert 'index.rst:57: WARNING: invalid numfig_format: Fig %s %s' not in warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_disabled_test_numfig_disabled.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_disabled_test_numfig_disabled.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 646, "end_line": 686, "span_ids": ["test_numfig_disabled"], "tokens": 524}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", None, True),\n (\".//table/caption/span[@class='caption-number']\", None, True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", None, True),\n (\".//li/p/code/span\", '^fig1$', True),\n (\".//li/p/code/span\", '^Figure%s$', True),\n (\".//li/p/code/span\", '^table-1$', True),\n (\".//li/p/code/span\", '^Table:%s$', True),\n (\".//li/p/code/span\", '^CODE_1$', True),\n (\".//li/p/code/span\", '^Code-%s$', True),\n (\".//li/p/a/span\", '^Section 1$', True),\n (\".//li/p/a/span\", '^Section 2.1$', True),\n (\".//li/p/code/span\", '^Fig.{number}$', True),\n (\".//li/p/a/span\", '^Sect.1 Foo$', True),\n ],\n 'foo.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", None, True),\n (\".//table/caption/span[@class='caption-number']\", None, True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", None, True),\n ],\n 'bar.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", None, True),\n (\".//table/caption/span[@class='caption-number']\", None, True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", None, True),\n ],\n 'baz.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", None, True),\n (\".//table/caption/span[@class='caption-number']\", None, True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", None, True),\n ],\n}))\n@pytest.mark.sphinx('html', testroot='numfig')\n@pytest.mark.test_params(shared_result='test_build_html_numfig')\ndef test_numfig_disabled(app, cached_etree_parse, fname, expect):\n app.build()\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_without_numbered_toctree_warn_test_numfig_without_numbered_toctree_warn.assert_index_rst_57_WAR": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_without_numbered_toctree_warn_test_numfig_without_numbered_toctree_warn.assert_index_rst_57_WAR", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 649, "end_line": 665, "span_ids": ["test_numfig_without_numbered_toctree_warn"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'html', testroot='numfig',\n srcdir='test_numfig_without_numbered_toctree_warn',\n confoverrides={'numfig': True})\ndef test_numfig_without_numbered_toctree_warn(app, warning):\n app.build()\n # remove :numbered: option\n index = (app.srcdir / 'index.rst').read_text()\n index = re.sub(':numbered:.*', '', index)\n (app.srcdir / 'index.rst').write_text(index)\n app.builder.build_all()\n\n warnings = warning.getvalue()\n assert 'index.rst:47: WARNING: numfig is disabled. :numref: is ignored.' not in warnings\n assert 'index.rst:55: WARNING: Failed to create a cross reference. Any number is not assigned: index' in warnings\n assert 'index.rst:56: WARNING: invalid numfig_format: invalid' in warnings\n assert 'index.rst:57: WARNING: invalid numfig_format: Fig %s %s' in warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_without_numbered_toctree_test_numfig_without_numbered_toctree.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_without_numbered_toctree_test_numfig_without_numbered_toctree.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 708, "end_line": 790, "span_ids": ["test_numfig_without_numbered_toctree"], "tokens": 1134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 9 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 10 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 9 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 10 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 9 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 10 $', True),\n (\".//li/p/a/span\", '^Fig. 9$', True),\n (\".//li/p/a/span\", '^Figure6$', True),\n (\".//li/p/a/span\", '^Table 9$', True),\n (\".//li/p/a/span\", '^Table:6$', True),\n (\".//li/p/a/span\", '^Listing 9$', True),\n (\".//li/p/a/span\", '^Code-6$', True),\n (\".//li/p/code/span\", '^foo$', True),\n (\".//li/p/code/span\", '^bar_a$', True),\n (\".//li/p/a/span\", '^Fig.9 should be Fig.1$', True),\n (\".//li/p/code/span\", '^Sect.{number}$', True),\n ],\n 'foo.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 3 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 4 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 3 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 4 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 3 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 4 $', True),\n ],\n 'bar.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 5 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 7 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 8 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 5 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 7 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 8 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 5 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 7 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 8 $', True),\n ],\n 'baz.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 6 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 6 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 6 $', True),\n ],\n}))\n@pytest.mark.sphinx(\n 'html', testroot='numfig',\n srcdir='test_numfig_without_numbered_toctree',\n confoverrides={'numfig': True})\ndef test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect):\n # remove :numbered: option\n index = (app.srcdir / 'index.rst').read_text()\n index = re.sub(':numbered:.*', '', index)\n (app.srcdir / 'index.rst').write_text(index)\n\n if not app.outdir.listdir():\n app.build()\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_numbered_toctree_warn_test_numfig_with_numbered_toctree_warn.assert_index_rst_57_WAR": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_numbered_toctree_warn_test_numfig_with_numbered_toctree_warn.assert_index_rst_57_WAR", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 765, "end_line": 773, "span_ids": ["test_numfig_with_numbered_toctree_warn"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True})\n@pytest.mark.test_params(shared_result='test_build_html_numfig_on')\ndef test_numfig_with_numbered_toctree_warn(app, warning):\n app.build()\n warnings = warning.getvalue()\n assert 'index.rst:47: WARNING: numfig is disabled. :numref: is ignored.' not in warnings\n assert 'index.rst:55: WARNING: Failed to create a cross reference. Any number is not assigned: index' in warnings\n assert 'index.rst:56: WARNING: invalid numfig_format: invalid' in warnings\n assert 'index.rst:57: WARNING: invalid numfig_format: Fig %s %s' in warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_numbered_toctree_test_numfig_with_numbered_toctree.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_numbered_toctree_test_numfig_with_numbered_toctree.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 804, "end_line": 878, "span_ids": ["test_numfig_with_numbered_toctree"], "tokens": 1128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2 $', True),\n (\".//li/p/a/span\", '^Fig. 1$', True),\n (\".//li/p/a/span\", '^Figure2.2$', True),\n (\".//li/p/a/span\", '^Table 1$', True),\n (\".//li/p/a/span\", '^Table:2.2$', True),\n (\".//li/p/a/span\", '^Listing 1$', True),\n (\".//li/p/a/span\", '^Code-2.2$', True),\n (\".//li/p/a/span\", '^Section.1$', True),\n (\".//li/p/a/span\", '^Section.2.1$', True),\n (\".//li/p/a/span\", '^Fig.1 should be Fig.1$', True),\n (\".//li/p/a/span\", '^Sect.1 Foo$', True),\n ],\n 'foo.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.2 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.3 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.4 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.3 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.4 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.3 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.4 $', True),\n ],\n 'bar.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.3 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.4 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.3 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.4 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.3 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.4 $', True),\n ],\n 'baz.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.2 $', True),\n ],\n}))\n@pytest.mark.sphinx('html', testroot='numfig', confoverrides={'numfig': True})\n@pytest.mark.test_params(shared_result='test_build_html_numfig_on')\ndef test_numfig_with_numbered_toctree(app, cached_etree_parse, fname, expect):\n app.build()\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_prefix_warn_test_numfig_with_prefix_warn.assert_index_rst_57_WAR": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_prefix_warn_test_numfig_with_prefix_warn.assert_index_rst_57_WAR", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 865, "end_line": 878, "span_ids": ["test_numfig_with_prefix_warn"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='numfig', confoverrides={\n 'numfig': True,\n 'numfig_format': {'figure': 'Figure:%s',\n 'table': 'Tab_%s',\n 'code-block': 'Code-%s',\n 'section': 'SECTION-%s'}})\n@pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn')\ndef test_numfig_with_prefix_warn(app, warning):\n app.build()\n warnings = warning.getvalue()\n assert 'index.rst:47: WARNING: numfig is disabled. :numref: is ignored.' not in warnings\n assert 'index.rst:55: WARNING: Failed to create a cross reference. Any number is not assigned: index' in warnings\n assert 'index.rst:56: WARNING: invalid numfig_format: invalid' in warnings\n assert 'index.rst:57: WARNING: invalid numfig_format: Fig %s %s' in warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_prefix_test_numfig_with_prefix.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_prefix_test_numfig_with_prefix.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 897, "end_line": 976, "span_ids": ["test_numfig_with_prefix"], "tokens": 1158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Figure:1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Figure:2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Tab_1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Tab_2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Code-1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Code-2 $', True),\n (\".//li/p/a/span\", '^Figure:1$', True),\n (\".//li/p/a/span\", '^Figure2.2$', True),\n (\".//li/p/a/span\", '^Tab_1$', True),\n (\".//li/p/a/span\", '^Table:2.2$', True),\n (\".//li/p/a/span\", '^Code-1$', True),\n (\".//li/p/a/span\", '^Code-2.2$', True),\n (\".//li/p/a/span\", '^SECTION-1$', True),\n (\".//li/p/a/span\", '^SECTION-2.1$', True),\n (\".//li/p/a/span\", '^Fig.1 should be Fig.1$', True),\n (\".//li/p/a/span\", '^Sect.1 Foo$', True),\n ],\n 'foo.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Figure:1.1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Figure:1.2 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Figure:1.3 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Figure:1.4 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Tab_1.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Tab_1.2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Tab_1.3 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Tab_1.4 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Code-1.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Code-1.2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Code-1.3 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Code-1.4 $', True),\n ],\n 'bar.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Figure:2.1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Figure:2.3 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Figure:2.4 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Tab_2.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Tab_2.3 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Tab_2.4 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Code-2.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Code-2.3 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Code-2.4 $', True),\n ],\n 'baz.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Figure:2.2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Tab_2.2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Code-2.2 $', True),\n ],\n}))\n@pytest.mark.sphinx('html', testroot='numfig',\n confoverrides={'numfig': True,\n 'numfig_format': {'figure': 'Figure:%s',\n 'table': 'Tab_%s',\n 'code-block': 'Code-%s',\n 'section': 'SECTION-%s'}})\n@pytest.mark.test_params(shared_result='test_build_html_numfig_format_warn')\ndef test_numfig_with_prefix(app, cached_etree_parse, fname, expect):\n app.build()\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_secnum_depth_warn_test_numfig_with_secnum_depth_warn.assert_index_rst_57_WAR": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_secnum_depth_warn_test_numfig_with_secnum_depth_warn.assert_index_rst_57_WAR", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 975, "end_line": 984, "span_ids": ["test_numfig_with_secnum_depth_warn"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='numfig',\n confoverrides={'numfig': True, 'numfig_secnum_depth': 2})\n@pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2')\ndef test_numfig_with_secnum_depth_warn(app, warning):\n app.build()\n warnings = warning.getvalue()\n assert 'index.rst:47: WARNING: numfig is disabled. :numref: is ignored.' not in warnings\n assert 'index.rst:55: WARNING: Failed to create a cross reference. Any number is not assigned: index' in warnings\n assert 'index.rst:56: WARNING: invalid numfig_format: invalid' in warnings\n assert 'index.rst:57: WARNING: invalid numfig_format: Fig %s %s' in warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_secnum_depth_test_numfig_with_secnum_depth.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_secnum_depth_test_numfig_with_secnum_depth.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 991, "end_line": 1067, "span_ids": ["test_numfig_with_secnum_depth"], "tokens": 1188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2 $', True),\n (\".//li/p/a/span\", '^Fig. 1$', True),\n (\".//li/p/a/span\", '^Figure2.1.2$', True),\n (\".//li/p/a/span\", '^Table 1$', True),\n (\".//li/p/a/span\", '^Table:2.1.2$', True),\n (\".//li/p/a/span\", '^Listing 1$', True),\n (\".//li/p/a/span\", '^Code-2.1.2$', True),\n (\".//li/p/a/span\", '^Section.1$', True),\n (\".//li/p/a/span\", '^Section.2.1$', True),\n (\".//li/p/a/span\", '^Fig.1 should be Fig.1$', True),\n (\".//li/p/a/span\", '^Sect.1 Foo$', True),\n ],\n 'foo.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.1.1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.1.2 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.2.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.1.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.1.2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.2.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.1.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.1.2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.2.1 $', True),\n ],\n 'bar.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.1.1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.1.3 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.2.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.1.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.1.3 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.2.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.1.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.1.3 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.2.1 $', True),\n ],\n 'baz.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.1.2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.1.2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.1.2 $', True),\n ],\n}))\n@pytest.mark.sphinx('html', testroot='numfig',\n confoverrides={'numfig': True,\n 'numfig_secnum_depth': 2})\n@pytest.mark.test_params(shared_result='test_build_html_numfig_depth_2')\ndef test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect):\n app.build()\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_singlehtml_test_numfig_with_singlehtml.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_numfig_with_singlehtml_test_numfig_with_singlehtml.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1070, "end_line": 1138, "span_ids": ["test_numfig_with_singlehtml"], "tokens": 1102}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2 $', True),\n (\".//li/p/a/span\", '^Fig. 1$', True),\n (\".//li/p/a/span\", '^Figure2.2$', True),\n (\".//li/p/a/span\", '^Table 1$', True),\n (\".//li/p/a/span\", '^Table:2.2$', True),\n (\".//li/p/a/span\", '^Listing 1$', True),\n (\".//li/p/a/span\", '^Code-2.2$', True),\n (\".//li/p/a/span\", '^Section.1$', True),\n (\".//li/p/a/span\", '^Section.2.1$', True),\n (\".//li/p/a/span\", '^Fig.1 should be Fig.1$', True),\n (\".//li/p/a/span\", '^Sect.1 Foo$', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.2 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.3 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 1.4 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.3 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 1.4 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.3 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 1.4 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.1 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.3 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.4 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.1 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.3 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.4 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.1 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.3 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.4 $', True),\n (FIGURE_CAPTION + \"/span[@class='caption-number']\", '^Fig. 2.2 $', True),\n (\".//table/caption/span[@class='caption-number']\",\n '^Table 2.2 $', True),\n (\".//div[@class='code-block-caption']/\"\n \"span[@class='caption-number']\", '^Listing 2.2 $', True),\n ],\n}))\n@pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={'numfig': True})\n@pytest.mark.test_params(shared_result='test_build_html_numfig_on')\ndef test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect):\n app.build()\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_enumerable_node_test_enumerable_node.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_enumerable_node_test_enumerable_node.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1141, "end_line": 1159, "span_ids": ["test_enumerable_node"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (FIGURE_CAPTION + \"//span[@class='caption-number']\", \"Fig. 1\", True),\n (FIGURE_CAPTION + \"//span[@class='caption-number']\", \"Fig. 2\", True),\n (FIGURE_CAPTION + \"//span[@class='caption-number']\", \"Fig. 3\", True),\n (\".//div//span[@class='caption-number']\", \"No.1 \", True),\n (\".//div//span[@class='caption-number']\", \"No.2 \", True),\n (\".//li/p/a/span\", 'Fig. 1', True),\n (\".//li/p/a/span\", 'Fig. 2', True),\n (\".//li/p/a/span\", 'Fig. 3', True),\n (\".//li/p/a/span\", 'No.1', True),\n (\".//li/p/a/span\", 'No.2', True),\n ],\n}))\n@pytest.mark.sphinx('html', testroot='add_enumerable_node',\n srcdir='test_enumerable_node')\ndef test_enumerable_node(app, cached_etree_parse, fname, expect):\n app.build()\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_assets_test_html_assets.assert_script_async_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_assets_test_html_assets.assert_script_async_a", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1180, "end_line": 1221, "span_ids": ["test_html_assets"], "tokens": 575}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='html_assets')\ndef test_html_assets(app):\n app.builder.build_all()\n\n # exclude_path and its family\n assert not (app.outdir / 'static' / 'index.html').exists()\n assert not (app.outdir / 'extra' / 'index.html').exists()\n\n # html_static_path\n assert not (app.outdir / '_static' / '.htaccess').exists()\n assert not (app.outdir / '_static' / '.htpasswd').exists()\n assert (app.outdir / '_static' / 'API.html').exists()\n assert (app.outdir / '_static' / 'API.html').read_text() == 'Sphinx-1.4.4'\n assert (app.outdir / '_static' / 'css' / 'style.css').exists()\n assert (app.outdir / '_static' / 'js' / 'custom.js').exists()\n assert (app.outdir / '_static' / 'rimg.png').exists()\n assert not (app.outdir / '_static' / '_build' / 'index.html').exists()\n assert (app.outdir / '_static' / 'background.png').exists()\n assert not (app.outdir / '_static' / 'subdir' / '.htaccess').exists()\n assert not (app.outdir / '_static' / 'subdir' / '.htpasswd').exists()\n\n # html_extra_path\n assert (app.outdir / '.htaccess').exists()\n assert not (app.outdir / '.htpasswd').exists()\n assert (app.outdir / 'API.html_t').exists()\n assert (app.outdir / 'css/style.css').exists()\n assert (app.outdir / 'rimg.png').exists()\n assert not (app.outdir / '_build' / 'index.html').exists()\n assert (app.outdir / 'background.png').exists()\n assert (app.outdir / 'subdir' / '.htaccess').exists()\n assert not (app.outdir / 'subdir' / '.htpasswd').exists()\n\n # html_css_files\n content = (app.outdir / 'index.html').read_text()\n assert '<link rel=\"stylesheet\" type=\"text/css\" href=\"_static/css/style.css\" />' in content\n assert ('<link media=\"print\" rel=\"stylesheet\" title=\"title\" type=\"text/css\" '\n 'href=\"https://example.com/custom.css\" />' in content)\n\n # html_js_files\n assert '<script src=\"_static/js/custom.js\"></script>' in content\n assert ('<script async=\"async\" src=\"https://example.com/script.js\">'\n '</script>' in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_copy_source_test_html_entity.for_entity_in_re_findall_.assert_entity_not_in_vali": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_copy_source_test_html_entity.for_entity_in_re_findall_.assert_entity_not_in_vali", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1224, "end_line": 1254, "span_ids": ["test_html_sourcelink_suffix_empty", "test_html_entity", "test_html_copy_source", "test_html_sourcelink_suffix_same", "test_html_sourcelink_suffix"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_copy_source': False})\ndef test_html_copy_source(app):\n app.builder.build_all()\n assert not (app.outdir / '_sources' / 'index.rst.txt').exists()\n\n\n@pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_sourcelink_suffix': '.txt'})\ndef test_html_sourcelink_suffix(app):\n app.builder.build_all()\n assert (app.outdir / '_sources' / 'index.rst.txt').exists()\n\n\n@pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_sourcelink_suffix': '.rst'})\ndef test_html_sourcelink_suffix_same(app):\n app.builder.build_all()\n assert (app.outdir / '_sources' / 'index.rst').exists()\n\n\n@pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_sourcelink_suffix': ''})\ndef test_html_sourcelink_suffix_empty(app):\n app.builder.build_all()\n assert (app.outdir / '_sources' / 'index.rst').exists()\n\n\n@pytest.mark.sphinx('html', testroot='html_entity')\ndef test_html_entity(app):\n app.builder.build_all()\n valid_entities = {'amp', 'lt', 'gt', 'quot', 'apos'}\n content = (app.outdir / 'index.html').read_text()\n for entity in re.findall(r'&([a-z]+);', content, re.M):\n assert entity not in valid_entities", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_inventory_test_html_inventory.assert_invdata_std_doc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_inventory_test_html_inventory.assert_invdata_std_doc_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1257, "end_line": 1288, "span_ids": ["test_html_inventory"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='basic')\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_html_inventory(app):\n app.builder.build_all()\n with open(app.outdir / 'objects.inv', 'rb') as f:\n invdata = InventoryFile.load(f, 'https://www.google.com', os.path.join)\n assert set(invdata.keys()) == {'std:label', 'std:doc'}\n assert set(invdata['std:label'].keys()) == {'modindex',\n 'py-modindex',\n 'genindex',\n 'search'}\n assert invdata['std:label']['modindex'] == ('Python',\n '',\n 'https://www.google.com/py-modindex.html',\n 'Module Index')\n assert invdata['std:label']['py-modindex'] == ('Python',\n '',\n 'https://www.google.com/py-modindex.html',\n 'Python Module Index')\n assert invdata['std:label']['genindex'] == ('Python',\n '',\n 'https://www.google.com/genindex.html',\n 'Index')\n assert invdata['std:label']['search'] == ('Python',\n '',\n 'https://www.google.com/search.html',\n 'Search Page')\n assert set(invdata['std:doc'].keys()) == {'index'}\n assert invdata['std:doc']['index'] == ('Python',\n '',\n 'https://www.google.com/index.html',\n 'The basic Sphinx documentation for testing')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_raw_directive_test_html_raw_directive.assert_p_LaTeX_abc_gh": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_raw_directive_test_html_raw_directive.assert_p_LaTeX_abc_gh", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1300, "end_line": 1311, "span_ids": ["test_html_raw_directive"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='directives-raw')\ndef test_html_raw_directive(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'index.html').read_text()\n\n # standard case\n assert 'standalone raw directive (HTML)' in result\n assert 'standalone raw directive (LaTeX)' not in result\n\n # with substitution\n assert '<p>HTML: abc def ghi</p>' in result\n assert '<p>LaTeX: abc ghi</p>' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_alternate_stylesheets_test_alternate_stylesheets.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_alternate_stylesheets_test_alternate_stylesheets.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1314, "end_line": 1341, "span_ids": ["test_alternate_stylesheets"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (\".//link[@href='_static/persistent.css']\"\n \"[@rel='stylesheet']\", '', True),\n (\".//link[@href='_static/default.css']\"\n \"[@rel='stylesheet']\"\n \"[@title='Default']\", '', True),\n (\".//link[@href='_static/alternate1.css']\"\n \"[@rel='alternate stylesheet']\"\n \"[@title='Alternate']\", '', True),\n (\".//link[@href='_static/alternate2.css']\"\n \"[@rel='alternate stylesheet']\", '', True),\n (\".//link[@href='_static/more_persistent.css']\"\n \"[@rel='stylesheet']\", '', True),\n (\".//link[@href='_static/more_default.css']\"\n \"[@rel='stylesheet']\"\n \"[@title='Default']\", '', True),\n (\".//link[@href='_static/more_alternate1.css']\"\n \"[@rel='alternate stylesheet']\"\n \"[@title='Alternate']\", '', True),\n (\".//link[@href='_static/more_alternate2.css']\"\n \"[@rel='alternate stylesheet']\", '', True),\n ],\n}))\n@pytest.mark.sphinx('html', testroot='stylesheets')\ndef test_alternate_stylesheets(app, cached_etree_parse, fname, expect):\n app.build()\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_style_test_html_remote_images.assert_not_app_outdir_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_style_test_html_remote_images.assert_not_app_outdir_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1374, "end_line": 1390, "span_ids": ["test_html_remote_images", "test_html_style"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='html_style')\ndef test_html_style(app, status, warning):\n app.build()\n result = (app.outdir / 'index.html').read_text()\n assert '<link rel=\"stylesheet\" type=\"text/css\" href=\"_static/default.css\" />' in result\n assert ('<link rel=\"stylesheet\" type=\"text/css\" href=\"_static/alabaster.css\" />'\n not in result)\n\n\n@pytest.mark.sphinx('html', testroot='images')\ndef test_html_remote_images(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'index.html').read_text()\n assert ('<img alt=\"https://www.python.org/static/img/python-logo.png\" '\n 'src=\"https://www.python.org/static/img/python-logo.png\" />' in result)\n assert not (app.outdir / 'python-logo.png').exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_sidebar_test_html_sidebar.None_17": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_sidebar_test_html_sidebar.None_17", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1363, "end_line": 1407, "span_ids": ["test_html_sidebar"], "tokens": 519}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='basic')\ndef test_html_sidebar(app, status, warning):\n ctx = {}\n\n # default for alabaster\n app.builder.build_all()\n result = (app.outdir / 'index.html').read_text()\n assert ('<div class=\"sphinxsidebar\" role=\"navigation\" '\n 'aria-label=\"main navigation\">' in result)\n assert '<h1 class=\"logo\"><a href=\"#\">Python</a></h1>' in result\n assert '<h3>Navigation</h3>' in result\n assert '<h3>Related Topics</h3>' in result\n assert '<h3 id=\"searchlabel\">Quick search</h3>' in result\n\n app.builder.add_sidebars('index', ctx)\n assert ctx['sidebars'] == ['about.html', 'navigation.html', 'relations.html',\n 'searchbox.html', 'donate.html']\n\n # only relations.html\n app.config.html_sidebars = {'**': ['relations.html']}\n app.builder.build_all()\n result = (app.outdir / 'index.html').read_text()\n assert ('<div class=\"sphinxsidebar\" role=\"navigation\" '\n 'aria-label=\"main navigation\">' in result)\n assert '<h1 class=\"logo\"><a href=\"#\">Python</a></h1>' not in result\n assert '<h3>Navigation</h3>' not in result\n assert '<h3>Related Topics</h3>' in result\n assert '<h3 id=\"searchlabel\">Quick search</h3>' not in result\n\n app.builder.add_sidebars('index', ctx)\n assert ctx['sidebars'] == ['relations.html']\n\n # no sidebars\n app.config.html_sidebars = {'**': []}\n app.builder.build_all()\n result = (app.outdir / 'index.html').read_text()\n assert ('<div class=\"sphinxsidebar\" role=\"navigation\" '\n 'aria-label=\"main navigation\">' not in result)\n assert '<h1 class=\"logo\"><a href=\"#\">Python</a></h1>' not in result\n assert '<h3>Navigation</h3>' not in result\n assert '<h3>Related Topics</h3>' not in result\n assert '<h3 id=\"searchlabel\">Quick search</h3>' not in result\n\n app.builder.add_sidebars('index', ctx)\n assert ctx['sidebars'] == []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_manpage_test_html_manpage.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_manpage_test_html_manpage.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1410, "end_line": 1421, "span_ids": ["test_html_manpage"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize('fname,expect', flat_dict({\n 'index.html': [(\".//em/a[@href='https://example.com/man.1']\", \"\", True),\n (\".//em/a[@href='https://example.com/ls.1']\", \"\", True),\n (\".//em/a[@href='https://example.com/sphinx.']\", \"\", True)]\n\n}))\n@pytest.mark.sphinx('html', testroot='manpage_url', confoverrides={\n 'manpages_url': 'https://example.com/{page}.{section}'})\n@pytest.mark.test_params(shared_result='test_build_html_manpage_url')\ndef test_html_manpage(app, cached_etree_parse, fname, expect):\n app.build()\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_baseurl_test_html_baseurl.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_baseurl_test_html_baseurl.None_1", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1424, "end_line": 1433, "span_ids": ["test_html_baseurl"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='toctree-glob',\n confoverrides={'html_baseurl': 'https://example.com/'})\ndef test_html_baseurl(app, status, warning):\n app.build()\n\n result = (app.outdir / 'index.html').read_text()\n assert '<link rel=\"canonical\" href=\"https://example.com/index.html\" />' in result\n\n result = (app.outdir / 'qux' / 'index.html').read_text()\n assert '<link rel=\"canonical\" href=\"https://example.com/qux/index.html\" />' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_baseurl_and_html_file_suffix_test_html_baseurl_and_html_file_suffix.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_baseurl_and_html_file_suffix_test_html_baseurl_and_html_file_suffix.None_1", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1436, "end_line": 1446, "span_ids": ["test_html_baseurl_and_html_file_suffix"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='toctree-glob',\n confoverrides={'html_baseurl': 'https://example.com/subdir',\n 'html_file_suffix': '.htm'})\ndef test_html_baseurl_and_html_file_suffix(app, status, warning):\n app.build()\n\n result = (app.outdir / 'index.htm').read_text()\n assert '<link rel=\"canonical\" href=\"https://example.com/subdir/index.htm\" />' in result\n\n result = (app.outdir / 'qux' / 'index.htm').read_text()\n assert '<link rel=\"canonical\" href=\"https://example.com/subdir/qux/index.htm\" />' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_default_html_math_renderer_test_html_dark_pygments_style_default.assert_app_builder_dark_h": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_default_html_math_renderer_test_html_dark_pygments_style_default.assert_app_builder_dark_h", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1449, "end_line": 1530, "span_ids": ["test_default_html_math_renderer", "test_html_math_renderer_is_imgmath", "test_html_math_renderer_is_chosen", "test_html_math_renderer_is_duplicated", "test_html_pygments_style_default", "test_html_math_renderer_is_mathjax", "test_html_pygments_for_classic_theme", "test_html_dark_pygments_style_default", "test_html_math_renderer_is_mismatched", "test_html_math_renderer_is_duplicated2", "test_html_pygments_style_manually"], "tokens": 715}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='basic')\ndef test_default_html_math_renderer(app, status, warning):\n assert app.builder.math_renderer_name == 'mathjax'\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'extensions': ['sphinx.ext.mathjax']})\ndef test_html_math_renderer_is_mathjax(app, status, warning):\n assert app.builder.math_renderer_name == 'mathjax'\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'extensions': ['sphinx.ext.imgmath']})\ndef test_html_math_renderer_is_imgmath(app, status, warning):\n assert app.builder.math_renderer_name == 'imgmath'\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'extensions': ['sphinxcontrib.jsmath',\n 'sphinx.ext.imgmath']})\ndef test_html_math_renderer_is_duplicated(make_app, app_params):\n try:\n args, kwargs = app_params\n make_app(*args, **kwargs)\n assert False\n except ConfigError as exc:\n assert str(exc) == ('Many math_renderers are registered. '\n 'But no math_renderer is selected.')\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'extensions': ['sphinx.ext.imgmath',\n 'sphinx.ext.mathjax']})\ndef test_html_math_renderer_is_duplicated2(app, status, warning):\n # case of both mathjax and another math_renderer is loaded\n assert app.builder.math_renderer_name == 'imgmath' # The another one is chosen\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'extensions': ['sphinxcontrib.jsmath',\n 'sphinx.ext.imgmath'],\n 'html_math_renderer': 'imgmath'})\ndef test_html_math_renderer_is_chosen(app, status, warning):\n assert app.builder.math_renderer_name == 'imgmath'\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'extensions': ['sphinxcontrib.jsmath',\n 'sphinx.ext.mathjax'],\n 'html_math_renderer': 'imgmath'})\ndef test_html_math_renderer_is_mismatched(make_app, app_params):\n try:\n args, kwargs = app_params\n make_app(*args, **kwargs)\n assert False\n except ConfigError as exc:\n assert str(exc) == \"Unknown math_renderer 'imgmath' is given.\"\n\n\n@pytest.mark.sphinx('html', testroot='basic')\ndef test_html_pygments_style_default(app):\n style = app.builder.highlighter.formatter_args.get('style')\n assert style.__name__ == 'Alabaster'\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'pygments_style': 'sphinx'})\ndef test_html_pygments_style_manually(app):\n style = app.builder.highlighter.formatter_args.get('style')\n assert style.__name__ == 'SphinxStyle'\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'html_theme': 'classic'})\ndef test_html_pygments_for_classic_theme(app):\n style = app.builder.highlighter.formatter_args.get('style')\n assert style.__name__ == 'SphinxStyle'\n\n\n@pytest.mark.sphinx('html', testroot='basic')\ndef test_html_dark_pygments_style_default(app):\n assert app.builder.dark_highlighter is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_validate_html_extra_path_test_validate_html_extra_path.assert_app_config_html_ex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_validate_html_extra_path_test_validate_html_extra_path.assert_app_config_html_ex", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1533, "end_line": 1543, "span_ids": ["test_validate_html_extra_path"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='basic', srcdir='validate_html_extra_path')\ndef test_validate_html_extra_path(app):\n (app.confdir / '_static').makedirs()\n app.config.html_extra_path = [\n '/path/to/not_found', # not found\n '_static',\n app.outdir, # outdir\n app.outdir / '_static', # inside outdir\n ]\n validate_html_extra_path(app, app.config)\n assert app.config.html_extra_path == ['_static']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_validate_html_static_path_test_validate_html_static_path.assert_app_config_html_st": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_validate_html_static_path_test_validate_html_static_path.assert_app_config_html_st", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1546, "end_line": 1556, "span_ids": ["test_validate_html_static_path"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='basic', srcdir='validate_html_static_path')\ndef test_validate_html_static_path(app):\n (app.confdir / '_static').makedirs()\n app.config.html_static_path = [\n '/path/to/not_found', # not found\n '_static',\n app.outdir, # outdir\n app.outdir / '_static', # inside outdir\n ]\n validate_html_static_path(app, app.config)\n assert app.config.html_static_path == ['_static']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py__compile_latex_document__compile_latex_document.try_.except_CalledProcessError.assert_False_s_exited_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py__compile_latex_document__compile_latex_document.try_.except_CalledProcessError.assert_False_s_exited_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 73, "span_ids": ["compile_latex_document", "kpsetest"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# compile latex document with app.config.latex_engine\ndef compile_latex_document(app, filename='python.tex'):\n # now, try to run latex over it\n try:\n with cd(app.outdir):\n ensuredir(app.config.latex_engine)\n # keep a copy of latex file for this engine in case test fails\n copyfile(filename, app.config.latex_engine + '/' + filename)\n args = [app.config.latex_engine,\n '--halt-on-error',\n '--interaction=nonstopmode',\n '-output-directory=%s' % app.config.latex_engine,\n filename]\n subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True)\n except OSError as exc: # most likely the latex executable was not found\n raise pytest.skip.Exception from exc\n except CalledProcessError as exc:\n print(exc.stdout)\n print(exc.stderr)\n assert False, '%s exited with return code %s' % (app.config.latex_engine,\n exc.returncode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_skip_if_requested_skip_if_stylefiles_notfound.if_kpsetest_STYLEFILES_.else_.return.testfunc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_skip_if_requested_skip_if_stylefiles_notfound.if_kpsetest_STYLEFILES_.else_.return.testfunc", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 89, "span_ids": ["skip_if_stylefiles_notfound", "skip_if_requested"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def skip_if_requested(testfunc):\n if 'SKIP_LATEX_BUILD' in os.environ:\n msg = 'Skip LaTeX builds because SKIP_LATEX_BUILD is set'\n return pytest.mark.skipif(True, reason=msg)(testfunc)\n else:\n return testfunc\n\n\ndef skip_if_stylefiles_notfound(testfunc):\n if kpsetest(*STYLEFILES) is False:\n msg = 'not running latex, the required styles do not seem to be installed'\n return pytest.mark.skipif(True, reason=msg)(testfunc)\n else:\n return testfunc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_build_latex_doc_test_build_latex_doc.compile_latex_document_ap": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_build_latex_doc_test_build_latex_doc.compile_latex_document_ap", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 92, "end_line": 110, "span_ids": ["test_build_latex_doc"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@skip_if_requested\n@skip_if_stylefiles_notfound\n@pytest.mark.parametrize(\n \"engine,docclass\",\n product(LATEX_ENGINES, DOCCLASSES),\n)\n@pytest.mark.sphinx('latex')\ndef test_build_latex_doc(app, status, warning, engine, docclass):\n app.config.latex_engine = engine\n app.config.latex_documents = [app.config.latex_documents[0][:4] + (docclass,)]\n app.builder.init()\n\n LaTeXTranslator.ignore_missing_images = True\n app.builder.build_all()\n\n # file from latex_additional_files\n assert (app.outdir / 'svgimg.svg').isfile()\n\n compile_latex_document(app, 'sphinxtests.tex')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_writer_test_writer.assert_Footnotes_not_in": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_writer_test_writer.assert_Footnotes_not_in", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 113, "end_line": 140, "span_ids": ["test_writer"], "tokens": 346}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex')\ndef test_writer(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'sphinxtests.tex').read_text()\n\n assert ('\\\\begin{sphinxfigure-in-table}\\n\\\\centering\\n\\\\capstart\\n'\n '\\\\noindent\\\\sphinxincludegraphics{{img}.png}\\n'\n '\\\\sphinxfigcaption{figure in table}\\\\label{\\\\detokenize{markup:id8}}'\n '\\\\end{sphinxfigure-in-table}\\\\relax' in result)\n\n assert ('\\\\begin{wrapfigure}{r}{0pt}\\n\\\\centering\\n'\n '\\\\noindent\\\\sphinxincludegraphics{{rimg}.png}\\n'\n '\\\\caption{figure with align option}\\\\label{\\\\detokenize{markup:id9}}'\n '\\\\end{wrapfigure}' in result)\n\n assert ('\\\\begin{wrapfigure}{r}{0.500\\\\linewidth}\\n\\\\centering\\n'\n '\\\\noindent\\\\sphinxincludegraphics{{rimg}.png}\\n'\n '\\\\caption{figure with align \\\\& figwidth option}'\n '\\\\label{\\\\detokenize{markup:id10}}'\n '\\\\end{wrapfigure}' in result)\n\n assert ('\\\\begin{wrapfigure}{r}{3cm}\\n\\\\centering\\n'\n '\\\\noindent\\\\sphinxincludegraphics[width=3cm]{{rimg}.png}\\n'\n '\\\\caption{figure with align \\\\& width option}'\n '\\\\label{\\\\detokenize{markup:id11}}'\n '\\\\end{wrapfigure}' in result)\n\n assert 'Footnotes' not in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_warnings_test_latex_warnings.assert_re_match_warnings_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_warnings_test_latex_warnings.assert_re_match_warnings_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 143, "end_line": 153, "span_ids": ["test_latex_warnings"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='warnings', freshenv=True)\ndef test_latex_warnings(app, status, warning):\n app.builder.build_all()\n\n warnings = strip_escseq(re.sub(re.escape(os.sep) + '{1,2}', '/', warning.getvalue()))\n warnings_exp = LATEX_WARNINGS % {\n 'root': re.escape(app.srcdir.replace(os.sep, '/'))}\n assert re.match(warnings_exp + '$', warnings), \\\n 'Warnings don\\'t match:\\n' + \\\n '--- Expected (regex):\\n' + warnings_exp + \\\n '--- Got:\\n' + warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_test_latex_basic_manual.assert_r_documentclass_l": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_test_latex_basic_manual.assert_r_documentclass_l", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 156, "end_line": 177, "span_ids": ["test_latex_basic_manual", "test_latex_basic"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='basic')\ndef test_latex_basic(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert r'\\title{The basic Sphinx documentation for testing}' in result\n assert r'\\release{}' in result\n assert r'\\renewcommand{\\releasename}{}' in result\n\n\n@pytest.mark.sphinx('latex', testroot='basic',\n confoverrides={\n 'latex_documents': [('index', 'test.tex', 'title', 'author', 'manual')]\n })\ndef test_latex_basic_manual(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text(encoding='utf8')\n print(result)\n assert r'\\def\\sphinxdocclass{report}' in result\n assert r'\\documentclass[letterpaper,10pt,english]{sphinxmanual}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_howto_test_latex_basic_howto.assert_r_documentclass_l": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_howto_test_latex_basic_howto.assert_r_documentclass_l", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 180, "end_line": 189, "span_ids": ["test_latex_basic_howto"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='basic',\n confoverrides={\n 'latex_documents': [('index', 'test.tex', 'title', 'author', 'howto')]\n })\ndef test_latex_basic_howto(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text(encoding='utf8')\n print(result)\n assert r'\\def\\sphinxdocclass{article}' in result\n assert r'\\documentclass[letterpaper,10pt,english]{sphinxhowto}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_manual_ja_test_latex_basic_manual_ja.assert_r_documentclass_l": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_manual_ja_test_latex_basic_manual_ja.assert_r_documentclass_l", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 183, "end_line": 193, "span_ids": ["test_latex_basic_manual_ja"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='basic',\n confoverrides={\n 'language': 'ja',\n 'latex_documents': [('index', 'test.tex', 'title', 'author', 'manual')]\n })\ndef test_latex_basic_manual_ja(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text(encoding='utf8')\n print(result)\n assert r'\\def\\sphinxdocclass{ujbook}' in result\n assert r'\\documentclass[letterpaper,10pt,dvipdfmx]{sphinxmanual}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_howto_ja_test_latex_basic_howto_ja.assert_r_documentclass_l": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_basic_howto_ja_test_latex_basic_howto_ja.assert_r_documentclass_l", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 196, "end_line": 206, "span_ids": ["test_latex_basic_howto_ja"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='basic',\n confoverrides={\n 'language': 'ja',\n 'latex_documents': [('index', 'test.tex', 'title', 'author', 'howto')]\n })\ndef test_latex_basic_howto_ja(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text(encoding='utf8')\n print(result)\n assert r'\\def\\sphinxdocclass{ujreport}' in result\n assert r'\\documentclass[letterpaper,10pt,dvipdfmx]{sphinxhowto}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_theme_test_latex_theme_papersize.assert_r_documentclass_b": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_theme_test_latex_theme_papersize.assert_r_documentclass_b", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 218, "end_line": 235, "span_ids": ["test_latex_theme_papersize", "test_latex_theme"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-theme')\ndef test_latex_theme(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text(encoding='utf8')\n print(result)\n assert r'\\def\\sphinxdocclass{book}' in result\n assert r'\\documentclass[a4paper,12pt,english]{sphinxbook}' in result\n\n\n@pytest.mark.sphinx('latex', testroot='latex-theme',\n confoverrides={'latex_elements': {'papersize': 'b5paper',\n 'pointsize': '9pt'}})\ndef test_latex_theme_papersize(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text(encoding='utf8')\n print(result)\n assert r'\\def\\sphinxdocclass{book}' in result\n assert r'\\documentclass[b5paper,9pt,english]{sphinxbook}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_theme_options_test_latex_theme_options.assert_r_documentclass_b": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_theme_options_test_latex_theme_options.assert_r_documentclass_b", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 238, "end_line": 246, "span_ids": ["test_latex_theme_options"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-theme',\n confoverrides={'latex_theme_options': {'papersize': 'b5paper',\n 'pointsize': '9pt'}})\ndef test_latex_theme_options(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text(encoding='utf8')\n print(result)\n assert r'\\def\\sphinxdocclass{book}' in result\n assert r'\\documentclass[b5paper,9pt,english]{sphinxbook}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_additional_settings_for_language_code_test_latex_additional_settings_for_greek.assert_newfontfamily_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_additional_settings_for_language_code_test_latex_additional_settings_for_greek.assert_newfontfamily_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 249, "end_line": 267, "span_ids": ["test_latex_additional_settings_for_greek", "test_latex_additional_settings_for_language_code"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='basic', confoverrides={'language': 'zh'})\ndef test_latex_additional_settings_for_language_code(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert r'\\usepackage{xeCJK}' in result\n\n\n@pytest.mark.sphinx('latex', testroot='basic', confoverrides={'language': 'el'})\ndef test_latex_additional_settings_for_greek(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\usepackage{polyglossia}\\n\\\\setmainlanguage{greek}' in result\n assert '\\\\newfontfamily\\\\greekfonttt{FreeMono}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_title_after_admonitions_test_latex_release.assert_r_renewcommand_r": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_title_after_admonitions_test_latex_release.assert_r_renewcommand_r", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 261, "end_line": 280, "span_ids": ["test_latex_release", "test_latex_title_after_admonitions"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-title')\ndef test_latex_title_after_admonitions(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\title{test\\\\sphinxhyphen{}latex\\\\sphinxhyphen{}title}' in result\n\n\n@pytest.mark.sphinx('latex', testroot='basic',\n confoverrides={'release': '1.0_0'})\ndef test_latex_release(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert r'\\release{1.0\\_0}' in result\n assert r'\\renewcommand{\\releasename}{Release}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_test_numref.None_12": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_test_numref.None_12", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 292, "end_line": 326, "span_ids": ["test_numref"], "tokens": 593}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='numfig',\n confoverrides={'numfig': True})\ndef test_numref(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert ('\\\\hyperref[\\\\detokenize{index:fig1}]'\n '{Fig.\\\\@ \\\\ref{\\\\detokenize{index:fig1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:fig22}]'\n '{Figure\\\\ref{\\\\detokenize{baz:fig22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:table-1}]'\n '{Table \\\\ref{\\\\detokenize{index:table-1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:table22}]'\n '{Table:\\\\ref{\\\\detokenize{baz:table22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:code-1}]'\n '{Listing \\\\ref{\\\\detokenize{index:code-1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:code22}]'\n '{Code\\\\sphinxhyphen{}\\\\ref{\\\\detokenize{baz:code22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{foo:foo}]'\n '{Section \\\\ref{\\\\detokenize{foo:foo}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{bar:bar-a}]'\n '{Section \\\\ref{\\\\detokenize{bar:bar-a}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:fig1}]{Fig.\\\\ref{\\\\detokenize{index:fig1}} '\n '\\\\nameref{\\\\detokenize{index:fig1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{foo:foo}]{Sect.\\\\ref{\\\\detokenize{foo:foo}} '\n '\\\\nameref{\\\\detokenize{foo:foo}}}') in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\addto\\captionsenglish{\\renewcommand{\\figurename}{Fig.\\@{} }}' in result\n assert r'\\addto\\captionsenglish{\\renewcommand{\\tablename}{Table }}' in result\n assert r'\\addto\\captionsenglish{\\renewcommand{\\literalblockname}{Listing}}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_with_prefix1_test_numref_with_prefix1.None_18": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_with_prefix1_test_numref_with_prefix1.None_18", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 329, "end_line": 374, "span_ids": ["test_numref_with_prefix1"], "tokens": 774}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='numfig',\n confoverrides={'numfig': True,\n 'numfig_format': {'figure': 'Figure:%s',\n 'table': 'Tab_%s',\n 'code-block': 'Code-%s',\n 'section': 'SECTION-%s'}})\ndef test_numref_with_prefix1(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\ref{\\\\detokenize{index:fig1}}' in result\n assert '\\\\ref{\\\\detokenize{baz:fig22}}' in result\n assert '\\\\ref{\\\\detokenize{index:table-1}}' in result\n assert '\\\\ref{\\\\detokenize{baz:table22}}' in result\n assert '\\\\ref{\\\\detokenize{index:code-1}}' in result\n assert '\\\\ref{\\\\detokenize{baz:code22}}' in result\n assert ('\\\\hyperref[\\\\detokenize{index:fig1}]'\n '{Figure:\\\\ref{\\\\detokenize{index:fig1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:fig22}]'\n '{Figure\\\\ref{\\\\detokenize{baz:fig22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:table-1}]'\n '{Tab\\\\_\\\\ref{\\\\detokenize{index:table-1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:table22}]'\n '{Table:\\\\ref{\\\\detokenize{baz:table22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:code-1}]'\n '{Code\\\\sphinxhyphen{}\\\\ref{\\\\detokenize{index:code-1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:code22}]'\n '{Code\\\\sphinxhyphen{}\\\\ref{\\\\detokenize{baz:code22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{foo:foo}]'\n '{SECTION\\\\sphinxhyphen{}\\\\ref{\\\\detokenize{foo:foo}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{bar:bar-a}]'\n '{SECTION\\\\sphinxhyphen{}\\\\ref{\\\\detokenize{bar:bar-a}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:fig1}]{Fig.\\\\ref{\\\\detokenize{index:fig1}} '\n '\\\\nameref{\\\\detokenize{index:fig1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{foo:foo}]{Sect.\\\\ref{\\\\detokenize{foo:foo}} '\n '\\\\nameref{\\\\detokenize{foo:foo}}}') in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\addto\\captionsenglish{\\renewcommand{\\figurename}{Figure:}}' in result\n assert r'\\addto\\captionsenglish{\\renewcommand{\\tablename}{Tab\\_}}' in result\n assert r'\\addto\\captionsenglish{\\renewcommand{\\literalblockname}{Code-}}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_with_prefix2_test_numref_with_prefix2.None_14": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_with_prefix2_test_numref_with_prefix2.None_14", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 377, "end_line": 418, "span_ids": ["test_numref_with_prefix2"], "tokens": 702}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='numfig',\n confoverrides={'numfig': True,\n 'numfig_format': {'figure': 'Figure:%s.',\n 'table': 'Tab_%s:',\n 'code-block': 'Code-%s | ',\n 'section': 'SECTION_%s_'}})\ndef test_numref_with_prefix2(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert ('\\\\hyperref[\\\\detokenize{index:fig1}]'\n '{Figure:\\\\ref{\\\\detokenize{index:fig1}}.\\\\@}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:fig22}]'\n '{Figure\\\\ref{\\\\detokenize{baz:fig22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:table-1}]'\n '{Tab\\\\_\\\\ref{\\\\detokenize{index:table-1}}:}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:table22}]'\n '{Table:\\\\ref{\\\\detokenize{baz:table22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:code-1}]{Code\\\\sphinxhyphen{}\\\\ref{\\\\detokenize{index:code-1}} '\n '| }') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:code22}]'\n '{Code\\\\sphinxhyphen{}\\\\ref{\\\\detokenize{baz:code22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{foo:foo}]'\n '{SECTION\\\\_\\\\ref{\\\\detokenize{foo:foo}}\\\\_}') in result\n assert ('\\\\hyperref[\\\\detokenize{bar:bar-a}]'\n '{SECTION\\\\_\\\\ref{\\\\detokenize{bar:bar-a}}\\\\_}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:fig1}]{Fig.\\\\ref{\\\\detokenize{index:fig1}} '\n '\\\\nameref{\\\\detokenize{index:fig1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{foo:foo}]{Sect.\\\\ref{\\\\detokenize{foo:foo}} '\n '\\\\nameref{\\\\detokenize{foo:foo}}}') in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\addto\\captionsenglish{\\renewcommand{\\figurename}{Figure:}}' in result\n assert r'\\def\\fnum@figure{\\figurename\\thefigure{}.}' in result\n assert r'\\addto\\captionsenglish{\\renewcommand{\\tablename}{Tab\\_}}' in result\n assert r'\\def\\fnum@table{\\tablename\\thetable{}:}' in result\n assert r'\\addto\\captionsenglish{\\renewcommand{\\literalblockname}{Code-}}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_with_language_ja_test_numref_with_language_ja.None_12": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_numref_with_language_ja_test_numref_with_language_ja.None_12", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 421, "end_line": 456, "span_ids": ["test_numref_with_language_ja"], "tokens": 618}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='numfig',\n confoverrides={'numfig': True, 'language': 'ja'})\ndef test_numref_with_language_ja(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert ('\\\\hyperref[\\\\detokenize{index:fig1}]'\n '{\\u56f3 \\\\ref{\\\\detokenize{index:fig1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:fig22}]'\n '{Figure\\\\ref{\\\\detokenize{baz:fig22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:table-1}]'\n '{\\u8868 \\\\ref{\\\\detokenize{index:table-1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:table22}]'\n '{Table:\\\\ref{\\\\detokenize{baz:table22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:code-1}]'\n '{\\u30ea\\u30b9\\u30c8 \\\\ref{\\\\detokenize{index:code-1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{baz:code22}]'\n '{Code\\\\sphinxhyphen{}\\\\ref{\\\\detokenize{baz:code22}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{foo:foo}]'\n '{\\\\ref{\\\\detokenize{foo:foo}} \\u7ae0}') in result\n assert ('\\\\hyperref[\\\\detokenize{bar:bar-a}]'\n '{\\\\ref{\\\\detokenize{bar:bar-a}} \\u7ae0}') in result\n assert ('\\\\hyperref[\\\\detokenize{index:fig1}]{Fig.\\\\ref{\\\\detokenize{index:fig1}} '\n '\\\\nameref{\\\\detokenize{index:fig1}}}') in result\n assert ('\\\\hyperref[\\\\detokenize{foo:foo}]{Sect.\\\\ref{\\\\detokenize{foo:foo}} '\n '\\\\nameref{\\\\detokenize{foo:foo}}}') in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert '\\\\@iden{\\\\renewcommand{\\\\figurename}{\u56f3 }}' in result\n assert '\\\\@iden{\\\\renewcommand{\\\\tablename}{\u8868 }}' in result\n assert '\\\\@iden{\\\\renewcommand{\\\\literalblockname}{\u30ea\u30b9\u30c8}}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_obey_numfig_is_false_test_latex_obey_numfig_secnum_depth_is_zero.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_obey_numfig_is_false_test_latex_obey_numfig_secnum_depth_is_zero.None_1", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 459, "end_line": 480, "span_ids": ["test_latex_obey_numfig_is_false", "test_latex_obey_numfig_secnum_depth_is_zero"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-numfig')\ndef test_latex_obey_numfig_is_false(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'SphinxManual.tex').read_text()\n assert '\\\\usepackage{sphinx}' in result\n\n result = (app.outdir / 'SphinxHowTo.tex').read_text()\n assert '\\\\usepackage{sphinx}' in result\n\n\n@pytest.mark.sphinx(\n 'latex', testroot='latex-numfig',\n confoverrides={'numfig': True, 'numfig_secnum_depth': 0})\ndef test_latex_obey_numfig_secnum_depth_is_zero(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'SphinxManual.tex').read_text()\n assert '\\\\usepackage[,nonumfigreset,mathnumfig]{sphinx}' in result\n\n result = (app.outdir / 'SphinxHowTo.tex').read_text()\n assert '\\\\usepackage[,nonumfigreset,mathnumfig]{sphinx}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_obey_numfig_secnum_depth_is_two_test_latex_obey_numfig_secnum_depth_is_two.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_obey_numfig_secnum_depth_is_two_test_latex_obey_numfig_secnum_depth_is_two.None_1", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 483, "end_line": 493, "span_ids": ["test_latex_obey_numfig_secnum_depth_is_two"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='latex-numfig',\n confoverrides={'numfig': True, 'numfig_secnum_depth': 2})\ndef test_latex_obey_numfig_secnum_depth_is_two(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'SphinxManual.tex').read_text()\n assert '\\\\usepackage[,numfigreset=2,mathnumfig]{sphinx}' in result\n\n result = (app.outdir / 'SphinxHowTo.tex').read_text()\n assert '\\\\usepackage[,numfigreset=3,mathnumfig]{sphinx}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_obey_numfig_but_math_numfig_false_test_latex_add_latex_package.assert_usepackage_baz_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_obey_numfig_but_math_numfig_false_test_latex_add_latex_package.assert_usepackage_baz_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 496, "end_line": 516, "span_ids": ["test_latex_add_latex_package", "test_latex_obey_numfig_but_math_numfig_false"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='latex-numfig',\n confoverrides={'numfig': True, 'math_numfig': False})\ndef test_latex_obey_numfig_but_math_numfig_false(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'SphinxManual.tex').read_text()\n assert '\\\\usepackage[,numfigreset=1]{sphinx}' in result\n\n result = (app.outdir / 'SphinxHowTo.tex').read_text()\n assert '\\\\usepackage[,numfigreset=2]{sphinx}' in result\n\n\n@pytest.mark.sphinx('latex', testroot='basic')\ndef test_latex_add_latex_package(app, status, warning):\n app.add_latex_package('foo')\n app.add_latex_package('bar', 'baz')\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text()\n assert '\\\\usepackage{foo}' in result\n assert '\\\\usepackage[baz]{bar}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_no_language_settings_test_babel_with_no_language_settings.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_no_language_settings_test_babel_with_no_language_settings.None_8", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 510, "end_line": 530, "span_ids": ["test_babel_with_no_language_settings"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-babel')\ndef test_babel_with_no_language_settings(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\documentclass[letterpaper,10pt,english]{sphinxmanual}' in result\n assert '\\\\usepackage{babel}' in result\n assert '\\\\usepackage{tgtermes}' in result\n assert '\\\\usepackage[Bjarne]{fncychap}' in result\n assert ('\\\\addto\\\\captionsenglish{\\\\renewcommand{\\\\contentsname}{Table of content}}\\n'\n in result)\n assert '\\\\shorthandoff{\"}' in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\def\\pageautorefname{page}' in result\n assert r'\\addto\\captionsenglish{\\renewcommand{\\figurename}{Fig.\\@{} }}' in result\n assert r'\\addto\\captionsenglish{\\renewcommand{\\tablename}{Table.\\@{} }}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_de_test_babel_with_language_de.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_de_test_babel_with_language_de.None_8", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 533, "end_line": 555, "span_ids": ["test_babel_with_language_de"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='latex-babel',\n confoverrides={'language': 'de'})\ndef test_babel_with_language_de(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\documentclass[letterpaper,10pt,ngerman]{sphinxmanual}' in result\n assert '\\\\usepackage{babel}' in result\n assert '\\\\usepackage{tgtermes}' in result\n assert '\\\\usepackage[Sonny]{fncychap}' in result\n assert ('\\\\addto\\\\captionsngerman{\\\\renewcommand{\\\\contentsname}{Table of content}}\\n'\n in result)\n assert '\\\\shorthandoff{\"}' in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\def\\pageautorefname{Seite}' in result\n assert r'\\addto\\captionsngerman{\\renewcommand{\\figurename}{Fig.\\@{} }}' in result\n assert r'\\addto\\captionsngerman{\\renewcommand{\\tablename}{Table.\\@{} }}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_ru_test_babel_with_language_ru.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_ru_test_babel_with_language_ru.None_8", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 558, "end_line": 580, "span_ids": ["test_babel_with_language_ru"], "tokens": 284}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='latex-babel',\n confoverrides={'language': 'ru'})\ndef test_babel_with_language_ru(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\documentclass[letterpaper,10pt,russian]{sphinxmanual}' in result\n assert '\\\\usepackage{babel}' in result\n assert '\\\\usepackage{tgtermes}' not in result\n assert '\\\\usepackage[Sonny]{fncychap}' in result\n assert ('\\\\addto\\\\captionsrussian{\\\\renewcommand{\\\\contentsname}{Table of content}}\\n'\n in result)\n assert '\\\\shorthandoff{\"}' in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\def\\pageautorefname{\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430}' in result\n assert r'\\addto\\captionsrussian{\\renewcommand{\\figurename}{Fig.\\@{} }}' in result\n assert r'\\addto\\captionsrussian{\\renewcommand{\\tablename}{Table.\\@{} }}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_tr_test_babel_with_language_tr.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_tr_test_babel_with_language_tr.None_8", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 583, "end_line": 605, "span_ids": ["test_babel_with_language_tr"], "tokens": 284}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='latex-babel',\n confoverrides={'language': 'tr'})\ndef test_babel_with_language_tr(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\documentclass[letterpaper,10pt,turkish]{sphinxmanual}' in result\n assert '\\\\usepackage{babel}' in result\n assert '\\\\usepackage{tgtermes}' in result\n assert '\\\\usepackage[Sonny]{fncychap}' in result\n assert ('\\\\addto\\\\captionsturkish{\\\\renewcommand{\\\\contentsname}{Table of content}}\\n'\n in result)\n assert '\\\\shorthandoff{=}' in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\def\\pageautorefname{sayfa}' in result\n assert r'\\addto\\captionsturkish{\\renewcommand{\\figurename}{Fig.\\@{} }}' in result\n assert r'\\addto\\captionsturkish{\\renewcommand{\\tablename}{Table.\\@{} }}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_ja_test_babel_with_language_ja.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_language_ja_test_babel_with_language_ja.None_8", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 608, "end_line": 629, "span_ids": ["test_babel_with_language_ja"], "tokens": 269}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='latex-babel',\n confoverrides={'language': 'ja'})\ndef test_babel_with_language_ja(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\documentclass[letterpaper,10pt,dvipdfmx]{sphinxmanual}' in result\n assert '\\\\usepackage{babel}' not in result\n assert '\\\\usepackage{tgtermes}' in result\n assert '\\\\usepackage[Sonny]{fncychap}' not in result\n assert '\\\\renewcommand{\\\\contentsname}{Table of content}\\n' in result\n assert '\\\\shorthandoff' not in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\def\\pageautorefname{\u30da\u30fc\u30b8}' in result\n assert '\\\\@iden{\\\\renewcommand{\\\\figurename}{Fig.\\\\@{} }}' in result\n assert '\\\\@iden{\\\\renewcommand{\\\\tablename}{Table.\\\\@{} }}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_unknown_language_test_babel_with_unknown_language.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_babel_with_unknown_language_test_babel_with_unknown_language.None_9", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 632, "end_line": 656, "span_ids": ["test_babel_with_unknown_language"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='latex-babel',\n confoverrides={'language': 'unknown'})\ndef test_babel_with_unknown_language(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\documentclass[letterpaper,10pt,english]{sphinxmanual}' in result\n assert '\\\\usepackage{babel}' in result\n assert '\\\\usepackage{tgtermes}' in result\n assert '\\\\usepackage[Sonny]{fncychap}' in result\n assert ('\\\\addto\\\\captionsenglish{\\\\renewcommand{\\\\contentsname}{Table of content}}\\n'\n in result)\n assert '\\\\shorthandoff' in result\n\n assert \"WARNING: no Babel option known for language 'unknown'\" in warning.getvalue()\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\def\\pageautorefname{page}' in result\n assert r'\\addto\\captionsenglish{\\renewcommand{\\figurename}{Fig.\\@{} }}' in result\n assert r'\\addto\\captionsenglish{\\renewcommand{\\tablename}{Table.\\@{} }}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_polyglossia_with_language_de_test_polyglossia_with_language_de.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_polyglossia_with_language_de_test_polyglossia_with_language_de.None_9", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 659, "end_line": 682, "span_ids": ["test_polyglossia_with_language_de"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='latex-babel',\n confoverrides={'language': 'de', 'latex_engine': 'lualatex'})\ndef test_polyglossia_with_language_de(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\documentclass[letterpaper,10pt,german]{sphinxmanual}' in result\n assert '\\\\usepackage{polyglossia}' in result\n assert '\\\\setmainlanguage[spelling=new]{german}' in result\n assert '\\\\usepackage{tgtermes}' not in result\n assert '\\\\usepackage[Sonny]{fncychap}' in result\n assert ('\\\\addto\\\\captionsgerman{\\\\renewcommand{\\\\contentsname}{Table of content}}\\n'\n in result)\n assert '\\\\shorthandoff' not in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\def\\pageautorefname{Seite}' in result\n assert r'\\addto\\captionsgerman{\\renewcommand{\\figurename}{Fig.\\@{} }}' in result\n assert r'\\addto\\captionsgerman{\\renewcommand{\\tablename}{Table.\\@{} }}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_polyglossia_with_language_de_1901_test_polyglossia_with_language_de_1901.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_polyglossia_with_language_de_1901_test_polyglossia_with_language_de_1901.None_9", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 685, "end_line": 708, "span_ids": ["test_polyglossia_with_language_de_1901"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='latex-babel',\n confoverrides={'language': 'de-1901', 'latex_engine': 'lualatex'})\ndef test_polyglossia_with_language_de_1901(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\documentclass[letterpaper,10pt,german]{sphinxmanual}' in result\n assert '\\\\usepackage{polyglossia}' in result\n assert '\\\\setmainlanguage[spelling=old]{german}' in result\n assert '\\\\usepackage{tgtermes}' not in result\n assert '\\\\usepackage[Sonny]{fncychap}' in result\n assert ('\\\\addto\\\\captionsgerman{\\\\renewcommand{\\\\contentsname}{Table of content}}\\n'\n in result)\n assert '\\\\shorthandoff' not in result\n\n # sphinxmessages.sty\n result = (app.outdir / 'sphinxmessages.sty').read_text()\n print(result)\n assert r'\\def\\pageautorefname{page}' in result\n assert r'\\addto\\captionsgerman{\\renewcommand{\\figurename}{Fig.\\@{} }}' in result\n assert r'\\addto\\captionsgerman{\\renewcommand{\\tablename}{Table.\\@{} }}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_footnote_test_footnote.assert_Information_abou": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_footnote_test_footnote.assert_Information_abou", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 711, "end_line": 740, "span_ids": ["test_footnote"], "tokens": 488}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex')\ndef test_footnote(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'sphinxtests.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert ('\\\\sphinxAtStartPar\\n%\\n\\\\begin{footnote}[1]\\\\sphinxAtStartFootnote\\n'\n 'numbered\\n%\\n\\\\end{footnote}') in result\n assert ('\\\\begin{footnote}[2]\\\\sphinxAtStartFootnote\\nauto numbered\\n%\\n'\n '\\\\end{footnote}') in result\n assert '\\\\begin{footnote}[3]\\\\sphinxAtStartFootnote\\nnamed\\n%\\n\\\\end{footnote}' in result\n assert '\\\\sphinxcite{footnote:bar}' in result\n assert ('\\\\bibitem[bar]{footnote:bar}\\n\\\\sphinxAtStartPar\\ncite\\n') in result\n assert '\\\\sphinxcaption{Table caption \\\\sphinxfootnotemark[4]' in result\n assert ('\\\\hline%\\n\\\\begin{footnotetext}[4]'\n '\\\\phantomsection\\\\label{\\\\thesphinxscope.4}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'footnote in table caption\\n%\\n\\\\end{footnotetext}\\\\ignorespaces %\\n'\n '\\\\begin{footnotetext}[5]'\n '\\\\phantomsection\\\\label{\\\\thesphinxscope.5}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'footnote in table header\\n%\\n\\\\end{footnotetext}\\\\ignorespaces '\n '\\n\\\\sphinxAtStartPar\\n'\n 'VIDIOC\\\\_CROPCAP\\n&\\n\\\\sphinxAtStartPar\\n') in result\n assert ('Information about VIDIOC\\\\_CROPCAP %\\n'\n '\\\\begin{footnote}[6]\\\\sphinxAtStartFootnote\\n'\n 'footnote in table not in header\\n%\\n\\\\end{footnote}\\n\\\\\\\\\\n\\\\hline\\n'\n '\\\\end{tabulary}\\n'\n '\\\\par\\n\\\\sphinxattableend\\\\end{savenotes}\\n') in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_reference_in_caption_and_codeblock_in_footnote_test_reference_in_caption_and_codeblock_in_footnote.assert_begin_sphinxVer": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_reference_in_caption_and_codeblock_in_footnote_test_reference_in_caption_and_codeblock_in_footnote.assert_begin_sphinxVer", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 743, "end_line": 787, "span_ids": ["test_reference_in_caption_and_codeblock_in_footnote"], "tokens": 772}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='footnotes')\ndef test_reference_in_caption_and_codeblock_in_footnote(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert ('\\\\caption{This is the figure caption with a reference to '\n '\\\\sphinxcite{index:authoryear}.}' in result)\n assert '\\\\chapter{The section with a reference to {[}AuthorYear{]}}' in result\n assert ('\\\\sphinxcaption{The table title with a reference'\n ' to {[}AuthorYear{]}}' in result)\n assert '\\\\subsubsection*{The rubric title with a reference to {[}AuthorYear{]}}' in result\n assert ('\\\\chapter{The section with a reference to \\\\sphinxfootnotemark[6]}\\n'\n '\\\\label{\\\\detokenize{index:the-section-with-a-reference-to}}'\n '%\\n\\\\begin{footnotetext}[6]'\n '\\\\phantomsection\\\\label{\\\\thesphinxscope.6}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'Footnote in section\\n%\\n\\\\end{footnotetext}') in result\n assert ('\\\\caption{This is the figure caption with a footnote to '\n '\\\\sphinxfootnotemark[8].}\\\\label{\\\\detokenize{index:id35}}\\\\end{figure}\\n'\n '%\\n\\\\begin{footnotetext}[8]'\n '\\\\phantomsection\\\\label{\\\\thesphinxscope.8}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'Footnote in caption\\n%\\n\\\\end{footnotetext}') in result\n assert ('\\\\sphinxcaption{footnote \\\\sphinxfootnotemark[9] in '\n 'caption of normal table}\\\\label{\\\\detokenize{index:id36}}') in result\n assert ('\\\\caption{footnote \\\\sphinxfootnotemark[10] '\n 'in caption \\\\sphinxfootnotemark[11] of longtable\\\\strut}') in result\n assert ('\\\\endlastfoot\\n%\\n\\\\begin{footnotetext}[10]'\n '\\\\phantomsection\\\\label{\\\\thesphinxscope.10}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'Foot note in longtable\\n%\\n\\\\end{footnotetext}\\\\ignorespaces %\\n'\n '\\\\begin{footnotetext}[11]'\n '\\\\phantomsection\\\\label{\\\\thesphinxscope.11}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'Second footnote in caption of longtable\\n') in result\n assert ('This is a reference to the code\\\\sphinxhyphen{}block in the footnote:\\n'\n '{\\\\hyperref[\\\\detokenize{index:codeblockinfootnote}]'\n '{\\\\sphinxcrossref{\\\\DUrole{std,std-ref}{I am in a footnote}}}}') in result\n assert ('&\\n\\\\sphinxAtStartPar\\nThis is one more footnote with some code in it %\\n'\n '\\\\begin{footnote}[12]\\\\sphinxAtStartFootnote\\n'\n 'Third footnote in longtable\\n') in result\n assert ('\\\\end{sphinxVerbatim}\\n%\\n\\\\end{footnote}.\\n') in result\n assert '\\\\begin{sphinxVerbatim}[commandchars=\\\\\\\\\\\\{\\\\}]' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_footnote_and_substitutions_test_latex_show_urls_footnote_and_substitutions.test_latex_show_urls_is_f": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_footnote_and_substitutions_test_latex_show_urls_footnote_and_substitutions.test_latex_show_urls_is_f", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 928, "end_line": 934, "span_ids": ["test_latex_show_urls_footnote_and_substitutions"], "tokens": 105}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='footnotes',\n confoverrides={'latex_show_urls': 'footnote',\n 'rst_prolog': '.. |URL| replace:: `text <http://www.example.com/>`__'})\ndef test_latex_show_urls_footnote_and_substitutions(app, status, warning):\n # hyperlinks in substitutions should not effect to make footnotes (refs: #4784)\n test_latex_show_urls_is_footnote(app, status, warning)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_image_in_section_test_image_in_section.assert_chapter_Anothe": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_image_in_section_test_image_in_section.assert_chapter_Anothe", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 937, "end_line": 950, "span_ids": ["test_image_in_section"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='image-in-section')\ndef test_image_in_section(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert ('\\\\chapter[Test section]{\\\\lowercase{\\\\sphinxincludegraphics'\n '[width=15bp,height=15bp]}{{pic}.png} Test section}'\n in result)\n assert ('\\\\chapter[Other {[}blah{]} section]{Other {[}blah{]} '\n '\\\\lowercase{\\\\sphinxincludegraphics[width=15bp,height=15bp]}'\n '{{pic}.png} section}' in result)\n assert ('\\\\chapter{Another section}' in result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_logo_if_not_found_test_toctree_maxdepth_manual.assert_chapter_Foo_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_logo_if_not_found_test_toctree_maxdepth_manual.assert_chapter_Foo_i", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 953, "end_line": 972, "span_ids": ["test_toctree_maxdepth_manual", "test_latex_logo_if_not_found"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='basic',\n confoverrides={'latex_logo': 'notfound.jpg'})\ndef test_latex_logo_if_not_found(app, status, warning):\n try:\n app.builder.build_all()\n assert False # SphinxError not raised\n except Exception as exc:\n assert isinstance(exc, SphinxError)\n\n\n@pytest.mark.sphinx('latex', testroot='toctree-maxdepth')\ndef test_toctree_maxdepth_manual(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\setcounter{tocdepth}{1}' in result\n assert '\\\\setcounter{secnumdepth}' not in result\n assert '\\\\chapter{Foo}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_toctree_maxdepth_howto_test_toctree_maxdepth_howto.assert_section_Foo_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_toctree_maxdepth_howto_test_toctree_maxdepth_howto.assert_section_Foo_i", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 975, "end_line": 989, "span_ids": ["test_toctree_maxdepth_howto"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='toctree-maxdepth',\n confoverrides={'latex_documents': [\n ('index', 'python.tex', 'Sphinx Tests Documentation',\n 'Georg Brandl', 'howto'),\n ]})\ndef test_toctree_maxdepth_howto(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\setcounter{tocdepth}{2}' in result\n assert '\\\\setcounter{secnumdepth}' not in result\n assert '\\\\section{Foo}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_toctree_not_found_test_toctree_not_found.assert_chapter_Foo_A_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_toctree_not_found_test_toctree_not_found.assert_chapter_Foo_A_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1044, "end_line": 1055, "span_ids": ["test_toctree_not_found"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='toctree-maxdepth',\n confoverrides={'root_doc': 'foo'})\ndef test_toctree_not_found(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\setcounter{tocdepth}' not in result\n assert '\\\\setcounter{secnumdepth}' not in result\n assert '\\\\chapter{Foo A}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_toctree_without_maxdepth_test_toctree_with_deeper_maxdepth.assert_setcounter_secn": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_toctree_without_maxdepth_test_toctree_with_deeper_maxdepth.assert_setcounter_secn", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1058, "end_line": 1081, "span_ids": ["test_toctree_with_deeper_maxdepth", "test_toctree_without_maxdepth"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='toctree-maxdepth',\n confoverrides={'root_doc': 'bar'})\ndef test_toctree_without_maxdepth(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\setcounter{tocdepth}' not in result\n assert '\\\\setcounter{secnumdepth}' not in result\n\n\n@pytest.mark.sphinx(\n 'latex', testroot='toctree-maxdepth',\n confoverrides={'root_doc': 'qux'})\ndef test_toctree_with_deeper_maxdepth(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\setcounter{tocdepth}{3}' in result\n assert '\\\\setcounter{secnumdepth}{3}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_None_test_latex_toplevel_sectioning_is_part.assert_chapter_Foo_B_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_None_test_latex_toplevel_sectioning_is_part.assert_chapter_Foo_B_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1032, "end_line": 1055, "span_ids": ["test_latex_toplevel_sectioning_is_None", "test_latex_toplevel_sectioning_is_part"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='toctree-maxdepth',\n confoverrides={'latex_toplevel_sectioning': None})\ndef test_latex_toplevel_sectioning_is_None(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\chapter{Foo}' in result\n\n\n@pytest.mark.sphinx(\n 'latex', testroot='toctree-maxdepth',\n confoverrides={'latex_toplevel_sectioning': 'part'})\ndef test_latex_toplevel_sectioning_is_part(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\part{Foo}' in result\n assert '\\\\chapter{Foo A}' in result\n assert '\\\\chapter{Foo B}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_part_with_howto_test_latex_toplevel_sectioning_is_part_with_howto.assert_section_Foo_B_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_part_with_howto_test_latex_toplevel_sectioning_is_part_with_howto.assert_section_Foo_B_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1058, "end_line": 1073, "span_ids": ["test_latex_toplevel_sectioning_is_part_with_howto"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='toctree-maxdepth',\n confoverrides={'latex_toplevel_sectioning': 'part',\n 'latex_documents': [\n ('index', 'python.tex', 'Sphinx Tests Documentation',\n 'Georg Brandl', 'howto')\n ]})\ndef test_latex_toplevel_sectioning_is_part_with_howto(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\part{Foo}' in result\n assert '\\\\section{Foo A}' in result\n assert '\\\\section{Foo B}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_chapter_test_latex_toplevel_sectioning_is_chapter_with_howto.assert_section_Foo_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_chapter_test_latex_toplevel_sectioning_is_chapter_with_howto.assert_section_Foo_i", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1076, "end_line": 1101, "span_ids": ["test_latex_toplevel_sectioning_is_chapter_with_howto", "test_latex_toplevel_sectioning_is_chapter"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='toctree-maxdepth',\n confoverrides={'latex_toplevel_sectioning': 'chapter'})\ndef test_latex_toplevel_sectioning_is_chapter(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\chapter{Foo}' in result\n\n\n@pytest.mark.sphinx(\n 'latex', testroot='toctree-maxdepth',\n confoverrides={'latex_toplevel_sectioning': 'chapter',\n 'latex_documents': [\n ('index', 'python.tex', 'Sphinx Tests Documentation',\n 'Georg Brandl', 'howto')\n ]})\ndef test_latex_toplevel_sectioning_is_chapter_with_howto(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\section{Foo}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_section_test_maxlistdepth_at_ten.compile_latex_document_ap": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_toplevel_sectioning_is_section_test_maxlistdepth_at_ten.compile_latex_document_ap", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1104, "end_line": 1124, "span_ids": ["test_maxlistdepth_at_ten", "test_latex_toplevel_sectioning_is_section"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='toctree-maxdepth',\n confoverrides={'latex_toplevel_sectioning': 'section'})\ndef test_latex_toplevel_sectioning_is_section(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert '\\\\section{Foo}' in result\n\n\n@skip_if_stylefiles_notfound\n@pytest.mark.sphinx('latex', testroot='maxlistdepth')\ndef test_maxlistdepth_at_ten(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n compile_latex_document(app, 'python.tex')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_tabulars_test_latex_table_tabulars.None_10": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_tabulars_test_latex_table_tabulars.None_10", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1179, "end_line": 1246, "span_ids": ["test_latex_table_tabulars"], "tokens": 604}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-table')\n@pytest.mark.test_params(shared_result='latex-table')\ndef test_latex_table_tabulars(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n tables = {}\n for chap in re.split(r'\\\\(?:section|chapter){', result)[1:]:\n sectname, content = chap.split('}', 1)\n content = re.sub(r'\\\\sphinxstepscope', '', content) # filter a separator\n tables[sectname] = content.strip()\n\n def get_expected(name):\n return (app.srcdir / 'expects' / (name + '.tex')).read_text().strip()\n\n # simple_table\n actual = tables['simple table']\n expected = get_expected('simple_table')\n assert actual == expected\n\n # table having :widths: option\n actual = tables['table having :widths: option']\n expected = get_expected('table_having_widths')\n assert actual == expected\n\n # table having :align: option (tabulary)\n actual = tables['table having :align: option (tabulary)']\n expected = get_expected('tabulary_having_widths')\n assert actual == expected\n\n # table having :align: option (tabular)\n actual = tables['table having :align: option (tabular)']\n expected = get_expected('tabular_having_widths')\n assert actual == expected\n\n # table with tabularcolumn\n actual = tables['table with tabularcolumn']\n expected = get_expected('tabularcolumn')\n assert actual == expected\n\n # table with cell in first column having three paragraphs\n actual = tables['table with cell in first column having three paragraphs']\n expected = get_expected('table_having_threeparagraphs_cell_in_first_col')\n assert actual == expected\n\n # table having caption\n actual = tables['table having caption']\n expected = get_expected('table_having_caption')\n assert actual == expected\n\n # table having verbatim\n actual = tables['table having verbatim']\n expected = get_expected('table_having_verbatim')\n assert actual == expected\n\n # table having problematic cell\n actual = tables['table having problematic cell']\n expected = get_expected('table_having_problematic_cell')\n assert actual == expected\n\n # table having both :widths: and problematic cell\n actual = tables['table having both :widths: and problematic cell']\n expected = get_expected('table_having_widths_and_problematic_cell')\n assert actual == expected\n\n # table having both stub columns and problematic cell\n actual = tables['table having both stub columns and problematic cell']\n expected = get_expected('table_having_stub_columns_and_problematic_cell')\n assert actual == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_longtable_test_latex_table_longtable.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_longtable_test_latex_table_longtable.None_8", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1249, "end_line": 1306, "span_ids": ["test_latex_table_longtable"], "tokens": 521}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-table')\n@pytest.mark.test_params(shared_result='latex-table')\ndef test_latex_table_longtable(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n tables = {}\n for chap in re.split(r'\\\\(?:section|chapter){', result)[1:]:\n sectname, content = chap.split('}', 1)\n content = re.sub(r'\\\\sphinxstepscope', '', content) # filter a separator\n tables[sectname] = content.strip()\n\n def get_expected(name):\n return (app.srcdir / 'expects' / (name + '.tex')).read_text().strip()\n\n # longtable\n actual = tables['longtable']\n expected = get_expected('longtable')\n assert actual == expected\n\n # longtable having :widths: option\n actual = tables['longtable having :widths: option']\n expected = get_expected('longtable_having_widths')\n assert actual == expected\n\n # longtable having :align: option\n actual = tables['longtable having :align: option']\n expected = get_expected('longtable_having_align')\n assert actual == expected\n\n # longtable with tabularcolumn\n actual = tables['longtable with tabularcolumn']\n expected = get_expected('longtable_with_tabularcolumn')\n assert actual == expected\n\n # longtable having caption\n actual = tables['longtable having caption']\n expected = get_expected('longtable_having_caption')\n assert actual == expected\n\n # longtable having verbatim\n actual = tables['longtable having verbatim']\n expected = get_expected('longtable_having_verbatim')\n assert actual == expected\n\n # longtable having problematic cell\n actual = tables['longtable having problematic cell']\n expected = get_expected('longtable_having_problematic_cell')\n assert actual == expected\n\n # longtable having both :widths: and problematic cell\n actual = tables['longtable having both :widths: and problematic cell']\n expected = get_expected('longtable_having_widths_and_problematic_cell')\n assert actual == expected\n\n # longtable having both stub columns and problematic cell\n actual = tables['longtable having both stub columns and problematic cell']\n expected = get_expected('longtable_having_stub_columns_and_problematic_cell')\n assert actual == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_complex_tables_test_latex_table_complex_tables.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_complex_tables_test_latex_table_complex_tables.None_1", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1309, "end_line": 1330, "span_ids": ["test_latex_table_complex_tables"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-table')\n@pytest.mark.test_params(shared_result='latex-table')\ndef test_latex_table_complex_tables(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n tables = {}\n for chap in re.split(r'\\\\(?:section|renewcommand){', result)[1:]:\n sectname, content = chap.split('}', 1)\n tables[sectname] = content.strip()\n\n def get_expected(name):\n return (app.srcdir / 'expects' / (name + '.tex')).read_text().strip()\n\n # grid table\n actual = tables['grid table']\n expected = get_expected('gridtable')\n assert actual == expected\n\n # complex spanning cell\n actual = tables['complex spanning cell']\n expected = get_expected('complex_spanning_cell')\n assert actual == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_custom_template_caseA_test_latex_table_custom_template_caseC.assert_SALUT_LES_COPAINS": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_table_custom_template_caseA_test_latex_table_custom_template_caseC.assert_SALUT_LES_COPAINS", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1285, "end_line": 1306, "span_ids": ["test_latex_table_custom_template_caseB", "test_latex_table_custom_template_caseA", "test_latex_table_custom_template_caseC"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-table',\n confoverrides={'templates_path': ['_mytemplates/latex']})\ndef test_latex_table_custom_template_caseA(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n assert 'SALUT LES COPAINS' in result\n\n\n@pytest.mark.sphinx('latex', testroot='latex-table',\n confoverrides={'templates_path': ['_mytemplates']})\ndef test_latex_table_custom_template_caseB(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n assert 'SALUT LES COPAINS' not in result\n\n\n@pytest.mark.sphinx('latex', testroot='latex-table')\n@pytest.mark.test_params(shared_result='latex-table')\ndef test_latex_table_custom_template_caseC(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n assert 'SALUT LES COPAINS' not in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_raw_directive_test_latex_raw_directive.assert_LaTeX_abc_def_gh": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_raw_directive_test_latex_raw_directive.assert_LaTeX_abc_def_gh", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1309, "end_line": 1321, "span_ids": ["test_latex_raw_directive"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='directives-raw')\ndef test_latex_raw_directive(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n\n # standard case\n assert 'standalone raw directive (HTML)' not in result\n assert ('\\\\label{\\\\detokenize{index:id1}}\\n'\n 'standalone raw directive (LaTeX)' in result)\n\n # with substitution\n assert 'HTML: abc ghi' in result\n assert 'LaTeX: abc def ghi' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_images_test_latex_images.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_images_test_latex_images.None_5", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1324, "end_line": 1345, "span_ids": ["test_latex_images"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='images')\ndef test_latex_images(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'python.tex').read_text()\n\n # images are copied\n assert '\\\\sphinxincludegraphics{{python-logo}.png}' in result\n assert (app.outdir / 'python-logo.png').exists()\n\n # not found images\n assert '\\\\sphinxincludegraphics{{NOT_EXIST}.PNG}' not in result\n assert ('WARNING: Could not fetch remote image: '\n 'https://www.google.com/NOT_EXIST.PNG [404]' in warning.getvalue())\n\n # an image having target\n assert ('\\\\sphinxhref{https://www.sphinx-doc.org/}'\n '{\\\\sphinxincludegraphics{{rimg}.png}}\\n\\n' in result)\n\n # a centerized image having target\n assert ('\\\\sphinxhref{https://www.python.org/}{{\\\\hspace*{\\\\fill}'\n '\\\\sphinxincludegraphics{{rimg}.png}\\\\hspace*{\\\\fill}}}\\n\\n' in result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_index_test_latex_index.assert_n_index_main_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_index_test_latex_index.assert_n_index_main_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1351, "end_line": 1362, "span_ids": ["test_latex_index"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-index')\ndef test_latex_index(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'python.tex').read_text()\n assert ('A \\\\index{famous@\\\\spxentry{famous}}famous '\n '\\\\index{equation@\\\\spxentry{equation}}equation:\\n' in result)\n assert ('\\n\\\\index{Einstein@\\\\spxentry{Einstein}}'\n '\\\\index{relativity@\\\\spxentry{relativity}}'\n '\\\\ignorespaces \\n\\\\sphinxAtStartPar\\nand') in result\n assert ('\\n\\\\index{main \\\\sphinxleftcurlybrace{}@\\\\spxentry{'\n 'main \\\\sphinxleftcurlybrace{}}}\\\\ignorespaces ' in result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_equations_test_latex_image_in_parsed_literal.assert_sphinxunactiv": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_equations_test_latex_image_in_parsed_literal.assert_sphinxunactiv", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1362, "end_line": 1379, "span_ids": ["test_latex_image_in_parsed_literal", "test_latex_equations"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-equations')\ndef test_latex_equations(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'python.tex').read_text()\n expected = (app.srcdir / 'expects' / 'latex-equations.tex').read_text().strip()\n\n assert expected in result\n\n\n@pytest.mark.sphinx('latex', testroot='image-in-parsed-literal')\ndef test_latex_image_in_parsed_literal(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'python.tex').read_text()\n assert ('{\\\\sphinxunactivateextrasandspace \\\\raisebox{-0.5\\\\height}'\n '{\\\\sphinxincludegraphics[height=2.00000cm]{{pic}.png}}'\n '}AFTER') in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_nested_enumerated_list_test_latex_nested_enumerated_list.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_nested_enumerated_list_test_latex_nested_enumerated_list.None_4", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1382, "end_line": 1396, "span_ids": ["test_latex_nested_enumerated_list"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='nested-enumerated-list')\ndef test_latex_nested_enumerated_list(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'python.tex').read_text()\n assert ('\\\\sphinxsetlistlabels{\\\\arabic}{enumi}{enumii}{}{.}%\\n'\n '\\\\setcounter{enumi}{4}\\n' in result)\n assert ('\\\\sphinxsetlistlabels{\\\\alph}{enumii}{enumiii}{}{.}%\\n'\n '\\\\setcounter{enumii}{3}\\n' in result)\n assert ('\\\\sphinxsetlistlabels{\\\\arabic}{enumiii}{enumiv}{}{)}%\\n'\n '\\\\setcounter{enumiii}{9}\\n' in result)\n assert ('\\\\sphinxsetlistlabels{\\\\arabic}{enumiv}{enumv}{(}{)}%\\n'\n '\\\\setcounter{enumiv}{23}\\n' in result)\n assert ('\\\\sphinxsetlistlabels{\\\\roman}{enumii}{enumiii}{}{.}%\\n'\n '\\\\setcounter{enumii}{2}\\n' in result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_thebibliography_test_latex_thebibliography.assert_sphinxcite_inde": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_thebibliography_test_latex_thebibliography.assert_sphinxcite_inde", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1402, "end_line": 1412, "span_ids": ["test_latex_thebibliography"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='footnotes')\ndef test_latex_thebibliography(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n assert ('\\\\begin{sphinxthebibliography}{AuthorYe}\\n'\n '\\\\bibitem[AuthorYear]{index:authoryear}\\n\\\\sphinxAtStartPar\\n'\n 'Author, Title, Year\\n'\n '\\\\end{sphinxthebibliography}\\n' in result)\n assert '\\\\sphinxcite{index:authoryear}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_labels_test_latex_labels.assert_result_count_r_la": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_labels_test_latex_labels.assert_result_count_r_la", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1439, "end_line": 1485, "span_ids": ["test_latex_labels"], "tokens": 546}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-labels')\ndef test_latex_labels(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'python.tex').read_text()\n\n # figures\n assert (r'\\caption{labeled figure}'\n r'\\label{\\detokenize{index:id1}}'\n r'\\label{\\detokenize{index:figure2}}'\n r'\\label{\\detokenize{index:figure1}}'\n r'\\end{figure}' in result)\n assert (r'\\caption{labeled figure}'\n '\\\\label{\\\\detokenize{index:figure3}}\\n'\n '\\\\begin{sphinxlegend}\\n\\\\sphinxAtStartPar\\n'\n 'with a legend\\n\\\\end{sphinxlegend}\\n'\n r'\\end{figure}' in result)\n\n # code-blocks\n assert (r'\\def\\sphinxLiteralBlockLabel{'\n r'\\label{\\detokenize{index:codeblock2}}'\n r'\\label{\\detokenize{index:codeblock1}}}' in result)\n assert (r'\\def\\sphinxLiteralBlockLabel{'\n r'\\label{\\detokenize{index:codeblock3}}}' in result)\n\n # tables\n assert (r'\\sphinxcaption{table caption}'\n r'\\label{\\detokenize{index:id2}}'\n r'\\label{\\detokenize{index:table2}}'\n r'\\label{\\detokenize{index:table1}}' in result)\n assert (r'\\sphinxcaption{table caption}'\n r'\\label{\\detokenize{index:table3}}' in result)\n\n # sections\n assert ('\\\\chapter{subsection}\\n'\n r'\\label{\\detokenize{index:subsection}}'\n r'\\label{\\detokenize{index:section2}}'\n r'\\label{\\detokenize{index:section1}}' in result)\n assert ('\\\\section{subsubsection}\\n'\n r'\\label{\\detokenize{index:subsubsection}}'\n r'\\label{\\detokenize{index:section3}}' in result)\n assert ('\\\\subsection{otherdoc}\\n'\n r'\\label{\\detokenize{otherdoc:otherdoc}}'\n r'\\label{\\detokenize{otherdoc::doc}}' in result)\n\n # Embedded standalone hyperlink reference (refs: #5948)\n assert result.count(r'\\label{\\detokenize{index:section1}}') == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_figure_in_admonition_test_default_latex_documents.assert_default_latex_docu": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_figure_in_admonition_test_default_latex_documents.assert_default_latex_docu", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1533, "end_line": 1551, "span_ids": ["test_default_latex_documents", "test_latex_figure_in_admonition"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-figure-in-admonition')\ndef test_latex_figure_in_admonition(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n assert(r'\\begin{figure}[H]' in result)\n\n\ndef test_default_latex_documents():\n from sphinx.util import texescape\n texescape.init()\n config = Config({'root_doc': 'index',\n 'project': 'STASI\u2122 Documentation',\n 'author': \"Wolfgang Sch\u00e4uble & G'Beckstein.\"})\n config.init_values()\n config.add('latex_engine', None, True, None)\n config.add('latex_theme', 'manual', True, None)\n expected = [('index', 'stasi.tex', 'STASI\u2122 Documentation',\n r\"Wolfgang Sch\u00e4uble \\& G\\textquotesingle{}Beckstein.\\@{}\", 'manual')]\n assert default_latex_documents(config) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_includegraphics_oversized_test_index_on_title.assert_chapter_Test_f": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_includegraphics_oversized_test_index_on_title.assert_chapter_Test_f", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1505, "end_line": 1522, "span_ids": ["test_includegraphics_oversized", "test_index_on_title"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@skip_if_requested\n@skip_if_stylefiles_notfound\n@pytest.mark.sphinx('latex', testroot='latex-includegraphics')\ndef test_includegraphics_oversized(app, status, warning):\n app.builder.build_all()\n print(status.getvalue())\n print(warning.getvalue())\n compile_latex_document(app)\n\n\n@pytest.mark.sphinx('latex', testroot='index_on_title')\ndef test_index_on_title(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n assert ('\\\\chapter{Test for index in top level title}\\n'\n '\\\\label{\\\\detokenize{contents:test-for-index-in-top-level-title}}'\n '\\\\index{index@\\\\spxentry{index}}\\n'\n in result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_texescape_for_non_unicode_supported_engine_test_texescape_for_non_unicode_supported_engine.assert_r_subscript_sb": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_texescape_for_non_unicode_supported_engine_test_texescape_for_non_unicode_supported_engine.assert_r_subscript_sb", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1525, "end_line": 1534, "span_ids": ["test_texescape_for_non_unicode_supported_engine"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-unicode',\n confoverrides={'latex_engine': 'pdflatex'})\ndef test_texescape_for_non_unicode_supported_engine(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n assert 'script small e: e' in result\n assert 'double struck italic small i: i' in result\n assert r'superscript: \\(\\sp{\\text{0}}\\), \\(\\sp{\\text{1}}\\)' in result\n assert r'subscript: \\(\\sb{\\text{0}}\\), \\(\\sb{\\text{1}}\\)' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_texescape_for_unicode_supported_engine_test_texescape_for_unicode_supported_engine.assert_subscript_\u2080_\u2081_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_texescape_for_unicode_supported_engine_test_texescape_for_unicode_supported_engine.assert_subscript_\u2080_\u2081_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1537, "end_line": 1546, "span_ids": ["test_texescape_for_unicode_supported_engine"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='latex-unicode',\n confoverrides={'latex_engine': 'xelatex'})\ndef test_texescape_for_unicode_supported_engine(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n assert 'script small e: e' in result\n assert 'double struck italic small i: i' in result\n assert 'superscript: \u2070, \u00b9' in result\n assert 'subscript: \u2080, \u2081' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_elements_extrapackages_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_elements_extrapackages_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1598, "end_line": 1618, "span_ids": ["test_latex_elements_extrapackages", "test_latex_nested_tables", "test_latex_container"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='basic',\n confoverrides={'latex_elements': {'extrapackages': r'\\usepackage{foo}'}})\ndef test_latex_elements_extrapackages(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'test.tex').read_text()\n assert r'\\usepackage{foo}' in result\n\n\n@pytest.mark.sphinx('latex', testroot='nested-tables')\ndef test_latex_nested_tables(app, status, warning):\n app.builder.build_all()\n assert '' == warning.getvalue()\n\n\n@pytest.mark.sphinx('latex', testroot='latex-container')\ndef test_latex_container(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n assert r'\\begin{sphinxuseclass}{classname}' in result\n assert r'\\end{sphinxuseclass}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_defaults_json_test_defaults_json.assert_Not_Found_for_url": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_defaults_json_test_defaults_json.assert_Not_Found_for_url", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 47, "end_line": 96, "span_ids": ["test_defaults_json"], "tokens": 536}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck', freshenv=True)\ndef test_defaults_json(app):\n app.build()\n\n assert (app.outdir / 'output.json').exists()\n content = (app.outdir / 'output.json').read_text()\n print(content)\n\n rows = [json.loads(x) for x in content.splitlines()]\n row = rows[0]\n for attr in [\"filename\", \"lineno\", \"status\", \"code\", \"uri\",\n \"info\"]:\n assert attr in row\n\n assert len(content.splitlines()) == 11\n assert len(rows) == 11\n # the output order of the rows is not stable\n # due to possible variance in network latency\n rowsby = {row[\"uri\"]: row for row in rows}\n assert rowsby[\"https://www.google.com#!bar\"] == {\n 'filename': 'links.txt',\n 'lineno': 10,\n 'status': 'working',\n 'code': 0,\n 'uri': 'https://www.google.com#!bar',\n 'info': ''\n }\n # looking for non-existent URL should fail\n dnerow = rowsby['https://localhost:7777/doesnotexist']\n assert dnerow['filename'] == 'links.txt'\n assert dnerow['lineno'] == 13\n assert dnerow['status'] == 'broken'\n assert dnerow['code'] == 0\n assert dnerow['uri'] == 'https://localhost:7777/doesnotexist'\n assert rowsby['https://www.google.com/image2.png'] == {\n 'filename': 'links.txt',\n 'lineno': 19,\n 'status': 'broken',\n 'code': 0,\n 'uri': 'https://www.google.com/image2.png',\n 'info': '404 Client Error: Not Found for url: https://www.google.com/image2.png'\n }\n # looking for '#top' and '#does-not-exist' not found should fail\n assert \"Anchor 'top' not found\" == \\\n rowsby[\"https://www.google.com/#top\"][\"info\"]\n assert \"Anchor 'does-not-exist' not found\" == \\\n rowsby[\"http://www.sphinx-doc.org/en/master/index.html#does-not-exist\"][\"info\"]\n # images should fail\n assert \"Not Found for url: https://www.google.com/image.png\" in \\\n rowsby[\"https://www.google.com/image.png\"][\"info\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_anchors_ignored_test_anchors_ignored.assert_not_content": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_anchors_ignored_test_anchors_ignored.assert_not_content", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 99, "end_line": 116, "span_ids": ["test_anchors_ignored"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'linkcheck', testroot='linkcheck', freshenv=True,\n confoverrides={'linkcheck_anchors_ignore': [\"^!\", \"^top$\"],\n 'linkcheck_ignore': [\n 'https://localhost:7777/doesnotexist',\n 'http://www.sphinx-doc.org/en/master/index.html#',\n 'https://www.google.com/image.png',\n 'https://www.google.com/image2.png',\n 'path/to/notfound']\n })\ndef test_anchors_ignored(app):\n app.build()\n\n assert (app.outdir / 'output.txt').exists()\n content = (app.outdir / 'output.txt').read_text()\n\n # expect all ok when excluding #top\n assert not content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py_test_default_man_pages_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py_test_default_man_pages_", "embedding": null, "metadata": {"file_path": "tests/test_build_manpage.py", "file_name": "test_build_manpage.py", "file_type": "text/x-python", "category": "test", "start_line": 61, "end_line": 76, "span_ids": ["test_default_man_pages", "test_rubric"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_default_man_pages():\n config = Config({'project': 'STASI\u2122 Documentation',\n 'author': \"Wolfgang Sch\u00e4uble & G'Beckstein\",\n 'release': '1.0'})\n config.init_values()\n expected = [('index', 'stasi', 'STASI\u2122 Documentation 1.0',\n [\"Wolfgang Sch\u00e4uble & G'Beckstein\"], 1)]\n assert default_man_pages(config) == expected\n\n\n@pytest.mark.sphinx('man', testroot='markup-rubric')\ndef test_rubric(app, status, warning):\n app.build()\n content = (app.outdir / 'python.1').read_text()\n assert 'This is a rubric\\n' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_warnings_test_texinfo_warnings.assert_re_match_warnings_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_warnings_test_texinfo_warnings.assert_re_match_warnings_", "embedding": null, "metadata": {"file_path": "tests/test_build_texinfo.py", "file_name": "test_build_texinfo.py", "file_type": "text/x-python", "category": "test", "start_line": 36, "end_line": 45, "span_ids": ["test_texinfo_warnings"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('texinfo', testroot='warnings', freshenv=True)\ndef test_texinfo_warnings(app, status, warning):\n app.builder.build_all()\n warnings = strip_escseq(re.sub(re.escape(os.sep) + '{1,2}', '/', warning.getvalue()))\n warnings_exp = TEXINFO_WARNINGS % {\n 'root': re.escape(app.srcdir.replace(os.sep, '/'))}\n assert re.match(warnings_exp + '$', warnings), \\\n 'Warnings don\\'t match:\\n' + \\\n '--- Expected (regex):\\n' + warnings_exp + \\\n '--- Got:\\n' + warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_test_texinfo.try_.except_CalledProcessError.assert_False_makeinfo_e": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_test_texinfo.try_.except_CalledProcessError.assert_False_makeinfo_e", "embedding": null, "metadata": {"file_path": "tests/test_build_texinfo.py", "file_name": "test_build_texinfo.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 66, "span_ids": ["test_texinfo"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('texinfo')\ndef test_texinfo(app, status, warning):\n TexinfoTranslator.ignore_missing_images = True\n app.builder.build_all()\n result = (app.outdir / 'sphinxtests.texi').read_text()\n assert ('@anchor{markup doc}@anchor{11}'\n '@anchor{markup id1}@anchor{12}'\n '@anchor{markup testing-various-markup}@anchor{13}' in result)\n assert 'Footnotes' not in result\n # now, try to run makeinfo over it\n try:\n args = ['makeinfo', '--no-split', 'sphinxtests.texi']\n subprocess.run(args, stdout=PIPE, stderr=PIPE, cwd=app.outdir, check=True)\n except OSError as exc:\n raise pytest.skip.Exception from exc # most likely makeinfo was not found\n except CalledProcessError as exc:\n print(exc.stdout)\n print(exc.stderr)\n assert False, 'makeinfo exited with return code %s' % exc.retcode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_rubric_test_texinfo_citation.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_rubric_test_texinfo_citation.None_2", "embedding": null, "metadata": {"file_path": "tests/test_build_texinfo.py", "file_name": "test_build_texinfo.py", "file_type": "text/x-python", "category": "test", "start_line": 69, "end_line": 87, "span_ids": ["test_texinfo_citation", "test_texinfo_rubric"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('texinfo', testroot='markup-rubric')\ndef test_texinfo_rubric(app, status, warning):\n app.build()\n\n output = (app.outdir / 'python.texi').read_text()\n assert '@heading This is a rubric' in output\n assert '@heading This is a multiline rubric' in output\n\n\n@pytest.mark.sphinx('texinfo', testroot='markup-citation')\ndef test_texinfo_citation(app, status, warning):\n app.builder.build_all()\n\n output = (app.outdir / 'python.texi').read_text()\n assert 'This is a citation ref; @ref{1,,[CITE1]} and @ref{2,,[CITE2]}.' in output\n assert ('@anchor{index cite1}@anchor{1}@w{(CITE1)} \\n'\n 'This is a citation\\n') in output\n assert ('@anchor{index cite2}@anchor{2}@w{(CITE2)} \\n'\n 'This is a multiline citation\\n') in output", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_lineblock_test_table_builder.assert_repr_table_count_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_lineblock_test_table_builder.assert_repr_table_count_", "embedding": null, "metadata": {"file_path": "tests/test_build_text.py", "file_name": "test_build_text.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 99, "span_ids": ["test_lineblock", "test_table_builder", "test_nonascii_title_line", "test_nonascii_table", "test_nonascii_maxwidth"], "tokens": 447}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@with_text_app()\ndef test_lineblock(app, status, warning):\n # regression test for #1109: need empty line after line block\n app.builder.build_update()\n result = (app.outdir / 'lineblock.txt').read_text()\n expect = (\n \"* one\\n\"\n \"\\n\"\n \" line-block 1\\n\"\n \" line-block 2\\n\"\n \"\\n\"\n \"followed paragraph.\\n\"\n )\n assert result == expect\n\n\n@with_text_app()\ndef test_nonascii_title_line(app, status, warning):\n app.builder.build_update()\n result = (app.outdir / 'nonascii_title.txt').read_text()\n expect_underline = '*********'\n result_underline = result.splitlines()[1].strip()\n assert expect_underline == result_underline\n\n\n@with_text_app()\ndef test_nonascii_table(app, status, warning):\n app.builder.build_update()\n result = (app.outdir / 'nonascii_table.txt').read_text()\n lines = [line.strip() for line in result.splitlines() if line.strip()]\n line_widths = [column_width(line) for line in lines]\n assert len(set(line_widths)) == 1 # same widths\n\n\n@with_text_app()\ndef test_nonascii_maxwidth(app, status, warning):\n app.builder.build_update()\n result = (app.outdir / 'nonascii_maxwidth.txt').read_text()\n lines = [line.strip() for line in result.splitlines() if line.strip()]\n line_widths = [column_width(line) for line in lines]\n assert max(line_widths) < MAXWIDTH\n\n\ndef test_table_builder():\n table = Table([6, 6])\n table.add_cell(Cell(\"foo\"))\n table.add_cell(Cell(\"bar\"))\n table_str = str(table).split(\"\\n\")\n assert table_str[0] == \"+--------+--------+\"\n assert table_str[1] == \"| foo | bar |\"\n assert table_str[2] == \"+--------+--------+\"\n assert repr(table).count(\"<Cell \") == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_separator_test_table_separator.assert_repr_table_count_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_separator_test_table_separator.assert_repr_table_count_", "embedding": null, "metadata": {"file_path": "tests/test_build_text.py", "file_name": "test_build_text.py", "file_type": "text/x-python", "category": "test", "start_line": 102, "end_line": 116, "span_ids": ["test_table_separator"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_table_separator():\n table = Table([6, 6])\n table.add_cell(Cell(\"foo\"))\n table.add_cell(Cell(\"bar\"))\n table.set_separator()\n table.add_row()\n table.add_cell(Cell(\"FOO\"))\n table.add_cell(Cell(\"BAR\"))\n table_str = str(table).split(\"\\n\")\n assert table_str[0] == \"+--------+--------+\"\n assert table_str[1] == \"| foo | bar |\"\n assert table_str[2] == \"|========|========|\"\n assert table_str[3] == \"| FOO | BAR |\"\n assert table_str[4] == \"+--------+--------+\"\n assert repr(table).count(\"<Cell \") == 4", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_cell_test_table_with_empty_cell.assert_lines_6_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_cell_test_table_with_empty_cell.assert_lines_6_", "embedding": null, "metadata": {"file_path": "tests/test_build_text.py", "file_name": "test_build_text.py", "file_type": "text/x-python", "category": "test", "start_line": 119, "end_line": 137, "span_ids": ["test_table_cell", "test_table_with_empty_cell"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_table_cell():\n cell = Cell(\"Foo bar baz\")\n cell.wrap(3)\n assert \"Cell\" in repr(cell)\n assert cell.wrapped == [\"Foo\", \"bar\", \"baz\"]\n\n\n@with_text_app()\ndef test_table_with_empty_cell(app, status, warning):\n app.builder.build_update()\n result = (app.outdir / 'table.txt').read_text()\n lines = [line.strip() for line in result.splitlines() if line.strip()]\n assert lines[0] == \"+-------+-------+\"\n assert lines[1] == \"| XXX | XXX |\"\n assert lines[2] == \"+-------+-------+\"\n assert lines[3] == \"| | XXX |\"\n assert lines[4] == \"+-------+-------+\"\n assert lines[5] == \"| XXX | |\"\n assert lines[6] == \"+-------+-------+\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_rowspan_test_table_with_rowspan.assert_lines_6_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_rowspan_test_table_with_rowspan.assert_lines_6_", "embedding": null, "metadata": {"file_path": "tests/test_build_text.py", "file_name": "test_build_text.py", "file_type": "text/x-python", "category": "test", "start_line": 140, "end_line": 151, "span_ids": ["test_table_with_rowspan"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@with_text_app()\ndef test_table_with_rowspan(app, status, warning):\n app.builder.build_update()\n result = (app.outdir / 'table_rowspan.txt').read_text()\n lines = [line.strip() for line in result.splitlines() if line.strip()]\n assert lines[0] == \"+-------+-------+\"\n assert lines[1] == \"| XXXXXXXXX |\"\n assert lines[2] == \"+-------+-------+\"\n assert lines[3] == \"| | XXX |\"\n assert lines[4] == \"+-------+-------+\"\n assert lines[5] == \"| XXX | |\"\n assert lines[6] == \"+-------+-------+\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_colspan_test_table_with_colspan.assert_lines_6_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_colspan_test_table_with_colspan.assert_lines_6_", "embedding": null, "metadata": {"file_path": "tests/test_build_text.py", "file_name": "test_build_text.py", "file_type": "text/x-python", "category": "test", "start_line": 154, "end_line": 165, "span_ids": ["test_table_with_colspan"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@with_text_app()\ndef test_table_with_colspan(app, status, warning):\n app.builder.build_update()\n result = (app.outdir / 'table_colspan.txt').read_text()\n lines = [line.strip() for line in result.splitlines() if line.strip()]\n assert lines[0] == \"+-------+-------+\"\n assert lines[1] == \"| XXX | XXX |\"\n assert lines[2] == \"+-------+-------+\"\n assert lines[3] == \"| | XXX |\"\n assert lines[4] == \"+-------+ |\"\n assert lines[5] == \"| XXX | |\"\n assert lines[6] == \"+-------+-------+\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_colspan_left_test_table_with_colspan_left.assert_lines_6_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_colspan_left_test_table_with_colspan_left.assert_lines_6_", "embedding": null, "metadata": {"file_path": "tests/test_build_text.py", "file_name": "test_build_text.py", "file_type": "text/x-python", "category": "test", "start_line": 168, "end_line": 179, "span_ids": ["test_table_with_colspan_left"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@with_text_app()\ndef test_table_with_colspan_left(app, status, warning):\n app.builder.build_update()\n result = (app.outdir / 'table_colspan_left.txt').read_text()\n lines = [line.strip() for line in result.splitlines() if line.strip()]\n assert lines[0] == \"+-------+-------+\"\n assert lines[1] == \"| XXX | XXX |\"\n assert lines[2] == \"+-------+-------+\"\n assert lines[3] == \"| XXX | XXX |\"\n assert lines[4] == \"| +-------+\"\n assert lines[5] == \"| | |\"\n assert lines[6] == \"+-------+-------+\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_colspan_and_rowspan_test_table_with_colspan_and_rowspan.assert_lines_6_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_table_with_colspan_and_rowspan_test_table_with_colspan_and_rowspan.assert_lines_6_", "embedding": null, "metadata": {"file_path": "tests/test_build_text.py", "file_name": "test_build_text.py", "file_type": "text/x-python", "category": "test", "start_line": 182, "end_line": 194, "span_ids": ["test_table_with_colspan_and_rowspan"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@with_text_app()\ndef test_table_with_colspan_and_rowspan(app, status, warning):\n app.builder.build_update()\n result = (app.outdir / 'table_colspan_and_rowspan.txt').read_text()\n lines = [line.strip() for line in result.splitlines() if line.strip()]\n assert result\n assert lines[0] == \"+-------+-------+-------+\"\n assert lines[1] == \"| AAA | BBB |\"\n assert lines[2] == \"+-------+-------+ |\"\n assert lines[3] == \"| DDD | XXX | |\"\n assert lines[4] == \"| +-------+-------+\"\n assert lines[5] == \"| | CCC |\"\n assert lines[6] == \"+-------+-------+-------+\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_list_items_in_admonition_test_list_items_in_admonition.assert_lines_4_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_list_items_in_admonition_test_list_items_in_admonition.assert_lines_4_i", "embedding": null, "metadata": {"file_path": "tests/test_build_text.py", "file_name": "test_build_text.py", "file_type": "text/x-python", "category": "test", "start_line": 197, "end_line": 206, "span_ids": ["test_list_items_in_admonition"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@with_text_app()\ndef test_list_items_in_admonition(app, status, warning):\n app.builder.build_update()\n result = (app.outdir / 'listitems.txt').read_text()\n lines = [line.rstrip() for line in result.splitlines()]\n assert lines[0] == \"See also:\"\n assert lines[1] == \"\"\n assert lines[2] == \" * item 1\"\n assert lines[3] == \"\"\n assert lines[4] == \" * item 2\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_secnums_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py_test_secnums_", "embedding": null, "metadata": {"file_path": "tests/test_build_text.py", "file_name": "test_build_text.py", "file_type": "text/x-python", "category": "test", "start_line": 209, "end_line": 287, "span_ids": ["test_secnums"], "tokens": 633}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@with_text_app()\ndef test_secnums(app, status, warning):\n app.builder.build_all()\n index = (app.outdir / 'index.txt').read_text()\n lines = index.splitlines()\n assert lines[0] == \"* 1. Section A\"\n assert lines[1] == \"\"\n assert lines[2] == \"* 2. Section B\"\n assert lines[3] == \"\"\n assert lines[4] == \" * 2.1. Sub Ba\"\n assert lines[5] == \"\"\n assert lines[6] == \" * 2.2. Sub Bb\"\n doc2 = (app.outdir / 'doc2.txt').read_text()\n expect = (\n \"2. Section B\\n\"\n \"************\\n\"\n \"\\n\"\n \"\\n\"\n \"2.1. Sub Ba\\n\"\n \"===========\\n\"\n \"\\n\"\n \"\\n\"\n \"2.2. Sub Bb\\n\"\n \"===========\\n\"\n )\n assert doc2 == expect\n\n app.config.text_secnumber_suffix = \" \"\n app.builder.build_all()\n index = (app.outdir / 'index.txt').read_text()\n lines = index.splitlines()\n assert lines[0] == \"* 1 Section A\"\n assert lines[1] == \"\"\n assert lines[2] == \"* 2 Section B\"\n assert lines[3] == \"\"\n assert lines[4] == \" * 2.1 Sub Ba\"\n assert lines[5] == \"\"\n assert lines[6] == \" * 2.2 Sub Bb\"\n doc2 = (app.outdir / 'doc2.txt').read_text()\n expect = (\n \"2 Section B\\n\"\n \"***********\\n\"\n \"\\n\"\n \"\\n\"\n \"2.1 Sub Ba\\n\"\n \"==========\\n\"\n \"\\n\"\n \"\\n\"\n \"2.2 Sub Bb\\n\"\n \"==========\\n\"\n )\n assert doc2 == expect\n\n app.config.text_add_secnumbers = False\n app.builder.build_all()\n index = (app.outdir / 'index.txt').read_text()\n lines = index.splitlines()\n assert lines[0] == \"* Section A\"\n assert lines[1] == \"\"\n assert lines[2] == \"* Section B\"\n assert lines[3] == \"\"\n assert lines[4] == \" * Sub Ba\"\n assert lines[5] == \"\"\n assert lines[6] == \" * Sub Bb\"\n doc2 = (app.outdir / 'doc2.txt').read_text()\n expect = (\n \"Section B\\n\"\n \"*********\\n\"\n \"\\n\"\n \"\\n\"\n \"Sub Ba\\n\"\n \"======\\n\"\n \"\\n\"\n \"\\n\"\n \"Sub Bb\\n\"\n \"======\\n\"\n )\n assert doc2 == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py_test_compile_all_catalogs_test_compile_all_catalogs.assert_actual_expect": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py_test_compile_all_catalogs_test_compile_all_catalogs.assert_actual_expect", "embedding": null, "metadata": {"file_path": "tests/test_catalogs.py", "file_name": "test_catalogs.py", "file_type": "text/x-python", "category": "test", "start_line": 36, "end_line": 52, "span_ids": ["test_compile_all_catalogs"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.usefixtures('setup_test')\n@pytest.mark.test_params(shared_result='test-catalogs')\n@pytest.mark.sphinx(\n 'html', testroot='intl',\n confoverrides={'language': 'en', 'locale_dirs': ['./locale']})\ndef test_compile_all_catalogs(app, status, warning):\n app.builder.compile_all_catalogs()\n\n locale_dir = app.srcdir / 'locale'\n catalog_dir = locale_dir / app.config.language / 'LC_MESSAGES'\n expect = {\n x.replace('.po', '.mo')\n for x in find_files(catalog_dir, '.po')\n }\n actual = set(find_files(catalog_dir, '.mo'))\n assert actual # not empty\n assert actual == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py_test_compile_specific_catalogs_test_compile_specific_catalogs.assert_actual_admoni": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py_test_compile_specific_catalogs_test_compile_specific_catalogs.assert_actual_admoni", "embedding": null, "metadata": {"file_path": "tests/test_catalogs.py", "file_name": "test_catalogs.py", "file_type": "text/x-python", "category": "test", "start_line": 55, "end_line": 70, "span_ids": ["test_compile_specific_catalogs"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.usefixtures('setup_test')\n@pytest.mark.test_params(shared_result='test-catalogs')\n@pytest.mark.sphinx(\n 'html', testroot='intl',\n confoverrides={'language': 'en', 'locale_dirs': ['./locale']})\ndef test_compile_specific_catalogs(app, status, warning):\n locale_dir = app.srcdir / 'locale'\n catalog_dir = locale_dir / app.config.language / 'LC_MESSAGES'\n\n def get_actual():\n return set(find_files(catalog_dir, '.mo'))\n\n actual_on_boot = get_actual() # sphinx.mo might be included\n app.builder.compile_specific_catalogs([app.srcdir / 'admonitions.txt'])\n actual = get_actual() - actual_on_boot\n assert actual == {'admonitions.mo'}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py_test_compile_update_catalogs_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py_test_compile_update_catalogs_", "embedding": null, "metadata": {"file_path": "tests/test_catalogs.py", "file_name": "test_catalogs.py", "file_type": "text/x-python", "category": "test", "start_line": 73, "end_line": 90, "span_ids": ["test_compile_update_catalogs"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.usefixtures('setup_test')\n@pytest.mark.test_params(shared_result='test-catalogs')\n@pytest.mark.sphinx(\n 'html', testroot='intl',\n confoverrides={'language': 'en', 'locale_dirs': ['./locale']})\ndef test_compile_update_catalogs(app, status, warning):\n app.builder.compile_update_catalogs()\n\n locale_dir = app.srcdir / 'locale'\n catalog_dir = locale_dir / app.config.language / 'LC_MESSAGES'\n expect = {\n x.replace('.po', '.mo')\n for x in find_files(catalog_dir, '.po')\n }\n actual = set(find_files(catalog_dir, '.mo'))\n assert actual # not empty\n assert actual == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_overrides_test_overrides.assert_config_value8_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_overrides_test_overrides.assert_config_value8_", "embedding": null, "metadata": {"file_path": "tests/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 98, "end_line": 119, "span_ids": ["test_overrides"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overrides():\n config = Config({'value1': '1', 'value2': 2, 'value6': {'default': 6}},\n {'value2': 999, 'value3': '999', 'value5.attr1': 999, 'value6.attr1': 999,\n 'value7': 'abc,def,ghi', 'value8': 'abc,def,ghi'})\n config.add('value1', None, 'env', ())\n config.add('value2', None, 'env', ())\n config.add('value3', 0, 'env', ())\n config.add('value4', 0, 'env', ())\n config.add('value5', {'default': 0}, 'env', ())\n config.add('value6', {'default': 0}, 'env', ())\n config.add('value7', None, 'env', ())\n config.add('value8', [], 'env', ())\n config.init_values()\n\n assert config.value1 == '1'\n assert config.value2 == 999\n assert config.value3 == 999\n assert config.value4 == 0\n assert config.value5 == {'attr1': 999}\n assert config.value6 == {'default': 6, 'attr1': 999}\n assert config.value7 == 'abc,def,ghi'\n assert config.value8 == ['abc', 'def', 'ghi']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_overrides_boolean_test_errors_warnings.assert_logger_called_is_F": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_overrides_boolean_test_errors_warnings.assert_logger_called_is_F", "embedding": null, "metadata": {"file_path": "tests/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 122, "end_line": 149, "span_ids": ["test_errors_warnings", "test_overrides_boolean"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overrides_boolean():\n config = Config({}, {'value1': '1',\n 'value2': '0',\n 'value3': '0'})\n config.add('value1', None, 'env', [bool])\n config.add('value2', None, 'env', [bool])\n config.add('value3', True, 'env', ())\n config.init_values()\n\n assert config.value1 is True\n assert config.value2 is False\n assert config.value3 is False\n\n\n@mock.patch(\"sphinx.config.logger\")\ndef test_errors_warnings(logger, tempdir):\n # test the error for syntax errors in the config file\n (tempdir / 'conf.py').write_text('project = \\n', encoding='ascii')\n with pytest.raises(ConfigError) as excinfo:\n Config.read(tempdir, {}, None)\n assert 'conf.py' in str(excinfo.value)\n\n # test the automatic conversion of 2.x only code in configs\n (tempdir / 'conf.py').write_text('project = u\"J\u00e4germeister\"\\n')\n cfg = Config.read(tempdir, {}, None)\n cfg.init_values()\n assert cfg.project == 'J\u00e4germeister'\n assert logger.called is False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_errors_if_setup_is_not_callable_make_app_with_empty_project.return._make_app": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_errors_if_setup_is_not_callable_make_app_with_empty_project.return._make_app", "embedding": null, "metadata": {"file_path": "tests/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 152, "end_line": 167, "span_ids": ["test_errors_if_setup_is_not_callable", "make_app_with_empty_project"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_errors_if_setup_is_not_callable(tempdir, make_app):\n # test the error to call setup() in the config file\n (tempdir / 'conf.py').write_text('setup = 1')\n with pytest.raises(ConfigError) as excinfo:\n make_app(srcdir=tempdir)\n assert 'callable' in str(excinfo.value)\n\n\n@pytest.fixture\ndef make_app_with_empty_project(make_app, tempdir):\n (tempdir / 'conf.py').write_text('')\n\n def _make_app(*args, **kw):\n kw.setdefault('srcdir', path(tempdir))\n return make_app(*args, **kw)\n return _make_app", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_needs_sphinx_test_needs_sphinx.None_2._NG_greater": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_needs_sphinx_test_needs_sphinx.None_2._NG_greater", "embedding": null, "metadata": {"file_path": "tests/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 170, "end_line": 189, "span_ids": ["test_needs_sphinx"], "tokens": 288}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@mock.patch.object(sphinx, '__display_version__', '1.3.4')\ndef test_needs_sphinx(make_app_with_empty_project):\n make_app = make_app_with_empty_project\n # micro version\n make_app(confoverrides={'needs_sphinx': '1.3.3'}) # OK: less\n make_app(confoverrides={'needs_sphinx': '1.3.4'}) # OK: equals\n with pytest.raises(VersionRequirementError):\n make_app(confoverrides={'needs_sphinx': '1.3.5'}) # NG: greater\n\n # minor version\n make_app(confoverrides={'needs_sphinx': '1.2'}) # OK: less\n make_app(confoverrides={'needs_sphinx': '1.3'}) # OK: equals\n with pytest.raises(VersionRequirementError):\n make_app(confoverrides={'needs_sphinx': '1.4'}) # NG: greater\n\n # major version\n make_app(confoverrides={'needs_sphinx': '0'}) # OK: less\n make_app(confoverrides={'needs_sphinx': '1'}) # OK: equals\n with pytest.raises(VersionRequirementError):\n make_app(confoverrides={'needs_sphinx': '2'}) # NG: greater", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_config_eol_test_builtin_conf.assert_primary_domain_n": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_config_eol_test_builtin_conf.assert_primary_domain_n", "embedding": null, "metadata": {"file_path": "tests/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 188, "end_line": 212, "span_ids": ["test_builtin_conf", "test_config_eol"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@mock.patch(\"sphinx.config.logger\")\ndef test_config_eol(logger, tempdir):\n # test config file's eol patterns: LF, CRLF\n configfile = tempdir / 'conf.py'\n for eol in (b'\\n', b'\\r\\n'):\n configfile.write_bytes(b'project = \"spam\"' + eol)\n cfg = Config.read(tempdir, {}, None)\n cfg.init_values()\n assert cfg.project == 'spam'\n assert logger.called is False\n\n\n@pytest.mark.sphinx(confoverrides={'root_doc': 123,\n 'language': 'foo',\n 'primary_domain': None})\ndef test_builtin_conf(app, status, warning):\n warnings = warning.getvalue()\n assert 'root_doc' in warnings, (\n 'override on builtin \"root_doc\" should raise a type warning')\n assert 'language' not in warnings, (\n 'explicitly permitted override on builtin \"language\" should NOT raise '\n 'a type warning')\n assert 'primary_domain' not in warnings, (\n 'override to None on builtin \"primary_domain\" should NOT raise a type '\n 'warning')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py__example_classes_for_typ_test_check_enum_failed.assert_logger_warning_cal": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py__example_classes_for_typ_test_check_enum_failed.assert_logger_warning_cal", "embedding": null, "metadata": {"file_path": "tests/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 219, "end_line": 295, "span_ids": ["test_check_enum", "impl", "test_builtin_conf", "C", "impl:2", "impl:3", "B", "A", "test_conf_warning_message", "test_check_types", "test_check_enum_failed"], "tokens": 732}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# example classes for type checking\nclass A:\n pass\n\n\nclass B(A):\n pass\n\n\nclass C(A):\n pass\n\n\n# name, default, annotation, actual, warned\nTYPECHECK_WARNINGS = [\n ('value1', 'string', None, 123, True), # wrong type\n ('value2', lambda _: [], None, 123, True), # lambda with wrong type\n ('value3', lambda _: [], None, [], False), # lambda with correct type\n ('value4', 100, None, True, True), # child type\n ('value5', False, None, True, False), # parent type\n ('value6', [], None, (), True), # other sequence type\n ('value7', 'string', [list], ['foo'], False), # explicit type annotation\n ('value8', B(), None, C(), False), # sibling type\n ('value9', None, None, 'foo', False), # no default or no annotations\n ('value10', None, None, 123, False), # no default or no annotations\n ('value11', None, [str], 'bar', False), # str\n ('value12', 'string', None, 'bar', False), # str\n]\n\n\n@mock.patch(\"sphinx.config.logger\")\n@pytest.mark.parametrize(\"name,default,annotation,actual,warned\", TYPECHECK_WARNINGS)\ndef test_check_types(logger, name, default, annotation, actual, warned):\n config = Config({name: actual})\n config.add(name, default, 'env', annotation or ())\n config.init_values()\n check_confval_types(None, config)\n assert logger.warning.called == warned\n\n\nTYPECHECK_WARNING_MESSAGES = [\n ('value1', 'string', [str], ['foo', 'bar'],\n \"The config value `value1' has type `list'; expected `str'.\"),\n ('value1', 'string', [str, int], ['foo', 'bar'],\n \"The config value `value1' has type `list'; expected `str' or `int'.\"),\n ('value1', 'string', [str, int, tuple], ['foo', 'bar'],\n \"The config value `value1' has type `list'; expected `str', `int', or `tuple'.\"),\n]\n\n\n@mock.patch(\"sphinx.config.logger\")\n@pytest.mark.parametrize(\"name,default,annotation,actual,message\", TYPECHECK_WARNING_MESSAGES)\ndef test_conf_warning_message(logger, name, default, annotation, actual, message):\n config = Config({name: actual})\n config.add(name, default, False, annotation or ())\n config.init_values()\n check_confval_types(None, config)\n assert logger.warning.called\n assert logger.warning.call_args[0][0] == message\n\n\n@mock.patch(\"sphinx.config.logger\")\ndef test_check_enum(logger):\n config = Config()\n config.add('value', 'default', False, ENUM('default', 'one', 'two'))\n config.init_values()\n check_confval_types(None, config)\n logger.warning.assert_not_called() # not warned\n\n\n@mock.patch(\"sphinx.config.logger\")\ndef test_check_enum_failed(logger):\n config = Config({'value': 'invalid'})\n config.add('value', 'default', False, ENUM('default', 'one', 'two'))\n config.init_values()\n check_confval_types(None, config)\n assert logger.warning.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_correct_year.py_pytest_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_correct_year.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/test_correct_year.py", "file_name": "test_correct_year.py", "file_type": "text/x-python", "category": "test", "start_line": 10, "end_line": 37, "span_ids": ["test_correct_year", "expect_date", "imports"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\n\n@pytest.fixture(\n params=[\n # test with SOURCE_DATE_EPOCH unset: no modification\n (None, '2006-2009'),\n # test with SOURCE_DATE_EPOCH set: copyright year should be updated\n ('1293840000', '2006-2011'),\n ('1293839999', '2006-2010'),\n ],\n\n)\ndef expect_date(request, monkeypatch):\n sde, expect = request.param\n if sde:\n monkeypatch.setenv('SOURCE_DATE_EPOCH', sde)\n else:\n monkeypatch.delenv('SOURCE_DATE_EPOCH', raising=False)\n yield expect\n\n\n@pytest.mark.sphinx('html', testroot='correct-year')\ndef test_correct_year(expect_date, app):\n app.build()\n content = (app.outdir / 'index.html').read_text()\n assert expect_date in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_lines2_test_LiteralIncludeReader_lines2.assert_content_Lit": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_lines2_test_LiteralIncludeReader_lines2.assert_content_Lit", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 110, "span_ids": ["test_LiteralIncludeReader_lines2"], "tokens": 105}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_lines2(literal_inc_path):\n options = {'lines': '1,3,5'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"# Literally included file using Python highlighting\\n\"\n \"foo = \\\"Including Unicode characters: \u00fc\u00f6\u00e4\\\"\\n\"\n \"class Foo:\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_lines_and_lineno_match1_test_LiteralIncludeReader_lines_and_lineno_match1.assert_reader_lineno_star": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_lines_and_lineno_match1_test_LiteralIncludeReader_lines_and_lineno_match1.assert_reader_lineno_star", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 113, "end_line": 121, "span_ids": ["test_LiteralIncludeReader_lines_and_lineno_match1"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_lines_and_lineno_match1(literal_inc_path):\n options = {'lines': '3-5', 'lineno-match': True}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"foo = \\\"Including Unicode characters: \u00fc\u00f6\u00e4\\\"\\n\"\n \"\\n\"\n \"class Foo:\\n\")\n assert reader.lineno_start == 3", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_lines_and_lineno_match2_test_LiteralIncludeReader_lines_and_lineno_match3.with_pytest_raises_ValueE.content_lines_reader_r": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_lines_and_lineno_match2_test_LiteralIncludeReader_lines_and_lineno_match3.with_pytest_raises_ValueE.content_lines_reader_r", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 124, "end_line": 137, "span_ids": ["test_LiteralIncludeReader_lines_and_lineno_match2", "test_LiteralIncludeReader_lines_and_lineno_match3"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx() # init locale for errors\ndef test_LiteralIncludeReader_lines_and_lineno_match2(literal_inc_path, app, status, warning):\n options = {'lines': '0,3,5', 'lineno-match': True}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n with pytest.raises(ValueError):\n content, lines = reader.read()\n\n\n@pytest.mark.sphinx() # init locale for errors\ndef test_LiteralIncludeReader_lines_and_lineno_match3(literal_inc_path, app, status, warning):\n options = {'lines': '100-', 'lineno-match': True}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n with pytest.raises(ValueError):\n content, lines = reader.read()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_start_at_test_LiteralIncludeReader_start_after.assert_reader_lineno_star": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_start_at_test_LiteralIncludeReader_start_after.assert_reader_lineno_star", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 140, "end_line": 159, "span_ids": ["test_LiteralIncludeReader_start_after", "test_LiteralIncludeReader_start_at"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_start_at(literal_inc_path):\n options = {'lineno-match': True, 'start-at': 'Foo', 'end-at': 'Bar'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"class Foo:\\n\"\n \" pass\\n\"\n \"\\n\"\n \"class Bar:\\n\")\n assert reader.lineno_start == 5\n\n\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_start_after(literal_inc_path):\n options = {'lineno-match': True, 'start-after': 'Foo', 'end-before': 'Bar'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\" pass\\n\"\n \"\\n\")\n assert reader.lineno_start == 6", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_start_after_and_lines_test_LiteralIncludeReader_start_after_and_lines.assert_reader_lineno_star": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_start_after_and_lines_test_LiteralIncludeReader_start_after_and_lines.assert_reader_lineno_star", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 162, "end_line": 173, "span_ids": ["test_LiteralIncludeReader_start_after_and_lines"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_start_after_and_lines(literal_inc_path):\n options = {'lineno-match': True, 'lines': '6-',\n 'start-after': 'Literally', 'end-before': 'comment'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"\\n\"\n \"class Bar:\\n\"\n \" def baz():\\n\"\n \" pass\\n\"\n \"\\n\")\n assert reader.lineno_start == 7", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_start_at_and_lines_test_LiteralIncludeReader_start_at_and_lines.assert_reader_lineno_star": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_start_at_and_lines_test_LiteralIncludeReader_start_at_and_lines.assert_reader_lineno_star", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 176, "end_line": 184, "span_ids": ["test_LiteralIncludeReader_start_at_and_lines"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_start_at_and_lines(literal_inc_path):\n options = {'lines': '2, 3, 5', 'start-at': 'foo', 'end-before': '#'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"\\n\"\n \"class Foo:\\n\"\n \"\\n\")\n assert reader.lineno_start == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_missing_start_and_end_test_LiteralIncludeReader_missing_start_and_end.None_3.content_lines_reader_r": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_missing_start_and_end_test_LiteralIncludeReader_missing_start_and_end.None_3.content_lines_reader_r", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 187, "end_line": 206, "span_ids": ["test_LiteralIncludeReader_missing_start_and_end"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_LiteralIncludeReader_missing_start_and_end(literal_inc_path):\n options = {'start-at': 'NOTHING'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n with pytest.raises(ValueError):\n content, lines = reader.read()\n\n options = {'end-at': 'NOTHING'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n with pytest.raises(ValueError):\n content, lines = reader.read()\n\n options = {'start-after': 'NOTHING'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n with pytest.raises(ValueError):\n content, lines = reader.read()\n\n options = {'end-before': 'NOTHING'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n with pytest.raises(ValueError):\n content, lines = reader.read()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_end_before_test_LiteralIncludeReader_prepend.assert_content_Hello": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_end_before_test_LiteralIncludeReader_prepend.assert_content_Hello", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 209, "end_line": 224, "span_ids": ["test_LiteralIncludeReader_end_before", "test_LiteralIncludeReader_prepend"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_LiteralIncludeReader_end_before(literal_inc_path):\n options = {'end-before': 'nclud'} # *nclud* matches first and third lines.\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"# Literally included file using Python highlighting\\n\"\n \"\\n\")\n\n\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_prepend(literal_inc_path):\n options = {'lines': '1', 'prepend': 'Hello', 'append': 'Sphinx'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"Hello\\n\"\n \"# Literally included file using Python highlighting\\n\"\n \"Sphinx\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_tabwidth_test_LiteralIncludeReader_tabwidth_dedent.assert_content_def_q": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_tabwidth_test_LiteralIncludeReader_tabwidth_dedent.assert_content_def_q", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 254, "end_line": 279, "span_ids": ["test_LiteralIncludeReader_tabwidth_dedent", "test_LiteralIncludeReader_tabwidth"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_tabwidth(testroot):\n # tab-width: 4\n options = {'tab-width': 4, 'pyobject': 'Qux'}\n reader = LiteralIncludeReader(testroot / 'target.py', options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"class Qux:\\n\"\n \" def quux(self):\\n\"\n \" pass\\n\")\n\n # tab-width: 8\n options = {'tab-width': 8, 'pyobject': 'Qux'}\n reader = LiteralIncludeReader(testroot / 'target.py', options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"class Qux:\\n\"\n \" def quux(self):\\n\"\n \" pass\\n\")\n\n\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_tabwidth_dedent(testroot):\n options = {'tab-width': 4, 'dedent': 4, 'pyobject': 'Qux.quux'}\n reader = LiteralIncludeReader(testroot / 'target.py', options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"def quux(self):\\n\"\n \" pass\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_diff_test_LiteralIncludeReader_diff.assert_content_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_diff_test_LiteralIncludeReader_diff.assert_content_", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 282, "end_line": 299, "span_ids": ["test_LiteralIncludeReader_diff"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_diff(testroot, literal_inc_path):\n options = {'diff': testroot / 'literal-diff.inc'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"--- \" + testroot + \"/literal-diff.inc\\n\"\n \"+++ \" + testroot + \"/literal.inc\\n\"\n \"@@ -6,8 +6,8 @@\\n\"\n \" pass\\n\"\n \" \\n\"\n \" class Bar:\\n\"\n \"- def baz(self):\\n\"\n \"+ def baz():\\n\"\n \" pass\\n\"\n \" \\n\"\n \"-# comment after Bar class\\n\"\n \"+# comment after Bar class definition\\n\"\n \" def bar(): pass\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_test_force_option.assert_force_rst_not_in": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_test_force_option.assert_force_rst_not_in", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 302, "end_line": 321, "span_ids": ["test_code_block", "test_force_option"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='directive-code')\ndef test_code_block(app, status, warning):\n app.builder.build('index')\n et = etree_parse(app.outdir / 'index.xml')\n secs = et.findall('./section/section')\n code_block = secs[0].findall('literal_block')\n assert len(code_block) > 0\n actual = code_block[0].text\n expect = (\n \" def ruby?\\n\" +\n \" false\\n\" +\n \" end\"\n )\n assert actual == expect\n\n\n@pytest.mark.sphinx('html', testroot='directive-code')\ndef test_force_option(app, status, warning):\n app.builder.build(['force'])\n assert 'force.rst' not in warning.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_caption_html_test_code_block_caption_html.assert_caption_in_html": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_caption_html_test_code_block_caption_html.assert_caption_in_html", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 324, "end_line": 333, "span_ids": ["test_code_block_caption_html"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='directive-code')\ndef test_code_block_caption_html(app, status, warning):\n app.builder.build(['caption'])\n html = (app.outdir / 'caption.html').read_text()\n caption = ('<div class=\"code-block-caption\">'\n '<span class=\"caption-number\">Listing 1 </span>'\n '<span class=\"caption-text\">caption <em>test</em> rb'\n '</span><a class=\"headerlink\" href=\"#id1\" '\n 'title=\"Permalink to this code\">\\xb6</a></div>')\n assert caption in html", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_caption_latex_test_code_block_caption_latex.assert_link_in_latex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_caption_latex_test_code_block_caption_latex.assert_link_in_latex", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 336, "end_line": 346, "span_ids": ["test_code_block_caption_latex"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='directive-code')\ndef test_code_block_caption_latex(app, status, warning):\n app.builder.build_all()\n latex = (app.outdir / 'python.tex').read_text()\n caption = '\\\\sphinxSetupCaptionForVerbatim{caption \\\\sphinxstyleemphasis{test} rb}'\n label = '\\\\def\\\\sphinxLiteralBlockLabel{\\\\label{\\\\detokenize{caption:id1}}}'\n link = '\\\\hyperref[\\\\detokenize{caption:name-test-rb}]' \\\n '{Listing \\\\ref{\\\\detokenize{caption:name-test-rb}}}'\n assert caption in latex\n assert label in latex\n assert link in latex", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_namedlink_latex_test_code_block_namedlink_latex.assert_link2_in_latex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_namedlink_latex_test_code_block_namedlink_latex.assert_link2_in_latex", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 349, "end_line": 363, "span_ids": ["test_code_block_namedlink_latex"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='directive-code')\ndef test_code_block_namedlink_latex(app, status, warning):\n app.builder.build_all()\n latex = (app.outdir / 'python.tex').read_text()\n label1 = '\\\\def\\\\sphinxLiteralBlockLabel{\\\\label{\\\\detokenize{caption:name-test-rb}}}'\n link1 = '\\\\hyperref[\\\\detokenize{caption:name-test-rb}]'\\\n '{\\\\sphinxcrossref{\\\\DUrole{std,std-ref}{Ruby}}'\n label2 = ('\\\\def\\\\sphinxLiteralBlockLabel'\n '{\\\\label{\\\\detokenize{namedblocks:some-ruby-code}}}')\n link2 = '\\\\hyperref[\\\\detokenize{namedblocks:some-ruby-code}]'\\\n '{\\\\sphinxcrossref{\\\\DUrole{std,std-ref}{the ruby code}}}'\n assert label1 in latex\n assert link1 in latex\n assert label2 in latex\n assert link2 in latex", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_emphasize_latex_test_code_block_emphasize_latex.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_emphasize_latex_test_code_block_emphasize_latex.None_1", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 366, "end_line": 373, "span_ids": ["test_code_block_emphasize_latex"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='directive-code')\ndef test_code_block_emphasize_latex(app, status, warning):\n app.builder.build(['emphasize'])\n latex = (app.outdir / 'python.tex').read_text().replace('\\r\\n', '\\n')\n includes = '\\\\fvset{hllines={, 5, 6, 13, 14, 15, 24, 25, 26,}}%\\n'\n assert includes in latex\n includes = '\\\\end{sphinxVerbatim}\\n\\\\sphinxresetverbatimhllines\\n'\n assert includes in latex", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literal_include_test_literal_include.assert_actual_literal_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literal_include_test_literal_include.assert_actual_literal_", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 376, "end_line": 385, "span_ids": ["test_literal_include"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='directive-code')\ndef test_literal_include(app, status, warning):\n app.builder.build(['index'])\n et = etree_parse(app.outdir / 'index.xml')\n secs = et.findall('./section/section')\n literal_include = secs[1].findall('literal_block')\n literal_src = (app.srcdir / 'literal.inc').read_text()\n assert len(literal_include) > 0\n actual = literal_include[0].text\n assert actual == literal_src", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literal_include_block_start_with_comment_or_brank_test_literal_include_block_start_with_comment_or_brank.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literal_include_block_start_with_comment_or_brank_test_literal_include_block_start_with_comment_or_brank.None_2", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 388, "end_line": 409, "span_ids": ["test_literal_include_block_start_with_comment_or_brank"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='directive-code')\ndef test_literal_include_block_start_with_comment_or_brank(app, status, warning):\n app.builder.build(['python'])\n et = etree_parse(app.outdir / 'python.xml')\n secs = et.findall('./section/section')\n literal_include = secs[0].findall('literal_block')\n assert len(literal_include) > 0\n actual = literal_include[0].text\n expect = (\n 'def block_start_with_comment():\\n'\n ' # Comment\\n'\n ' return 1\\n'\n )\n assert actual == expect\n\n actual = literal_include[1].text\n expect = (\n 'def block_start_with_blank():\\n'\n '\\n'\n ' return 1\\n'\n )\n assert actual == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literal_include_linenos_test_literal_include_linenos.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literal_include_linenos_test_literal_include_linenos.None_2", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 425, "end_line": 440, "span_ids": ["test_literal_include_linenos"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='directive-code')\ndef test_literal_include_linenos(app, status, warning):\n app.builder.build(['linenos'])\n html = (app.outdir / 'linenos.html').read_text()\n\n # :linenos:\n assert ('<span class=\"linenos\"> 1</span><span class=\"c1\">'\n '# Literally included file using Python highlighting</span>' in html)\n\n # :lineno-start:\n assert ('<span class=\"linenos\">200</span><span class=\"c1\">'\n '# Literally included file using Python highlighting</span>' in html)\n\n # :lines: 5-9\n assert ('<span class=\"linenos\">5</span><span class=\"k\">class</span> '\n '<span class=\"nc\">Foo</span><span class=\"p\">:</span>' in html)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_file_whole_of_emptyline_test_literalinclude_file_whole_of_emptyline.assert_includes_in_latex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_file_whole_of_emptyline_test_literalinclude_file_whole_of_emptyline.assert_includes_in_latex", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 458, "end_line": 469, "span_ids": ["test_literalinclude_file_whole_of_emptyline"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='directive-code')\ndef test_literalinclude_file_whole_of_emptyline(app, status, warning):\n app.builder.build_all()\n latex = (app.outdir / 'python.tex').read_text().replace('\\r\\n', '\\n')\n includes = (\n '\\\\begin{sphinxVerbatim}'\n '[commandchars=\\\\\\\\\\\\{\\\\},numbers=left,firstnumber=1,stepnumber=1]\\n'\n '\\n'\n '\\n'\n '\\n'\n '\\\\end{sphinxVerbatim}\\n')\n assert includes in latex", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_caption_html_test_literalinclude_caption_html.assert_caption_in_html": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_caption_html_test_literalinclude_caption_html.assert_caption_in_html", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 472, "end_line": 481, "span_ids": ["test_literalinclude_caption_html"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='directive-code')\ndef test_literalinclude_caption_html(app, status, warning):\n app.builder.build('index')\n html = (app.outdir / 'caption.html').read_text()\n caption = ('<div class=\"code-block-caption\">'\n '<span class=\"caption-number\">Listing 2 </span>'\n '<span class=\"caption-text\">caption <strong>test</strong> py'\n '</span><a class=\"headerlink\" href=\"#id2\" '\n 'title=\"Permalink to this code\">\\xb6</a></div>')\n assert caption in html", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_caption_latex_test_literalinclude_caption_latex.assert_link_in_latex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_caption_latex_test_literalinclude_caption_latex.assert_link_in_latex", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 484, "end_line": 494, "span_ids": ["test_literalinclude_caption_latex"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='directive-code')\ndef test_literalinclude_caption_latex(app, status, warning):\n app.builder.build('index')\n latex = (app.outdir / 'python.tex').read_text()\n caption = '\\\\sphinxSetupCaptionForVerbatim{caption \\\\sphinxstylestrong{test} py}'\n label = '\\\\def\\\\sphinxLiteralBlockLabel{\\\\label{\\\\detokenize{caption:id2}}}'\n link = '\\\\hyperref[\\\\detokenize{caption:name-test-py}]' \\\n '{Listing \\\\ref{\\\\detokenize{caption:name-test-py}}}'\n assert caption in latex\n assert label in latex\n assert link in latex", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_namedlink_latex_test_literalinclude_namedlink_latex.assert_link2_in_latex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_namedlink_latex_test_literalinclude_namedlink_latex.assert_link2_in_latex", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 497, "end_line": 511, "span_ids": ["test_literalinclude_namedlink_latex"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='directive-code')\ndef test_literalinclude_namedlink_latex(app, status, warning):\n app.builder.build('index')\n latex = (app.outdir / 'python.tex').read_text()\n label1 = '\\\\def\\\\sphinxLiteralBlockLabel{\\\\label{\\\\detokenize{caption:name-test-py}}}'\n link1 = '\\\\hyperref[\\\\detokenize{caption:name-test-py}]'\\\n '{\\\\sphinxcrossref{\\\\DUrole{std,std-ref}{Python}}'\n label2 = ('\\\\def\\\\sphinxLiteralBlockLabel'\n '{\\\\label{\\\\detokenize{namedblocks:some-python-code}}}')\n link2 = '\\\\hyperref[\\\\detokenize{namedblocks:some-python-code}]'\\\n '{\\\\sphinxcrossref{\\\\DUrole{std,std-ref}{the python code}}}'\n assert label1 in latex\n assert link1 in latex\n assert label2 in latex\n assert link2 in latex", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_classes_test_literalinclude_classes.assert_literal_include_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_classes_test_literalinclude_classes.assert_literal_include_", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 514, "end_line": 528, "span_ids": ["test_literalinclude_classes"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='directive-code')\ndef test_literalinclude_classes(app, status, warning):\n app.builder.build(['classes'])\n et = etree_parse(app.outdir / 'classes.xml')\n secs = et.findall('./section/section')\n\n code_block = secs[0].findall('literal_block')\n assert len(code_block) > 0\n assert 'foo bar' == code_block[0].get('classes')\n assert 'code_block' == code_block[0].get('names')\n\n literalinclude = secs[1].findall('literal_block')\n assert len(literalinclude) > 0\n assert 'bar baz' == literalinclude[0].get('classes')\n assert 'literal_include' == literalinclude[0].get('names')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_pydecorators_test_literalinclude_pydecorators.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_literalinclude_pydecorators_test_literalinclude_pydecorators.None_3", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 531, "end_line": 569, "span_ids": ["test_literalinclude_pydecorators"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='directive-code')\ndef test_literalinclude_pydecorators(app, status, warning):\n app.builder.build(['py-decorators'])\n et = etree_parse(app.outdir / 'py-decorators.xml')\n secs = et.findall('./section/section')\n\n literal_include = secs[0].findall('literal_block')\n assert len(literal_include) == 3\n\n actual = literal_include[0].text\n expect = (\n '@class_decorator\\n'\n '@other_decorator()\\n'\n 'class TheClass(object):\\n'\n '\\n'\n ' @method_decorator\\n'\n ' @other_decorator()\\n'\n ' def the_method():\\n'\n ' pass\\n'\n )\n assert actual == expect\n\n actual = literal_include[1].text\n expect = (\n ' @method_decorator\\n'\n ' @other_decorator()\\n'\n ' def the_method():\\n'\n ' pass\\n'\n )\n assert actual == expect\n\n actual = literal_include[2].text\n expect = (\n '@function_decorator\\n'\n '@other_decorator()\\n'\n 'def the_function():\\n'\n ' pass\\n'\n )\n assert actual == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_highlighted_test_code_block_highlighted.assert_codeblocks_3_lan": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_highlighted_test_code_block_highlighted.assert_codeblocks_3_lan", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 557, "end_line": 566, "span_ids": ["test_code_block_highlighted"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='directive-code')\ndef test_code_block_highlighted(app, status, warning):\n app.builder.build(['highlight'])\n doctree = app.env.get_doctree('highlight')\n codeblocks = list(doctree.findall(nodes.literal_block))\n\n assert codeblocks[0]['language'] == 'default'\n assert codeblocks[1]['language'] == 'python2'\n assert codeblocks[2]['language'] == 'python3'\n assert codeblocks[3]['language'] == 'python2'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_only.py_test_sectioning.app_builder_build_only__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_only.py_test_sectioning.app_builder_build_only__", "embedding": null, "metadata": {"file_path": "tests/test_directive_only.py", "file_name": "test_directive_only.py", "file_type": "text/x-python", "category": "test", "start_line": 45, "end_line": 55, "span_ids": ["test_sectioning"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('text', testroot='directive-only')\ndef test_sectioning(app, status, warning):\n # ... other code\n\n app.builder.build(['only'])\n doctree = app.env.get_doctree('only')\n app.env.apply_post_transforms(doctree, 'only')\n\n parts = [getsects(n)\n for n in [_n for _n in doctree.children if isinstance(_n, nodes.section)]]\n for i, s in enumerate(parts):\n testsects(str(i + 1) + '.', s, 4)\n assert len(parts) == 4, 'Expected 4 document level headings, got:\\n%s' % \\\n '\\n'.join([p[0] for p in parts])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_relative_toctree_test_relative_toctree.assert_node_doctree_0_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_relative_toctree_test_relative_toctree.assert_node_doctree_0_0_", "embedding": null, "metadata": {"file_path": "tests/test_directive_other.py", "file_name": "test_directive_other.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 50, "span_ids": ["test_relative_toctree"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='toctree-glob')\ndef test_relative_toctree(app):\n text = (\".. toctree::\\n\"\n \"\\n\"\n \" bar_1\\n\"\n \" bar_2\\n\"\n \" bar_3\\n\"\n \" ../quux\\n\")\n\n app.env.find_files(app.config, app.builder)\n doctree = restructuredtext.parse(app, text, 'bar/index')\n assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])\n assert_node(doctree[0][0],\n entries=[(None, 'bar/bar_1'), (None, 'bar/bar_2'), (None, 'bar/bar_3'),\n (None, 'quux')],\n includefiles=['bar/bar_1', 'bar/bar_2', 'bar/bar_3', 'quux'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_urls_and_titles_test_toctree_urls_and_titles.assert_node_doctree_0_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_urls_and_titles_test_toctree_urls_and_titles.assert_node_doctree_0_0_", "embedding": null, "metadata": {"file_path": "tests/test_directive_other.py", "file_name": "test_directive_other.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 68, "span_ids": ["test_toctree_urls_and_titles"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='toctree-glob')\ndef test_toctree_urls_and_titles(app):\n text = (\".. toctree::\\n\"\n \"\\n\"\n \" Sphinx <https://www.sphinx-doc.org/>\\n\"\n \" https://readthedocs.org/\\n\"\n \" The BAR <bar/index>\\n\")\n\n app.env.find_files(app.config, app.builder)\n doctree = restructuredtext.parse(app, text, 'index')\n assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])\n assert_node(doctree[0][0],\n entries=[('Sphinx', 'https://www.sphinx-doc.org/'),\n (None, 'https://readthedocs.org/'),\n ('The BAR', 'bar/index')],\n includefiles=['bar/index'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_glob_test_toctree_glob.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_glob_test_toctree_glob.None_8", "embedding": null, "metadata": {"file_path": "tests/test_directive_other.py", "file_name": "test_directive_other.py", "file_type": "text/x-python", "category": "test", "start_line": 71, "end_line": 111, "span_ids": ["test_toctree_glob"], "tokens": 444}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='toctree-glob')\ndef test_toctree_glob(app):\n text = (\".. toctree::\\n\"\n \" :glob:\\n\"\n \"\\n\"\n \" *\\n\")\n\n app.env.find_files(app.config, app.builder)\n doctree = restructuredtext.parse(app, text, 'index')\n assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])\n assert_node(doctree[0][0],\n entries=[(None, 'baz'), (None, 'foo'), (None, 'quux')],\n includefiles=['baz', 'foo', 'quux'])\n\n # give both docname and glob (case1)\n text = (\".. toctree::\\n\"\n \" :glob:\\n\"\n \"\\n\"\n \" foo\\n\"\n \" *\\n\")\n\n app.env.find_files(app.config, app.builder)\n doctree = restructuredtext.parse(app, text, 'index')\n assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])\n assert_node(doctree[0][0],\n entries=[(None, 'foo'), (None, 'baz'), (None, 'quux')],\n includefiles=['foo', 'baz', 'quux'])\n\n # give both docname and glob (case2)\n text = (\".. toctree::\\n\"\n \" :glob:\\n\"\n \"\\n\"\n \" *\\n\"\n \" foo\\n\")\n\n app.env.find_files(app.config, app.builder)\n doctree = restructuredtext.parse(app, text, 'index')\n assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])\n assert_node(doctree[0][0],\n entries=[(None, 'baz'), (None, 'foo'), (None, 'quux'), (None, 'foo')],\n includefiles=['baz', 'foo', 'quux', 'foo'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_glob_and_url_test_toctree_glob_and_url.assert_node_doctree_0_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_glob_and_url_test_toctree_glob_and_url.assert_node_doctree_0_0_", "embedding": null, "metadata": {"file_path": "tests/test_directive_other.py", "file_name": "test_directive_other.py", "file_type": "text/x-python", "category": "test", "start_line": 114, "end_line": 126, "span_ids": ["test_toctree_glob_and_url"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='toctree-glob')\ndef test_toctree_glob_and_url(app):\n text = (\".. toctree::\\n\"\n \" :glob:\\n\"\n \"\\n\"\n \" https://example.com/?q=sphinx\\n\")\n\n app.env.find_files(app.config, app.builder)\n doctree = restructuredtext.parse(app, text, 'index')\n assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])\n assert_node(doctree[0][0],\n entries=[(None, 'https://example.com/?q=sphinx')],\n includefiles=[])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_reversed_toctree_test_reversed_toctree.assert_node_doctree_0_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_reversed_toctree_test_reversed_toctree.assert_node_doctree_0_0_", "embedding": null, "metadata": {"file_path": "tests/test_directive_other.py", "file_name": "test_directive_other.py", "file_type": "text/x-python", "category": "test", "start_line": 129, "end_line": 143, "span_ids": ["test_reversed_toctree"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='toctree-glob')\ndef test_reversed_toctree(app):\n text = (\".. toctree::\\n\"\n \" :reversed:\\n\"\n \"\\n\"\n \" foo\\n\"\n \" bar/index\\n\"\n \" baz\\n\")\n\n app.env.find_files(app.config, app.builder)\n doctree = restructuredtext.parse(app, text, 'index')\n assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])\n assert_node(doctree[0][0],\n entries=[(None, 'baz'), (None, 'bar/index'), (None, 'foo')],\n includefiles=['baz', 'bar/index', 'foo'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_twice_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py_test_toctree_twice_", "embedding": null, "metadata": {"file_path": "tests/test_directive_other.py", "file_name": "test_directive_other.py", "file_type": "text/x-python", "category": "test", "start_line": 146, "end_line": 159, "span_ids": ["test_toctree_twice"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='toctree-glob')\ndef test_toctree_twice(app):\n text = (\".. toctree::\\n\"\n \"\\n\"\n \" foo\\n\"\n \" foo\\n\")\n\n app.env.find_files(app.config, app.builder)\n doctree = restructuredtext.parse(app, text, 'index')\n assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])\n assert_node(doctree[0][0],\n entries=[(None, 'foo'), (None, 'foo')],\n includefiles=['foo', 'foo'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_patch.py_test_math_directive_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_patch.py_test_math_directive_", "embedding": null, "metadata": {"file_path": "tests/test_directive_patch.py", "file_name": "test_directive_patch.py", "file_type": "text/x-python", "category": "test", "start_line": 57, "end_line": 87, "span_ids": ["test_math_directive"], "tokens": 377}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_math_directive(app):\n # normal case\n text = '.. math:: E = mc^2'\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, [nodes.document, nodes.math_block, 'E = mc^2\\n\\n'])\n\n # :name: option\n text = ('.. math:: E = mc^2\\n'\n ' :name: eq1\\n')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, [nodes.document, (nodes.target,\n [nodes.math_block, \"E = mc^2\\n\\n\"])])\n assert_node(doctree[1], nodes.math_block, docname='index', label=\"eq1\", number=1)\n\n # :label: option\n text = ('.. math:: E = mc^2\\n'\n ' :label: eq2\\n')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, [nodes.document, (nodes.target,\n [nodes.math_block, 'E = mc^2\\n\\n'])])\n assert_node(doctree[1], nodes.math_block, docname='index', label=\"eq2\", number=2)\n\n # :label: option without value\n text = ('.. math:: E = mc^2\\n'\n ' :label:\\n')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, [nodes.document, (nodes.target,\n [nodes.math_block, 'E = mc^2\\n\\n'])])\n assert_node(doctree[1], nodes.math_block, ids=['equation-index-0'],\n docname='index', label=\"index:0\", number=3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_docutilsconf.py_test_html_with_docutilsconf_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_docutilsconf.py_test_html_with_docutilsconf_", "embedding": null, "metadata": {"file_path": "tests/test_docutilsconf.py", "file_name": "test_docutilsconf.py", "file_type": "text/x-python", "category": "test", "start_line": 28, "end_line": 38, "span_ids": ["test_html_with_docutilsconf"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='docutilsconf', freshenv=True,\n docutilsconf=('[restructuredtext parser]\\n'\n 'trim_footnote_reference_space: true\\n'))\ndef test_html_with_docutilsconf(app, status, warning):\n with patch_docutils(app.confdir):\n app.build()\n\n doctree = app.env.get_doctree('index')\n assert_node(doctree[0][1], [nodes.paragraph, (\"Sphinx\",\n [nodes.footnote_reference, \"1\"])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py__check__check.if_not_all_res_.raise_DefinitionError_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py__check__check.if_not_all_res_.raise_DefinitionError_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 32, "end_line": 98, "span_ids": ["_check"], "tokens": 563}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _check(name, input, idDict, output, key, asTextOutput):\n if key is None:\n key = name\n key += ' '\n if name in ('function', 'member'):\n inputActual = input\n outputAst = output\n outputAsText = output\n else:\n inputActual = input.format(key='')\n outputAst = output.format(key='')\n outputAsText = output.format(key=key)\n if asTextOutput is not None:\n outputAsText = asTextOutput\n\n # first a simple check of the AST\n ast = parse(name, inputActual)\n res = str(ast)\n if res != outputAst:\n print(\"\")\n print(\"Input: \", input)\n print(\"Result: \", res)\n print(\"Expected: \", outputAst)\n raise DefinitionError(\"\")\n rootSymbol = Symbol(None, None, None, None, None)\n symbol = rootSymbol.add_declaration(ast, docname=\"TestDoc\", line=42)\n parentNode = addnodes.desc()\n signode = addnodes.desc_signature(input, '')\n parentNode += signode\n ast.describe_signature(signode, 'lastIsName', symbol, options={})\n resAsText = parentNode.astext()\n if resAsText != outputAsText:\n print(\"\")\n print(\"Input: \", input)\n print(\"astext(): \", resAsText)\n print(\"Expected: \", outputAsText)\n raise DefinitionError(\"\")\n\n idExpected = [None]\n for i in range(1, _max_id + 1):\n if i in idDict:\n idExpected.append(idDict[i])\n else:\n idExpected.append(idExpected[i - 1])\n idActual = [None]\n for i in range(1, _max_id + 1):\n # try:\n id = ast.get_id(version=i)\n assert id is not None\n idActual.append(id[len(_id_prefix[i]):])\n # except NoOldIdError:\n # idActual.append(None)\n\n res = [True]\n for i in range(1, _max_id + 1):\n res.append(idExpected[i] == idActual[i])\n\n if not all(res):\n print(\"input: %s\" % input.rjust(20))\n for i in range(1, _max_id + 1):\n if res[i]:\n continue\n print(\"Error in id version %d.\" % i)\n print(\"result: %s\" % idActual[i])\n print(\"expected: %s\" % idExpected[i])\n # print(rootSymbol.dump(0))\n raise DefinitionError(\"\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py__check__check.if_not_all_res_.raise_DefinitionError_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py__check__check.if_not_all_res_.raise_DefinitionError_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 33, "end_line": 100, "span_ids": ["_check"], "tokens": 569}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _check(name, input, idDict, output, key, asTextOutput):\n if key is None:\n key = name\n key += ' '\n if name in ('function', 'member'):\n inputActual = input\n outputAst = output\n outputAsText = output\n else:\n inputActual = input.format(key='')\n outputAst = output.format(key='')\n outputAsText = output.format(key=key)\n if asTextOutput is not None:\n outputAsText = asTextOutput\n\n # first a simple check of the AST\n ast = parse(name, inputActual)\n res = str(ast)\n if res != outputAst:\n print(\"\")\n print(\"Input: \", input)\n print(\"Result: \", res)\n print(\"Expected: \", outputAst)\n raise DefinitionError(\"\")\n rootSymbol = Symbol(None, None, None, None, None, None, None)\n symbol = rootSymbol.add_declaration(ast, docname=\"TestDoc\", line=42)\n parentNode = addnodes.desc()\n signode = addnodes.desc_signature(input, '')\n parentNode += signode\n ast.describe_signature(signode, 'lastIsName', symbol, options={})\n resAsText = parentNode.astext()\n if resAsText != outputAsText:\n print(\"\")\n print(\"Input: \", input)\n print(\"astext(): \", resAsText)\n print(\"Expected: \", outputAsText)\n print(\"Node:\", parentNode)\n raise DefinitionError(\"\")\n\n idExpected = [None]\n for i in range(1, _max_id + 1):\n if i in idDict:\n idExpected.append(idDict[i])\n else:\n idExpected.append(idExpected[i - 1])\n idActual = [None]\n for i in range(1, _max_id + 1):\n try:\n id = ast.get_id(version=i)\n assert id is not None\n idActual.append(id[len(_id_prefix[i]):])\n except NoOldIdError:\n idActual.append(None)\n\n res = [True]\n for i in range(1, _max_id + 1):\n res.append(idExpected[i] == idActual[i])\n\n if not all(res):\n print(\"input: %s\" % input.rjust(20))\n for i in range(1, _max_id + 1):\n if res[i]:\n continue\n print(\"Error in id version %d.\" % i)\n print(\"result: %s\" % idActual[i])\n print(\"expected: %s\" % idExpected[i])\n print(rootSymbol.dump(0))\n raise DefinitionError(\"\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_domain_js_objects_test_domain_js_objects.None_18": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_domain_js_objects_test_domain_js_objects.None_18", "embedding": null, "metadata": {"file_path": "tests/test_domain_js.py", "file_name": "test_domain_js.py", "file_type": "text/x-python", "category": "test", "start_line": 82, "end_line": 109, "span_ids": ["test_domain_js_objects"], "tokens": 365}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='domain-js')\ndef test_domain_js_objects(app, status, warning):\n app.builder.build_all()\n\n modules = app.env.domains['js'].data['modules']\n objects = app.env.domains['js'].data['objects']\n\n assert 'module_a.submodule' in modules\n assert 'module_a.submodule' in objects\n assert 'module_b.submodule' in modules\n assert 'module_b.submodule' in objects\n\n assert objects['module_a.submodule.ModTopLevel'][2] == 'class'\n assert objects['module_a.submodule.ModTopLevel.mod_child_1'][2] == 'method'\n assert objects['module_a.submodule.ModTopLevel.mod_child_2'][2] == 'method'\n assert objects['module_b.submodule.ModTopLevel'][2] == 'class'\n\n assert objects['TopLevel'][2] == 'class'\n assert objects['top_level'][2] == 'function'\n assert objects['NestedParentA'][2] == 'class'\n assert objects['NestedParentA.child_1'][2] == 'function'\n assert objects['NestedParentA.any_child'][2] == 'function'\n assert objects['NestedParentA.NestedChildA'][2] == 'class'\n assert objects['NestedParentA.NestedChildA.subchild_1'][2] == 'function'\n assert objects['NestedParentA.NestedChildA.subchild_2'][2] == 'function'\n assert objects['NestedParentA.child_2'][2] == 'function'\n assert objects['NestedParentB'][2] == 'class'\n assert objects['NestedParentB.child_1'][2] == 'function'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_domain_js_find_obj_test_domain_js_find_obj.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_domain_js_find_obj_test_domain_js_find_obj.None_8", "embedding": null, "metadata": {"file_path": "tests/test_domain_js.py", "file_name": "test_domain_js.py", "file_type": "text/x-python", "category": "test", "start_line": 112, "end_line": 144, "span_ids": ["test_domain_js_find_obj"], "tokens": 520}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='domain-js')\ndef test_domain_js_find_obj(app, status, warning):\n\n def find_obj(mod_name, prefix, obj_name, obj_type, searchmode=0):\n return app.env.domains['js'].find_obj(\n app.env, mod_name, prefix, obj_name, obj_type, searchmode)\n\n app.builder.build_all()\n\n assert (find_obj(None, None, 'NONEXISTANT', 'class') == (None, None))\n assert (find_obj(None, None, 'NestedParentA', 'class') ==\n ('NestedParentA', ('roles', 'NestedParentA', 'class')))\n assert (find_obj(None, None, 'NestedParentA.NestedChildA', 'class') ==\n ('NestedParentA.NestedChildA',\n ('roles', 'NestedParentA.NestedChildA', 'class')))\n assert (find_obj(None, 'NestedParentA', 'NestedChildA', 'class') ==\n ('NestedParentA.NestedChildA',\n ('roles', 'NestedParentA.NestedChildA', 'class')))\n assert (find_obj(None, None, 'NestedParentA.NestedChildA.subchild_1', 'func') ==\n ('NestedParentA.NestedChildA.subchild_1',\n ('roles', 'NestedParentA.NestedChildA.subchild_1', 'function')))\n assert (find_obj(None, 'NestedParentA', 'NestedChildA.subchild_1', 'func') ==\n ('NestedParentA.NestedChildA.subchild_1',\n ('roles', 'NestedParentA.NestedChildA.subchild_1', 'function')))\n assert (find_obj(None, 'NestedParentA.NestedChildA', 'subchild_1', 'func') ==\n ('NestedParentA.NestedChildA.subchild_1',\n ('roles', 'NestedParentA.NestedChildA.subchild_1', 'function')))\n assert (find_obj('module_a.submodule', 'ModTopLevel', 'mod_child_2', 'meth') ==\n ('module_a.submodule.ModTopLevel.mod_child_2',\n ('module', 'module_a.submodule.ModTopLevel.mod_child_2', 'method')))\n assert (find_obj('module_b.submodule', 'ModTopLevel', 'module_a.submodule', 'mod') ==\n ('module_a.submodule',\n ('module', 'module-module_a.submodule', 'module')))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_get_full_qualified_name_test_get_full_qualified_name.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_get_full_qualified_name_test_get_full_qualified_name.None_4", "embedding": null, "metadata": {"file_path": "tests/test_domain_js.py", "file_name": "test_domain_js.py", "file_type": "text/x-python", "category": "test", "start_line": 147, "end_line": 172, "span_ids": ["test_get_full_qualified_name"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_full_qualified_name():\n env = Mock(domaindata={})\n domain = JavaScriptDomain(env)\n\n # non-js references\n node = nodes.reference()\n assert domain.get_full_qualified_name(node) is None\n\n # simple reference\n node = nodes.reference(reftarget='func')\n assert domain.get_full_qualified_name(node) == 'func'\n\n # with js:module context\n kwargs = {'js:module': 'module1'}\n node = nodes.reference(reftarget='func', **kwargs)\n assert domain.get_full_qualified_name(node) == 'module1.func'\n\n # with js:object context\n kwargs = {'js:object': 'Class'}\n node = nodes.reference(reftarget='func', **kwargs)\n assert domain.get_full_qualified_name(node) == 'Class.func'\n\n # with both js:module and js:object context\n kwargs = {'js:module': 'module1', 'js:object': 'Class'}\n node = nodes.reference(reftarget='func', **kwargs)\n assert domain.get_full_qualified_name(node) == 'module1.Class.func'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_js_module_test_js_function.assert_node_doctree_1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_js_module_test_js_function.assert_node_doctree_1_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_js.py", "file_name": "test_domain_js.py", "file_type": "text/x-python", "category": "test", "start_line": 166, "end_line": 187, "span_ids": ["test_js_function", "test_js_module"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_js_module(app):\n text = \".. js:module:: sphinx\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (nodes.target,\n addnodes.index))\n assert_node(doctree[0], nodes.target, ids=[\"module-sphinx\"])\n assert_node(doctree[1], addnodes.index,\n entries=[(\"single\", \"sphinx (module)\", \"module-sphinx\", \"\", None)])\n\n\ndef test_js_function(app):\n text = \".. js:function:: sum(a, b)\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, ([desc_sig_name, \"sum\"])],\n desc_parameterlist)],\n [desc_content, ()])]))\n assert_node(doctree[1][0][1], [desc_parameterlist, ([desc_parameter, ([desc_sig_name, \"a\"])],\n [desc_parameter, ([desc_sig_name, \"b\"])])])\n assert_node(doctree[0], addnodes.index,\n entries=[(\"single\", \"sum() (built-in function)\", \"sum\", \"\", None)])\n assert_node(doctree[1], addnodes.desc, domain=\"js\", objtype=\"function\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_js_class_test_js_class.assert_node_doctree_1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_js_class_test_js_class.assert_node_doctree_1_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_js.py", "file_name": "test_domain_js.py", "file_type": "text/x-python", "category": "test", "start_line": 190, "end_line": 201, "span_ids": ["test_js_class"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_js_class(app):\n text = \".. js:class:: Application\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, ([desc_sig_keyword, 'class'],\n desc_sig_space)],\n [desc_name, ([desc_sig_name, \"Application\"])],\n [desc_parameterlist, ()])],\n [desc_content, ()])]))\n assert_node(doctree[0], addnodes.index,\n entries=[(\"single\", \"Application() (class)\", \"Application\", \"\", None)])\n assert_node(doctree[1], addnodes.desc, domain=\"js\", objtype=\"class\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_function_signatures_test_function_signatures.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_function_signatures_test_function_signatures.None_5", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 41, "end_line": 58, "span_ids": ["test_function_signatures"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_function_signatures():\n rv = parse('func(a=1) -> int object')\n assert rv == '(a=1)'\n\n rv = parse('func(a=1, [b=None])')\n assert rv == '(a=1, [b=None])'\n\n rv = parse('func(a=1[, b=None])')\n assert rv == '(a=1, [b=None])'\n\n rv = parse(\"compile(source : string, filename, symbol='file')\")\n assert rv == \"(source : string, filename, symbol='file')\"\n\n rv = parse('func(a=[], [b=None])')\n assert rv == '(a=[], [b=None])'\n\n rv = parse('func(a=[][, b=None])')\n assert rv == '(a=[], [b=None])'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_xrefs_test_domain_py_xrefs.None_21": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_xrefs_test_domain_py_xrefs.None_21", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 108, "span_ids": ["test_domain_py_xrefs"], "tokens": 784}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='domain-py')\ndef test_domain_py_xrefs(app, status, warning):\n \"\"\"Domain objects have correct prefixes when looking up xrefs\"\"\"\n app.builder.build_all()\n\n def assert_refnode(node, module_name, class_name, target, reftype=None,\n domain='py'):\n attributes = {\n 'refdomain': domain,\n 'reftarget': target,\n }\n if reftype is not None:\n attributes['reftype'] = reftype\n if module_name is not False:\n attributes['py:module'] = module_name\n if class_name is not False:\n attributes['py:class'] = class_name\n assert_node(node, **attributes)\n\n doctree = app.env.get_doctree('roles')\n refnodes = list(doctree.findall(pending_xref))\n assert_refnode(refnodes[0], None, None, 'TopLevel', 'class')\n assert_refnode(refnodes[1], None, None, 'top_level', 'meth')\n assert_refnode(refnodes[2], None, 'NestedParentA', 'child_1', 'meth')\n assert_refnode(refnodes[3], None, 'NestedParentA', 'NestedChildA.subchild_2', 'meth')\n assert_refnode(refnodes[4], None, 'NestedParentA', 'child_2', 'meth')\n assert_refnode(refnodes[5], False, 'NestedParentA', 'any_child', domain='')\n assert_refnode(refnodes[6], None, 'NestedParentA', 'NestedChildA', 'class')\n assert_refnode(refnodes[7], None, 'NestedParentA.NestedChildA', 'subchild_2', 'meth')\n assert_refnode(refnodes[8], None, 'NestedParentA.NestedChildA',\n 'NestedParentA.child_1', 'meth')\n assert_refnode(refnodes[9], None, 'NestedParentA', 'NestedChildA.subchild_1', 'meth')\n assert_refnode(refnodes[10], None, 'NestedParentB', 'child_1', 'meth')\n assert_refnode(refnodes[11], None, 'NestedParentB', 'NestedParentB', 'class')\n assert_refnode(refnodes[12], None, None, 'NestedParentA.NestedChildA', 'class')\n assert len(refnodes) == 13\n\n doctree = app.env.get_doctree('module')\n refnodes = list(doctree.findall(pending_xref))\n assert_refnode(refnodes[0], 'module_a.submodule', None,\n 'ModTopLevel', 'class')\n assert_refnode(refnodes[1], 'module_a.submodule', 'ModTopLevel',\n 'mod_child_1', 'meth')\n assert_refnode(refnodes[2], 'module_a.submodule', 'ModTopLevel',\n 'ModTopLevel.mod_child_1', 'meth')\n assert_refnode(refnodes[3], 'module_a.submodule', 'ModTopLevel',\n 'mod_child_2', 'meth')\n assert_refnode(refnodes[4], 'module_a.submodule', 'ModTopLevel',\n 'module_a.submodule.ModTopLevel.mod_child_1', 'meth')\n assert_refnode(refnodes[5], 'module_a.submodule', 'ModTopLevel',\n 'prop', 'attr')\n assert_refnode(refnodes[6], 'module_a.submodule', 'ModTopLevel',\n 'prop', 'meth')\n assert_refnode(refnodes[7], 'module_b.submodule', None,\n 'ModTopLevel', 'class')\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_xrefs.None_22_test_domain_py_xrefs.assert_len_refnodes_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_xrefs.None_22_test_domain_py_xrefs.assert_len_refnodes_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 109, "end_line": 127, "span_ids": ["test_domain_py_xrefs"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='domain-py')\ndef test_domain_py_xrefs(app, status, warning):\n # ... other code\n assert_refnode(refnodes[8], 'module_b.submodule', 'ModTopLevel',\n 'ModNoModule', 'class')\n assert_refnode(refnodes[9], False, False, 'int', 'class')\n assert_refnode(refnodes[10], False, False, 'tuple', 'class')\n assert_refnode(refnodes[11], False, False, 'str', 'class')\n assert_refnode(refnodes[12], False, False, 'float', 'class')\n assert_refnode(refnodes[13], False, False, 'list', 'class')\n assert_refnode(refnodes[14], False, False, 'ModTopLevel', 'class')\n assert_refnode(refnodes[15], False, False, 'index', 'doc', domain='std')\n assert len(refnodes) == 16\n\n doctree = app.env.get_doctree('module_option')\n refnodes = list(doctree.findall(pending_xref))\n print(refnodes)\n print(refnodes[0])\n print(refnodes[1])\n assert_refnode(refnodes[0], 'test.extra', 'B', 'foo', 'meth')\n assert_refnode(refnodes[1], 'test.extra', 'B', 'foo', 'meth')\n assert len(refnodes) == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_objects_test_domain_py_objects.None_20": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_objects_test_domain_py_objects.None_20", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 137, "end_line": 166, "span_ids": ["test_domain_py_objects"], "tokens": 394}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='domain-py')\ndef test_domain_py_objects(app, status, warning):\n app.builder.build_all()\n\n modules = app.env.domains['py'].data['modules']\n objects = app.env.domains['py'].data['objects']\n\n assert 'module_a.submodule' in modules\n assert 'module_a.submodule' in objects\n assert 'module_b.submodule' in modules\n assert 'module_b.submodule' in objects\n\n assert objects['module_a.submodule.ModTopLevel'][2] == 'class'\n assert objects['module_a.submodule.ModTopLevel.mod_child_1'][2] == 'method'\n assert objects['module_a.submodule.ModTopLevel.mod_child_2'][2] == 'method'\n assert 'ModTopLevel.ModNoModule' not in objects\n assert objects['ModNoModule'][2] == 'class'\n assert objects['module_b.submodule.ModTopLevel'][2] == 'class'\n\n assert objects['TopLevel'][2] == 'class'\n assert objects['top_level'][2] == 'method'\n assert objects['NestedParentA'][2] == 'class'\n assert objects['NestedParentA.child_1'][2] == 'method'\n assert objects['NestedParentA.any_child'][2] == 'method'\n assert objects['NestedParentA.NestedChildA'][2] == 'class'\n assert objects['NestedParentA.NestedChildA.subchild_1'][2] == 'method'\n assert objects['NestedParentA.NestedChildA.subchild_2'][2] == 'method'\n assert objects['NestedParentA.child_2'][2] == 'method'\n assert objects['NestedParentB'][2] == 'class'\n assert objects['NestedParentB.child_1'][2] == 'method'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_find_obj_test_domain_py_find_obj.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_find_obj_test_domain_py_find_obj.None_6", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 204, "end_line": 230, "span_ids": ["test_domain_py_find_obj"], "tokens": 428}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='domain-py')\ndef test_domain_py_find_obj(app, status, warning):\n\n def find_obj(modname, prefix, obj_name, obj_type, searchmode=0):\n return app.env.domains['py'].find_obj(\n app.env, modname, prefix, obj_name, obj_type, searchmode)\n\n app.builder.build_all()\n\n assert (find_obj(None, None, 'NONEXISTANT', 'class') == [])\n assert (find_obj(None, None, 'NestedParentA', 'class') ==\n [('NestedParentA', ('roles', 'NestedParentA', 'class', False))])\n assert (find_obj(None, None, 'NestedParentA.NestedChildA', 'class') ==\n [('NestedParentA.NestedChildA',\n ('roles', 'NestedParentA.NestedChildA', 'class', False))])\n assert (find_obj(None, 'NestedParentA', 'NestedChildA', 'class') ==\n [('NestedParentA.NestedChildA',\n ('roles', 'NestedParentA.NestedChildA', 'class', False))])\n assert (find_obj(None, None, 'NestedParentA.NestedChildA.subchild_1', 'meth') ==\n [('NestedParentA.NestedChildA.subchild_1',\n ('roles', 'NestedParentA.NestedChildA.subchild_1', 'method', False))])\n assert (find_obj(None, 'NestedParentA', 'NestedChildA.subchild_1', 'meth') ==\n [('NestedParentA.NestedChildA.subchild_1',\n ('roles', 'NestedParentA.NestedChildA.subchild_1', 'method', False))])\n assert (find_obj(None, 'NestedParentA.NestedChildA', 'subchild_1', 'meth') ==\n [('NestedParentA.NestedChildA.subchild_1',\n ('roles', 'NestedParentA.NestedChildA.subchild_1', 'method', False))])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_get_full_qualified_name_test_get_full_qualified_name.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_get_full_qualified_name_test_get_full_qualified_name.None_4", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 211, "end_line": 236, "span_ids": ["test_get_full_qualified_name"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_full_qualified_name():\n env = Mock(domaindata={})\n domain = PythonDomain(env)\n\n # non-python references\n node = nodes.reference()\n assert domain.get_full_qualified_name(node) is None\n\n # simple reference\n node = nodes.reference(reftarget='func')\n assert domain.get_full_qualified_name(node) == 'func'\n\n # with py:module context\n kwargs = {'py:module': 'module1'}\n node = nodes.reference(reftarget='func', **kwargs)\n assert domain.get_full_qualified_name(node) == 'module1.func'\n\n # with py:class context\n kwargs = {'py:class': 'Class'}\n node = nodes.reference(reftarget='func', **kwargs)\n assert domain.get_full_qualified_name(node) == 'Class.func'\n\n # with both py:module and py:class context\n kwargs = {'py:module': 'module1', 'py:class': 'Class'}\n node = nodes.reference(reftarget='func', **kwargs)\n assert domain.get_full_qualified_name(node) == 'module1.Class.func'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_signature_test_pyfunction_signature.assert_node_doctree_1_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_signature_test_pyfunction_signature.assert_node_doctree_1_0_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 391, "end_line": 405, "span_ids": ["test_pyfunction_signature"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pyfunction_signature(app):\n text = \".. py:function:: hello(name: str) -> str\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"hello\"],\n desc_parameterlist,\n [desc_returns, pending_xref, \"str\"])],\n desc_content)]))\n assert_node(doctree[1], addnodes.desc, desctype=\"function\",\n domain=\"py\", objtype=\"function\", noindex=False)\n assert_node(doctree[1][0][1],\n [desc_parameterlist, desc_parameter, ([desc_sig_name, \"name\"],\n [desc_sig_punctuation, \":\"],\n desc_sig_space,\n [nodes.inline, pending_xref, \"str\"])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_signature_full_test_pyfunction_signature_full.assert_node_doctree_1_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_signature_full_test_pyfunction_signature_full.assert_node_doctree_1_0_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 408, "end_line": 452, "span_ids": ["test_pyfunction_signature_full"], "tokens": 479}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pyfunction_signature_full(app):\n text = (\".. py:function:: hello(a: str, b = 1, *args: str, \"\n \"c: bool = True, d: tuple = (1, 2), **kwargs: str) -> str\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"hello\"],\n desc_parameterlist,\n [desc_returns, pending_xref, \"str\"])],\n desc_content)]))\n assert_node(doctree[1], addnodes.desc, desctype=\"function\",\n domain=\"py\", objtype=\"function\", noindex=False)\n assert_node(doctree[1][0][1],\n [desc_parameterlist, ([desc_parameter, ([desc_sig_name, \"a\"],\n [desc_sig_punctuation, \":\"],\n desc_sig_space,\n [desc_sig_name, pending_xref, \"str\"])],\n [desc_parameter, ([desc_sig_name, \"b\"],\n [desc_sig_operator, \"=\"],\n [nodes.inline, \"1\"])],\n [desc_parameter, ([desc_sig_operator, \"*\"],\n [desc_sig_name, \"args\"],\n [desc_sig_punctuation, \":\"],\n desc_sig_space,\n [desc_sig_name, pending_xref, \"str\"])],\n [desc_parameter, ([desc_sig_name, \"c\"],\n [desc_sig_punctuation, \":\"],\n desc_sig_space,\n [desc_sig_name, pending_xref, \"bool\"],\n desc_sig_space,\n [desc_sig_operator, \"=\"],\n desc_sig_space,\n [nodes.inline, \"True\"])],\n [desc_parameter, ([desc_sig_name, \"d\"],\n [desc_sig_punctuation, \":\"],\n desc_sig_space,\n [desc_sig_name, pending_xref, \"tuple\"],\n desc_sig_space,\n [desc_sig_operator, \"=\"],\n desc_sig_space,\n [nodes.inline, \"(1, 2)\"])],\n [desc_parameter, ([desc_sig_operator, \"**\"],\n [desc_sig_name, \"kwargs\"],\n [desc_sig_punctuation, \":\"],\n desc_sig_space,\n [desc_sig_name, pending_xref, \"str\"])])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_signature_full_py38_test_pyfunction_signature_full_py38.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_signature_full_py38_test_pyfunction_signature_full_py38.None_3", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 340, "end_line": 373, "span_ids": ["test_pyfunction_signature_full_py38"], "tokens": 404}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8), reason='python 3.8+ is required.')\ndef test_pyfunction_signature_full_py38(app):\n # case: separator at head\n text = \".. py:function:: hello(*, a)\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree[1][0][1],\n [desc_parameterlist, ([desc_parameter, nodes.inline, \"*\"],\n [desc_parameter, desc_sig_name, \"a\"])])\n\n # case: separator in the middle\n text = \".. py:function:: hello(a, /, b, *, c)\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree[1][0][1],\n [desc_parameterlist, ([desc_parameter, desc_sig_name, \"a\"],\n [desc_parameter, desc_sig_operator, \"/\"],\n [desc_parameter, desc_sig_name, \"b\"],\n [desc_parameter, desc_sig_operator, \"*\"],\n [desc_parameter, desc_sig_name, \"c\"])])\n\n # case: separator in the middle (2)\n text = \".. py:function:: hello(a, /, *, b)\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree[1][0][1],\n [desc_parameterlist, ([desc_parameter, desc_sig_name, \"a\"],\n [desc_parameter, desc_sig_operator, \"/\"],\n [desc_parameter, desc_sig_operator, \"*\"],\n [desc_parameter, desc_sig_name, \"b\"])])\n\n # case: separator at tail\n text = \".. py:function:: hello(a, /)\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree[1][0][1],\n [desc_parameterlist, ([desc_parameter, desc_sig_name, \"a\"],\n [desc_parameter, desc_sig_operator, \"/\"])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_optional_pyfunction_signature_test_optional_pyfunction_signature.assert_node_doctree_1_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_optional_pyfunction_signature_test_optional_pyfunction_signature.assert_node_doctree_1_0_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 518, "end_line": 531, "span_ids": ["test_optional_pyfunction_signature"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_optional_pyfunction_signature(app):\n text = \".. py:function:: compile(source [, filename [, symbol]]) -> ast object\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"compile\"],\n desc_parameterlist,\n [desc_returns, pending_xref, \"ast object\"])],\n desc_content)]))\n assert_node(doctree[1], addnodes.desc, desctype=\"function\",\n domain=\"py\", objtype=\"function\", noindex=False)\n assert_node(doctree[1][0][1],\n ([desc_parameter, ([desc_sig_name, \"source\"])],\n [desc_optional, ([desc_parameter, ([desc_sig_name, \"filename\"])],\n [desc_optional, desc_parameter, ([desc_sig_name, \"symbol\"])])]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyexception_signature_test_pyexception_signature.assert_node_doctree_1_d": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyexception_signature_test_pyexception_signature.assert_node_doctree_1_d", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 534, "end_line": 543, "span_ids": ["test_pyexception_signature"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pyexception_signature(app):\n text = \".. py:exception:: builtins.IOError\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, ('exception', desc_sig_space)],\n [desc_addname, \"builtins.\"],\n [desc_name, \"IOError\"])],\n desc_content)]))\n assert_node(doctree[1], desc, desctype=\"exception\",\n domain=\"py\", objtype=\"exception\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_signature_test_pydata_signature.assert_node_doctree_1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_signature_test_pydata_signature.assert_node_doctree_1_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 546, "end_line": 564, "span_ids": ["test_pydata_signature"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pydata_signature(app):\n text = (\".. py:data:: version\\n\"\n \" :type: int\\n\"\n \" :value: 1\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"version\"],\n [desc_annotation, ([desc_sig_punctuation, ':'],\n desc_sig_space,\n [pending_xref, \"int\"])],\n [desc_annotation, (\n desc_sig_space,\n [desc_sig_punctuation, '='],\n desc_sig_space,\n \"1\")]\n )],\n desc_content)]))\n assert_node(doctree[1], addnodes.desc, desctype=\"data\",\n domain=\"py\", objtype=\"data\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_signature_old_test_pydata_signature_old.assert_node_doctree_1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_signature_old_test_pydata_signature_old.assert_node_doctree_1_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 567, "end_line": 577, "span_ids": ["test_pydata_signature_old"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pydata_signature_old(app):\n text = (\".. py:data:: version\\n\"\n \" :annotation: = 1\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"version\"],\n [desc_annotation, (desc_sig_space,\n \"= 1\")])],\n desc_content)]))\n assert_node(doctree[1], addnodes.desc, desctype=\"data\",\n domain=\"py\", objtype=\"data\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_test_pyfunction.assert_domain_objects_ex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_test_pyfunction.assert_domain_objects_ex", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 632, "end_line": 662, "span_ids": ["test_pyfunction"], "tokens": 353}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pyfunction(app):\n text = (\".. py:function:: func1\\n\"\n \".. py:module:: example\\n\"\n \".. py:function:: func2\\n\"\n \" :async:\\n\")\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"func1\"],\n [desc_parameterlist, ()])],\n [desc_content, ()])],\n nodes.target,\n addnodes.index,\n addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, ([desc_sig_keyword, 'async'],\n desc_sig_space)],\n [desc_addname, \"example.\"],\n [desc_name, \"func2\"],\n [desc_parameterlist, ()])],\n [desc_content, ()])]))\n assert_node(doctree[0], addnodes.index,\n entries=[('pair', 'built-in function; func1()', 'func1', '', None)])\n assert_node(doctree[3], addnodes.index,\n entries=[('pair', 'module; example', 'module-example', '', None)])\n assert_node(doctree[4], addnodes.index,\n entries=[('single', 'func2() (in module example)', 'example.func2', '', None)])\n\n assert 'func1' in domain.objects\n assert domain.objects['func1'] == ('index', 'func1', 'function', False)\n assert 'example.func2' in domain.objects\n assert domain.objects['example.func2'] == ('index', 'example.func2', 'function', False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyclass_options_test_pyclass_options.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyclass_options_test_pyclass_options.None_3", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 665, "end_line": 693, "span_ids": ["test_pyclass_options"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pyclass_options(app):\n text = (\".. py:class:: Class1\\n\"\n \".. py:class:: Class2\\n\"\n \" :final:\\n\")\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space)],\n [desc_name, \"Class1\"])],\n [desc_content, ()])],\n addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"final\",\n desc_sig_space,\n \"class\",\n desc_sig_space)],\n [desc_name, \"Class2\"])],\n [desc_content, ()])]))\n\n # class\n assert_node(doctree[0], addnodes.index,\n entries=[('single', 'Class1 (built-in class)', 'Class1', '', None)])\n assert 'Class1' in domain.objects\n assert domain.objects['Class1'] == ('index', 'Class1', 'class', False)\n\n # :final:\n assert_node(doctree[2], addnodes.index,\n entries=[('single', 'Class2 (built-in class)', 'Class2', '', None)])\n assert 'Class2' in domain.objects\n assert domain.objects['Class2'] == ('index', 'Class2', 'class', False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyclassmethod_test_pyclassmethod.assert_domain_objects_Cl": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyclassmethod_test_pyclassmethod.assert_domain_objects_Cl", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 801, "end_line": 819, "span_ids": ["test_pyclassmethod"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pyclassmethod(app):\n text = (\".. py:class:: Class\\n\"\n \"\\n\"\n \" .. py:classmethod:: meth\\n\")\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space)],\n [desc_name, \"Class\"])],\n [desc_content, (addnodes.index,\n desc)])]))\n assert_node(doctree[1][1][0], addnodes.index,\n entries=[('single', 'meth() (Class class method)', 'Class.meth', '', None)])\n assert_node(doctree[1][1][1], ([desc_signature, ([desc_annotation, (\"classmethod\", desc_sig_space)],\n [desc_name, \"meth\"],\n [desc_parameterlist, ()])],\n [desc_content, ()]))\n assert 'Class.meth' in domain.objects\n assert domain.objects['Class.meth'] == ('index', 'Class.meth', 'method', False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pystaticmethod_test_pystaticmethod.assert_domain_objects_Cl": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pystaticmethod_test_pystaticmethod.assert_domain_objects_Cl", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 822, "end_line": 840, "span_ids": ["test_pystaticmethod"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pystaticmethod(app):\n text = (\".. py:class:: Class\\n\"\n \"\\n\"\n \" .. py:staticmethod:: meth\\n\")\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space)],\n [desc_name, \"Class\"])],\n [desc_content, (addnodes.index,\n desc)])]))\n assert_node(doctree[1][1][0], addnodes.index,\n entries=[('single', 'meth() (Class static method)', 'Class.meth', '', None)])\n assert_node(doctree[1][1][1], ([desc_signature, ([desc_annotation, (\"static\", desc_sig_space)],\n [desc_name, \"meth\"],\n [desc_parameterlist, ()])],\n [desc_content, ()]))\n assert 'Class.meth' in domain.objects\n assert domain.objects['Class.meth'] == ('index', 'Class.meth', 'method', False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyattribute_test_pyattribute.assert_domain_objects_Cl": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyattribute_test_pyattribute.assert_domain_objects_Cl", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 843, "end_line": 874, "span_ids": ["test_pyattribute"], "tokens": 376}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pyattribute(app):\n text = (\".. py:class:: Class\\n\"\n \"\\n\"\n \" .. py:attribute:: attr\\n\"\n \" :type: Optional[str]\\n\"\n \" :value: ''\\n\")\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space)],\n [desc_name, \"Class\"])],\n [desc_content, (addnodes.index,\n desc)])]))\n assert_node(doctree[1][1][0], addnodes.index,\n entries=[('single', 'attr (Class attribute)', 'Class.attr', '', None)])\n assert_node(doctree[1][1][1], ([desc_signature, ([desc_name, \"attr\"],\n [desc_annotation, ([desc_sig_punctuation, ':'],\n desc_sig_space,\n [pending_xref, \"Optional\"],\n [desc_sig_punctuation, \"[\"],\n [pending_xref, \"str\"],\n [desc_sig_punctuation, \"]\"])],\n [desc_annotation, (desc_sig_space,\n [desc_sig_punctuation, '='],\n desc_sig_space,\n \"''\")]\n )],\n [desc_content, ()]))\n assert_node(doctree[1][1][1][0][1][2], pending_xref, **{\"py:class\": \"Class\"})\n assert_node(doctree[1][1][1][0][1][4], pending_xref, **{\"py:class\": \"Class\"})\n assert 'Class.attr' in domain.objects\n assert domain.objects['Class.attr'] == ('index', 'Class.attr', 'attribute', False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydecorator_signature_test_pydecorator_signature.assert_domain_objects_de": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydecorator_signature_test_pydecorator_signature.assert_domain_objects_de", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 920, "end_line": 932, "span_ids": ["test_pydecorator_signature"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pydecorator_signature(app):\n text = \".. py:decorator:: deco\"\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_addname, \"@\"],\n [desc_name, \"deco\"])],\n desc_content)]))\n assert_node(doctree[1], addnodes.desc, desctype=\"function\",\n domain=\"py\", objtype=\"function\", noindex=False)\n\n assert 'deco' in domain.objects\n assert domain.objects['deco'] == ('index', 'deco', 'function', False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydecoratormethod_signature_test_pydecoratormethod_signature.assert_domain_objects_de": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydecoratormethod_signature_test_pydecoratormethod_signature.assert_domain_objects_de", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 935, "end_line": 947, "span_ids": ["test_pydecoratormethod_signature"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pydecoratormethod_signature(app):\n text = \".. py:decoratormethod:: deco\"\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_addname, \"@\"],\n [desc_name, \"deco\"])],\n desc_content)]))\n assert_node(doctree[1], addnodes.desc, desctype=\"method\",\n domain=\"py\", objtype=\"method\", noindex=False)\n\n assert 'deco' in domain.objects\n assert domain.objects['deco'] == ('index', 'deco', 'method', False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_module_index_test_module_index.assert_index_generate_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_module_index_test_module_index.assert_index_generate_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 732, "end_line": 750, "span_ids": ["test_module_index"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(freshenv=True)\ndef test_module_index(app):\n text = (\".. py:module:: docutils\\n\"\n \".. py:module:: sphinx\\n\"\n \".. py:module:: sphinx.config\\n\"\n \".. py:module:: sphinx.builders\\n\"\n \".. py:module:: sphinx.builders.html\\n\"\n \".. py:module:: sphinx_intl\\n\")\n restructuredtext.parse(app, text)\n index = PythonModuleIndex(app.env.get_domain('py'))\n assert index.generate() == (\n [('d', [IndexEntry('docutils', 0, 'index', 'module-docutils', '', '', '')]),\n ('s', [IndexEntry('sphinx', 1, 'index', 'module-sphinx', '', '', ''),\n IndexEntry('sphinx.builders', 2, 'index', 'module-sphinx.builders', '', '', ''), # NOQA\n IndexEntry('sphinx.builders.html', 2, 'index', 'module-sphinx.builders.html', '', '', ''), # NOQA\n IndexEntry('sphinx.config', 2, 'index', 'module-sphinx.config', '', '', ''),\n IndexEntry('sphinx_intl', 0, 'index', 'module-sphinx_intl', '', '', '')])],\n False\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_module_index_submodule_test_module_index_submodule.assert_index_generate_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_module_index_submodule_test_module_index_submodule.assert_index_generate_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 753, "end_line": 762, "span_ids": ["test_module_index_submodule"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(freshenv=True)\ndef test_module_index_submodule(app):\n text = \".. py:module:: sphinx.config\\n\"\n restructuredtext.parse(app, text)\n index = PythonModuleIndex(app.env.get_domain('py'))\n assert index.generate() == (\n [('s', [IndexEntry('sphinx', 1, '', '', '', '', ''),\n IndexEntry('sphinx.config', 2, 'index', 'module-sphinx.config', '', '', '')])],\n False\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_module_index_not_collapsed_test_module_index_not_collapsed.assert_index_generate_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_module_index_not_collapsed_test_module_index_not_collapsed.assert_index_generate_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 765, "end_line": 775, "span_ids": ["test_module_index_not_collapsed"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(freshenv=True)\ndef test_module_index_not_collapsed(app):\n text = (\".. py:module:: docutils\\n\"\n \".. py:module:: sphinx\\n\")\n restructuredtext.parse(app, text)\n index = PythonModuleIndex(app.env.get_domain('py'))\n assert index.generate() == (\n [('d', [IndexEntry('docutils', 0, 'index', 'module-docutils', '', '', '')]),\n ('s', [IndexEntry('sphinx', 0, 'index', 'module-sphinx', '', '', '')])],\n True\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_test_rst_directive.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_test_rst_directive.None_5", "embedding": null, "metadata": {"file_path": "tests/test_domain_rst.py", "file_name": "test_domain_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 34, "end_line": 55, "span_ids": ["test_rst_directive"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rst_directive(app):\n # bare\n text = \".. rst:directive:: toctree\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, desc_name, \".. toctree::\"],\n [desc_content, ()])]))\n assert_node(doctree[0],\n entries=[(\"single\", \"toctree (directive)\", \"directive-toctree\", \"\", None)])\n assert_node(doctree[1], addnodes.desc, desctype=\"directive\",\n domain=\"rst\", objtype=\"directive\", noindex=False)\n\n # decorated\n text = \".. rst:directive:: .. toctree::\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, desc_name, \".. toctree::\"],\n [desc_content, ()])]))\n assert_node(doctree[0],\n entries=[(\"single\", \"toctree (directive)\", \"directive-toctree\", \"\", None)])\n assert_node(doctree[1], addnodes.desc, desctype=\"directive\",\n domain=\"rst\", objtype=\"directive\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_with_argument_test_rst_directive_with_argument.assert_node_doctree_1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_with_argument_test_rst_directive_with_argument.assert_node_doctree_1_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_rst.py", "file_name": "test_domain_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 58, "end_line": 68, "span_ids": ["test_rst_directive_with_argument"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rst_directive_with_argument(app):\n text = \".. rst:directive:: .. toctree:: foo bar baz\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \".. toctree::\"],\n [desc_addname, \" foo bar baz\"])],\n [desc_content, ()])]))\n assert_node(doctree[0],\n entries=[(\"single\", \"toctree (directive)\", \"directive-toctree\", \"\", None)])\n assert_node(doctree[1], addnodes.desc, desctype=\"directive\",\n domain=\"rst\", objtype=\"directive\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_option_test_rst_directive_option.assert_node_doctree_1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_option_test_rst_directive_option.assert_node_doctree_1_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_rst.py", "file_name": "test_domain_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 71, "end_line": 81, "span_ids": ["test_rst_directive_option"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rst_directive_option(app):\n text = \".. rst:directive:option:: foo\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, desc_name, \":foo:\"],\n [desc_content, ()])]))\n assert_node(doctree[0],\n entries=[(\"single\", \":foo: (directive option)\",\n \"directive-option-foo\", \"\", \"F\")])\n assert_node(doctree[1], addnodes.desc, desctype=\"directive:option\",\n domain=\"rst\", objtype=\"directive:option\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_option_with_argument_test_rst_directive_option_with_argument.assert_node_doctree_1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_option_with_argument_test_rst_directive_option_with_argument.assert_node_doctree_1_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_rst.py", "file_name": "test_domain_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 84, "end_line": 95, "span_ids": ["test_rst_directive_option_with_argument"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rst_directive_option_with_argument(app):\n text = \".. rst:directive:option:: foo: bar baz\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \":foo:\"],\n [desc_annotation, \" bar baz\"])],\n [desc_content, ()])]))\n assert_node(doctree[0],\n entries=[(\"single\", \":foo: (directive option)\",\n \"directive-option-foo\", \"\", \"F\")])\n assert_node(doctree[1], addnodes.desc, desctype=\"directive:option\",\n domain=\"rst\", objtype=\"directive:option\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_option_type_test_rst_directive_option_type.assert_node_doctree_1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_option_type_test_rst_directive_option_type.assert_node_doctree_1_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_rst.py", "file_name": "test_domain_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 98, "end_line": 110, "span_ids": ["test_rst_directive_option_type"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rst_directive_option_type(app):\n text = (\".. rst:directive:option:: foo\\n\"\n \" :type: directives.flags\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \":foo:\"],\n [desc_annotation, \" (directives.flags)\"])],\n [desc_content, ()])]))\n assert_node(doctree[0],\n entries=[(\"single\", \":foo: (directive option)\",\n \"directive-option-foo\", \"\", \"F\")])\n assert_node(doctree[1], addnodes.desc, desctype=\"directive:option\",\n domain=\"rst\", objtype=\"directive:option\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_and_directive_option_test_rst_directive_and_directive_option.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_directive_and_directive_option_test_rst_directive_and_directive_option.None_3", "embedding": null, "metadata": {"file_path": "tests/test_domain_rst.py", "file_name": "test_domain_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 113, "end_line": 128, "span_ids": ["test_rst_directive_and_directive_option"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rst_directive_and_directive_option(app):\n text = (\".. rst:directive:: foo\\n\"\n \"\\n\"\n \" .. rst:directive:option:: bar\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, desc_name, \".. foo::\"],\n [desc_content, (addnodes.index,\n desc)])]))\n assert_node(doctree[1][1][0],\n entries=[(\"pair\", \"foo (directive); :bar: (directive option)\",\n \"directive-option-foo-bar\", \"\", \"B\")])\n assert_node(doctree[1][1][1], ([desc_signature, desc_name, \":bar:\"],\n [desc_content, ()]))\n assert_node(doctree[1][1][1], addnodes.desc, desctype=\"directive:option\",\n domain=\"rst\", objtype=\"directive:option\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_role_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py_test_rst_role_", "embedding": null, "metadata": {"file_path": "tests/test_domain_rst.py", "file_name": "test_domain_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 131, "end_line": 141, "span_ids": ["test_rst_role"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rst_role(app):\n text = \".. rst:role:: ref\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, desc_name, \":ref:\"],\n [desc_content, ()])]))\n assert_node(doctree[0],\n entries=[(\"single\", \"ref (role)\", \"role-ref\", \"\", None)])\n assert_node(doctree[1], addnodes.desc, desctype=\"role\",\n domain=\"rst\", objtype=\"role\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_process_doc_handle_table_title_test_process_doc_handle_table_title.assert_domain_data_label": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_process_doc_handle_table_title_test_process_doc_handle_table_title.assert_domain_data_label", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 63, "span_ids": ["test_process_doc_handle_table_title"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_process_doc_handle_table_title():\n env = mock.Mock(domaindata={})\n env.app.registry.enumerable_nodes = {}\n table_node = nodes.table(\n '',\n nodes.title('title text', 'title text'),\n )\n document = mock.Mock(\n nametypes={'testname': True},\n nameids={'testname': 'testid'},\n ids={'testid': table_node},\n citation_refs={},\n )\n document.findall.return_value = []\n\n domain = StandardDomain(env)\n if 'testname' in domain.data['labels']:\n del domain.data['labels']['testname']\n domain.process_doc(env, 'testdoc', document)\n assert 'testname' in domain.data['labels']\n assert domain.data['labels']['testname'] == (\n 'testdoc', 'testid', 'title text')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_get_full_qualified_name_test_get_full_qualified_name.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_get_full_qualified_name_test_get_full_qualified_name.None_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 79, "end_line": 95, "span_ids": ["test_get_full_qualified_name"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_full_qualified_name():\n env = mock.Mock(domaindata={})\n env.app.registry.enumerable_nodes = {}\n domain = StandardDomain(env)\n\n # normal references\n node = nodes.reference()\n assert domain.get_full_qualified_name(node) is None\n\n # simple reference to options\n node = nodes.reference(reftype='option', reftarget='-l')\n assert domain.get_full_qualified_name(node) is None\n\n # options with std:program context\n kwargs = {'std:program': 'ls'}\n node = nodes.reference(reftype='option', reftarget='-l', **kwargs)\n assert domain.get_full_qualified_name(node) == 'ls.-l'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_test_glossary.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_test_glossary.None_9", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 98, "end_line": 159, "span_ids": ["test_glossary"], "tokens": 681}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_glossary(app):\n text = (\".. glossary::\\n\"\n \"\\n\"\n \" term1\\n\"\n \" TERM2\\n\"\n \" description\\n\"\n \"\\n\"\n \" term3 : classifier\\n\"\n \" description\\n\"\n \" description\\n\"\n \"\\n\"\n \" term4 : class1 : class2\\n\"\n \" description\\n\")\n\n # doctree\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (\n [glossary, definition_list, ([definition_list_item, ([term, (\"term1\",\n index)],\n [term, (\"TERM2\",\n index)],\n definition)],\n [definition_list_item, ([term, (\"term3\",\n index)],\n definition)],\n [definition_list_item, ([term, (\"term4\",\n index)],\n definition)])],\n ))\n assert_node(doctree[0][0][0][0][1],\n entries=[(\"single\", \"term1\", \"term-term1\", \"main\", None)])\n assert_node(doctree[0][0][0][1][1],\n entries=[(\"single\", \"TERM2\", \"term-TERM2\", \"main\", None)])\n assert_node(doctree[0][0][0][2],\n [definition, nodes.paragraph, \"description\"])\n assert_node(doctree[0][0][1][0][1],\n entries=[(\"single\", \"term3\", \"term-term3\", \"main\", \"classifier\")])\n assert_node(doctree[0][0][1][1],\n [definition, nodes.paragraph, (\"description\\n\"\n \"description\")])\n assert_node(doctree[0][0][2][0][1],\n entries=[(\"single\", \"term4\", \"term-term4\", \"main\", \"class1\")])\n assert_node(doctree[0][0][2][1],\n [nodes.definition, nodes.paragraph, \"description\"])\n\n # index\n domain = app.env.get_domain(\"std\")\n objects = list(domain.get_objects())\n assert (\"term1\", \"term1\", \"term\", \"index\", \"term-term1\", -1) in objects\n assert (\"TERM2\", \"TERM2\", \"term\", \"index\", \"term-TERM2\", -1) in objects\n assert (\"term3\", \"term3\", \"term\", \"index\", \"term-term3\", -1) in objects\n assert (\"term4\", \"term4\", \"term\", \"index\", \"term-term4\", -1) in objects\n\n # term reference (case sensitive)\n refnode = domain.resolve_xref(app.env, 'index', app.builder, 'term', 'term1',\n pending_xref(), nodes.paragraph())\n assert_node(refnode, nodes.reference, refid=\"term-term1\")\n\n # term reference (case insensitive)\n refnode = domain.resolve_xref(app.env, 'index', app.builder, 'term', 'term2',\n pending_xref(), nodes.paragraph())\n assert_node(refnode, nodes.reference, refid=\"term-TERM2\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_warning_test_glossary_warning.assert_case4_rst_3_WAR": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_warning_test_glossary_warning.assert_case4_rst_3_WAR", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 162, "end_line": 199, "span_ids": ["test_glossary_warning"], "tokens": 334}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_glossary_warning(app, status, warning):\n # empty line between terms\n text = (\".. glossary::\\n\"\n \"\\n\"\n \" term1\\n\"\n \"\\n\"\n \" term2\\n\")\n restructuredtext.parse(app, text, \"case1\")\n assert (\"case1.rst:4: WARNING: glossary terms must not be separated by empty lines\"\n in warning.getvalue())\n\n # glossary starts with indented item\n text = (\".. glossary::\\n\"\n \"\\n\"\n \" description\\n\"\n \" term\\n\")\n restructuredtext.parse(app, text, \"case2\")\n assert (\"case2.rst:3: WARNING: glossary term must be preceded by empty line\"\n in warning.getvalue())\n\n # empty line between terms\n text = (\".. glossary::\\n\"\n \"\\n\"\n \" term1\\n\"\n \" description\\n\"\n \" term2\\n\")\n restructuredtext.parse(app, text, \"case3\")\n assert (\"case3.rst:4: WARNING: glossary term must be preceded by empty line\"\n in warning.getvalue())\n\n # duplicated terms\n text = (\".. glossary::\\n\"\n \"\\n\"\n \" term-case4\\n\"\n \" term-case4\\n\")\n restructuredtext.parse(app, text, \"case4\")\n assert (\"case4.rst:3: WARNING: duplicate term description of term-case4, \"\n \"other instance in case4\" in warning.getvalue())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_comment_test_glossary_comment.assert_node_doctree_0_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_comment_test_glossary_comment.assert_node_doctree_0_0_", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 202, "end_line": 217, "span_ids": ["test_glossary_comment"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_glossary_comment(app):\n text = (\".. glossary::\\n\"\n \"\\n\"\n \" term1\\n\"\n \" description\\n\"\n \" .. term2\\n\"\n \" description\\n\"\n \" description\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (\n [glossary, definition_list, definition_list_item, ([term, (\"term1\",\n index)],\n definition)],\n ))\n assert_node(doctree[0][0][0][1],\n [nodes.definition, nodes.paragraph, \"description\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_comment2_test_glossary_comment2.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_comment2_test_glossary_comment2.None_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 220, "end_line": 243, "span_ids": ["test_glossary_comment2"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_glossary_comment2(app):\n text = (\".. glossary::\\n\"\n \"\\n\"\n \" term1\\n\"\n \" description\\n\"\n \"\\n\"\n \" .. term2\\n\"\n \" term3\\n\"\n \" description\\n\"\n \" description\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (\n [glossary, definition_list, ([definition_list_item, ([term, (\"term1\",\n index)],\n definition)],\n [definition_list_item, ([term, (\"term3\",\n index)],\n definition)])],\n ))\n assert_node(doctree[0][0][0][1],\n [nodes.definition, nodes.paragraph, \"description\"])\n assert_node(doctree[0][0][1][1],\n [nodes.definition, nodes.paragraph, (\"description\\n\"\n \"description\")])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_sorted_test_glossary_sorted.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_sorted_test_glossary_sorted.None_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 246, "end_line": 270, "span_ids": ["test_glossary_sorted"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_glossary_sorted(app):\n text = (\".. glossary::\\n\"\n \" :sorted:\\n\"\n \"\\n\"\n \" term3\\n\"\n \" description\\n\"\n \"\\n\"\n \" term2\\n\"\n \" term1\\n\"\n \" description\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (\n [glossary, definition_list, ([definition_list_item, ([term, (\"term2\",\n index)],\n [term, (\"term1\",\n index)],\n definition)],\n [definition_list_item, ([term, (\"term3\",\n index)],\n definition)])],\n ))\n assert_node(doctree[0][0][0][2],\n [nodes.definition, nodes.paragraph, \"description\"])\n assert_node(doctree[0][0][1][1],\n [nodes.definition, nodes.paragraph, \"description\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_alphanumeric_test_glossary_conflicted_labels.assert_foo_foo_te": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_glossary_alphanumeric_test_glossary_conflicted_labels.assert_foo_foo_te", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 273, "end_line": 291, "span_ids": ["test_glossary_conflicted_labels", "test_glossary_alphanumeric"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_glossary_alphanumeric(app):\n text = (\".. glossary::\\n\"\n \"\\n\"\n \" 1\\n\"\n \" /\\n\")\n restructuredtext.parse(app, text)\n objects = list(app.env.get_domain(\"std\").get_objects())\n assert (\"1\", \"1\", \"term\", \"index\", \"term-1\", -1) in objects\n assert (\"/\", \"/\", \"term\", \"index\", \"term-0\", -1) in objects\n\n\ndef test_glossary_conflicted_labels(app):\n text = (\".. _term-foo:\\n\"\n \".. glossary::\\n\"\n \"\\n\"\n \" foo\\n\")\n restructuredtext.parse(app, text)\n objects = list(app.env.get_domain(\"std\").get_objects())\n assert (\"foo\", \"foo\", \"term\", \"index\", \"term-0\", -1) in objects", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmdoption_test_cmdoption.assert_domain_progoptions": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmdoption_test_cmdoption.assert_domain_progoptions", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 294, "end_line": 307, "span_ids": ["test_cmdoption"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cmdoption(app):\n text = (\".. program:: ls\\n\"\n \"\\n\"\n \".. option:: -l\\n\")\n domain = app.env.get_domain('std')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"-l\"],\n [desc_addname, ()])],\n [desc_content, ()])]))\n assert_node(doctree[0], addnodes.index,\n entries=[('pair', 'ls command line option; -l', 'cmdoption-ls-l', '', None)])\n assert ('ls', '-l') in domain.progoptions\n assert domain.progoptions[('ls', '-l')] == ('index', 'cmdoption-ls-l')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_multiple_cmdoptions_test_multiple_cmdoptions.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_multiple_cmdoptions_test_multiple_cmdoptions.None_3", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 339, "end_line": 358, "span_ids": ["test_multiple_cmdoptions"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_multiple_cmdoptions(app):\n text = (\".. program:: cmd\\n\"\n \"\\n\"\n \".. option:: -o directory, --output directory\\n\")\n domain = app.env.get_domain('std')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"-o\"],\n [desc_addname, \" directory\"],\n [desc_addname, \", \"],\n [desc_name, \"--output\"],\n [desc_addname, \" directory\"])],\n [desc_content, ()])]))\n assert_node(doctree[0], addnodes.index,\n entries=[('pair', 'cmd command line option; -o', 'cmdoption-cmd-o', '', None),\n ('pair', 'cmd command line option; --output', 'cmdoption-cmd-o', '', None)])\n assert ('cmd', '-o') in domain.progoptions\n assert ('cmd', '--output') in domain.progoptions\n assert domain.progoptions[('cmd', '-o')] == ('index', 'cmdoption-cmd-o')\n assert domain.progoptions[('cmd', '--output')] == ('index', 'cmdoption-cmd-o')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py_test_images_test_images.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py_test_images_test_images.None_3", "embedding": null, "metadata": {"file_path": "tests/test_environment.py", "file_name": "test_environment.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 78, "span_ids": ["test_images"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy')\ndef test_images(app):\n app.build()\n\n tree = app.env.get_doctree('images')\n htmlbuilder = StandaloneHTMLBuilder(app)\n htmlbuilder.set_environment(app.env)\n htmlbuilder.init()\n htmlbuilder.imgpath = 'dummy'\n htmlbuilder.post_process_images(tree)\n assert set(htmlbuilder.images.keys()) == \\\n {'subdir/img.png', 'img.png', 'subdir/simg.png', 'svgimg.svg', 'img.foo.png'}\n assert set(htmlbuilder.images.values()) == \\\n {'img.png', 'img1.png', 'simg.png', 'svgimg.svg', 'img.foo.png'}\n\n latexbuilder = LaTeXBuilder(app)\n latexbuilder.set_environment(app.env)\n latexbuilder.init()\n latexbuilder.post_process_images(tree)\n assert set(latexbuilder.images.keys()) == \\\n {'subdir/img.png', 'subdir/simg.png', 'img.png', 'img.pdf',\n 'svgimg.pdf', 'img.foo.png'}\n assert set(latexbuilder.images.values()) == \\\n {'img.pdf', 'img.png', 'img1.png', 'simg.png',\n 'svgimg.pdf', 'img.foo.png'}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py_test_object_inventory_test_object_inventory.assert_app_env_domains_c": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py_test_object_inventory_test_object_inventory.assert_app_env_domains_c", "embedding": null, "metadata": {"file_path": "tests/test_environment.py", "file_name": "test_environment.py", "file_type": "text/x-python", "category": "test", "start_line": 74, "end_line": 98, "span_ids": ["test_object_inventory"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy')\ndef test_object_inventory(app):\n app.build()\n refs = app.env.domaindata['py']['objects']\n\n assert 'func_without_module' in refs\n assert refs['func_without_module'] == ('objects', 'func_without_module', 'function', False)\n assert 'func_without_module2' in refs\n assert 'mod.func_in_module' in refs\n assert 'mod.Cls' in refs\n assert 'mod.Cls.meth1' in refs\n assert 'mod.Cls.meth2' in refs\n assert 'mod.Cls.meths' in refs\n\n assert 'mod.Error' not in refs\n assert 'errmod.Error' in refs\n\n assert 'func_in_module' not in refs\n assert 'func_noindex' not in refs\n\n assert app.env.domaindata['py']['modules']['mod'] == \\\n ('objects', 'module-mod', 'Module synopsis.', 'UNIX', False)\n\n assert app.env.domains['py'].data is app.env.domaindata['py']\n assert app.env.domains['c'].data is app.env.domaindata['c']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py_test_env_relfn2path_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py_test_env_relfn2path_", "embedding": null, "metadata": {"file_path": "tests/test_environment.py", "file_name": "test_environment.py", "file_type": "text/x-python", "category": "test", "start_line": 109, "end_line": 156, "span_ids": ["test_env_relfn2path"], "tokens": 512}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='basic')\ndef test_env_relfn2path(app):\n # relative filename and root document\n relfn, absfn = app.env.relfn2path('logo.jpg', 'index')\n assert relfn == 'logo.jpg'\n assert absfn == app.srcdir / 'logo.jpg'\n\n # absolute filename and root document\n relfn, absfn = app.env.relfn2path('/logo.jpg', 'index')\n assert relfn == 'logo.jpg'\n assert absfn == app.srcdir / 'logo.jpg'\n\n # relative filename and a document in subdir\n relfn, absfn = app.env.relfn2path('logo.jpg', 'subdir/index')\n assert relfn == PathComparer('subdir/logo.jpg')\n assert absfn == app.srcdir / 'subdir' / 'logo.jpg'\n\n # absolute filename and a document in subdir\n relfn, absfn = app.env.relfn2path('/logo.jpg', 'subdir/index')\n assert relfn == 'logo.jpg'\n assert absfn == app.srcdir / 'logo.jpg'\n\n # relative filename having subdir\n relfn, absfn = app.env.relfn2path('images/logo.jpg', 'index')\n assert relfn == 'images/logo.jpg'\n assert absfn == app.srcdir / 'images' / 'logo.jpg'\n\n # relative path traversal\n relfn, absfn = app.env.relfn2path('../logo.jpg', 'index')\n assert relfn == '../logo.jpg'\n assert absfn == app.srcdir.parent / 'logo.jpg'\n\n # relative path traversal\n relfn, absfn = app.env.relfn2path('subdir/../logo.jpg', 'index')\n assert relfn == 'logo.jpg'\n assert absfn == app.srcdir / 'logo.jpg'\n\n # omit docname (w/ current docname)\n app.env.temp_data['docname'] = 'subdir/document'\n relfn, absfn = app.env.relfn2path('images/logo.jpg')\n assert relfn == PathComparer('subdir/images/logo.jpg')\n assert absfn == app.srcdir / 'subdir' / 'images' / 'logo.jpg'\n\n # omit docname (w/o current docname)\n app.env.temp_data.clear()\n with pytest.raises(KeyError):\n app.env.relfn2path('images/logo.jpg')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_pair_index_test_create_pair_index.assert_index_6_\u0415_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_pair_index_test_create_pair_index.assert_index_6_\u0415_", "embedding": null, "metadata": {"file_path": "tests/test_environment_indexentries.py", "file_name": "test_environment_indexentries.py", "file_type": "text/x-python", "category": "test", "start_line": 47, "end_line": 75, "span_ids": ["test_create_pair_index"], "tokens": 442}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', freshenv=True)\ndef test_create_pair_index(app):\n text = (\".. index:: pair: docutils; reStructuredText\\n\"\n \".. index:: pair: Python; interpreter\\n\"\n \".. index:: pair: Sphinx; documentation tool\\n\"\n \".. index:: pair: Sphinx; :+1:\\n\"\n \".. index:: pair: Sphinx; \u0415\u043b\u044c\\n\"\n \".. index:: pair: Sphinx; \u0451\u043b\u043a\u0430\\n\")\n restructuredtext.parse(app, text)\n index = IndexEntries(app.env).create_index(app.builder)\n assert len(index) == 7\n assert index[0] == ('Symbols', [(':+1:', [[], [('Sphinx', [('', '#index-3')])], None])])\n assert index[1] == ('D',\n [('documentation tool', [[], [('Sphinx', [('', '#index-2')])], None]),\n ('docutils', [[], [('reStructuredText', [('', '#index-0')])], None])])\n assert index[2] == ('I', [('interpreter', [[], [('Python', [('', '#index-1')])], None])])\n assert index[3] == ('P', [('Python', [[], [('interpreter', [('', '#index-1')])], None])])\n assert index[4] == ('R',\n [('reStructuredText', [[], [('docutils', [('', '#index-0')])], None])])\n assert index[5] == ('S',\n [('Sphinx', [[],\n [(':+1:', [('', '#index-3')]),\n ('documentation tool', [('', '#index-2')]),\n ('\u0451\u043b\u043a\u0430', [('', '#index-5')]),\n ('\u0415\u043b\u044c', [('', '#index-4')])],\n None])])\n assert index[6] == ('\u0415',\n [('\u0451\u043b\u043a\u0430', [[], [('Sphinx', [('', '#index-5')])], None]),\n ('\u0415\u043b\u044c', [[], [('Sphinx', [('', '#index-4')])], None])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_triple_index_test_create_triple_index.assert_index_4_S_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_triple_index_test_create_triple_index.assert_index_4_S_", "embedding": null, "metadata": {"file_path": "tests/test_environment_indexentries.py", "file_name": "test_environment_indexentries.py", "file_type": "text/x-python", "category": "test", "start_line": 74, "end_line": 86, "span_ids": ["test_create_triple_index"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', freshenv=True)\ndef test_create_triple_index(app):\n text = (\".. index:: triple: foo; bar; baz\\n\"\n \".. index:: triple: Python; Sphinx; reST\\n\")\n restructuredtext.parse(app, text)\n index = IndexEntries(app.env).create_index(app.builder)\n assert len(index) == 5\n assert index[0] == ('B', [('bar', [[], [('baz, foo', [('', '#index-0')])], None]),\n ('baz', [[], [('foo bar', [('', '#index-0')])], None])])\n assert index[1] == ('F', [('foo', [[], [('bar baz', [('', '#index-0')])], None])])\n assert index[2] == ('P', [('Python', [[], [('Sphinx reST', [('', '#index-1')])], None])])\n assert index[3] == ('R', [('reST', [[], [('Python Sphinx', [('', '#index-1')])], None])])\n assert index[4] == ('S', [('Sphinx', [[], [('reST, Python', [('', '#index-1')])], None])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_see_index_test_create_see_index.assert_index_2_S_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_see_index_test_create_see_index.assert_index_2_S_", "embedding": null, "metadata": {"file_path": "tests/test_environment_indexentries.py", "file_name": "test_environment_indexentries.py", "file_type": "text/x-python", "category": "test", "start_line": 89, "end_line": 99, "span_ids": ["test_create_see_index"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', freshenv=True)\ndef test_create_see_index(app):\n text = (\".. index:: see: docutils; reStructuredText\\n\"\n \".. index:: see: Python; interpreter\\n\"\n \".. index:: see: Sphinx; documentation tool\\n\")\n restructuredtext.parse(app, text)\n index = IndexEntries(app.env).create_index(app.builder)\n assert len(index) == 3\n assert index[0] == ('D', [('docutils', [[], [('see reStructuredText', [])], None])])\n assert index[1] == ('P', [('Python', [[], [('see interpreter', [])], None])])\n assert index[2] == ('S', [('Sphinx', [[], [('see documentation tool', [])], None])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_seealso_index_test_create_seealso_index.assert_index_2_S_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_seealso_index_test_create_seealso_index.assert_index_2_S_", "embedding": null, "metadata": {"file_path": "tests/test_environment_indexentries.py", "file_name": "test_environment_indexentries.py", "file_type": "text/x-python", "category": "test", "start_line": 102, "end_line": 112, "span_ids": ["test_create_seealso_index"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', freshenv=True)\ndef test_create_seealso_index(app):\n text = (\".. index:: seealso: docutils; reStructuredText\\n\"\n \".. index:: seealso: Python; interpreter\\n\"\n \".. index:: seealso: Sphinx; documentation tool\\n\")\n restructuredtext.parse(app, text)\n index = IndexEntries(app.env).create_index(app.builder)\n assert len(index) == 3\n assert index[0] == ('D', [('docutils', [[], [('see also reStructuredText', [])], None])])\n assert index[1] == ('P', [('Python', [[], [('see also interpreter', [])], None])])\n assert index[2] == ('S', [('Sphinx', [[], [('see also documentation tool', [])], None])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_main_index_test_create_main_index.assert_index_1_P_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_main_index_test_create_main_index.assert_index_1_P_", "embedding": null, "metadata": {"file_path": "tests/test_environment_indexentries.py", "file_name": "test_environment_indexentries.py", "file_type": "text/x-python", "category": "test", "start_line": 115, "end_line": 127, "span_ids": ["test_create_main_index"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', freshenv=True)\ndef test_create_main_index(app):\n text = (\".. index:: !docutils\\n\"\n \".. index:: docutils\\n\"\n \".. index:: pip; install\\n\"\n \".. index:: !pip; install\\n\")\n restructuredtext.parse(app, text)\n index = IndexEntries(app.env).create_index(app.builder)\n assert len(index) == 2\n assert index[0] == ('D', [('docutils', [[('main', '#index-0'),\n ('', '#index-1')], [], None])])\n assert index[1] == ('P', [('pip', [[], [('install', [('main', '#index-3'),\n ('', '#index-2')])], None])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_index_with_name_test_create_index_with_name.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_index_with_name_test_create_index_with_name.None_5", "embedding": null, "metadata": {"file_path": "tests/test_environment_indexentries.py", "file_name": "test_environment_indexentries.py", "file_type": "text/x-python", "category": "test", "start_line": 130, "end_line": 149, "span_ids": ["test_create_index_with_name"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', freshenv=True)\ndef test_create_index_with_name(app):\n text = (\".. index:: single: docutils\\n\"\n \" :name: ref1\\n\"\n \".. index:: single: Python\\n\"\n \" :name: ref2\\n\"\n \".. index:: Sphinx\\n\")\n restructuredtext.parse(app, text)\n index = IndexEntries(app.env).create_index(app.builder)\n\n # check index is created correctly\n assert len(index) == 3\n assert index[0] == ('D', [('docutils', [[('', '#ref1')], [], None])])\n assert index[1] == ('P', [('Python', [[('', '#ref2')], [], None])])\n assert index[2] == ('S', [('Sphinx', [[('', '#index-0')], [], None])])\n\n # check the reference labels are created correctly\n std = app.env.get_domain('std')\n assert std.anonlabels['ref1'] == ('index', 'ref1')\n assert std.anonlabels['ref2'] == ('index', 'ref2')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_index_by_key_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py_test_create_index_by_key_", "embedding": null, "metadata": {"file_path": "tests/test_environment_indexentries.py", "file_name": "test_environment_indexentries.py", "file_type": "text/x-python", "category": "test", "start_line": 152, "end_line": 166, "span_ids": ["test_create_index_by_key"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', freshenv=True)\ndef test_create_index_by_key(app):\n # At present, only glossary directive is able to create index key\n text = (\".. glossary::\\n\"\n \"\\n\"\n \" docutils\\n\"\n \" Python\\n\"\n \" \u30b9\u30d5\u30a3\u30f3\u30af\u30b9 : \u30b9\\n\")\n restructuredtext.parse(app, text)\n index = IndexEntries(app.env).create_index(app.builder)\n assert len(index) == 3\n assert index[0] == ('D', [('docutils', [[('main', '#term-docutils')], [], None])])\n assert index[1] == ('P', [('Python', [[('main', '#term-Python')], [], None])])\n assert index[2] == ('\u30b9', [('\u30b9\u30d5\u30a3\u30f3\u30af\u30b9', [[('main', '#term-0')], [], '\u30b9'])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_process_doc.None_3_test_process_doc.assert_qux_not_in_app_e": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_process_doc.None_3_test_process_doc.assert_qux_not_in_app_e", "embedding": null, "metadata": {"file_path": "tests/test_environment_toctree.py", "file_name": "test_environment_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 79, "end_line": 88, "span_ids": ["test_process_doc"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='toctree')\n@pytest.mark.test_params(shared_result='test_environment_toctree_basic')\ndef test_process_doc(app):\n # ... other code\n assert_node(toctree[0][0][0], reference, anchorname='')\n # ... other code\n assert_node(toctree[0][1][1][0][1][0], addnodes.toctree,\n caption=None, glob=False, hidden=False, entries=[(None, 'baz')],\n includefiles=['baz'], titlesonly=False, maxdepth=-1, numbered=0)\n # ... other code\n assert app.env.files_to_rebuild['bar'] == {'index'}\n assert app.env.files_to_rebuild['baz'] == {'index'}\n assert app.env.glob_toctrees == set()\n assert app.env.numbered_toctrees == {'index'}\n\n # qux has no section title\n assert len(app.env.tocs['qux']) == 0\n assert_node(app.env.tocs['qux'], nodes.bullet_list)\n assert app.env.toc_num_entries['qux'] == 0\n assert 'qux' not in app.env.toctree_includes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_glob_test_glob.assert_app_env_numbered_t": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_glob_test_glob.assert_app_env_numbered_t", "embedding": null, "metadata": {"file_path": "tests/test_environment_toctree.py", "file_name": "test_environment_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 91, "end_line": 133, "span_ids": ["test_glob"], "tokens": 621}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='toctree-glob')\ndef test_glob(app):\n includefiles = ['foo', 'bar/index', 'bar/bar_1', 'bar/bar_2',\n 'bar/bar_3', 'baz', 'qux/index']\n\n app.build()\n\n # tocs\n toctree = app.env.tocs['index']\n assert_node(toctree,\n [bullet_list, list_item, (compact_paragraph, # [0][0]\n [bullet_list, (list_item, # [0][1][0]\n list_item)])]) # [0][1][1]\n\n assert_node(toctree[0][0],\n [compact_paragraph, reference, \"test-toctree-glob\"])\n assert_node(toctree[0][1][0],\n [list_item, ([compact_paragraph, reference, \"normal order\"],\n [bullet_list, addnodes.toctree])]) # [0][1][0][1][0]\n assert_node(toctree[0][1][0][1][0], addnodes.toctree, caption=None,\n glob=True, hidden=False, titlesonly=False,\n maxdepth=-1, numbered=0, includefiles=includefiles,\n entries=[(None, 'foo'), (None, 'bar/index'), (None, 'bar/bar_1'),\n (None, 'bar/bar_2'), (None, 'bar/bar_3'), (None, 'baz'),\n (None, 'qux/index'),\n ('hyperref', 'https://sphinx-doc.org/?q=sphinx')])\n assert_node(toctree[0][1][1],\n [list_item, ([compact_paragraph, reference, \"reversed order\"],\n [bullet_list, addnodes.toctree])]) # [0][1][1][1][0]\n assert_node(toctree[0][1][1][1][0], addnodes.toctree, caption=None,\n glob=True, hidden=False, titlesonly=False,\n maxdepth=-1, numbered=0, includefiles=list(reversed(includefiles)),\n entries=[(None, 'qux/index'), (None, 'baz'), (None, 'bar/bar_3'),\n (None, 'bar/bar_2'), (None, 'bar/bar_1'), (None, 'bar/index'),\n (None, 'foo')])\n\n # other collections\n assert app.env.toc_num_entries['index'] == 3\n assert app.env.toctree_includes['index'] == includefiles + list(reversed(includefiles))\n for file in includefiles:\n assert 'index' in app.env.files_to_rebuild[file]\n assert 'index' in app.env.glob_toctrees\n assert app.env.numbered_toctrees == set()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toc_for_test_get_toc_for.assert_node_toctree_2_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toc_for_test_get_toc_for.assert_node_toctree_2_0_", "embedding": null, "metadata": {"file_path": "tests/test_environment_toctree.py", "file_name": "test_environment_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 159, "span_ids": ["test_get_toc_for"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='toctree')\n@pytest.mark.test_params(shared_result='test_environment_toctree_basic')\ndef test_get_toc_for(app):\n app.build()\n toctree = TocTree(app.env).get_toc_for('index', app.builder)\n\n assert_node(toctree,\n [bullet_list, ([list_item, (compact_paragraph, # [0][0]\n [bullet_list, (addnodes.toctree, # [0][1][0]\n comment, # [0][1][1]\n list_item)])], # [0][1][2]\n [list_item, (compact_paragraph, # [1][0]\n [bullet_list, (addnodes.toctree,\n addnodes.toctree)])],\n [list_item, compact_paragraph])]) # [2][0]\n assert_node(toctree[0][0],\n [compact_paragraph, reference, \"Welcome to Sphinx Tests\u2019s documentation!\"])\n assert_node(toctree[0][1][2],\n ([compact_paragraph, reference, \"subsection\"],\n [bullet_list, list_item, compact_paragraph, reference, \"subsubsection\"]))\n assert_node(toctree[1][0],\n [compact_paragraph, reference, \"Test for issue #1157\"])\n assert_node(toctree[2][0],\n [compact_paragraph, reference, \"Indices and tables\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toc_for_only_test_get_toc_for_only.assert_node_toctree_2_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toc_for_only_test_get_toc_for_only.assert_node_toctree_2_0_", "embedding": null, "metadata": {"file_path": "tests/test_environment_toctree.py", "file_name": "test_environment_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 162, "end_line": 189, "span_ids": ["test_get_toc_for_only"], "tokens": 349}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='toctree')\n@pytest.mark.test_params(shared_result='test_environment_toctree_basic')\ndef test_get_toc_for_only(app):\n app.build()\n builder = StandaloneHTMLBuilder(app)\n toctree = TocTree(app.env).get_toc_for('index', builder)\n\n assert_node(toctree,\n [bullet_list, ([list_item, (compact_paragraph, # [0][0]\n [bullet_list, (addnodes.toctree, # [0][1][0]\n list_item, # [0][1][1]\n list_item)])], # [0][1][2]\n [list_item, (compact_paragraph, # [1][0]\n [bullet_list, (addnodes.toctree,\n addnodes.toctree)])],\n [list_item, compact_paragraph])]) # [2][0]\n assert_node(toctree[0][0],\n [compact_paragraph, reference, \"Welcome to Sphinx Tests\u2019s documentation!\"])\n assert_node(toctree[0][1][1],\n ([compact_paragraph, reference, \"Section for HTML\"],\n [bullet_list, addnodes.toctree]))\n assert_node(toctree[0][1][2],\n ([compact_paragraph, reference, \"subsection\"],\n [bullet_list, list_item, compact_paragraph, reference, \"subsubsection\"]))\n assert_node(toctree[1][0],\n [compact_paragraph, reference, \"Test for issue #1157\"])\n assert_node(toctree[2][0],\n [compact_paragraph, reference, \"Indices and tables\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toc_for_tocdepth_test_get_toc_for_tocdepth.assert_node_toctree_0_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toc_for_tocdepth_test_get_toc_for_tocdepth.assert_node_toctree_0_1_", "embedding": null, "metadata": {"file_path": "tests/test_environment_toctree.py", "file_name": "test_environment_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 192, "end_line": 204, "span_ids": ["test_get_toc_for_tocdepth"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='toctree')\n@pytest.mark.test_params(shared_result='test_environment_toctree_basic')\ndef test_get_toc_for_tocdepth(app):\n app.build()\n toctree = TocTree(app.env).get_toc_for('tocdepth', app.builder)\n\n assert_node(toctree,\n [bullet_list, list_item, (compact_paragraph, # [0][0]\n bullet_list)]) # [0][1]\n assert_node(toctree[0][0],\n [compact_paragraph, reference, \"level 1\"])\n assert_node(toctree[0][1],\n [bullet_list, list_item, compact_paragraph, reference, \"level 2\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_test_get_toctree_for.assert_node_toctree_3_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_test_get_toctree_for.assert_node_toctree_3_1_", "embedding": null, "metadata": {"file_path": "tests/test_environment_toctree.py", "file_name": "test_environment_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 200, "end_line": 237, "span_ids": ["test_get_toctree_for"], "tokens": 562}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='toctree')\n@pytest.mark.test_params(shared_result='test_environment_toctree_basic')\ndef test_get_toctree_for(app):\n app.build()\n toctree = TocTree(app.env).get_toctree_for('index', app.builder, collapse=False)\n assert_node(toctree,\n [compact_paragraph, ([title, \"Table of Contents\"],\n bullet_list,\n bullet_list,\n bullet_list)])\n\n assert_node(toctree[1],\n ([list_item, ([compact_paragraph, reference, \"foo\"],\n bullet_list)],\n [list_item, compact_paragraph, reference, \"bar\"],\n [list_item, compact_paragraph, reference, \"http://sphinx-doc.org/\"],\n [list_item, compact_paragraph, reference,\n \"Welcome to Sphinx Tests\u2019s documentation!\"]))\n assert_node(toctree[1][0][1],\n ([list_item, compact_paragraph, reference, \"quux\"],\n [list_item, compact_paragraph, reference, \"foo.1\"],\n [list_item, compact_paragraph, reference, \"foo.2\"]))\n\n assert_node(toctree[1][0][0][0], reference, refuri=\"foo\", secnumber=[1])\n assert_node(toctree[1][0][1][0][0][0], reference, refuri=\"quux\", secnumber=[1, 1])\n assert_node(toctree[1][0][1][1][0][0], reference, refuri=\"foo#foo-1\", secnumber=[1, 2])\n assert_node(toctree[1][0][1][2][0][0], reference, refuri=\"foo#foo-2\", secnumber=[1, 3])\n assert_node(toctree[1][1][0][0], reference, refuri=\"bar\", secnumber=[2])\n assert_node(toctree[1][2][0][0], reference, refuri=\"http://sphinx-doc.org/\")\n assert_node(toctree[1][3][0][0], reference, refuri=\"\")\n\n assert_node(toctree[2],\n [bullet_list, list_item, compact_paragraph, reference, \"baz\"])\n assert_node(toctree[3],\n ([list_item, compact_paragraph, reference, \"Latest reference\"],\n [list_item, compact_paragraph, reference, \"Python\"]))\n assert_node(toctree[3][0][0][0], reference, refuri=\"http://sphinx-doc.org/latest/\")\n assert_node(toctree[3][1][0][0], reference, refuri=\"http://python.org/\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_collapse_test_get_toctree_for_collapse.assert_node_toctree_3_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_collapse_test_get_toctree_for_collapse.assert_node_toctree_3_1_", "embedding": null, "metadata": {"file_path": "tests/test_environment_toctree.py", "file_name": "test_environment_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 240, "end_line": 268, "span_ids": ["test_get_toctree_for_collapse"], "tokens": 390}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='toctree')\n@pytest.mark.test_params(shared_result='test_environment_toctree_basic')\ndef test_get_toctree_for_collapse(app):\n app.build()\n toctree = TocTree(app.env).get_toctree_for('index', app.builder, collapse=True)\n assert_node(toctree,\n [compact_paragraph, ([title, \"Table of Contents\"],\n bullet_list,\n bullet_list,\n bullet_list)])\n\n assert_node(toctree[1],\n ([list_item, compact_paragraph, reference, \"foo\"],\n [list_item, compact_paragraph, reference, \"bar\"],\n [list_item, compact_paragraph, reference, \"http://sphinx-doc.org/\"],\n [list_item, compact_paragraph, reference,\n \"Welcome to Sphinx Tests\u2019s documentation!\"]))\n assert_node(toctree[1][0][0][0], reference, refuri=\"foo\", secnumber=[1])\n assert_node(toctree[1][1][0][0], reference, refuri=\"bar\", secnumber=[2])\n assert_node(toctree[1][2][0][0], reference, refuri=\"http://sphinx-doc.org/\")\n assert_node(toctree[1][3][0][0], reference, refuri=\"\")\n\n assert_node(toctree[2],\n [bullet_list, list_item, compact_paragraph, reference, \"baz\"])\n assert_node(toctree[3],\n ([list_item, compact_paragraph, reference, \"Latest reference\"],\n [list_item, compact_paragraph, reference, \"Python\"]))\n assert_node(toctree[3][0][0][0], reference, refuri=\"http://sphinx-doc.org/latest/\")\n assert_node(toctree[3][1][0][0], reference, refuri=\"http://python.org/\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_maxdepth_test_get_toctree_for_maxdepth.assert_node_toctree_3_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_maxdepth_test_get_toctree_for_maxdepth.assert_node_toctree_3_1_", "embedding": null, "metadata": {"file_path": "tests/test_environment_toctree.py", "file_name": "test_environment_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 271, "end_line": 314, "span_ids": ["test_get_toctree_for_maxdepth"], "tokens": 659}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='toctree')\n@pytest.mark.test_params(shared_result='test_environment_toctree_basic')\ndef test_get_toctree_for_maxdepth(app):\n app.build()\n toctree = TocTree(app.env).get_toctree_for('index', app.builder,\n collapse=False, maxdepth=3)\n assert_node(toctree,\n [compact_paragraph, ([title, \"Table of Contents\"],\n bullet_list,\n bullet_list,\n bullet_list)])\n\n assert_node(toctree[1],\n ([list_item, ([compact_paragraph, reference, \"foo\"],\n bullet_list)],\n [list_item, compact_paragraph, reference, \"bar\"],\n [list_item, compact_paragraph, reference, \"http://sphinx-doc.org/\"],\n [list_item, compact_paragraph, reference,\n \"Welcome to Sphinx Tests\u2019s documentation!\"]))\n assert_node(toctree[1][0][1],\n ([list_item, compact_paragraph, reference, \"quux\"],\n [list_item, ([compact_paragraph, reference, \"foo.1\"],\n bullet_list)],\n [list_item, compact_paragraph, reference, \"foo.2\"]))\n assert_node(toctree[1][0][1][1][1],\n [bullet_list, list_item, compact_paragraph, reference, \"foo.1-1\"])\n\n assert_node(toctree[1][0][0][0], reference, refuri=\"foo\", secnumber=[1])\n assert_node(toctree[1][0][1][0][0][0], reference, refuri=\"quux\", secnumber=[1, 1])\n assert_node(toctree[1][0][1][1][0][0], reference, refuri=\"foo#foo-1\", secnumber=[1, 2])\n assert_node(toctree[1][0][1][1][1][0][0][0],\n reference, refuri=\"foo#foo-1-1\", secnumber=[1, 2, 1])\n assert_node(toctree[1][0][1][2][0][0], reference, refuri=\"foo#foo-2\", secnumber=[1, 3])\n assert_node(toctree[1][1][0][0], reference, refuri=\"bar\", secnumber=[2])\n assert_node(toctree[1][2][0][0], reference, refuri=\"http://sphinx-doc.org/\")\n assert_node(toctree[1][3][0][0], reference, refuri=\"\")\n\n assert_node(toctree[2],\n [bullet_list, list_item, compact_paragraph, reference, \"baz\"])\n assert_node(toctree[3],\n ([list_item, compact_paragraph, reference, \"Latest reference\"],\n [list_item, compact_paragraph, reference, \"Python\"]))\n assert_node(toctree[3][0][0][0], reference, refuri=\"http://sphinx-doc.org/latest/\")\n assert_node(toctree[3][1][0][0], reference, refuri=\"http://python.org/\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_includehidden_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py_test_get_toctree_for_includehidden_", "embedding": null, "metadata": {"file_path": "tests/test_environment_toctree.py", "file_name": "test_environment_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 317, "end_line": 349, "span_ids": ["test_get_toctree_for_includehidden"], "tokens": 456}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('xml', testroot='toctree')\n@pytest.mark.test_params(shared_result='test_environment_toctree_basic')\ndef test_get_toctree_for_includehidden(app):\n app.build()\n toctree = TocTree(app.env).get_toctree_for('index', app.builder, collapse=False,\n includehidden=False)\n assert_node(toctree,\n [compact_paragraph, ([title, \"Table of Contents\"],\n bullet_list,\n bullet_list)])\n\n assert_node(toctree[1],\n ([list_item, ([compact_paragraph, reference, \"foo\"],\n bullet_list)],\n [list_item, compact_paragraph, reference, \"bar\"],\n [list_item, compact_paragraph, reference, \"http://sphinx-doc.org/\"],\n [list_item, compact_paragraph, reference,\n \"Welcome to Sphinx Tests\u2019s documentation!\"]))\n assert_node(toctree[1][0][1],\n ([list_item, compact_paragraph, reference, \"quux\"],\n [list_item, compact_paragraph, reference, \"foo.1\"],\n [list_item, compact_paragraph, reference, \"foo.2\"]))\n\n assert_node(toctree[1][0][0][0], reference, refuri=\"foo\", secnumber=[1])\n assert_node(toctree[1][0][1][0][0][0], reference, refuri=\"quux\", secnumber=[1, 1])\n assert_node(toctree[1][0][1][1][0][0], reference, refuri=\"foo#foo-1\", secnumber=[1, 2])\n assert_node(toctree[1][0][1][2][0][0], reference, refuri=\"foo#foo-2\", secnumber=[1, 3])\n assert_node(toctree[1][1][0][0], reference, refuri=\"bar\", secnumber=[2])\n assert_node(toctree[1][2][0][0], reference, refuri=\"http://sphinx-doc.org/\")\n\n assert_node(toctree[2],\n [bullet_list, list_item, compact_paragraph, reference, \"baz\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_errors.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_errors.py__", "embedding": null, "metadata": {"file_path": "tests/test_errors.py", "file_name": "test_errors.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 18, "span_ids": ["test_extension_error_repr", "imports", "test_extension_error_with_orig_exc_repr"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import sys\n\nfrom sphinx.errors import ExtensionError\n\n\ndef test_extension_error_repr():\n exc = ExtensionError(\"foo\")\n assert repr(exc) == \"ExtensionError('foo')\"\n\n\ndef test_extension_error_with_orig_exc_repr():\n exc = ExtensionError(\"foo\", Exception(\"bar\"))\n if sys.version_info < (3, 7):\n expected = \"ExtensionError('foo', Exception('bar',))\"\n else:\n expected = \"ExtensionError('foo', Exception('bar'))\"\n assert repr(exc) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_apidoc_params_test_simple.print_app__warning_getval": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_apidoc_params_test_simple.print_app__warning_getval", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 30, "end_line": 58, "span_ids": ["test_simple", "apidoc_params"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef apidoc_params(request):\n if hasattr(request.node, 'iter_markers'): # pytest-3.6.0 or newer\n markers = request.node.iter_markers(\"apidoc\")\n else:\n markers = request.node.get_marker(\"apidoc\")\n pargs = {}\n kwargs = {}\n\n if markers is not None:\n for info in reversed(list(markers)):\n for i, a in enumerate(info.args):\n pargs[i] = a\n kwargs.update(info.kwargs)\n\n args = [pargs[i] for i in sorted(pargs.keys())]\n return args, kwargs\n\n\n@pytest.mark.apidoc(coderoot='test-root')\ndef test_simple(make_app, apidoc):\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert (outdir / 'index.rst').isfile()\n\n app = make_app('text', srcdir=outdir)\n app.build()\n print(app._status.getvalue())\n print(app._warning.getvalue())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_enabled_test_pep_0420_enabled.None_5.assert_a_b_x_namespace_n": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_enabled_test_pep_0420_enabled.None_5.assert_a_b_x_namespace_n", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 61, "end_line": 106, "span_ids": ["test_pep_0420_enabled"], "tokens": 453}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-pep420/a',\n options=[\"--implicit-namespaces\"],\n)\ndef test_pep_0420_enabled(make_app, apidoc):\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert (outdir / 'a.b.c.rst').isfile()\n assert (outdir / 'a.b.e.rst').isfile()\n assert (outdir / 'a.b.x.rst').isfile()\n\n with open(outdir / 'a.b.c.rst') as f:\n rst = f.read()\n assert \"automodule:: a.b.c.d\\n\" in rst\n assert \"automodule:: a.b.c\\n\" in rst\n\n with open(outdir / 'a.b.e.rst') as f:\n rst = f.read()\n assert \"automodule:: a.b.e.f\\n\" in rst\n\n with open(outdir / 'a.b.x.rst') as f:\n rst = f.read()\n assert \"automodule:: a.b.x.y\\n\" in rst\n assert \"automodule:: a.b.x\\n\" not in rst\n\n app = make_app('text', srcdir=outdir)\n app.build()\n print(app._status.getvalue())\n print(app._warning.getvalue())\n\n builddir = outdir / '_build' / 'text'\n assert (builddir / 'a.b.c.txt').isfile()\n assert (builddir / 'a.b.e.txt').isfile()\n assert (builddir / 'a.b.x.txt').isfile()\n\n with open(builddir / 'a.b.c.txt') as f:\n txt = f.read()\n assert \"a.b.c package\\n\" in txt\n\n with open(builddir / 'a.b.e.txt') as f:\n txt = f.read()\n assert \"a.b.e.f module\\n\" in txt\n\n with open(builddir / 'a.b.x.txt') as f:\n txt = f.read()\n assert \"a.b.x namespace\\n\" in txt", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_enabled_separate_test_pep_0420_enabled_separate.None_5.assert_a_b_x_namespace_n": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_enabled_separate_test_pep_0420_enabled_separate.None_5.assert_a_b_x_namespace_n", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 109, "end_line": 156, "span_ids": ["test_pep_0420_enabled_separate"], "tokens": 538}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-pep420/a',\n options=[\"--implicit-namespaces\", \"--separate\"],\n)\ndef test_pep_0420_enabled_separate(make_app, apidoc):\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert (outdir / 'a.b.c.rst').isfile()\n assert (outdir / 'a.b.e.rst').isfile()\n assert (outdir / 'a.b.e.f.rst').isfile()\n assert (outdir / 'a.b.x.rst').isfile()\n assert (outdir / 'a.b.x.y.rst').isfile()\n\n with open(outdir / 'a.b.c.rst') as f:\n rst = f.read()\n assert \".. toctree::\\n :maxdepth: 4\\n\\n a.b.c.d\\n\" in rst\n\n with open(outdir / 'a.b.e.rst') as f:\n rst = f.read()\n assert \".. toctree::\\n :maxdepth: 4\\n\\n a.b.e.f\\n\" in rst\n\n with open(outdir / 'a.b.x.rst') as f:\n rst = f.read()\n assert \".. toctree::\\n :maxdepth: 4\\n\\n a.b.x.y\\n\" in rst\n\n app = make_app('text', srcdir=outdir)\n app.build()\n print(app._status.getvalue())\n print(app._warning.getvalue())\n\n builddir = outdir / '_build' / 'text'\n assert (builddir / 'a.b.c.txt').isfile()\n assert (builddir / 'a.b.e.txt').isfile()\n assert (builddir / 'a.b.e.f.txt').isfile()\n assert (builddir / 'a.b.x.txt').isfile()\n assert (builddir / 'a.b.x.y.txt').isfile()\n\n with open(builddir / 'a.b.c.txt') as f:\n txt = f.read()\n assert \"a.b.c package\\n\" in txt\n\n with open(builddir / 'a.b.e.f.txt') as f:\n txt = f.read()\n assert \"a.b.e.f module\\n\" in txt\n\n with open(builddir / 'a.b.x.txt') as f:\n txt = f.read()\n assert \"a.b.x namespace\\n\" in txt", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_disabled_test_pep_0420_disabled.print_app__warning_getval": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_disabled_test_pep_0420_disabled.print_app__warning_getval", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 170, "span_ids": ["test_pep_0420_disabled"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(coderoot='test-apidoc-pep420/a')\ndef test_pep_0420_disabled(make_app, apidoc):\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert not (outdir / 'a.b.c.rst').exists()\n assert not (outdir / 'a.b.x.rst').exists()\n\n app = make_app('text', srcdir=outdir)\n app.build()\n print(app._status.getvalue())\n print(app._warning.getvalue())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_disabled_top_level_verify_test_pep_0420_disabled_top_level_verify.print_app__warning_getval": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_pep_0420_disabled_top_level_verify_test_pep_0420_disabled_top_level_verify.print_app__warning_getval", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 173, "end_line": 190, "span_ids": ["test_pep_0420_disabled_top_level_verify"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-pep420/a/b')\ndef test_pep_0420_disabled_top_level_verify(make_app, apidoc):\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert (outdir / 'c.rst').isfile()\n assert not (outdir / 'x.rst').exists()\n\n with open(outdir / 'c.rst') as f:\n rst = f.read()\n assert \"c package\\n\" in rst\n assert \"automodule:: c.d\\n\" in rst\n assert \"automodule:: c\\n\" in rst\n\n app = make_app('text', srcdir=outdir)\n app.build()\n print(app._status.getvalue())\n print(app._warning.getvalue())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_trailing_underscore_test_trailing_underscore.with_open_builddir_pac.assert_package__module__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_trailing_underscore_test_trailing_underscore.with_open_builddir_pac.assert_package__module__", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 193, "end_line": 209, "span_ids": ["test_trailing_underscore"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-trailing-underscore')\ndef test_trailing_underscore(make_app, apidoc):\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert (outdir / 'package_.rst').isfile()\n\n app = make_app('text', srcdir=outdir)\n app.build()\n print(app._status.getvalue())\n print(app._warning.getvalue())\n\n builddir = outdir / '_build' / 'text'\n with open(builddir / 'package_.txt') as f:\n rst = f.read()\n assert \"package_ package\\n\" in rst\n assert \"package_.module_ module\\n\" in rst", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_test_excludes.assert_outdir_a_b_x_y": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_test_excludes.assert_outdir_a_b_x_y", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 211, "end_line": 224, "span_ids": ["test_excludes"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-pep420/a',\n excludes=[\"b/c/d.py\", \"b/e/f.py\", \"b/e/__init__.py\"],\n options=[\"--implicit-namespaces\", \"--separate\"],\n)\ndef test_excludes(apidoc):\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert (outdir / 'a.rst').isfile()\n assert (outdir / 'a.b.rst').isfile()\n assert (outdir / 'a.b.c.rst').isfile() # generated because not empty\n assert not (outdir / 'a.b.e.rst').isfile() # skipped because of empty after excludes\n assert (outdir / 'a.b.x.rst').isfile()\n assert (outdir / 'a.b.x.y.rst').isfile()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_subpackage_should_be_skipped_test_excludes_subpackage_should_be_skipped._skipped_because_b_e_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_subpackage_should_be_skipped_test_excludes_subpackage_should_be_skipped._skipped_because_b_e_s", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 227, "end_line": 239, "span_ids": ["test_excludes_subpackage_should_be_skipped"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-pep420/a',\n excludes=[\"b/e\"],\n options=[\"--implicit-namespaces\", \"--separate\"],\n)\ndef test_excludes_subpackage_should_be_skipped(apidoc):\n \"\"\"Subpackage exclusion should work.\"\"\"\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert (outdir / 'a.rst').isfile()\n assert (outdir / 'a.b.rst').isfile()\n assert (outdir / 'a.b.c.rst').isfile() # generated because not empty\n assert not (outdir / 'a.b.e.f.rst').isfile() # skipped because 'b/e' subpackage is skipped", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_module_should_be_skipped_test_excludes_module_should_be_skipped._skipped_because_of_empt": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_module_should_be_skipped_test_excludes_module_should_be_skipped._skipped_because_of_empt", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 242, "end_line": 254, "span_ids": ["test_excludes_module_should_be_skipped"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-pep420/a',\n excludes=[\"b/e/f.py\"],\n options=[\"--implicit-namespaces\", \"--separate\"],\n)\ndef test_excludes_module_should_be_skipped(apidoc):\n \"\"\"Module exclusion should work.\"\"\"\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert (outdir / 'a.rst').isfile()\n assert (outdir / 'a.b.rst').isfile()\n assert (outdir / 'a.b.c.rst').isfile() # generated because not empty\n assert not (outdir / 'a.b.e.f.rst').isfile() # skipped because of empty after excludes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_module_should_not_be_skipped_test_excludes_module_should_not_be_skipped._skipped_because_of_empt": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_excludes_module_should_not_be_skipped_test_excludes_module_should_not_be_skipped._skipped_because_of_empt", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 257, "end_line": 269, "span_ids": ["test_excludes_module_should_not_be_skipped"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-pep420/a',\n excludes=[],\n options=[\"--implicit-namespaces\", \"--separate\"],\n)\ndef test_excludes_module_should_not_be_skipped(apidoc):\n \"\"\"Module should be included if no excludes are used.\"\"\"\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert (outdir / 'a.rst').isfile()\n assert (outdir / 'a.b.rst').isfile()\n assert (outdir / 'a.b.c.rst').isfile() # generated because not empty\n assert (outdir / 'a.b.e.f.rst').isfile() # skipped because of empty after excludes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_multibyte_parameters_test_extension_parsed.with_open_outdir_conf_.assert_sphinx_ext_mathja": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_multibyte_parameters_test_extension_parsed.with_open_outdir_conf_.assert_sphinx_ext_mathja", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 265, "end_line": 301, "span_ids": ["test_extension_parsed", "test_multibyte_parameters"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-root',\n options=[\n '--doc-project', '\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d',\n '--doc-author', '\u8457\u8005\u540d',\n '--doc-version', '\u30d0\u30fc\u30b8\u30e7\u30f3',\n '--doc-release', '\u30ea\u30ea\u30fc\u30b9',\n ],\n)\ndef test_multibyte_parameters(make_app, apidoc):\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n assert (outdir / 'index.rst').isfile()\n\n conf_py = (outdir / 'conf.py').read_text()\n assert \"project = '\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d'\" in conf_py\n assert \"author = '\u8457\u8005\u540d'\" in conf_py\n assert \"version = '\u30d0\u30fc\u30b8\u30e7\u30f3'\" in conf_py\n assert \"release = '\u30ea\u30ea\u30fc\u30b9'\" in conf_py\n\n app = make_app('text', srcdir=outdir)\n app.build()\n print(app._status.getvalue())\n print(app._warning.getvalue())\n\n\n@pytest.mark.apidoc(\n coderoot='test-root',\n options=['--ext-mathjax'],\n)\ndef test_extension_parsed(make_app, apidoc):\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n\n with open(outdir / 'conf.py') as f:\n rst = f.read()\n assert \"sphinx.ext.mathjax\" in rst", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_toc_all_references_should_exist_pep420_enabled_test_toc_all_references_should_exist_pep420_enabled.assert_len_missing_files_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_toc_all_references_should_exist_pep420_enabled_test_toc_all_references_should_exist_pep420_enabled.assert_len_missing_files_", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 304, "end_line": 332, "span_ids": ["test_toc_all_references_should_exist_pep420_enabled"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-toc/mypackage',\n options=[\"--implicit-namespaces\"],\n)\ndef test_toc_all_references_should_exist_pep420_enabled(make_app, apidoc):\n \"\"\"All references in toc should exist. This test doesn't say if\n directories with empty __init__.py and and nothing else should be\n skipped, just ensures consistency between what's referenced in the toc\n and what is created. This is the variant with pep420 enabled.\n \"\"\"\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n\n toc = extract_toc(outdir / 'mypackage.rst')\n\n refs = [l.strip() for l in toc.splitlines() if l.strip()]\n found_refs = []\n missing_files = []\n for ref in refs:\n if ref and ref[0] in (':', '#'):\n continue\n found_refs.append(ref)\n filename = \"{}.rst\".format(ref)\n if not (outdir / filename).isfile():\n missing_files.append(filename)\n\n assert len(missing_files) == 0, \\\n 'File(s) referenced in TOC not found: {}\\n' \\\n 'TOC:\\n{}'.format(\", \".join(missing_files), toc)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_toc_all_references_should_exist_pep420_disabled_test_toc_all_references_should_exist_pep420_disabled.assert_len_missing_files_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_toc_all_references_should_exist_pep420_disabled_test_toc_all_references_should_exist_pep420_disabled.assert_len_missing_files_", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 335, "end_line": 362, "span_ids": ["test_toc_all_references_should_exist_pep420_disabled"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-toc/mypackage',\n)\ndef test_toc_all_references_should_exist_pep420_disabled(make_app, apidoc):\n \"\"\"All references in toc should exist. This test doesn't say if\n directories with empty __init__.py and and nothing else should be\n skipped, just ensures consistency between what's referenced in the toc\n and what is created. This is the variant with pep420 disabled.\n \"\"\"\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n\n toc = extract_toc(outdir / 'mypackage.rst')\n\n refs = [l.strip() for l in toc.splitlines() if l.strip()]\n found_refs = []\n missing_files = []\n for ref in refs:\n if ref and ref[0] in (':', '#'):\n continue\n filename = \"{}.rst\".format(ref)\n found_refs.append(ref)\n if not (outdir / filename).isfile():\n missing_files.append(filename)\n\n assert len(missing_files) == 0, \\\n 'File(s) referenced in TOC not found: {}\\n' \\\n 'TOC:\\n{}'.format(\", \".join(missing_files), toc)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_extract_toc_extract_toc.return.toctree": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_extract_toc_extract_toc.return.toctree", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 365, "end_line": 378, "span_ids": ["extract_toc"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def extract_toc(path):\n \"\"\"Helper: Extract toc section from package rst file\"\"\"\n with open(path) as f:\n rst = f.read()\n\n # Read out the part containing the toctree\n toctree_start = \"\\n.. toctree::\\n\"\n toctree_end = \"\\nSubmodules\"\n\n start_idx = rst.index(toctree_start)\n end_idx = rst.index(toctree_end, start_idx)\n toctree = rst[start_idx + len(toctree_start):end_idx]\n\n return toctree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_subpackage_in_toc_test_subpackage_in_toc.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_subpackage_in_toc_test_subpackage_in_toc.None_5", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 381, "end_line": 402, "span_ids": ["test_subpackage_in_toc"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.apidoc(\n coderoot='test-apidoc-subpackage-in-toc',\n options=['--separate']\n)\ndef test_subpackage_in_toc(make_app, apidoc):\n \"\"\"Make sure that empty subpackages with non-empty subpackages in them\n are not skipped (issue #4520)\n \"\"\"\n outdir = apidoc.outdir\n assert (outdir / 'conf.py').isfile()\n\n assert (outdir / 'parent.rst').isfile()\n with open(outdir / 'parent.rst') as f:\n parent = f.read()\n assert 'parent.child' in parent\n\n assert (outdir / 'parent.child.rst').isfile()\n with open(outdir / 'parent.child.rst') as f:\n parent_child = f.read()\n assert 'parent.child.foo' in parent_child\n\n assert (outdir / 'parent.child.foo.rst').isfile()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_private_test_private.assert_tempdir__world": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_private_test_private.assert_tempdir__world", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 405, "end_line": 419, "span_ids": ["test_private"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_private(tempdir):\n (tempdir / 'hello.py').write_text('')\n (tempdir / '_world.py').write_text('')\n\n # without --private option\n apidoc_main(['-o', tempdir, tempdir])\n assert (tempdir / 'hello.rst').exists()\n assert ':private-members:' not in (tempdir / 'hello.rst').read_text()\n assert not (tempdir / '_world.rst').exists()\n\n # with --private option\n apidoc_main(['--private', '-f', '-o', tempdir, tempdir])\n assert (tempdir / 'hello.rst').exists()\n assert ':private-members:' in (tempdir / 'hello.rst').read_text()\n assert (tempdir / '_world.rst').exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_toc_file_test_toc_file.assert_content_test_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_toc_file_test_toc_file.assert_content_test_", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 422, "end_line": 437, "span_ids": ["test_toc_file"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_toc_file(tempdir):\n outdir = path(tempdir)\n (outdir / 'module').makedirs()\n (outdir / 'example.py').write_text('')\n (outdir / 'module' / 'example.py').write_text('')\n apidoc_main(['-o', tempdir, tempdir])\n assert (outdir / 'modules.rst').exists()\n\n content = (outdir / 'modules.rst').read_text()\n assert content == (\"test_toc_file0\\n\"\n \"==============\\n\"\n \"\\n\"\n \".. toctree::\\n\"\n \" :maxdepth: 4\\n\"\n \"\\n\"\n \" example\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_module_file_test_module_file.assert_content_examp": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_module_file_test_module_file.assert_content_examp", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 440, "end_line": 453, "span_ids": ["test_module_file"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_module_file(tempdir):\n outdir = path(tempdir)\n (outdir / 'example.py').write_text('')\n apidoc_main(['-o', tempdir, tempdir])\n assert (outdir / 'example.rst').exists()\n\n content = (outdir / 'example.rst').read_text()\n assert content == (\"example module\\n\"\n \"==============\\n\"\n \"\\n\"\n \".. automodule:: example\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_module_file_noheadings_test_module_file_noheadings.assert_content_au": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_module_file_noheadings_test_module_file_noheadings.assert_content_au", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 456, "end_line": 466, "span_ids": ["test_module_file_noheadings"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_module_file_noheadings(tempdir):\n outdir = path(tempdir)\n (outdir / 'example.py').write_text('')\n apidoc_main(['--no-headings', '-o', tempdir, tempdir])\n assert (outdir / 'example.rst').exists()\n\n content = (outdir / 'example.rst').read_text()\n assert content == (\".. automodule:: example\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_test_package_file.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_test_package_file.None_3", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 468, "end_line": 529, "span_ids": ["test_package_file"], "tokens": 534}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_package_file(tempdir):\n outdir = path(tempdir)\n (outdir / 'testpkg').makedirs()\n (outdir / 'testpkg' / '__init__.py').write_text('')\n (outdir / 'testpkg' / 'hello.py').write_text('')\n (outdir / 'testpkg' / 'world.py').write_text('')\n (outdir / 'testpkg' / 'subpkg').makedirs()\n (outdir / 'testpkg' / 'subpkg' / '__init__.py').write_text('')\n apidoc_main(['-o', tempdir, tempdir / 'testpkg'])\n assert (outdir / 'testpkg.rst').exists()\n assert (outdir / 'testpkg.subpkg.rst').exists()\n\n content = (outdir / 'testpkg.rst').read_text()\n assert content == (\"testpkg package\\n\"\n \"===============\\n\"\n \"\\n\"\n \"Subpackages\\n\"\n \"-----------\\n\"\n \"\\n\"\n \".. toctree::\\n\"\n \" :maxdepth: 4\\n\"\n \"\\n\"\n \" testpkg.subpkg\\n\"\n \"\\n\"\n \"Submodules\\n\"\n \"----------\\n\"\n \"\\n\"\n \"testpkg.hello module\\n\"\n \"--------------------\\n\"\n \"\\n\"\n \".. automodule:: testpkg.hello\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\"\n \"\\n\"\n \"testpkg.world module\\n\"\n \"--------------------\\n\"\n \"\\n\"\n \".. automodule:: testpkg.world\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\"\n \"\\n\"\n \"Module contents\\n\"\n \"---------------\\n\"\n \"\\n\"\n \".. automodule:: testpkg\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\")\n\n content = (outdir / 'testpkg.subpkg.rst').read_text()\n assert content == (\"testpkg.subpkg package\\n\"\n \"======================\\n\"\n \"\\n\"\n \"Module contents\\n\"\n \"---------------\\n\"\n \"\\n\"\n \".. automodule:: testpkg.subpkg\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_separate_test_package_file_separate.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_separate_test_package_file_separate.None_3", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 534, "end_line": 570, "span_ids": ["test_package_file_separate"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_package_file_separate(tempdir):\n outdir = path(tempdir)\n (outdir / 'testpkg').makedirs()\n (outdir / 'testpkg' / '__init__.py').write_text('')\n (outdir / 'testpkg' / 'example.py').write_text('')\n apidoc_main(['--separate', '-o', tempdir, tempdir / 'testpkg'])\n assert (outdir / 'testpkg.rst').exists()\n assert (outdir / 'testpkg.example.rst').exists()\n\n content = (outdir / 'testpkg.rst').read_text()\n assert content == (\"testpkg package\\n\"\n \"===============\\n\"\n \"\\n\"\n \"Submodules\\n\"\n \"----------\\n\"\n \"\\n\"\n \".. toctree::\\n\"\n \" :maxdepth: 4\\n\"\n \"\\n\"\n \" testpkg.example\\n\"\n \"\\n\"\n \"Module contents\\n\"\n \"---------------\\n\"\n \"\\n\"\n \".. automodule:: testpkg\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\")\n\n content = (outdir / 'testpkg.example.rst').read_text()\n assert content == (\"testpkg.example module\\n\"\n \"======================\\n\"\n \"\\n\"\n \".. automodule:: testpkg.example\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_module_first_test_package_file_module_first.assert_content_testp": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_module_first_test_package_file_module_first.assert_content_testp", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 571, "end_line": 596, "span_ids": ["test_package_file_module_first"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_package_file_module_first(tempdir):\n outdir = path(tempdir)\n (outdir / 'testpkg').makedirs()\n (outdir / 'testpkg' / '__init__.py').write_text('')\n (outdir / 'testpkg' / 'example.py').write_text('')\n apidoc_main(['--module-first', '-o', tempdir, tempdir])\n\n content = (outdir / 'testpkg.rst').read_text()\n assert content == (\"testpkg package\\n\"\n \"===============\\n\"\n \"\\n\"\n \".. automodule:: testpkg\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\"\n \"\\n\"\n \"Submodules\\n\"\n \"----------\\n\"\n \"\\n\"\n \"testpkg.example module\\n\"\n \"----------------------\\n\"\n \"\\n\"\n \".. automodule:: testpkg.example\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_without_submodules_test_package_file_without_submodules.assert_content_testp": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_package_file_without_submodules_test_package_file_without_submodules.assert_content_testp", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 602, "end_line": 619, "span_ids": ["test_package_file_without_submodules"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_package_file_without_submodules(tempdir):\n outdir = path(tempdir)\n (outdir / 'testpkg').makedirs()\n (outdir / 'testpkg' / '__init__.py').write_text('')\n apidoc_main(['-o', tempdir, tempdir / 'testpkg'])\n assert (outdir / 'testpkg.rst').exists()\n\n content = (outdir / 'testpkg.rst').read_text()\n assert content == (\"testpkg package\\n\"\n \"===============\\n\"\n \"\\n\"\n \"Module contents\\n\"\n \"---------------\\n\"\n \"\\n\"\n \".. automodule:: testpkg\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_namespace_package_file_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py_test_namespace_package_file_", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 619, "end_line": 642, "span_ids": ["test_namespace_package_file"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_namespace_package_file(tempdir):\n outdir = path(tempdir)\n (outdir / 'testpkg').makedirs()\n (outdir / 'testpkg' / 'example.py').write_text('')\n apidoc_main(['--implicit-namespace', '-o', tempdir, tempdir / 'testpkg'])\n assert (outdir / 'testpkg.rst').exists()\n\n content = (outdir / 'testpkg.rst').read_text()\n assert content == (\"testpkg namespace\\n\"\n \"=================\\n\"\n \"\\n\"\n \".. py:module:: testpkg\\n\"\n \"\\n\"\n \"Submodules\\n\"\n \"----------\\n\"\n \"\\n\"\n \"testpkg.example module\\n\"\n \"----------------------\\n\"\n \"\\n\"\n \".. automodule:: testpkg.example\\n\"\n \" :members:\\n\"\n \" :undoc-members:\\n\"\n \" :show-inheritance:\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_do_autodoc_do_autodoc.return.bridge_result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_do_autodoc_do_autodoc.return.bridge_result", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 33, "end_line": 45, "span_ids": ["do_autodoc"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def do_autodoc(app, objtype, name, options=None):\n if options is None:\n options = {}\n app.env.temp_data.setdefault('docname', 'index') # set dummy docname\n doccls = app.registry.documenters[objtype]\n docoptions = process_documenter_options(doccls, app.config, options)\n state = Mock()\n state.document.settings.tab_width = 8\n bridge = DocumenterBridge(app.env, LoggingReporter(''), docoptions, 1, state)\n documenter = doccls(bridge, name)\n documenter.generate()\n\n return bridge.result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_make_directive_bridge_skip_member.if_name_skipmeth_.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_make_directive_bridge_skip_member.if_name_skipmeth_.return.True", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 43, "end_line": 89, "span_ids": ["impl:6", "process_signature", "skip_member", "make_directive_bridge"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def make_directive_bridge(env):\n options = Options(\n inherited_members = False,\n undoc_members = False,\n private_members = False,\n special_members = False,\n imported_members = False,\n show_inheritance = False,\n noindex = False,\n annotation = None,\n synopsis = '',\n platform = '',\n deprecated = False,\n members = [],\n member_order = 'alphabetical',\n exclude_members = set(),\n ignore_module_all = False,\n )\n\n directive = Struct(\n env = env,\n genopt = options,\n result = ViewList(),\n record_dependencies = set(),\n state = Mock(),\n )\n directive.state.document.settings.tab_width = 8\n\n return directive\n\n\nprocessed_signatures = []\n\n\ndef process_signature(app, what, name, obj, options, args, retann):\n processed_signatures.append((what, name))\n if name == 'bar':\n return '42', None\n\n\ndef skip_member(app, what, name, obj, skip, options):\n if name in ('__special1__', '__special2__'):\n return skip\n if name.startswith('__'):\n return True\n if name == 'skipmeth':\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_new_documenter_test_new_documenter.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_new_documenter_test_new_documenter.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 309, "end_line": 337, "span_ids": ["test_new_documenter", "test_new_documenter.MyDocumenter:2", "test_new_documenter.MyDocumenter"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_new_documenter(app):\n class MyDocumenter(ModuleLevelDocumenter):\n objtype = 'integer'\n directivetype = 'integer'\n priority = 100\n\n @classmethod\n def can_document_member(cls, member, membername, isattr, parent):\n return isinstance(member, int)\n\n def document_members(self, all_members=False):\n return\n\n app.add_autodocumenter(MyDocumenter)\n\n options = {\"members\": 'integer'}\n actual = do_autodoc(app, 'module', 'target', options)\n assert list(actual) == [\n '',\n '.. py:module:: target',\n '',\n '',\n '.. py:integer:: integer',\n ' :module: target',\n '',\n ' documentation for the integer',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_attrgetter_using_test_attrgetter_using.with_catch_warnings_recor.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_attrgetter_using_test_attrgetter_using.with_catch_warnings_recor.None_2", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 340, "end_line": 375, "span_ids": ["test_attrgetter_using"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_attrgetter_using(app):\n from target import Class\n from target.inheritance import Derived\n\n directive = make_directive_bridge(app.env)\n\n def assert_getter_works(objtype, name, obj, attrs=[], **kw):\n getattr_spy = []\n\n def special_getattr(obj, name, *defargs):\n if name in attrs:\n getattr_spy.append((obj, name))\n return None\n return getattr(obj, name, *defargs)\n app.add_autodoc_attrgetter(type, special_getattr)\n\n del getattr_spy[:]\n inst = app.registry.documenters[objtype](directive, name)\n inst.generate(**kw)\n\n hooked_members = [s[1] for s in getattr_spy]\n documented_members = [s[1] for s in processed_signatures]\n for attr in attrs:\n fullname = '.'.join((name, attr))\n assert attr in hooked_members\n assert fullname not in documented_members, \\\n '%r was not hooked by special_attrgetter function' % fullname\n\n with catch_warnings(record=True):\n directive.genopt['members'] = ALL\n directive.genopt['inherited_members'] = False\n print(directive.genopt)\n assert_getter_works('class', 'target.Class', Class, ['meth'])\n\n directive.genopt['inherited_members'] = True\n assert_getter_works('class', 'target.inheritance.Derived', Derived, ['inheritedmeth'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_py_module_test_py_module.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_py_module_test_py_module.None_4", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 378, "end_line": 400, "span_ids": ["test_py_module"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_py_module(app, warning):\n # without py:module\n actual = do_autodoc(app, 'method', 'Class.meth')\n assert list(actual) == []\n assert (\"don't know which module to import for autodocumenting 'Class.meth'\"\n in warning.getvalue())\n\n # with py:module\n app.env.ref_context['py:module'] = 'target'\n warning.truncate(0)\n\n actual = do_autodoc(app, 'method', 'Class.meth')\n assert list(actual) == [\n '',\n '.. py:method:: Class.meth()',\n ' :module: target',\n '',\n ' Function.',\n '',\n ]\n assert (\"don't know which module to import for autodocumenting 'Class.meth'\"\n not in warning.getvalue())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_decorator_test_autodoc_exception.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_decorator_test_autodoc_exception.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 403, "end_line": 436, "span_ids": ["test_autodoc_exception", "test_autodoc_decorator"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_decorator(app):\n actual = do_autodoc(app, 'decorator', 'target.decorator.deco1')\n assert list(actual) == [\n '',\n '.. py:decorator:: deco1',\n ' :module: target.decorator',\n '',\n ' docstring for deco1',\n '',\n ]\n\n actual = do_autodoc(app, 'decorator', 'target.decorator.deco2')\n assert list(actual) == [\n '',\n '.. py:decorator:: deco2(condition, message)',\n ' :module: target.decorator',\n '',\n ' docstring for deco2',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_exception(app):\n actual = do_autodoc(app, 'exception', 'target.CustomEx')\n assert list(actual) == [\n '',\n '.. py:exception:: CustomEx',\n ' :module: target',\n '',\n ' My custom exception.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_warnings_test_autodoc_warnings.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_warnings_test_autodoc_warnings.None_4", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 439, "end_line": 456, "span_ids": ["test_autodoc_warnings"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_warnings(app, warning):\n app.env.temp_data['docname'] = 'dummy'\n\n # can't import module\n do_autodoc(app, 'module', 'unknown')\n assert \"failed to import module 'unknown'\" in warning.getvalue()\n\n # missing function\n do_autodoc(app, 'function', 'unknown')\n assert \"import for autodocumenting 'unknown'\" in warning.getvalue()\n\n do_autodoc(app, 'function', 'target.unknown')\n assert \"failed to import function 'unknown' from module 'target'\" in warning.getvalue()\n\n # missing method\n do_autodoc(app, 'method', 'target.Class.unknown')\n assert \"failed to import method 'Class.unknown' from module 'target'\" in warning.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_attributes_test_autodoc_attributes.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_attributes_test_autodoc_attributes.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 459, "end_line": 472, "span_ids": ["test_autodoc_attributes"], "tokens": 107}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_attributes(app):\n options = {\"synopsis\": 'Synopsis',\n \"platform\": \"Platform\",\n \"deprecated\": None}\n actual = do_autodoc(app, 'module', 'target', options)\n assert list(actual) == [\n '',\n '.. py:module:: target',\n ' :synopsis: Synopsis',\n ' :platform: Platform',\n ' :deprecated:',\n ''\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inherited_members_test_autodoc_inherited_members.assert_list_filter_lambda": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inherited_members_test_autodoc_inherited_members.assert_list_filter_lambda", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 546, "end_line": 555, "span_ids": ["test_autodoc_inherited_members"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_inherited_members(app):\n options = {\"members\": None,\n \"inherited-members\": None}\n actual = do_autodoc(app, 'class', 'target.inheritance.Derived', options)\n assert list(filter(lambda l: 'method::' in l, actual)) == [\n ' .. py:method:: Derived.inheritedclassmeth()',\n ' .. py:method:: Derived.inheritedmeth()',\n ' .. py:method:: Derived.inheritedstaticmeth(cls)',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inherited_members_Base_test_autodoc_inherited_members_Base.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inherited_members_Base_test_autodoc_inherited_members_Base.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 558, "end_line": 567, "span_ids": ["test_autodoc_inherited_members_Base"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_inherited_members_Base(app):\n options = {\"members\": None,\n \"inherited-members\": \"Base\",\n \"special-members\": None}\n\n # check methods for object class are shown\n actual = do_autodoc(app, 'class', 'target.inheritance.Derived', options)\n assert ' .. py:method:: Derived.inheritedmeth()' in actual\n assert ' .. py:method:: Derived.inheritedclassmeth' not in actual", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inherited_members_None_test_autodoc_imported_members.assert_py_function_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inherited_members_None_test_autodoc_imported_members.assert_py_function_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 570, "end_line": 588, "span_ids": ["test_autodoc_imported_members", "test_autodoc_inherited_members_None"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_inherited_members_None(app):\n options = {\"members\": None,\n \"inherited-members\": \"None\",\n \"special-members\": None}\n\n # check methods for object class are shown\n actual = do_autodoc(app, 'class', 'target.inheritance.Derived', options)\n assert ' .. py:method:: Derived.__init__()' in actual\n assert ' .. py:method:: Derived.__str__()' in actual\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_imported_members(app):\n options = {\"members\": None,\n \"imported-members\": None,\n \"ignore-module-all\": None}\n actual = do_autodoc(app, 'module', 'target', options)\n assert '.. py:function:: save_traceback(app: Sphinx) -> str' in actual", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_ignore_module_all_test_autodoc_ignore_module_all.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_ignore_module_all_test_autodoc_ignore_module_all.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 710, "end_line": 731, "span_ids": ["test_autodoc_ignore_module_all"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_ignore_module_all(app):\n # default (no-ignore-module-all)\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target', options)\n assert list(filter(lambda l: 'class::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ]\n\n # ignore-module-all\n options = {\"members\": None,\n \"ignore-module-all\": None}\n actual = do_autodoc(app, 'module', 'target', options)\n assert list(filter(lambda l: 'class::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n '.. py:class:: CustomDict',\n '.. py:class:: InnerChild()',\n '.. py:class:: InstAttCls()',\n '.. py:class:: Outer()',\n ' .. py:class:: Outer.Inner()',\n '.. py:class:: StrRepr'\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_noindex_test_autodoc_subclass_of_builtin_class.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_noindex_test_autodoc_subclass_of_builtin_class.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 918, "end_line": 952, "span_ids": ["test_autodoc_subclass_of_builtin_class", "test_autodoc_noindex"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_noindex(app):\n options = {\"noindex\": None}\n actual = do_autodoc(app, 'module', 'target', options)\n assert list(actual) == [\n '',\n '.. py:module:: target',\n ' :noindex:',\n ''\n ]\n\n # TODO: :noindex: should be propagated to children of target item.\n\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(actual) == [\n '',\n '.. py:class:: Base()',\n ' :noindex:',\n ' :module: target.inheritance',\n ''\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_subclass_of_builtin_class(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'class', 'target.CustomDict', options)\n assert list(actual) == [\n '',\n '.. py:class:: CustomDict',\n ' :module: target',\n '',\n ' Docstring.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inner_class_test_autodoc_inner_class.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_inner_class_test_autodoc_inner_class.None_3", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 955, "end_line": 1011, "span_ids": ["test_autodoc_inner_class"], "tokens": 363}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_inner_class(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'class', 'target.Outer', options)\n assert list(actual) == [\n '',\n '.. py:class:: Outer()',\n ' :module: target',\n '',\n ' Foo',\n '',\n '',\n ' .. py:class:: Outer.Inner()',\n ' :module: target',\n '',\n ' Foo',\n '',\n '',\n ' .. py:method:: Outer.Inner.meth()',\n ' :module: target',\n '',\n ' Foo',\n '',\n '',\n ' .. py:attribute:: Outer.factory',\n ' :module: target',\n '',\n ' alias of :py:class:`dict`'\n ]\n\n actual = do_autodoc(app, 'class', 'target.Outer.Inner', options)\n assert list(actual) == [\n '',\n '.. py:class:: Inner()',\n ' :module: target.Outer',\n '',\n ' Foo',\n '',\n '',\n ' .. py:method:: Inner.meth()',\n ' :module: target.Outer',\n '',\n ' Foo',\n '',\n ]\n\n options['show-inheritance'] = None\n actual = do_autodoc(app, 'class', 'target.InnerChild', options)\n assert list(actual) == [\n '',\n '.. py:class:: InnerChild()',\n ' :module: target', '',\n ' Bases: :py:class:`~target.Outer.Inner`',\n '',\n ' InnerChild docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_classmethod_test_autodoc_staticmethod.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_classmethod_test_autodoc_staticmethod.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 766, "end_line": 791, "span_ids": ["test_autodoc_classmethod", "test_autodoc_staticmethod"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_classmethod(app):\n actual = do_autodoc(app, 'method', 'target.inheritance.Base.inheritedclassmeth')\n assert list(actual) == [\n '',\n '.. py:method:: Base.inheritedclassmeth()',\n ' :module: target.inheritance',\n ' :classmethod:',\n '',\n ' Inherited class method.',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_staticmethod(app):\n actual = do_autodoc(app, 'method', 'target.inheritance.Base.inheritedstaticmeth')\n assert list(actual) == [\n '',\n '.. py:method:: Base.inheritedstaticmeth(cls)',\n ' :module: target.inheritance',\n ' :staticmethod:',\n '',\n ' Inherited static method.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_descriptor_test_autodoc_descriptor.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_descriptor_test_autodoc_descriptor.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1042, "end_line": 1064, "span_ids": ["test_autodoc_descriptor"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_descriptor(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'class', 'target.descriptor.Class', options)\n assert list(actual) == [\n '',\n '.. py:class:: Class()',\n ' :module: target.descriptor',\n '',\n '',\n ' .. py:attribute:: Class.descr',\n ' :module: target.descriptor',\n '',\n ' Descriptor instance docstring.',\n '',\n '',\n ' .. py:property:: Class.prop',\n ' :module: target.descriptor',\n '',\n ' Property.',\n ''\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_member_order_test_autodoc_member_order.actual_5.do_autodoc_app_class_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_member_order_test_autodoc_member_order.actual_5.do_autodoc_app_class_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1087, "end_line": 1143, "span_ids": ["test_autodoc_member_order"], "tokens": 697}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_member_order(app):\n # case member-order='bysource'\n options = {\"members\": None,\n 'member-order': 'bysource',\n \"undoc-members\": None,\n 'private-members': None}\n actual = do_autodoc(app, 'class', 'target.Class', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:method:: Class.meth()',\n ' .. py:method:: Class.undocmeth()',\n ' .. py:method:: Class.skipmeth()',\n ' .. py:method:: Class.excludemeth()',\n ' .. py:attribute:: Class.skipattr',\n ' .. py:attribute:: Class.attr',\n ' .. py:attribute:: Class.docattr',\n ' .. py:attribute:: Class.udocattr',\n ' .. py:attribute:: Class.mdocattr',\n ' .. py:method:: Class.roger(a, *, b=2, c=3, d=4, e=5, f=6)',\n ' .. py:method:: Class.moore(a, e, f) -> happiness',\n ' .. py:attribute:: Class.inst_attr_inline',\n ' .. py:attribute:: Class.inst_attr_comment',\n ' .. py:attribute:: Class.inst_attr_string',\n ' .. py:attribute:: Class._private_inst_attr'\n ]\n\n # case member-order='groupwise'\n options = {\"members\": None,\n 'member-order': 'groupwise',\n \"undoc-members\": None,\n 'private-members': None}\n actual = do_autodoc(app, 'class', 'target.Class', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:method:: Class.excludemeth()',\n ' .. py:method:: Class.meth()',\n ' .. py:method:: Class.moore(a, e, f) -> happiness',\n ' .. py:method:: Class.roger(a, *, b=2, c=3, d=4, e=5, f=6)',\n ' .. py:method:: Class.skipmeth()',\n ' .. py:method:: Class.undocmeth()',\n ' .. py:attribute:: Class._private_inst_attr',\n ' .. py:attribute:: Class.attr',\n ' .. py:attribute:: Class.docattr',\n ' .. py:attribute:: Class.inst_attr_comment',\n ' .. py:attribute:: Class.inst_attr_inline',\n ' .. py:attribute:: Class.inst_attr_string',\n ' .. py:attribute:: Class.mdocattr',\n ' .. py:attribute:: Class.skipattr',\n ' .. py:attribute:: Class.udocattr'\n ]\n\n # case member-order=None\n options = {\"members\": None,\n \"undoc-members\": None,\n 'private-members': None}\n actual = do_autodoc(app, 'class', 'target.Class', options)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_member_order.None_2_test_autodoc_member_order.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_member_order.None_2_test_autodoc_member_order.None_2", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 892, "end_line": 909, "span_ids": ["test_autodoc_member_order"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_member_order(app):\n # ... other code\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:attribute:: Class._private_inst_attr',\n ' .. py:attribute:: Class.attr',\n ' .. py:attribute:: Class.docattr',\n ' .. py:method:: Class.excludemeth()',\n ' .. py:attribute:: Class.inst_attr_comment',\n ' .. py:attribute:: Class.inst_attr_inline',\n ' .. py:attribute:: Class.inst_attr_string',\n ' .. py:attribute:: Class.mdocattr',\n ' .. py:method:: Class.meth()',\n ' .. py:method:: Class.moore(a, e, f) -> happiness',\n ' .. py:method:: Class.roger(a, *, b=2, c=3, d=4, e=5, f=6)',\n ' .. py:attribute:: Class.skipattr',\n ' .. py:method:: Class.skipmeth()',\n ' .. py:attribute:: Class.udocattr',\n ' .. py:method:: Class.undocmeth()'\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_module_scope_test_autodoc_module_scope.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_module_scope_test_autodoc_module_scope.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 912, "end_line": 924, "span_ids": ["test_autodoc_module_scope"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_module_scope(app):\n app.env.temp_data['autodoc:module'] = 'target'\n actual = do_autodoc(app, 'attribute', 'Class.mdocattr')\n assert list(actual) == [\n '',\n '.. py:attribute:: Class.mdocattr',\n ' :module: target',\n ' :value: <_io.StringIO object>',\n '',\n ' should be documented as well - s\u00fc\u00df',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_class_scope_test_autodoc_class_scope.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_class_scope_test_autodoc_class_scope.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 927, "end_line": 940, "span_ids": ["test_autodoc_class_scope"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_class_scope(app):\n app.env.temp_data['autodoc:module'] = 'target'\n app.env.temp_data['autodoc:class'] = 'Class'\n actual = do_autodoc(app, 'attribute', 'mdocattr')\n assert list(actual) == [\n '',\n '.. py:attribute:: Class.mdocattr',\n ' :module: target',\n ' :value: <_io.StringIO object>',\n '',\n ' should be documented as well - s\u00fc\u00df',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_class_attributes_test_class_attributes.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_class_attributes_test_class_attributes.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1229, "end_line": 1249, "span_ids": ["test_class_attributes"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_class_attributes(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'class', 'target.AttCls', options)\n assert list(actual) == [\n '',\n '.. py:class:: AttCls()',\n ' :module: target',\n '',\n '',\n ' .. py:attribute:: AttCls.a1',\n ' :module: target',\n ' :value: hello world',\n '',\n '',\n ' .. py:attribute:: AttCls.a2',\n ' :module: target',\n ' :value: None',\n ''\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_enum_class_test_enum_class.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_enum_class_test_enum_class.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1394, "end_line": 1458, "span_ids": ["test_enum_class"], "tokens": 450}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_enum_class(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'class', 'target.enums.EnumCls', options)\n\n if sys.version_info > (3, 11):\n args = ('(value, names=None, *, module=None, qualname=None, '\n 'type=None, start=1, boundary=None)')\n else:\n args = '(value)'\n\n assert list(actual) == [\n '',\n '.. py:class:: EnumCls' + args,\n ' :module: target.enums',\n '',\n ' this is enum class',\n '',\n '',\n ' .. py:method:: EnumCls.say_goodbye()',\n ' :module: target.enums',\n ' :classmethod:',\n '',\n ' a classmethod says good-bye to you.',\n '',\n '',\n ' .. py:method:: EnumCls.say_hello()',\n ' :module: target.enums',\n '',\n ' a method says hello to you.',\n '',\n '',\n ' .. py:attribute:: EnumCls.val1',\n ' :module: target.enums',\n ' :value: 12',\n '',\n ' doc for val1',\n '',\n '',\n ' .. py:attribute:: EnumCls.val2',\n ' :module: target.enums',\n ' :value: 23',\n '',\n ' doc for val2',\n '',\n '',\n ' .. py:attribute:: EnumCls.val3',\n ' :module: target.enums',\n ' :value: 34',\n '',\n ' doc for val3',\n '',\n ]\n\n # checks for an attribute of EnumClass\n actual = do_autodoc(app, 'attribute', 'target.enums.EnumCls.val1')\n assert list(actual) == [\n '',\n '.. py:attribute:: EnumCls.val1',\n ' :module: target.enums',\n ' :value: 12',\n '',\n ' doc for val1',\n ''\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_descriptor_class_test_descriptor_class.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_descriptor_class_test_descriptor_class.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1140, "end_line": 1166, "span_ids": ["test_descriptor_class"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_descriptor_class(app):\n options = {\"members\": 'CustomDataDescriptor,CustomDataDescriptor2'}\n actual = do_autodoc(app, 'module', 'target.descriptor', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.descriptor',\n '',\n '',\n '.. py:class:: CustomDataDescriptor(doc)',\n ' :module: target.descriptor',\n '',\n ' Descriptor class docstring.',\n '',\n '',\n ' .. py:method:: CustomDataDescriptor.meth()',\n ' :module: target.descriptor',\n '',\n ' Function.',\n '',\n '',\n '.. py:class:: CustomDataDescriptor2(doc)',\n ' :module: target.descriptor',\n '',\n ' Descriptor class with custom metaclass docstring.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_abstractmethods_test_abstractmethods.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_abstractmethods_test_abstractmethods.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1514, "end_line": 1559, "span_ids": ["test_abstractmethods"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_abstractmethods(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.abstractmethods', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.abstractmethods',\n '',\n '',\n '.. py:class:: Base()',\n ' :module: target.abstractmethods',\n '',\n '',\n ' .. py:method:: Base.abstractmeth()',\n ' :module: target.abstractmethods',\n ' :abstractmethod:',\n '',\n '',\n ' .. py:method:: Base.classmeth()',\n ' :module: target.abstractmethods',\n ' :abstractmethod:',\n ' :classmethod:',\n '',\n '',\n ' .. py:method:: Base.coroutinemeth()',\n ' :module: target.abstractmethods',\n ' :abstractmethod:',\n ' :async:',\n '',\n '',\n ' .. py:method:: Base.meth()',\n ' :module: target.abstractmethods',\n '',\n '',\n ' .. py:property:: Base.prop',\n ' :module: target.abstractmethods',\n ' :abstractmethod:',\n '',\n '',\n ' .. py:method:: Base.staticmeth()',\n ' :module: target.abstractmethods',\n ' :abstractmethod:',\n ' :staticmethod:',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_partialfunction_test_partialfunction.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_partialfunction_test_partialfunction.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1332, "end_line": 1364, "span_ids": ["test_partialfunction"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_partialfunction(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.partialfunction', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.partialfunction',\n '',\n '',\n '.. py:function:: func1(a, b, c)',\n ' :module: target.partialfunction',\n '',\n ' docstring of func1',\n '',\n '',\n '.. py:function:: func2(b, c)',\n ' :module: target.partialfunction',\n '',\n ' docstring of func1',\n '',\n '',\n '.. py:function:: func3(c)',\n ' :module: target.partialfunction',\n '',\n ' docstring of func3',\n '',\n '',\n '.. py:function:: func4()',\n ' :module: target.partialfunction',\n '',\n ' docstring of func3',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_imported_partialfunction_should_not_shown_without_imported_members_test_bound_method.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_imported_partialfunction_should_not_shown_without_imported_members_test_bound_method.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1367, "end_line": 1392, "span_ids": ["test_bound_method", "test_imported_partialfunction_should_not_shown_without_imported_members"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_imported_partialfunction_should_not_shown_without_imported_members(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.imported_members', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.imported_members',\n ''\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_bound_method(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.bound_method', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.bound_method',\n '',\n '',\n '.. py:function:: bound_method()',\n ' :module: target.bound_method',\n '',\n ' Method docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_partialmethod_undoc_members_test_partialmethod_undoc_members.assert_list_actual_ex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_partialmethod_undoc_members_test_partialmethod_undoc_members.assert_list_actual_ex", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1484, "end_line": 1516, "span_ids": ["test_partialmethod_undoc_members"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_partialmethod_undoc_members(app):\n expected = [\n '',\n '.. py:class:: Cell()',\n ' :module: target.partialmethod',\n '',\n ' An example for partialmethod.',\n '',\n ' refs: https://docs.python.jp/3/library/functools.html#functools.partialmethod',\n '',\n '',\n ' .. py:method:: Cell.set_alive()',\n ' :module: target.partialmethod',\n '',\n ' Make a cell alive.',\n '',\n '',\n ' .. py:method:: Cell.set_dead()',\n ' :module: target.partialmethod',\n '',\n '',\n ' .. py:method:: Cell.set_state(state)',\n ' :module: target.partialmethod',\n '',\n ' Update state of cell to *state*.',\n '',\n ]\n\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'class', 'target.partialmethod.Cell', options)\n assert list(actual) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_typed_instance_variables_test_autodoc_typed_instance_variables.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_typed_instance_variables_test_autodoc_typed_instance_variables.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1690, "end_line": 1785, "span_ids": ["test_autodoc_typed_instance_variables"], "tokens": 639}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_typed_instance_variables(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.typed_vars', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.typed_vars',\n '',\n '',\n '.. py:attribute:: Alias',\n ' :module: target.typed_vars',\n '',\n ' alias of :py:class:`~target.typed_vars.Derived`',\n '',\n '.. py:class:: Class()',\n ' :module: target.typed_vars',\n '',\n '',\n ' .. py:attribute:: Class.attr1',\n ' :module: target.typed_vars',\n ' :type: int',\n ' :value: 0',\n '',\n '',\n ' .. py:attribute:: Class.attr2',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n '',\n ' .. py:attribute:: Class.attr3',\n ' :module: target.typed_vars',\n ' :type: int',\n ' :value: 0',\n '',\n '',\n ' .. py:attribute:: Class.attr4',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ' attr4',\n '',\n '',\n ' .. py:attribute:: Class.attr5',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ' attr5',\n '',\n '',\n ' .. py:attribute:: Class.attr6',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ' attr6',\n '',\n '',\n ' .. py:attribute:: Class.descr4',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ' This is descr4',\n '',\n '',\n '.. py:class:: Derived()',\n ' :module: target.typed_vars',\n '',\n '',\n ' .. py:attribute:: Derived.attr7',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n '',\n '.. py:data:: attr1',\n ' :module: target.typed_vars',\n ' :type: str',\n \" :value: ''\",\n '',\n ' attr1',\n '',\n '',\n '.. py:data:: attr2',\n ' :module: target.typed_vars',\n ' :type: str',\n '',\n ' attr2',\n '',\n '',\n '.. py:data:: attr3',\n ' :module: target.typed_vars',\n ' :type: str',\n \" :value: ''\",\n '',\n ' attr3',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_Annotated_test_autodoc_Annotated.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_Annotated_test_autodoc_Annotated.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1611, "end_line": 1626, "span_ids": ["test_autodoc_Annotated"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 9), reason='py39+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_Annotated(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.annotated', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.annotated',\n '',\n '',\n '.. py:function:: hello(name: str) -> None',\n ' :module: target.annotated',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_for_egged_code_test_autodoc_for_egged_code.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_for_egged_code_test_autodoc_for_egged_code.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1629, "end_line": 1649, "span_ids": ["test_autodoc_for_egged_code"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='pycode-egg')\ndef test_autodoc_for_egged_code(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'sample', options)\n assert list(actual) == [\n '',\n '.. py:module:: sample',\n '',\n '',\n '.. py:data:: CONSTANT',\n ' :module: sample',\n ' :value: 1',\n '',\n ' constant on sample.py',\n '',\n '',\n '.. py:function:: hello(s)',\n ' :module: sample',\n ''\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_singledispatchmethod_test_singledispatchmethod.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_singledispatchmethod_test_singledispatchmethod.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2083, "end_line": 2108, "span_ids": ["test_singledispatchmethod"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8),\n reason='singledispatchmethod is available since python3.8')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_singledispatchmethod(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.singledispatchmethod', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.singledispatchmethod',\n '',\n '',\n '.. py:class:: Foo()',\n ' :module: target.singledispatchmethod',\n '',\n ' docstring',\n '',\n '',\n ' .. py:method:: Foo.meth(arg, kwarg=None)',\n ' Foo.meth(arg: float, kwarg=None)',\n ' Foo.meth(arg: int, kwarg=None)',\n ' Foo.meth(arg: str, kwarg=None)',\n ' :module: target.singledispatchmethod',\n '',\n ' A method for general use.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_singledispatchmethod_automethod_test_singledispatchmethod_automethod.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_singledispatchmethod_automethod_test_singledispatchmethod_automethod.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2111, "end_line": 2127, "span_ids": ["test_singledispatchmethod_automethod"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8),\n reason='singledispatchmethod is available since python3.8')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_singledispatchmethod_automethod(app):\n options = {}\n actual = do_autodoc(app, 'method', 'target.singledispatchmethod.Foo.meth', options)\n assert list(actual) == [\n '',\n '.. py:method:: Foo.meth(arg, kwarg=None)',\n ' Foo.meth(arg: float, kwarg=None)',\n ' Foo.meth(arg: int, kwarg=None)',\n ' Foo.meth(arg: str, kwarg=None)',\n ' :module: target.singledispatchmethod',\n '',\n ' A method for general use.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_cython_test_cython.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_cython_test_cython.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2130, "end_line": 2161, "span_ids": ["test_cython"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info > (3, 11),\n reason=('cython does not support python-3.11 yet. '\n 'see https://github.com/cython/cython/issues/4365'))\n@pytest.mark.skipif(pyximport is None, reason='cython is not installed')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_cython(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.cython', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.cython',\n '',\n '',\n '.. py:class:: Class()',\n ' :module: target.cython',\n '',\n ' Docstring.',\n '',\n '',\n ' .. py:method:: Class.meth(name: str, age: int = 0) -> None',\n ' :module: target.cython',\n '',\n ' Docstring.',\n '',\n '',\n '.. py:function:: foo(x: int, *args, y: str, **kwargs)',\n ' :module: target.cython',\n '',\n ' Docstring.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_final_test_final.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_final_test_final.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1811, "end_line": 1841, "span_ids": ["test_final"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8),\n reason='typing.final is available since python3.8')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_final(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.final', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.final',\n '',\n '',\n '.. py:class:: Class()',\n ' :module: target.final',\n ' :final:',\n '',\n ' docstring',\n '',\n '',\n ' .. py:method:: Class.meth1()',\n ' :module: target.final',\n ' :final:',\n '',\n ' docstring',\n '',\n '',\n ' .. py:method:: Class.meth2()',\n ' :module: target.final',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_init_test_autoclass_content_init.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_init_test_autoclass_content_init.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 83, "end_line": 140, "span_ids": ["test_autoclass_content_init"], "tokens": 392}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoclass_content_init(app):\n app.config.autoclass_content = 'init'\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.autoclass_content', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.autoclass_content',\n '',\n '',\n '.. py:class:: A()',\n ' :module: target.autoclass_content',\n '',\n ' A class having no __init__, no __new__',\n '',\n '',\n '.. py:class:: B()',\n ' :module: target.autoclass_content',\n '',\n ' A class having __init__(no docstring), no __new__',\n '',\n '',\n '.. py:class:: C()',\n ' :module: target.autoclass_content',\n '',\n ' __init__ docstring',\n '',\n '',\n '.. py:class:: D()',\n ' :module: target.autoclass_content',\n '',\n ' A class having no __init__, __new__(no docstring)',\n '',\n '',\n '.. py:class:: E()',\n ' :module: target.autoclass_content',\n '',\n ' __new__ docstring',\n '',\n '',\n '.. py:class:: F()',\n ' :module: target.autoclass_content',\n '',\n ' __init__ docstring',\n '',\n '',\n '.. py:class:: G()',\n ' :module: target.autoclass_content',\n '',\n ' __init__ docstring',\n '',\n '',\n '.. py:class:: H()',\n ' :module: target.autoclass_content',\n '',\n ' __new__ docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_both_test_autoclass_content_both.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_both_test_autoclass_content_both.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 143, "end_line": 210, "span_ids": ["test_autoclass_content_both"], "tokens": 471}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoclass_content_both(app):\n app.config.autoclass_content = 'both'\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.autoclass_content', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.autoclass_content',\n '',\n '',\n '.. py:class:: A()',\n ' :module: target.autoclass_content',\n '',\n ' A class having no __init__, no __new__',\n '',\n '',\n '.. py:class:: B()',\n ' :module: target.autoclass_content',\n '',\n ' A class having __init__(no docstring), no __new__',\n '',\n '',\n '.. py:class:: C()',\n ' :module: target.autoclass_content',\n '',\n ' A class having __init__, no __new__',\n '',\n ' __init__ docstring',\n '',\n '',\n '.. py:class:: D()',\n ' :module: target.autoclass_content',\n '',\n ' A class having no __init__, __new__(no docstring)',\n '',\n '',\n '.. py:class:: E()',\n ' :module: target.autoclass_content',\n '',\n ' A class having no __init__, __new__',\n '',\n ' __new__ docstring',\n '',\n '',\n '.. py:class:: F()',\n ' :module: target.autoclass_content',\n '',\n ' A class having both __init__ and __new__',\n '',\n ' __init__ docstring',\n '',\n '',\n '.. py:class:: G()',\n ' :module: target.autoclass_content',\n '',\n ' A class inherits __init__ without docstring.',\n '',\n ' __init__ docstring',\n '',\n '',\n '.. py:class:: H()',\n ' :module: target.autoclass_content',\n '',\n ' A class inherits __new__ without docstring.',\n '',\n ' __new__ docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_inherit_docstrings_test_autodoc_inherit_docstrings.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_inherit_docstrings_test_autodoc_inherit_docstrings.None_2", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 210, "end_line": 231, "span_ids": ["test_autodoc_inherit_docstrings"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_inherit_docstrings(app):\n assert app.config.autodoc_inherit_docstrings is True # default\n actual = do_autodoc(app, 'method', 'target.inheritance.Derived.inheritedmeth')\n assert list(actual) == [\n '',\n '.. py:method:: Derived.inheritedmeth()',\n ' :module: target.inheritance',\n '',\n ' Inherited function.',\n '',\n ]\n\n # disable autodoc_inherit_docstrings\n app.config.autodoc_inherit_docstrings = False\n actual = do_autodoc(app, 'method', 'target.inheritance.Derived.inheritedmeth')\n assert list(actual) == [\n '',\n '.. py:method:: Derived.inheritedmeth()',\n ' :module: target.inheritance',\n ''\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_and_docstring_signature_class_test_autoclass_content_and_docstring_signature_class.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_and_docstring_signature_class_test_autoclass_content_and_docstring_signature_class.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 406, "end_line": 440, "span_ids": ["test_autoclass_content_and_docstring_signature_class"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoclass_content_and_docstring_signature_class(app):\n app.config.autoclass_content = 'class'\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.docstring_signature', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.docstring_signature',\n '',\n '',\n '.. py:class:: A(foo, bar)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: B(foo, bar)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: C(foo, bar)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: D()',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: E()',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: F()',\n ' :module: target.docstring_signature',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_and_docstring_signature_init_test_autoclass_content_and_docstring_signature_init.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_and_docstring_signature_init_test_autoclass_content_and_docstring_signature_init.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 443, "end_line": 481, "span_ids": ["test_autoclass_content_and_docstring_signature_init"], "tokens": 335}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoclass_content_and_docstring_signature_init(app):\n app.config.autoclass_content = 'init'\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.docstring_signature', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.docstring_signature',\n '',\n '',\n '.. py:class:: A(foo, bar)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: B(foo, bar, baz)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: C(foo, bar, baz)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: D(foo, bar, baz)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: E(foo: int, bar: int, baz: int)',\n ' E(foo: str, bar: str, baz: str)',\n ' E(foo: float, bar: float, baz: float)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: F(foo: int, bar: int, baz: int)',\n ' F(foo: str, bar: str, baz: str)',\n ' F(foo: float, bar: float, baz: float)',\n ' :module: target.docstring_signature',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_and_docstring_signature_both_test_autoclass_content_and_docstring_signature_both.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autoclass_content_and_docstring_signature_both_test_autoclass_content_and_docstring_signature_both.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 484, "end_line": 526, "span_ids": ["test_autoclass_content_and_docstring_signature_both"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoclass_content_and_docstring_signature_both(app):\n app.config.autoclass_content = 'both'\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.docstring_signature', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.docstring_signature',\n '',\n '',\n '.. py:class:: A(foo, bar)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: B(foo, bar)',\n ' :module: target.docstring_signature',\n '',\n ' B(foo, bar, baz)',\n '',\n '',\n '.. py:class:: C(foo, bar)',\n ' :module: target.docstring_signature',\n '',\n ' C(foo, bar, baz)',\n '',\n '',\n '.. py:class:: D(foo, bar, baz)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: E(foo: int, bar: int, baz: int)',\n ' E(foo: str, bar: str, baz: str)',\n ' E(foo: float, bar: float, baz: float)',\n ' :module: target.docstring_signature',\n '',\n '',\n '.. py:class:: F(foo: int, bar: int, baz: int)',\n ' F(foo: str, bar: str, baz: str)',\n ' F(foo: float, bar: float, baz: float)',\n ' :module: target.docstring_signature',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_mocked_module_imports_test_mocked_module_imports.assert_warning_getvalue_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_mocked_module_imports_test_mocked_module_imports.assert_warning_getvalue_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 529, "end_line": 592, "span_ids": ["test_mocked_module_imports"], "tokens": 483}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\n@pytest.mark.usefixtures(\"rollback_sysmodules\")\ndef test_mocked_module_imports(app, warning):\n sys.modules.pop('target', None) # unload target module to clear the module cache\n\n # no autodoc_mock_imports\n options = {\"members\": 'TestAutodoc,decoratedFunction,func,Alias'}\n actual = do_autodoc(app, 'module', 'target.need_mocks', options)\n assert list(actual) == []\n assert \"autodoc: failed to import module 'need_mocks'\" in warning.getvalue()\n\n # with autodoc_mock_imports\n app.config.autodoc_mock_imports = [\n 'missing_module',\n 'missing_package1',\n 'missing_package2',\n 'missing_package3',\n 'sphinx.missing_module4',\n ]\n\n warning.truncate(0)\n actual = do_autodoc(app, 'module', 'target.need_mocks', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.need_mocks',\n '',\n '',\n '.. py:data:: Alias',\n ' :module: target.need_mocks',\n '',\n ' docstring',\n '',\n '',\n '.. py:class:: TestAutodoc()',\n ' :module: target.need_mocks',\n '',\n ' TestAutodoc docstring.',\n '',\n '',\n ' .. py:attribute:: TestAutodoc.Alias',\n ' :module: target.need_mocks',\n '',\n ' docstring',\n '',\n '',\n ' .. py:method:: TestAutodoc.decoratedMethod()',\n ' :module: target.need_mocks',\n '',\n ' TestAutodoc::decoratedMethod docstring',\n '',\n '',\n '.. py:function:: decoratedFunction()',\n ' :module: target.need_mocks',\n '',\n ' decoratedFunction docstring',\n '',\n '',\n '.. py:function:: func(arg: missing_module.Class)',\n ' :module: target.need_mocks',\n '',\n ' a function takes mocked object as an argument',\n '',\n ]\n assert warning.getvalue() == ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_signature_test_autodoc_typehints_signature.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_signature_test_autodoc_typehints_signature.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 595, "end_line": 685, "span_ids": ["test_autodoc_typehints_signature"], "tokens": 748}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints': \"signature\"})\ndef test_autodoc_typehints_signature(app):\n if sys.version_info < (3, 11):\n type_o = \"~typing.Optional[~typing.Any]\"\n else:\n type_o = \"~typing.Any\"\n\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.typehints', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.typehints',\n '',\n '',\n '.. py:data:: CONST1',\n ' :module: target.typehints',\n ' :type: int',\n '',\n '',\n '.. py:class:: Math(s: str, o: %s = None)' % type_o,\n ' :module: target.typehints',\n '',\n '',\n ' .. py:attribute:: Math.CONST1',\n ' :module: target.typehints',\n ' :type: int',\n '',\n '',\n ' .. py:attribute:: Math.CONST2',\n ' :module: target.typehints',\n ' :type: int',\n ' :value: 1',\n '',\n '',\n ' .. py:method:: Math.decr(a: int, b: int = 1) -> int',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:method:: Math.horse(a: str, b: int) -> None',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:method:: Math.incr(a: int, b: int = 1) -> int',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:method:: Math.nothing() -> None',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:property:: Math.prop',\n ' :module: target.typehints',\n ' :type: int',\n '',\n '',\n '.. py:class:: NewAnnotation(i: int)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:class:: NewComment(i: int)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:class:: SignatureFromMetaclass(a: int)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: complex_func(arg1: str, arg2: List[int], arg3: Tuple[int, '\n 'Union[str, Unknown]] = None, *args: str, **kwargs: str) -> None',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: decr(a: int, b: int = 1) -> int',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: incr(a: int, b: int = 1) -> int',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: missing_attr(c, a: str, b: Optional[str] = None) -> str',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: tuple_args(x: ~typing.Tuple[int, ~typing.Union[int, str]]) '\n '-> ~typing.Tuple[int, int]',\n ' :module: target.typehints',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_none_test_autodoc_typehints_none.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_none_test_autodoc_typehints_none.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 688, "end_line": 767, "span_ids": ["test_autodoc_typehints_none"], "tokens": 563}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints': \"none\"})\ndef test_autodoc_typehints_none(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.typehints', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.typehints',\n '',\n '',\n '.. py:data:: CONST1',\n ' :module: target.typehints',\n '',\n '',\n '.. py:class:: Math(s, o=None)',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:attribute:: Math.CONST1',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:attribute:: Math.CONST2',\n ' :module: target.typehints',\n ' :value: 1',\n '',\n '',\n ' .. py:method:: Math.decr(a, b=1)',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:method:: Math.horse(a, b)',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:method:: Math.incr(a, b=1)',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:method:: Math.nothing()',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:property:: Math.prop',\n ' :module: target.typehints',\n '',\n '',\n '.. py:class:: NewAnnotation(i)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:class:: NewComment(i)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:class:: SignatureFromMetaclass(a)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: complex_func(arg1, arg2, arg3=None, *args, **kwargs)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: decr(a, b=1)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: incr(a, b=1)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: missing_attr(c, a, b=None)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: tuple_args(x)',\n ' :module: target.typehints',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_default_options_test_autodoc_default_options.assert_Makes_this_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_default_options_test_autodoc_default_options.assert_Makes_this_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 1296, "end_line": 1367, "span_ids": ["test_autodoc_default_options"], "tokens": 875}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_default_options(app):\n # no settings\n actual = do_autodoc(app, 'class', 'target.enums.EnumCls')\n assert ' .. py:attribute:: EnumCls.val1' not in actual\n assert ' .. py:attribute:: EnumCls.val4' not in actual\n actual = do_autodoc(app, 'class', 'target.CustomIter')\n assert ' .. py:method:: target.CustomIter' not in actual\n actual = do_autodoc(app, 'module', 'target')\n assert '.. py:function:: save_traceback(app)' not in actual\n\n # with :members:\n app.config.autodoc_default_options = {'members': None}\n actual = do_autodoc(app, 'class', 'target.enums.EnumCls')\n assert ' .. py:attribute:: EnumCls.val1' in actual\n assert ' .. py:attribute:: EnumCls.val4' not in actual\n\n # with :members: = True\n app.config.autodoc_default_options = {'members': None}\n actual = do_autodoc(app, 'class', 'target.enums.EnumCls')\n assert ' .. py:attribute:: EnumCls.val1' in actual\n assert ' .. py:attribute:: EnumCls.val4' not in actual\n\n # with :members: and :undoc-members:\n app.config.autodoc_default_options = {\n 'members': None,\n 'undoc-members': None,\n }\n actual = do_autodoc(app, 'class', 'target.enums.EnumCls')\n assert ' .. py:attribute:: EnumCls.val1' in actual\n assert ' .. py:attribute:: EnumCls.val4' in actual\n\n # with :special-members:\n # Note that :members: must be *on* for :special-members: to work.\n app.config.autodoc_default_options = {\n 'members': None,\n 'special-members': None\n }\n actual = do_autodoc(app, 'class', 'target.CustomIter')\n assert ' .. py:method:: CustomIter.__init__()' in actual\n assert ' Create a new `CustomIter`.' in actual\n assert ' .. py:method:: CustomIter.__iter__()' in actual\n assert ' Iterate squares of each value.' in actual\n if not IS_PYPY:\n assert ' .. py:attribute:: CustomIter.__weakref__' in actual\n assert ' list of weak references to the object (if defined)' in actual\n\n # :exclude-members: None - has no effect. Unlike :members:,\n # :special-members:, etc. where None == \"include all\", here None means\n # \"no/false/off\".\n app.config.autodoc_default_options = {\n 'members': None,\n 'exclude-members': None,\n }\n actual = do_autodoc(app, 'class', 'target.enums.EnumCls')\n assert ' .. py:attribute:: EnumCls.val1' in actual\n assert ' .. py:attribute:: EnumCls.val4' not in actual\n app.config.autodoc_default_options = {\n 'members': None,\n 'special-members': None,\n 'exclude-members': None,\n }\n actual = do_autodoc(app, 'class', 'target.CustomIter')\n assert ' .. py:method:: CustomIter.__init__()' in actual\n assert ' Create a new `CustomIter`.' in actual\n assert ' .. py:method:: CustomIter.__iter__()' in actual\n assert ' Iterate squares of each value.' in actual\n if not IS_PYPY:\n assert ' .. py:attribute:: CustomIter.__weakref__' in actual\n assert ' list of weak references to the object (if defined)' in actual\n assert ' .. py:method:: CustomIter.snafucate()' in actual\n assert ' Makes this snafucated.' in actual", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_default_options_with_values_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_default_options_with_values_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 767, "end_line": 836, "span_ids": ["test_autodoc_default_options_with_values"], "tokens": 845}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_default_options_with_values(app):\n # with :members:\n app.config.autodoc_default_options = {'members': 'val1,val2'}\n actual = do_autodoc(app, 'class', 'target.enums.EnumCls')\n assert ' .. py:attribute:: EnumCls.val1' in actual\n assert ' .. py:attribute:: EnumCls.val2' in actual\n assert ' .. py:attribute:: EnumCls.val3' not in actual\n assert ' .. py:attribute:: EnumCls.val4' not in actual\n\n # with :member-order:\n app.config.autodoc_default_options = {\n 'members': None,\n 'member-order': 'bysource',\n }\n actual = do_autodoc(app, 'class', 'target.Class')\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:method:: Class.meth()',\n ' .. py:method:: Class.skipmeth()',\n ' .. py:method:: Class.excludemeth()',\n ' .. py:attribute:: Class.attr',\n ' .. py:attribute:: Class.docattr',\n ' .. py:attribute:: Class.udocattr',\n ' .. py:attribute:: Class.mdocattr',\n ' .. py:method:: Class.moore(a, e, f) -> happiness',\n ' .. py:attribute:: Class.inst_attr_inline',\n ' .. py:attribute:: Class.inst_attr_comment',\n ' .. py:attribute:: Class.inst_attr_string',\n ]\n\n # with :special-members:\n app.config.autodoc_default_options = {\n 'special-members': '__init__,__iter__',\n }\n actual = do_autodoc(app, 'class', 'target.CustomIter')\n assert ' .. py:method:: CustomIter.__init__()' in actual\n assert ' Create a new `CustomIter`.' in actual\n assert ' .. py:method:: CustomIter.__iter__()' in actual\n assert ' Iterate squares of each value.' in actual\n if not IS_PYPY:\n assert ' .. py:attribute:: CustomIter.__weakref__' not in actual\n assert ' list of weak references to the object (if defined)' not in actual\n\n # with :exclude-members:\n app.config.autodoc_default_options = {\n 'members': None,\n 'exclude-members': 'val1'\n }\n actual = do_autodoc(app, 'class', 'target.enums.EnumCls')\n assert ' .. py:attribute:: EnumCls.val1' not in actual\n assert ' .. py:attribute:: EnumCls.val2' in actual\n assert ' .. py:attribute:: EnumCls.val3' in actual\n assert ' .. py:attribute:: EnumCls.val4' not in actual\n app.config.autodoc_default_options = {\n 'members': None,\n 'special-members': None,\n 'exclude-members': '__weakref__,snafucate',\n }\n actual = do_autodoc(app, 'class', 'target.CustomIter')\n assert ' .. py:method:: CustomIter.__init__()' in actual\n assert ' Create a new `CustomIter`.' in actual\n assert ' .. py:method:: CustomIter.__iter__()' in actual\n assert ' Iterate squares of each value.' in actual\n if not IS_PYPY:\n assert ' .. py:attribute:: CustomIter.__weakref__' not in actual\n assert ' list of weak references to the object (if defined)' not in actual\n assert ' .. py:method:: CustomIter.snafucate()' not in actual\n assert ' Makes this snafucated.' not in actual", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_cut_lines_test_between.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_cut_lines_test_between.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_events.py", "file_name": "test_ext_autodoc_events.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 64, "span_ids": ["test_cut_lines", "test_between"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_cut_lines(app):\n app.connect('autodoc-process-docstring',\n cut_lines(2, 2, ['function']))\n\n actual = do_autodoc(app, 'function', 'target.process_docstring.func')\n assert list(actual) == [\n '',\n '.. py:function:: func()',\n ' :module: target.process_docstring',\n '',\n ' second line',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_between(app):\n app.connect('autodoc-process-docstring',\n between('---', ['function']))\n\n actual = do_autodoc(app, 'function', 'target.process_docstring.func')\n assert list(actual) == [\n '',\n '.. py:function:: func()',\n ' :module: target.process_docstring',\n '',\n ' second line',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_mock_test_mock.None_2.import_module_modname_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_mock_test_mock.None_2.import_module_modname_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_mock.py", "file_name": "test_ext_autodoc_mock.py", "file_type": "text/x-python", "category": "test", "start_line": 55, "end_line": 74, "span_ids": ["test_mock"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_mock():\n modname = 'sphinx.unknown'\n submodule = modname + '.submodule'\n assert modname not in sys.modules\n with pytest.raises(ImportError):\n import_module(modname)\n\n with mock([modname]):\n import_module(modname)\n assert modname in sys.modules\n assert isinstance(sys.modules[modname], _MockModule)\n\n # submodules are also mocked\n import_module(submodule)\n assert submodule in sys.modules\n assert isinstance(sys.modules[submodule], _MockModule)\n\n assert modname not in sys.modules\n with pytest.raises(ImportError):\n import_module(modname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosectionlabel.py__Re_use_test_definition__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosectionlabel.py__Re_use_test_definition__", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosectionlabel.py", "file_name": "test_ext_autosectionlabel.py", "file_type": "text/x-python", "category": "test", "start_line": 45, "end_line": 78, "span_ids": ["test_autosectionlabel_html", "test_autosectionlabel_maxdepth", "test_autosectionlabel_prefix_document_html"], "tokens": 366}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Re-use test definition from above, just change the test root directory\n@pytest.mark.sphinx('html', testroot='ext-autosectionlabel-prefix-document')\ndef test_autosectionlabel_prefix_document_html(app, status, warning):\n test_autosectionlabel_html(app, status, warning)\n\n\n@pytest.mark.sphinx('html', testroot='ext-autosectionlabel',\n confoverrides={'autosectionlabel_maxdepth': 3})\ndef test_autosectionlabel_maxdepth(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n\n # depth: 1\n html = ('<li><p><a class=\"reference internal\" href=\"#test-ext-autosectionlabel\">'\n '<span class=\".*?\">test-ext-autosectionlabel</span></a></p></li>')\n assert re.search(html, content, re.S)\n\n # depth: 2\n html = ('<li><p><a class=\"reference internal\" href=\"#installation\">'\n '<span class=\"std std-ref\">Installation</span></a></p></li>')\n assert re.search(html, content, re.S)\n\n # depth: 3\n html = ('<li><p><a class=\"reference internal\" href=\"#for-windows-users\">'\n '<span class=\"std std-ref\">For Windows users</span></a></p></li>')\n assert re.search(html, content, re.S)\n\n # depth: 4\n html = '<li><p><span class=\"xref std std-ref\">Linux</span></p></li>'\n assert re.search(html, content, re.S)\n\n assert 'WARNING: undefined label: linux' in warning.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_mangle_signature_test_mangle_signature.for_inp_outp_in_TEST_.assert_res_outp_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_mangle_signature_test_mangle_signature.for_inp_outp_in_TEST_.assert_res_outp_s", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 39, "end_line": 65, "span_ids": ["test_mangle_signature"], "tokens": 546}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_mangle_signature():\n TEST = \"\"\"\n () :: ()\n (a, b, c, d, e) :: (a, b, c, d, e)\n (a, b, c=1, d=2, e=3) :: (a, b[, c, d, e])\n (a, b, aaa=1, bbb=1, ccc=1, eee=1, fff=1, ggg=1, hhh=1, iii=1, jjj=1)\\\n :: (a, b[, aaa, bbb, ccc, ...])\n (a, b, c=(), d=<foo>) :: (a, b[, c, d])\n (a, b, c='foobar()', d=123) :: (a, b[, c, d])\n (a, b[, c]) :: (a, b[, c])\n (a, b[, cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]) :: (a, b[, ...)\n (a, b='c=d, e=f, g=h', c=3) :: (a[, b, c])\n (a, b=\"c=d, e=f, g=h\", c=3) :: (a[, b, c])\n (a, b='c=d, \\\\'e=f,\\\\' g=h', c=3) :: (a[, b, c])\n (a, b='c=d, ', e='\\\\\\\\' g=h, c=3) :: (a[, b, e, c])\n (a, b={'c=d, ': 3, '\\\\\\\\': 3}) :: (a[, b])\n (a=1, b=2, c=3) :: ([a, b, c])\n (a=1, b=<SomeClass: a, b, c>, c=3) :: ([a, b, c])\n (a=1, b=T(a=1, b=2), c=3) :: ([a, b, c])\n (a: Tuple[int, str], b: int) -> str :: (a, b)\n \"\"\"\n\n TEST = [[y.strip() for y in x.split(\"::\")] for x in TEST.split(\"\\n\")\n if '::' in x]\n for inp, outp in TEST:\n res = mangle_signature(inp).strip().replace(\"\\u00a0\", \" \")\n assert res == outp, (\"'%s' -> '%s' != '%s'\" % (inp, res, outp))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_extract_summary_test_extract_summary.assert_err_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_extract_summary_test_extract_summary.assert_err_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 68, "end_line": 116, "span_ids": ["test_extract_summary"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_extract_summary(capsys):\n settings = Mock(language_code='en',\n id_prefix='',\n auto_id_prefix='',\n pep_reference=False,\n rfc_reference=False)\n document = new_document('', settings)\n\n # normal case\n doc = ['',\n 'This is a first sentence. And second one.',\n '',\n 'Second block is here']\n assert extract_summary(doc, document) == 'This is a first sentence.'\n\n # inliner case\n doc = ['This sentence contains *emphasis text having dots.*,',\n 'it does not break sentence.']\n assert extract_summary(doc, document) == ' '.join(doc)\n\n # abbreviations\n doc = ['Blabla, i.e. bla.']\n assert extract_summary(doc, document) == ' '.join(doc)\n\n doc = ['Blabla, et al. bla.']\n assert extract_summary(doc, document) == ' '.join(doc)\n\n # literal\n doc = ['blah blah::']\n assert extract_summary(doc, document) == 'blah blah.'\n\n # heading\n doc = ['blah blah',\n '=========']\n assert extract_summary(doc, document) == 'blah blah'\n\n doc = ['=========',\n 'blah blah',\n '=========']\n assert extract_summary(doc, document) == 'blah blah'\n\n # hyperlink target\n doc = ['Do `this <https://www.sphinx-doc.org/>`_ and that. '\n 'blah blah blah.']\n assert (extract_summary(doc, document) ==\n 'Do `this <https://www.sphinx-doc.org/>`_ and that.')\n\n _, err = capsys.readouterr()\n assert err == ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_get_items_summary_test_get_items_summary.assert_autosummary_items_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_get_items_summary_test_get_items_summary.assert_autosummary_items_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 119, "end_line": 176, "span_ids": ["test_get_items_summary"], "tokens": 564}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', **default_kw)\ndef test_get_items_summary(make_app, app_params):\n import sphinx.ext.autosummary\n import sphinx.ext.autosummary.generate\n args, kwargs = app_params\n app = make_app(*args, **kwargs)\n sphinx.ext.autosummary.generate.setup_documenters(app)\n # monkey-patch Autosummary.get_items so we can easily get access to it's\n # results..\n orig_get_items = sphinx.ext.autosummary.Autosummary.get_items\n\n autosummary_items = {}\n\n def new_get_items(self, names, *args, **kwargs):\n results = orig_get_items(self, names, *args, **kwargs)\n for name, result in zip(names, results):\n autosummary_items[name] = result\n return results\n\n def handler(app, what, name, obj, options, lines):\n assert isinstance(lines, list)\n\n # ensure no docstring is processed twice:\n assert 'THIS HAS BEEN HANDLED' not in lines\n lines.append('THIS HAS BEEN HANDLED')\n app.connect('autodoc-process-docstring', handler)\n\n sphinx.ext.autosummary.Autosummary.get_items = new_get_items\n try:\n app.builder.build_all()\n finally:\n sphinx.ext.autosummary.Autosummary.get_items = orig_get_items\n\n html_warnings = app._warning.getvalue()\n assert html_warnings == ''\n\n expected_values = {\n 'withSentence': 'I have a sentence which spans multiple lines.',\n 'noSentence': \"this doesn't start with a capital.\",\n 'emptyLine': \"This is the real summary\",\n 'module_attr': 'This is a module attribute',\n 'C.class_attr': 'This is a class attribute',\n 'C.instance_attr': 'This is an instance attribute',\n 'C.prop_attr1': 'This is a function docstring',\n 'C.prop_attr2': 'This is a attribute docstring',\n 'C.C2': 'This is a nested inner class docstring',\n }\n for key, expected in expected_values.items():\n assert autosummary_items[key][2] == expected, 'Summary for %s was %r -'\\\n ' expected %r' % (key, autosummary_items[key], expected)\n\n # check an item in detail\n assert 'func' in autosummary_items\n func_attrs = ('func',\n '(arg_, *args, **kwargs)',\n 'Test function take an argument ended with underscore.',\n 'dummy_module.func')\n assert autosummary_items['func'] == func_attrs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_str_content_test_escaping.assert_str_content_title_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_str_content_test_escaping.assert_str_content_title_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 171, "end_line": 189, "span_ids": ["test_escaping", "str_content"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def str_content(elem):\n if elem.text is not None:\n return elem.text\n else:\n return ''.join(str_content(e) for e in elem)\n\n\n@pytest.mark.sphinx('xml', **default_kw)\ndef test_escaping(app, status, warning):\n app.builder.build_all()\n\n outdir = app.builder.outdir\n\n docpage = outdir / 'underscore_module_.xml'\n assert docpage.exists()\n\n title = etree_parse(docpage).find('section/title')\n\n assert str_content(title) == 'underscore_module_'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_overwrite1_test_autosummary_generate_overwrite1.assert_autosummary_dummy": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_overwrite1_test_autosummary_generate_overwrite1.assert_autosummary_dummy", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 248, "end_line": 260, "span_ids": ["test_autosummary_generate_overwrite1"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='ext-autosummary',\n confoverrides={'autosummary_generate_overwrite': False})\ndef test_autosummary_generate_overwrite1(app_params, make_app):\n args, kwargs = app_params\n srcdir = kwargs.get('srcdir')\n\n (srcdir / 'generated').makedirs(exist_ok=True)\n (srcdir / 'generated' / 'autosummary_dummy_module.rst').write_text('')\n\n app = make_app(*args, **kwargs)\n content = (srcdir / 'generated' / 'autosummary_dummy_module.rst').read_text()\n assert content == ''\n assert 'autosummary_dummy_module.rst' not in app._warning.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_overwrite2_test_autosummary_generate_overwrite2.assert_autosummary_dummy": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_overwrite2_test_autosummary_generate_overwrite2.assert_autosummary_dummy", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 263, "end_line": 275, "span_ids": ["test_autosummary_generate_overwrite2"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='ext-autosummary',\n confoverrides={'autosummary_generate_overwrite': True})\ndef test_autosummary_generate_overwrite2(app_params, make_app):\n args, kwargs = app_params\n srcdir = kwargs.get('srcdir')\n\n (srcdir / 'generated').makedirs(exist_ok=True)\n (srcdir / 'generated' / 'autosummary_dummy_module.rst').write_text('')\n\n app = make_app(*args, **kwargs)\n content = (srcdir / 'generated' / 'autosummary_dummy_module.rst').read_text()\n assert content != ''\n assert 'autosummary_dummy_module.rst' not in app._warning.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_mock_imports_test_autosummary_imported_members.try_.finally_.sys_modules_pop_autosumm": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_mock_imports_test_autosummary_imported_members.try_.finally_.sys_modules_pop_autosumm", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 337, "end_line": 366, "span_ids": ["test_autosummary_imported_members", "test_autosummary_mock_imports"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='ext-autosummary-mock_imports')\ndef test_autosummary_mock_imports(app, status, warning):\n try:\n app.build()\n assert warning.getvalue() == ''\n\n # generated/foo is generated successfully\n assert app.env.get_doctree('generated/foo')\n finally:\n sys.modules.pop('foo', None) # unload foo module\n\n\n@pytest.mark.sphinx('dummy', testroot='ext-autosummary-imported_members')\ndef test_autosummary_imported_members(app, status, warning):\n try:\n app.build()\n # generated/foo is generated successfully\n assert app.env.get_doctree('generated/autosummary_dummy_package')\n\n module = (app.srcdir / 'generated' / 'autosummary_dummy_package.rst').read_text()\n assert (' .. autosummary::\\n'\n ' \\n'\n ' Bar\\n'\n ' \\n' in module)\n assert (' .. autosummary::\\n'\n ' \\n'\n ' foo\\n'\n ' \\n' in module)\n finally:\n sys.modules.pop('autosummary_dummy_package', None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_generate_autosummary_docs_property_test_generate_autosummary_docs_property.assert_content_targe": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_generate_autosummary_docs_property_test_generate_autosummary_docs_property.assert_content_targe", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 369, "end_line": 382, "span_ids": ["test_generate_autosummary_docs_property"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autodoc',\n confoverrides={'extensions': ['sphinx.ext.autosummary']})\ndef test_generate_autosummary_docs_property(app):\n with patch('sphinx.ext.autosummary.generate.find_autosummary_in_files') as mock:\n mock.return_value = [AutosummaryEntry('target.methods.Base.prop', 'prop', None, False)]\n generate_autosummary_docs([], output_dir=app.srcdir, app=app)\n\n content = (app.srcdir / 'target.methods.Base.prop.rst').read_text()\n assert content == (\"target.methods.Base.prop\\n\"\n \"========================\\n\"\n \"\\n\"\n \".. currentmodule:: target.methods\\n\"\n \"\\n\"\n \".. autoproperty:: Base.prop\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_skip_member_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_skip_member_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 385, "end_line": 421, "span_ids": ["test_invalid_autosummary_generate", "test_autosummary_skip_member", "test_empty_autosummary_generate", "test_autogen", "test_autosummary_template"], "tokens": 336}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autosummary-skip-member')\ndef test_autosummary_skip_member(app):\n app.build()\n\n content = (app.srcdir / 'generate' / 'target.Foo.rst').read_text()\n assert 'Foo.skipmeth' not in content\n assert 'Foo._privatemeth' in content\n\n\n@pytest.mark.sphinx(testroot='ext-autosummary-template')\ndef test_autosummary_template(app):\n app.build()\n\n content = (app.srcdir / 'generate' / 'target.Foo.rst').read_text()\n assert 'EMPTY' in content\n\n\n@pytest.mark.sphinx('dummy', testroot='ext-autosummary',\n confoverrides={'autosummary_generate': []})\ndef test_empty_autosummary_generate(app, status, warning):\n app.build()\n assert (\"WARNING: autosummary: failed to import autosummary_importfail\"\n in warning.getvalue())\n\n\n@pytest.mark.sphinx('dummy', testroot='ext-autosummary',\n confoverrides={'autosummary_generate': ['unknown']})\ndef test_invalid_autosummary_generate(app, status, warning):\n assert 'WARNING: autosummary_generate: file not found: unknown.rst' in warning.getvalue()\n\n\ndef test_autogen(rootdir, tempdir):\n with cd(rootdir / 'test-templating'):\n args = ['-o', tempdir, '-t', '.', 'autosummary_templating.txt']\n autogen_main(args)\n assert (tempdir / 'sphinx.application.TemplateBridge.rst').exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_test_is_allowed_version_recorded_calls.Counter_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_test_is_allowed_version_recorded_calls.Counter_", "embedding": null, "metadata": {"file_path": "tests/test_ext_doctest.py", "file_name": "test_ext_doctest.py", "file_type": "text/x-python", "category": "test", "start_line": 52, "end_line": 81, "span_ids": ["test_is_allowed_version", "impl:3", "cleanup_call"], "tokens": 333}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_is_allowed_version():\n assert is_allowed_version('<3.4', '3.3') is True\n assert is_allowed_version('<3.4', '3.3') is True\n assert is_allowed_version('<3.2', '3.3') is False\n assert is_allowed_version('<=3.4', '3.3') is True\n assert is_allowed_version('<=3.2', '3.3') is False\n assert is_allowed_version('==3.3', '3.3') is True\n assert is_allowed_version('==3.4', '3.3') is False\n assert is_allowed_version('>=3.2', '3.3') is True\n assert is_allowed_version('>=3.4', '3.3') is False\n assert is_allowed_version('>3.2', '3.3') is True\n assert is_allowed_version('>3.4', '3.3') is False\n assert is_allowed_version('~=3.4', '3.4.5') is True\n assert is_allowed_version('~=3.4', '3.5.0') is True\n\n # invalid spec\n with pytest.raises(InvalidSpecifier):\n is_allowed_version('&3.4', '3.5')\n\n # invalid version\n with pytest.raises(InvalidVersion):\n is_allowed_version('>3.4', 'Sphinx')\n\n\ndef cleanup_call():\n global cleanup_called\n cleanup_called += 1\n\n\nrecorded_calls = Counter()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_test_skipif_test_skipif.assert_recorded_calls_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_test_skipif_test_skipif.assert_recorded_calls_", "embedding": null, "metadata": {"file_path": "tests/test_ext_doctest.py", "file_name": "test_ext_doctest.py", "file_type": "text/x-python", "category": "test", "start_line": 84, "end_line": 122, "span_ids": ["test_skipif"], "tokens": 506}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('doctest', testroot='ext-doctest-skipif')\ndef test_skipif(app, status, warning):\n \"\"\"Tests for the :skipif: option\n\n The tests are separated into a different test root directory since the\n ``app`` object only evaluates options once in its lifetime. If these tests\n were combined with the other doctest tests, the ``:skipif:`` evaluations\n would be recorded only on the first ``app.builder.build_all()`` run, i.e.\n in ``test_build`` above, and the assertion below would fail.\n\n \"\"\"\n global recorded_calls\n recorded_calls = Counter()\n app.builder.build_all()\n if app.statuscode != 0:\n assert False, 'failures in doctests:' + status.getvalue()\n # The `:skipif:` expressions are always run.\n # Actual tests and setup/cleanup code is only run if the `:skipif:`\n # expression evaluates to a False value.\n # Global setup/cleanup are run before/after evaluating the `:skipif:`\n # option in each directive - thus 11 additional invocations for each on top\n # of the ones made for the whole test file.\n assert recorded_calls == {('doctest_global_setup', 'body', True): 13,\n ('testsetup', ':skipif:', True): 1,\n ('testsetup', ':skipif:', False): 1,\n ('testsetup', 'body', False): 1,\n ('doctest', ':skipif:', True): 1,\n ('doctest', ':skipif:', False): 1,\n ('doctest', 'body', False): 1,\n ('testcode', ':skipif:', True): 1,\n ('testcode', ':skipif:', False): 1,\n ('testcode', 'body', False): 1,\n ('testoutput-1', ':skipif:', True): 1,\n ('testoutput-2', ':skipif:', True): 1,\n ('testoutput-2', ':skipif:', False): 1,\n ('testcleanup', ':skipif:', True): 1,\n ('testcleanup', ':skipif:', False): 1,\n ('testcleanup', 'body', False): 1,\n ('doctest_global_cleanup', 'body', True): 13}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_record_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_record_", "embedding": null, "metadata": {"file_path": "tests/test_ext_doctest.py", "file_name": "test_ext_doctest.py", "file_type": "text/x-python", "category": "test", "start_line": 125, "end_line": 147, "span_ids": ["test_reporting_with_autodoc", "record"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def record(directive, part, should_skip):\n global recorded_calls\n recorded_calls[(directive, part, should_skip)] += 1\n return 'Recorded {} {} {}'.format(directive, part, should_skip)\n\n\n@pytest.mark.sphinx('doctest', testroot='ext-doctest-with-autodoc')\ndef test_reporting_with_autodoc(app, status, warning, capfd):\n # Patch builder to get a copy of the output\n written = []\n app.builder._warn_out = written.append\n app.builder.build_all()\n lines = '\\n'.join(written).replace(os.sep, '/').split('\\n')\n failures = [l for l in lines if l.startswith('File')]\n expected = [\n 'File \"dir/inner.rst\", line 1, in default',\n 'File \"dir/bar.py\", line ?, in default',\n 'File \"foo.py\", line ?, in default',\n 'File \"index.rst\", line 4, in default',\n ]\n for location in expected:\n assert location in failures", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_svg_html_test_graphviz_svg_html.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_svg_html_test_graphviz_svg_html.None_3", "embedding": null, "metadata": {"file_path": "tests/test_ext_graphviz.py", "file_name": "test_ext_graphviz.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 113, "span_ids": ["test_graphviz_svg_html"], "tokens": 744}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-graphviz',\n confoverrides={'graphviz_output_format': 'svg'})\n@pytest.mark.usefixtures('if_graphviz_found')\ndef test_graphviz_svg_html(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n\n if docutils.__version_info__ < (0, 17):\n html = (r'<div class=\\\"figure align-default\\\" .*?>\\n'\n r'<div class=\"graphviz\"><object data=\\\".*\\.svg\\\".*>\\n'\n r'\\s*<p class=\\\"warning\\\">digraph foo {\\n'\n r'bar -> baz\\n'\n r'}</p></object></div>\\n'\n r'<p class=\\\"caption\\\"><span class=\\\"caption-text\\\">'\n r'caption of graph</span>.*</p>\\n</div>')\n else:\n html = (r'<figure class=\\\"align-default\\\" .*?>\\n'\n r'<div class=\"graphviz\"><object data=\\\".*\\.svg\\\".*>\\n'\n r'\\s*<p class=\\\"warning\\\">digraph foo {\\n'\n r'bar -> baz\\n'\n r'}</p></object></div>\\n'\n r'<figcaption>\\n'\n r'<p><span class=\\\"caption-text\\\">caption of graph</span>.*</p>\\n'\n r'</figcaption>\\n'\n r'</figure>')\n assert re.search(html, content, re.S)\n\n html = (r'Hello <div class=\"graphviz\"><object.*>\\n'\n r'\\s*<p class=\\\"warning\\\">graph</p></object></div>\\n'\n r' graphviz world')\n assert re.search(html, content, re.S)\n\n if docutils.__version_info__ < (0, 17):\n html = (r'<div class=\\\"figure align-right\\\" .*\\>\\n'\n r'<div class=\"graphviz\"><object data=\\\".*\\.svg\\\".*>\\n'\n r'\\s*<p class=\\\"warning\\\">digraph bar {\\n'\n r'foo -> bar\\n'\n r'}</p></object></div>\\n'\n r'<p class=\\\"caption\\\"><span class=\\\"caption-text\\\">'\n r'on <em>right</em></span>.*</p>\\n'\n r'</div>')\n else:\n html = (r'<figure class=\\\"align-right\\\" .*\\>\\n'\n r'<div class=\"graphviz\"><object data=\\\".*\\.svg\\\".*>\\n'\n r'\\s*<p class=\\\"warning\\\">digraph bar {\\n'\n r'foo -> bar\\n'\n r'}</p></object></div>\\n'\n r'<figcaption>\\n'\n r'<p><span class=\\\"caption-text\\\">on <em>right</em></span>.*</p>\\n'\n r'</figcaption>\\n'\n r'</figure>')\n assert re.search(html, content, re.S)\n\n html = (r'<div align=\\\"center\\\" class=\\\"align-center\\\">'\n r'<div class=\"graphviz\"><object data=\\\".*\\.svg\\\".*>\\n'\n r'\\s*<p class=\\\"warning\\\">digraph foo {\\n'\n r'centered\\n'\n r'}</p></object></div>\\n'\n r'</div>')\n assert re.search(html, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_latex_test_graphviz_latex.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_latex_test_graphviz_latex.None_3", "embedding": null, "metadata": {"file_path": "tests/test_ext_graphviz.py", "file_name": "test_ext_graphviz.py", "file_type": "text/x-python", "category": "test", "start_line": 89, "end_line": 112, "span_ids": ["test_graphviz_latex"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='ext-graphviz')\n@pytest.mark.usefixtures('if_graphviz_found')\ndef test_graphviz_latex(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'python.tex').read_text()\n macro = ('\\\\\\\\begin{figure}\\\\[htbp\\\\]\\n\\\\\\\\centering\\n\\\\\\\\capstart\\n\\n'\n '\\\\\\\\sphinxincludegraphics\\\\[\\\\]{graphviz-\\\\w+.pdf}\\n'\n '\\\\\\\\caption{caption of graph}\\\\\\\\label{.*}\\\\\\\\end{figure}')\n assert re.search(macro, content, re.S)\n\n macro = 'Hello \\\\\\\\sphinxincludegraphics\\\\[\\\\]{graphviz-\\\\w+.pdf} graphviz world'\n assert re.search(macro, content, re.S)\n\n macro = ('\\\\\\\\begin{wrapfigure}{r}{0pt}\\n\\\\\\\\centering\\n'\n '\\\\\\\\sphinxincludegraphics\\\\[\\\\]{graphviz-\\\\w+.pdf}\\n'\n '\\\\\\\\caption{on \\\\\\\\sphinxstyleemphasis{right}}'\n '\\\\\\\\label{.*}\\\\\\\\end{wrapfigure}')\n assert re.search(macro, content, re.S)\n\n macro = (r'\\{\\\\hfill'\n r'\\\\sphinxincludegraphics\\[\\]{graphviz-.*}'\n r'\\\\hspace\\*{\\\\fill}}')\n assert re.search(macro, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_i18n_test_graphviz_i18n.assert_re_search_html_co": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_i18n_test_graphviz_i18n.assert_re_search_html_co", "embedding": null, "metadata": {"file_path": "tests/test_ext_graphviz.py", "file_name": "test_ext_graphviz.py", "file_type": "text/x-python", "category": "test", "start_line": 115, "end_line": 122, "span_ids": ["test_graphviz_i18n"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-graphviz', confoverrides={'language': 'xx'})\n@pytest.mark.usefixtures('if_graphviz_found')\ndef test_graphviz_i18n(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n html = '<img src=\".*?\" alt=\"digraph {\\n BAR -> BAZ\\n}\" class=\"graphviz\" />'\n assert re.search(html, content, re.M)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_parse_mapfile_test_graphviz_parse_mapfile._inheritance_diagram_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_parse_mapfile_test_graphviz_parse_mapfile._inheritance_diagram_s", "embedding": null, "metadata": {"file_path": "tests/test_ext_graphviz.py", "file_name": "test_ext_graphviz.py", "file_type": "text/x-python", "category": "test", "start_line": 125, "end_line": 153, "span_ids": ["test_graphviz_parse_mapfile"], "tokens": 376}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_graphviz_parse_mapfile():\n # empty graph\n code = ('# digraph {\\n'\n '# }\\n')\n content = ('<map id=\"%3\" name=\"%3\">\\n'\n '</map>')\n cmap = ClickableMapDefinition('dummy.map', content, code)\n assert cmap.filename == 'dummy.map'\n assert cmap.id == 'grapvizb08107169e'\n assert len(cmap.clickable) == 0\n assert cmap.generate_clickable_map() == ''\n\n # normal graph\n code = ('digraph {\\n'\n ' foo [href=\"http://www.google.com/\"];\\n'\n ' foo -> bar;\\n'\n '}\\n')\n content = ('<map id=\"%3\" name=\"%3\">\\n'\n '<area shape=\"poly\" id=\"node1\" href=\"http://www.google.com/\" title=\"foo\" alt=\"\"'\n ' coords=\"77,29,76,22,70,15,62,10,52,7,41,5,30,7,20,10,12,15,7,22,5,29,7,37,12,'\n '43,20,49,30,52,41,53,52,52,62,49,70,43,76,37\"/>\\n'\n '</map>')\n cmap = ClickableMapDefinition('dummy.map', content, code)\n assert cmap.filename == 'dummy.map'\n assert cmap.id == 'grapviza4ccdd48ce'\n assert len(cmap.clickable) == 1\n assert cmap.generate_clickable_map() == content.replace('%3', cmap.id)\n\n # inheritance-diagram:: sphinx.builders.html\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_parse_mapfile.content_6_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py_test_graphviz_parse_mapfile.content_6_", "embedding": null, "metadata": {"file_path": "tests/test_ext_graphviz.py", "file_name": "test_ext_graphviz.py", "file_type": "text/x-python", "category": "test", "start_line": 154, "end_line": 183, "span_ids": ["test_graphviz_parse_mapfile"], "tokens": 534}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_graphviz_parse_mapfile():\n # ... other code\n content = (\n '<map id=\"inheritance66ff5471b9\" name=\"inheritance66ff5471b9\">\\n'\n '<area shape=\"rect\" id=\"node1\" title=\"Builds target formats from the reST sources.\"'\n ' alt=\"\" coords=\"26,95,125,110\"/>\\n'\n '<area shape=\"rect\" id=\"node5\" title=\"Builds standalone HTML docs.\"'\n ' alt=\"\" coords=\"179,95,362,110\"/>\\n'\n '<area shape=\"rect\" id=\"node2\" title=\"buildinfo file manipulator.\" '\n ' alt=\"\" coords=\"14,64,138,80\"/>\\n'\n '<area shape=\"rect\" id=\"node3\" title=\"The container of stylesheets.\"'\n ' alt=\"\" coords=\"3,34,148,49\"/>\\n'\n '<area shape=\"rect\" id=\"node4\" title=\"A StandaloneHTMLBuilder that creates all HTML'\n ' pages as "index.html" in\" alt=\"\" coords=\"395,64,569,80\"/>\\n'\n '<area shape=\"rect\" id=\"node7\" title=\"An abstract builder that serializes'\n ' the generated HTML.\" alt=\"\" coords=\"392,95,571,110\"/>\\n'\n '<area shape=\"rect\" id=\"node9\" title=\"A StandaloneHTMLBuilder subclass that puts'\n ' the whole document tree on one\" alt=\"\" coords=\"393,125,570,141\"/>\\n'\n '<area shape=\"rect\" id=\"node6\" title=\"A builder that dumps the generated HTML'\n ' into JSON files.\" alt=\"\" coords=\"602,80,765,95\"/>\\n'\n '<area shape=\"rect\" id=\"node8\" title=\"A Builder that dumps the generated HTML'\n ' into pickle files.\" alt=\"\" coords=\"602,110,765,125\"/>\\n'\n '<area shape=\"rect\" id=\"node10\" title=\"The metadata of stylesheet.\"'\n ' alt=\"\" coords=\"11,3,141,19\"/>\\n'\n '</map>'\n )\n cmap = ClickableMapDefinition('dummy.map', content, 'dummy_code')\n assert cmap.filename == 'dummy.map'\n assert cmap.id == 'inheritance66ff5471b9'\n assert len(cmap.clickable) == 0\n assert cmap.generate_clickable_map() == ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram.None_3_test_inheritance_diagram.None_5.assert_cls_in_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram.None_3_test_inheritance_diagram.None_5.assert_cls_in_", "embedding": null, "metadata": {"file_path": "tests/test_ext_inheritance_diagram.py", "file_name": "test_ext_inheritance_diagram.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 141, "span_ids": ["test_inheritance_diagram"], "tokens": 512}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(buildername=\"html\", testroot=\"inheritance\")\n@pytest.mark.usefixtures('if_graphviz_found')\ndef test_inheritance_diagram(app, status, warning):\n # ... other code\n for cls in graphs['diagram_w_2_top_classes'].class_info:\n assert cls in [\n ('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),\n ('dummy.test.C', 'dummy.test.C', [], None),\n ('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),\n ('dummy.test.D', 'dummy.test.D', ['dummy.test.B', 'dummy.test.C'], None),\n ('dummy.test.B', 'dummy.test.B', [], None)\n ]\n\n # inheritance diagram with 2 top classes and specifying the entire module\n # rendering should be\n #\n # A\n # B C\n # / \\ / \\\n # E D F\n #\n # Note: dummy.test.A is included in the graph before its descendants are even processed\n # b/c we've specified to load the entire module. The way InheritanceGraph works it is very\n # hard to exclude parent classes once after they have been included in the graph.\n # If you'd like to not show class A in the graph don't specify the entire module.\n # this is a known issue.\n for cls in graphs['diagram_module_w_2_top_classes'].class_info:\n assert cls in [\n ('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),\n ('dummy.test.C', 'dummy.test.C', [], None),\n ('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),\n ('dummy.test.D', 'dummy.test.D', ['dummy.test.B', 'dummy.test.C'], None),\n ('dummy.test.B', 'dummy.test.B', [], None),\n ('dummy.test.A', 'dummy.test.A', [], None),\n ]\n\n # inheritance diagram involving a base class nested within another class\n for cls in graphs['diagram_w_nested_classes'].class_info:\n assert cls in [\n ('dummy.test_nested.A', 'dummy.test_nested.A', [], None),\n ('dummy.test_nested.C', 'dummy.test_nested.C', ['dummy.test_nested.A.B'], None),\n ('dummy.test_nested.A.B', 'dummy.test_nested.A.B', [], None)\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_png_html_test_inheritance_diagram_png_html.assert_re_search_pattern_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_png_html_test_inheritance_diagram_png_html.assert_re_search_pattern_", "embedding": null, "metadata": {"file_path": "tests/test_ext_inheritance_diagram.py", "file_name": "test_ext_inheritance_diagram.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 157, "span_ids": ["test_inheritance_diagram_png_html"], "tokens": 332}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-inheritance_diagram')\n@pytest.mark.usefixtures('if_graphviz_found')\ndef test_inheritance_diagram_png_html(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n\n if docutils.__version_info__ < (0, 17):\n pattern = ('<div class=\"figure align-default\" id=\"id1\">\\n'\n '<div class=\"graphviz\">'\n '<img src=\"_images/inheritance-\\\\w+.png\" alt=\"Inheritance diagram of test.Foo\" '\n 'class=\"inheritance graphviz\" /></div>\\n<p class=\"caption\">'\n '<span class=\"caption-text\">Test Foo!</span><a class=\"headerlink\" href=\"#id1\" '\n 'title=\"Permalink to this image\">\\xb6</a></p>\\n</div>\\n')\n else:\n pattern = ('<figure class=\"align-default\" id=\"id1\">\\n'\n '<div class=\"graphviz\">'\n '<img src=\"_images/inheritance-\\\\w+.png\" alt=\"Inheritance diagram of test.Foo\" '\n 'class=\"inheritance graphviz\" /></div>\\n<figcaption>\\n<p>'\n '<span class=\"caption-text\">Test Foo!</span><a class=\"headerlink\" href=\"#id1\" '\n 'title=\"Permalink to this image\">\\xb6</a></p>\\n</figcaption>\\n</figure>\\n')\n assert re.search(pattern, content, re.M)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_svg_html_test_inheritance_diagram_svg_html.assert_re_search_pattern_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_svg_html_test_inheritance_diagram_svg_html.assert_re_search_pattern_", "embedding": null, "metadata": {"file_path": "tests/test_ext_inheritance_diagram.py", "file_name": "test_ext_inheritance_diagram.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 187, "span_ids": ["test_inheritance_diagram_svg_html"], "tokens": 386}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-inheritance_diagram',\n confoverrides={'graphviz_output_format': 'svg'})\n@pytest.mark.usefixtures('if_graphviz_found')\ndef test_inheritance_diagram_svg_html(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n\n if docutils.__version_info__ < (0, 17):\n pattern = ('<div class=\"figure align-default\" id=\"id1\">\\n'\n '<div class=\"graphviz\">'\n '<object data=\"_images/inheritance-\\\\w+.svg\" '\n 'type=\"image/svg\\\\+xml\" class=\"inheritance graphviz\">\\n'\n '<p class=\\\"warning\\\">Inheritance diagram of test.Foo</p>'\n '</object></div>\\n<p class=\"caption\"><span class=\"caption-text\">'\n 'Test Foo!</span><a class=\"headerlink\" href=\"#id1\" '\n 'title=\"Permalink to this image\">\\xb6</a></p>\\n</div>\\n')\n else:\n pattern = ('<figure class=\"align-default\" id=\"id1\">\\n'\n '<div class=\"graphviz\">'\n '<object data=\"_images/inheritance-\\\\w+.svg\" '\n 'type=\"image/svg\\\\+xml\" class=\"inheritance graphviz\">\\n'\n '<p class=\\\"warning\\\">Inheritance diagram of test.Foo</p>'\n '</object></div>\\n<figcaption>\\n<p><span class=\"caption-text\">'\n 'Test Foo!</span><a class=\"headerlink\" href=\"#id1\" '\n 'title=\"Permalink to this image\">\\xb6</a></p>\\n</figcaption>\\n</figure>\\n')\n\n assert re.search(pattern, content, re.M)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_latex_test_inheritance_diagram_latex.assert_re_search_pattern_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_latex_test_inheritance_diagram_latex.assert_re_search_pattern_", "embedding": null, "metadata": {"file_path": "tests/test_ext_inheritance_diagram.py", "file_name": "test_ext_inheritance_diagram.py", "file_type": "text/x-python", "category": "test", "start_line": 179, "end_line": 189, "span_ids": ["test_inheritance_diagram_latex"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='ext-inheritance_diagram')\n@pytest.mark.usefixtures('if_graphviz_found')\ndef test_inheritance_diagram_latex(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'python.tex').read_text()\n\n pattern = ('\\\\\\\\begin{figure}\\\\[htbp]\\n\\\\\\\\centering\\n\\\\\\\\capstart\\n\\n'\n '\\\\\\\\sphinxincludegraphics\\\\[\\\\]{inheritance-\\\\w+.pdf}\\n'\n '\\\\\\\\caption{Test Foo!}\\\\\\\\label{\\\\\\\\detokenize{index:id1}}\\\\\\\\end{figure}')\n assert re.search(pattern, content, re.M)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_latex_alias_test_inheritance_diagram_latex_alias.assert_re_search_pattern_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_inheritance_diagram_latex_alias_test_inheritance_diagram_latex_alias.assert_re_search_pattern_", "embedding": null, "metadata": {"file_path": "tests/test_ext_inheritance_diagram.py", "file_name": "test_ext_inheritance_diagram.py", "file_type": "text/x-python", "category": "test", "start_line": 203, "end_line": 233, "span_ids": ["test_inheritance_diagram_latex_alias"], "tokens": 474}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-inheritance_diagram',\n srcdir='ext-inheritance_diagram-alias')\n@pytest.mark.usefixtures('if_graphviz_found')\ndef test_inheritance_diagram_latex_alias(app, status, warning):\n app.config.inheritance_alias = {'test.Foo': 'alias.Foo'}\n app.builder.build_all()\n\n doc = app.env.get_and_resolve_doctree('index', app)\n aliased_graph = doc.children[0].children[3]['graph'].class_info\n assert len(aliased_graph) == 3\n assert ('test.Baz', 'test.Baz', ['test.Bar'], None) in aliased_graph\n assert ('test.Bar', 'test.Bar', ['alias.Foo'], None) in aliased_graph\n assert ('alias.Foo', 'alias.Foo', [], None) in aliased_graph\n\n content = (app.outdir / 'index.html').read_text()\n\n if docutils.__version_info__ < (0, 17):\n pattern = ('<div class=\"figure align-default\" id=\"id1\">\\n'\n '<div class=\"graphviz\">'\n '<img src=\"_images/inheritance-\\\\w+.png\" alt=\"Inheritance diagram of test.Foo\" '\n 'class=\"inheritance graphviz\" /></div>\\n<p class=\"caption\">'\n '<span class=\"caption-text\">Test Foo!</span><a class=\"headerlink\" href=\"#id1\" '\n 'title=\"Permalink to this image\">\\xb6</a></p>\\n</div>\\n')\n else:\n pattern = ('<figure class=\"align-default\" id=\"id1\">\\n'\n '<div class=\"graphviz\">'\n '<img src=\"_images/inheritance-\\\\w+.png\" alt=\"Inheritance diagram of test.Foo\" '\n 'class=\"inheritance graphviz\" /></div>\\n<figcaption>\\n<p>'\n '<span class=\"caption-text\">Test Foo!</span><a class=\"headerlink\" href=\"#id1\" '\n 'title=\"Permalink to this image\">\\xb6</a></p>\\n</figcaption>\\n</figure>\\n')\n assert re.search(pattern, content, re.M)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_import_classes_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py_test_import_classes_", "embedding": null, "metadata": {"file_path": "tests/test_ext_inheritance_diagram.py", "file_name": "test_ext_inheritance_diagram.py", "file_type": "text/x-python", "category": "test", "start_line": 217, "end_line": 272, "span_ids": ["test_import_classes"], "tokens": 407}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_classes(rootdir):\n from sphinx.parsers import Parser, RSTParser\n from sphinx.util.i18n import CatalogInfo\n\n try:\n sys.path.append(rootdir / 'test-ext-inheritance_diagram')\n from example.sphinx import DummyClass\n\n # got exception for unknown class or module\n with pytest.raises(InheritanceException):\n import_classes('unknown', None)\n with pytest.raises(InheritanceException):\n import_classes('unknown.Unknown', None)\n\n # got exception InheritanceException for wrong class or module\n # not AttributeError (refs: #4019)\n with pytest.raises(InheritanceException):\n import_classes('unknown', '.')\n with pytest.raises(InheritanceException):\n import_classes('unknown.Unknown', '.')\n with pytest.raises(InheritanceException):\n import_classes('.', None)\n\n # a module having no classes\n classes = import_classes('sphinx', None)\n assert classes == []\n\n classes = import_classes('sphinx', 'foo')\n assert classes == []\n\n # all of classes in the module\n classes = import_classes('sphinx.parsers', None)\n assert set(classes) == {Parser, RSTParser}\n\n # specified class in the module\n classes = import_classes('sphinx.parsers.Parser', None)\n assert classes == [Parser]\n\n # specified class in current module\n classes = import_classes('Parser', 'sphinx.parsers')\n assert classes == [Parser]\n\n # relative module name to current module\n classes = import_classes('i18n.CatalogInfo', 'sphinx.util')\n assert classes == [CatalogInfo]\n\n # got exception for functions\n with pytest.raises(InheritanceException):\n import_classes('encode_uri', 'sphinx.util')\n\n # import submodule on current module (refs: #3164)\n classes = import_classes('sphinx', 'example')\n assert classes == [DummyClass]\n finally:\n sys.path.pop()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_fetch_inventory_redirection_test_fetch_inventory_redirection.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_fetch_inventory_redirection_test_fetch_inventory_redirection.None_7", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 45, "end_line": 86, "span_ids": ["test_fetch_inventory_redirection"], "tokens": 493}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@mock.patch('sphinx.ext.intersphinx.InventoryFile')\n@mock.patch('sphinx.ext.intersphinx._read_from_url')\ndef test_fetch_inventory_redirection(_read_from_url, InventoryFile, app, status, warning):\n intersphinx_setup(app)\n _read_from_url().readline.return_value = b'# Sphinx inventory version 2'\n\n # same uri and inv, not redirected\n _read_from_url().url = 'http://hostname/' + INVENTORY_FILENAME\n fetch_inventory(app, 'http://hostname/', 'http://hostname/' + INVENTORY_FILENAME)\n assert 'intersphinx inventory has moved' not in status.getvalue()\n assert InventoryFile.load.call_args[0][1] == 'http://hostname/'\n\n # same uri and inv, redirected\n status.seek(0)\n status.truncate(0)\n _read_from_url().url = 'http://hostname/new/' + INVENTORY_FILENAME\n\n fetch_inventory(app, 'http://hostname/', 'http://hostname/' + INVENTORY_FILENAME)\n assert status.getvalue() == ('intersphinx inventory has moved: '\n 'http://hostname/%s -> http://hostname/new/%s\\n' %\n (INVENTORY_FILENAME, INVENTORY_FILENAME))\n assert InventoryFile.load.call_args[0][1] == 'http://hostname/new'\n\n # different uri and inv, not redirected\n status.seek(0)\n status.truncate(0)\n _read_from_url().url = 'http://hostname/new/' + INVENTORY_FILENAME\n\n fetch_inventory(app, 'http://hostname/', 'http://hostname/new/' + INVENTORY_FILENAME)\n assert 'intersphinx inventory has moved' not in status.getvalue()\n assert InventoryFile.load.call_args[0][1] == 'http://hostname/'\n\n # different uri and inv, redirected\n status.seek(0)\n status.truncate(0)\n _read_from_url().url = 'http://hostname/other/' + INVENTORY_FILENAME\n\n fetch_inventory(app, 'http://hostname/', 'http://hostname/new/' + INVENTORY_FILENAME)\n assert status.getvalue() == ('intersphinx inventory has moved: '\n 'http://hostname/new/%s -> http://hostname/other/%s\\n' %\n (INVENTORY_FILENAME, INVENTORY_FILENAME))\n assert InventoryFile.load.call_args[0][1] == 'http://hostname/'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_test_missing_reference.assert_rn_refuri_p": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_test_missing_reference.assert_rn_refuri_p", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 87, "end_line": 149, "span_ids": ["test_missing_reference"], "tokens": 790}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Path separator mismatch issue\")\ndef test_missing_reference(tempdir, app, status, warning):\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(inventory_v2)\n set_config(app, {\n 'https://docs.python.org/': inv_file,\n 'py3k': ('https://docs.python.org/py3k/', inv_file),\n 'py3krel': ('py3k', inv_file), # relative path\n 'py3krelparent': ('../../py3k', inv_file), # relative path, parent dir\n })\n\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n inv = app.env.intersphinx_inventory\n\n assert inv['py:module']['module2'] == \\\n ('foo', '2.0', 'https://docs.python.org/foo.html#module-module2', '-')\n\n # check resolution when a target is found\n rn = reference_check(app, 'py', 'func', 'module1.func', 'foo')\n assert isinstance(rn, nodes.reference)\n assert rn['refuri'] == 'https://docs.python.org/sub/foo.html#module1.func'\n assert rn['reftitle'] == '(in foo v2.0)'\n assert rn[0].astext() == 'foo'\n\n # create unresolvable nodes and check None return value\n assert reference_check(app, 'py', 'foo', 'module1.func', 'foo') is None\n assert reference_check(app, 'py', 'func', 'foo', 'foo') is None\n assert reference_check(app, 'py', 'func', 'foo', 'foo') is None\n\n # check handling of prefixes\n\n # prefix given, target found: prefix is stripped\n rn = reference_check(app, 'py', 'mod', 'py3k:module2', 'py3k:module2')\n assert rn[0].astext() == 'module2'\n\n # prefix given, but not in title: nothing stripped\n rn = reference_check(app, 'py', 'mod', 'py3k:module2', 'module2')\n assert rn[0].astext() == 'module2'\n\n # prefix given, but explicit: nothing stripped\n rn = reference_check(app, 'py', 'mod', 'py3k:module2', 'py3k:module2',\n refexplicit=True)\n assert rn[0].astext() == 'py3k:module2'\n\n # prefix given, target not found and nonexplicit title: prefix is not stripped\n node, contnode = fake_node('py', 'mod', 'py3k:unknown', 'py3k:unknown',\n refexplicit=False)\n rn = missing_reference(app, app.env, node, contnode)\n assert rn is None\n assert contnode[0].astext() == 'py3k:unknown'\n\n # prefix given, target not found and explicit title: nothing is changed\n node, contnode = fake_node('py', 'mod', 'py3k:unknown', 'py3k:unknown',\n refexplicit=True)\n rn = missing_reference(app, app.env, node, contnode)\n assert rn is None\n assert contnode[0].astext() == 'py3k:unknown'\n\n # check relative paths\n rn = reference_check(app, 'py', 'mod', 'py3krel:module1', 'foo')\n assert rn['refuri'] == 'py3k/foo.html#module-module1'\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_stddomain_test_missing_reference_stddomain.assert_rn_astext_l": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_stddomain_test_missing_reference_stddomain.assert_rn_astext_l", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 206, "end_line": 233, "span_ids": ["test_missing_reference_stddomain"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_missing_reference_stddomain(tempdir, app, status, warning):\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(inventory_v2)\n set_config(app, {\n 'cmd': ('https://docs.python.org/', inv_file),\n })\n\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n\n # no context data\n kwargs = {}\n node, contnode = fake_node('std', 'option', '-l', '-l', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert rn is None\n\n # std:program context helps to search objects\n kwargs = {'std:program': 'ls'}\n node, contnode = fake_node('std', 'option', '-l', 'ls -l', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert rn.astext() == 'ls -l'\n\n # refers inventory by name\n kwargs = {}\n node, contnode = fake_node('std', 'option', 'cmd:ls -l', '-l', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert rn.astext() == '-l'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_cppdomain_test_missing_reference_cppdomain.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_cppdomain_test_missing_reference_cppdomain.None_2", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 236, "end_line": 260, "span_ids": ["test_missing_reference_cppdomain"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-intersphinx-cppdomain')\ndef test_missing_reference_cppdomain(tempdir, app, status, warning):\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(inventory_v2)\n set_config(app, {\n 'https://docs.python.org/': inv_file,\n })\n\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n\n app.build()\n html = (app.outdir / 'index.html').read_text()\n assert ('<a class=\"reference external\"'\n ' href=\"https://docs.python.org/index.html#cpp_foo_bar\"'\n ' title=\"(in foo v2.0)\">'\n '<code class=\"xref cpp cpp-class docutils literal notranslate\">'\n '<span class=\"pre\">Bar</span></code></a>' in html)\n assert ('<a class=\"reference external\"'\n ' href=\"https://docs.python.org/index.html#foons\"'\n ' title=\"(in foo v2.0)\"><span class=\"n\"><span class=\"pre\">foons</span></span></a>' in html)\n assert ('<a class=\"reference external\"'\n ' href=\"https://docs.python.org/index.html#foons_bartype\"'\n ' title=\"(in foo v2.0)\"><span class=\"n\"><span class=\"pre\">bartype</span></span></a>' in html)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_jsdomain_test_missing_reference_jsdomain.assert_rn_astext_ba": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_jsdomain_test_missing_reference_jsdomain.assert_rn_astext_ba", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 263, "end_line": 284, "span_ids": ["test_missing_reference_jsdomain"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_missing_reference_jsdomain(tempdir, app, status, warning):\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(inventory_v2)\n set_config(app, {\n 'https://docs.python.org/': inv_file,\n })\n\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n\n # no context data\n kwargs = {}\n node, contnode = fake_node('js', 'meth', 'baz', 'baz()', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert rn is None\n\n # js:module and js:object context helps to search objects\n kwargs = {'js:module': 'foo', 'js:object': 'bar'}\n node, contnode = fake_node('js', 'meth', 'baz', 'baz()', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert rn.astext() == 'baz()'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_inventory_not_having_version_test_inventory_not_having_version.assert_rn_0_astext_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_inventory_not_having_version_test_inventory_not_having_version.assert_rn_0_astext_", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 349, "end_line": 365, "span_ids": ["test_inventory_not_having_version"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Path separator mismatch issue\")\ndef test_inventory_not_having_version(tempdir, app, status, warning):\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(inventory_v2_not_having_version)\n set_config(app, {\n 'https://docs.python.org/': inv_file,\n })\n\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n\n rn = reference_check(app, 'py', 'mod', 'module1', 'foo')\n assert isinstance(rn, nodes.reference)\n assert rn['refuri'] == 'https://docs.python.org/foo.html#module-module1'\n assert rn['reftitle'] == '(in foo)'\n assert rn[0].astext() == 'Long Module desc'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_load_mappings_warnings_test_load_mappings_warnings.assert_warning_getvalue_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_load_mappings_warnings_test_load_mappings_warnings.assert_warning_getvalue_", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 368, "end_line": 387, "span_ids": ["test_load_mappings_warnings"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_load_mappings_warnings(tempdir, app, status, warning):\n \"\"\"\n load_mappings issues a warning if new-style mapping\n identifiers are not string\n \"\"\"\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(inventory_v2)\n set_config(app, {\n 'https://docs.python.org/': inv_file,\n 'py3k': ('https://docs.python.org/py3k/', inv_file),\n 'repoze.workflow': ('http://docs.repoze.org/workflow/', inv_file),\n 'django-taggit': ('http://django-taggit.readthedocs.org/en/latest/',\n inv_file),\n 12345: ('http://www.sphinx-doc.org/en/stable/', inv_file),\n })\n\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n assert warning.getvalue().count('\\n') == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_load_mappings_fallback_test_load_mappings_fallback.assert_isinstance_rn_nod": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_load_mappings_fallback_test_load_mappings_fallback.assert_isinstance_rn_nod", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 390, "end_line": 421, "span_ids": ["test_load_mappings_fallback"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_load_mappings_fallback(tempdir, app, status, warning):\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(inventory_v2)\n set_config(app, {})\n\n # connect to invalid path\n app.config.intersphinx_mapping = {\n 'fallback': ('https://docs.python.org/py3k/', '/invalid/inventory/path'),\n }\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n assert \"failed to reach any of the inventories\" in warning.getvalue()\n\n rn = reference_check(app, 'py', 'func', 'module1.func', 'foo')\n assert rn is None\n\n # clear messages\n status.truncate(0)\n warning.truncate(0)\n\n # add fallbacks to mapping\n app.config.intersphinx_mapping = {\n 'fallback': ('https://docs.python.org/py3k/', ('/invalid/inventory/path',\n inv_file)),\n }\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n assert \"encountered some issues with some of the inventories\" in status.getvalue()\n assert \"\" == warning.getvalue()\n\n rn = reference_check(app, 'py', 'func', 'module1.func', 'foo')\n assert isinstance(rn, nodes.reference)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_TestStripBasicAuth_TestStripBasicAuth.test_having_port.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_TestStripBasicAuth_TestStripBasicAuth.test_having_port.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 361, "end_line": 383, "span_ids": ["TestStripBasicAuth", "TestStripBasicAuth.test_having_port", "TestStripBasicAuth.test_no_auth", "TestStripBasicAuth.test_auth_stripped"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestStripBasicAuth(unittest.TestCase):\n \"\"\"Tests for sphinx.ext.intersphinx._strip_basic_auth()\"\"\"\n def test_auth_stripped(self):\n \"\"\"basic auth creds stripped from URL containing creds\"\"\"\n url = 'https://user:12345@domain.com/project/objects.inv'\n expected = 'https://domain.com/project/objects.inv'\n actual = _strip_basic_auth(url)\n self.assertEqual(expected, actual)\n\n def test_no_auth(self):\n \"\"\"url unchanged if param doesn't contain basic auth creds\"\"\"\n url = 'https://domain.com/project/objects.inv'\n expected = 'https://domain.com/project/objects.inv'\n actual = _strip_basic_auth(url)\n self.assertEqual(expected, actual)\n\n def test_having_port(self):\n \"\"\"basic auth creds correctly stripped from URL containing creds even if URL\n contains port\"\"\"\n url = 'https://user:12345@domain.com:8080/project/objects.inv'\n expected = 'https://domain.com:8080/project/objects.inv'\n actual = _strip_basic_auth(url)\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_getsafeurl_authed_test_inspect_main_file.assert_stderr_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_getsafeurl_authed_test_inspect_main_file.assert_stderr_", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 386, "end_line": 433, "span_ids": ["test_getsafeurl_authed_having_port", "test_inspect_main_file", "test_getsafeurl_unauthed", "test_getsafeurl_authed", "test_inspect_main_noargs"], "tokens": 379}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_getsafeurl_authed():\n \"\"\"_get_safe_url() with a url with basic auth\"\"\"\n url = 'https://user:12345@domain.com/project/objects.inv'\n expected = 'https://user@domain.com/project/objects.inv'\n actual = _get_safe_url(url)\n assert expected == actual\n\n\ndef test_getsafeurl_authed_having_port():\n \"\"\"_get_safe_url() with a url with basic auth having port\"\"\"\n url = 'https://user:12345@domain.com:8080/project/objects.inv'\n expected = 'https://user@domain.com:8080/project/objects.inv'\n actual = _get_safe_url(url)\n assert expected == actual\n\n\ndef test_getsafeurl_unauthed():\n \"\"\"_get_safe_url() with a url without basic auth\"\"\"\n url = 'https://domain.com/project/objects.inv'\n expected = 'https://domain.com/project/objects.inv'\n actual = _get_safe_url(url)\n assert expected == actual\n\n\ndef test_inspect_main_noargs(capsys):\n \"\"\"inspect_main interface, without arguments\"\"\"\n with pytest.raises(SystemExit):\n inspect_main([])\n\n expected = (\n \"Print out an inventory file.\\n\"\n \"Error: must specify local path or URL to an inventory file.\"\n )\n stdout, stderr = capsys.readouterr()\n assert stdout == \"\"\n assert stderr == expected + \"\\n\"\n\n\ndef test_inspect_main_file(capsys, tempdir):\n \"\"\"inspect_main interface, with file argument\"\"\"\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(inventory_v2)\n\n inspect_main([str(inv_file)])\n\n stdout, stderr = capsys.readouterr()\n assert stdout.startswith(\"c:function\\n\")\n assert stderr == \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_imgmath_svg_test_imgmath_svg.assert_re_search_html_co": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_imgmath_svg_test_imgmath_svg.assert_re_search_html_co", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 63, "span_ids": ["test_imgmath_svg"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(not has_binary('dvisvgm'),\n reason='Requires dvisvgm\" binary')\n@pytest.mark.sphinx('html', testroot='ext-math-simple',\n confoverrides={'extensions': ['sphinx.ext.imgmath'],\n 'imgmath_image_format': 'svg'})\ndef test_imgmath_svg(app, status, warning):\n app.builder.build_all()\n if \"LaTeX command 'latex' cannot be run\" in warning.getvalue():\n raise pytest.skip.Exception('LaTeX command \"latex\" is not available')\n if \"dvisvgm command 'dvisvgm' cannot be run\" in warning.getvalue():\n raise pytest.skip.Exception('dvisvgm command \"dvisvgm\" is not available')\n\n content = (app.outdir / 'index.html').read_text()\n html = (r'<div class=\"math\">\\s*<p>\\s*<img src=\"_images/math/\\w+.svg\"'\n r'\\s*alt=\"a\\^2\\+b\\^2=c\\^2\"/>\\s*</p>\\s*</div>')\n assert re.search(html, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_options_test_mathjax_options.assert_script_async_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_options_test_mathjax_options.assert_script_async_a", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 68, "span_ids": ["test_mathjax_options"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax'],\n 'mathjax_options': {'integrity': 'sha384-0123456789'}})\ndef test_mathjax_options(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n assert ('<script async=\"async\" integrity=\"sha384-0123456789\" '\n 'src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js\">'\n '</script>' in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_align_test_mathjax_align.assert_re_search_html_co": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_align_test_mathjax_align.assert_re_search_html_co", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 78, "end_line": 87, "span_ids": ["test_mathjax_align"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax']})\ndef test_mathjax_align(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n html = (r'<div class=\"math notranslate nohighlight\">\\s*'\n r'\\\\\\[ \\\\begin\\{align\\}\\\\begin\\{aligned\\}S \\&= \\\\pi r\\^2\\\\\\\\'\n r'V \\&= \\\\frac\\{4\\}\\{3\\} \\\\pi r\\^3\\\\end\\{aligned\\}\\\\end\\{align\\} \\\\\\]</div>')\n assert re.search(html, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_number_all_mathjax_test_math_number_all_mathjax.assert_re_search_html_co": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_number_all_mathjax_test_math_number_all_mathjax.assert_re_search_html_co", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 90, "end_line": 99, "span_ids": ["test_math_number_all_mathjax"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'math_number_all': True,\n 'extensions': ['sphinx.ext.mathjax']})\ndef test_math_number_all_mathjax(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n html = (r'<div class=\"math notranslate nohighlight\" id=\"equation-index-0\">\\s*'\n r'<span class=\"eqno\">\\(1\\)<a .*>\\xb6</a></span>\\\\\\[a\\^2\\+b\\^2=c\\^2\\\\\\]</div>')\n assert re.search(html, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_number_all_latex_test_math_number_all_latex.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_number_all_latex_test_math_number_all_latex.None_4", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 102, "end_line": 128, "span_ids": ["test_math_number_all_latex"], "tokens": 350}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax']})\ndef test_math_number_all_latex(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'python.tex').read_text()\n macro = (r'\\\\begin{equation\\*}\\s*'\n r'\\\\begin{split}a\\^2\\+b\\^2=c\\^2\\\\end{split}\\s*'\n r'\\\\end{equation\\*}')\n assert re.search(macro, content, re.S)\n\n macro = r'Inline \\\\\\(E=mc\\^2\\\\\\)'\n assert re.search(macro, content, re.S)\n\n macro = (r'\\\\begin{equation\\*}\\s*'\n r'\\\\begin{split}e\\^{i\\\\pi}\\+1=0\\\\end{split}\\s+'\n r'\\\\end{equation\\*}')\n assert re.search(macro, content, re.S)\n\n macro = (r'\\\\begin{align\\*}\\\\!\\\\begin{aligned}\\s*'\n r'S &= \\\\pi r\\^2\\\\\\\\\\s*'\n r'V &= \\\\frac\\{4}\\{3} \\\\pi r\\^3\\\\\\\\\\s*'\n r'\\\\end{aligned}\\\\end{align\\*}')\n assert re.search(macro, content, re.S)\n\n macro = r'Referencing equation \\\\eqref{equation:math:foo}.'\n assert re.search(macro, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_eqref_format_html_test_math_eqref_format_html.assert_html_in_content": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_eqref_format_html_test_math_eqref_format_html.assert_html_in_content", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 131, "end_line": 141, "span_ids": ["test_math_eqref_format_html"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax'],\n 'math_eqref_format': 'Eq.{number}'})\ndef test_math_eqref_format_html(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'math.html').read_text()\n html = ('<p>Referencing equation <a class=\"reference internal\" '\n 'href=\"#equation-foo\">Eq.1</a> and <a class=\"reference internal\" '\n 'href=\"#equation-foo\">Eq.1</a>.</p>')\n assert html in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_eqref_format_latex_test_math_eqref_format_latex.assert_re_search_macro_c": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_eqref_format_latex_test_math_eqref_format_latex.assert_re_search_macro_c", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 144, "end_line": 153, "span_ids": ["test_math_eqref_format_latex"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax'],\n 'math_eqref_format': 'Eq.{number}'})\ndef test_math_eqref_format_latex(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'python.tex').read_text()\n macro = (r'Referencing equation Eq.\\\\ref{equation:math:foo} and '\n r'Eq.\\\\ref{equation:math:foo}.')\n assert re.search(macro, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_numfig_html_test_mathjax_numfig_html.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_numfig_html_test_mathjax_numfig_html.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 156, "end_line": 170, "span_ids": ["test_mathjax_numfig_html"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax'],\n 'numfig': True,\n 'math_numfig': True})\ndef test_mathjax_numfig_html(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'math.html').read_text()\n html = ('<div class=\"math notranslate nohighlight\" id=\"equation-math-0\">\\n'\n '<span class=\"eqno\">(1.2)')\n assert html in content\n html = ('<p>Referencing equation <a class=\"reference internal\" '\n 'href=\"#equation-foo\">(1.1)</a> and '\n '<a class=\"reference internal\" href=\"#equation-foo\">(1.1)</a>.</p>')\n assert html in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_imgmath_numfig_html_test_imgmath_numfig_html.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_imgmath_numfig_html_test_imgmath_numfig_html.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 173, "end_line": 187, "span_ids": ["test_imgmath_numfig_html"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.imgmath'],\n 'numfig': True,\n 'numfig_secnum_depth': 0,\n 'math_numfig': True})\ndef test_imgmath_numfig_html(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'page.html').read_text()\n html = '<span class=\"eqno\">(3)<a class=\"headerlink\" href=\"#equation-bar\"'\n assert html in content\n html = ('<p>Referencing equations <a class=\"reference internal\" '\n 'href=\"math.html#equation-foo\">(1)</a> and '\n '<a class=\"reference internal\" href=\"#equation-bar\">(3)</a>.</p>')\n assert html in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_compat_test_math_compat.with_warnings_catch_warni.assert_node_doctree_0_2_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_math_compat_test_math_compat.with_warnings_catch_warni.assert_node_doctree_0_2_", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 190, "end_line": 212, "span_ids": ["test_math_compat"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='ext-math-compat')\ndef test_math_compat(app, status, warning):\n with warnings.catch_warnings(record=True):\n app.builder.build_all()\n doctree = app.env.get_and_resolve_doctree('index', app.builder)\n\n assert_node(doctree,\n [nodes.document, nodes.section, (nodes.title,\n [nodes.section, (nodes.title,\n nodes.paragraph)],\n nodes.section)])\n assert_node(doctree[0][1][1],\n ('Inline: ',\n [nodes.math, \"E=mc^2\"],\n '\\nInline my math: ',\n [nodes.math, \"E = mc^2\"]))\n assert_node(doctree[0][2],\n ([nodes.title, \"block\"],\n [nodes.math_block, \"a^2+b^2=c^2\\n\\n\"],\n [nodes.paragraph, \"Second math\"],\n [nodes.math_block, \"e^{i\\\\pi}+1=0\\n\\n\"],\n [nodes.paragraph, \"Multi math equations\"],\n [nodes.math_block, \"E = mc^2\"]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SetupTest_SetupTest.test_add_config_values.if_not_has_skip_member_.self_fail_autodoc_skip_m": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SetupTest_SetupTest.test_add_config_values.if_not_has_skip_member_.self_fail_autodoc_skip_m", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon.py", "file_name": "test_ext_napoleon.py", "file_type": "text/x-python", "category": "test", "start_line": 88, "end_line": 117, "span_ids": ["SetupTest", "SetupTest.test_add_config_values", "SetupTest.test_unknown_app_type"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SetupTest(TestCase):\n def test_unknown_app_type(self):\n setup(object())\n\n def test_add_config_values(self):\n app = mock.Mock(Sphinx)\n setup(app)\n for name in Config._config_values:\n has_config = False\n for method_name, args, _kwargs in app.method_calls:\n if(method_name == 'add_config_value' and\n args[0] == name):\n has_config = True\n if not has_config:\n self.fail('Config value was not added to app %s' % name)\n\n has_process_docstring = False\n has_skip_member = False\n for method_name, args, _kwargs in app.method_calls:\n if method_name == 'connect':\n if(args[0] == 'autodoc-process-docstring' and\n args[1] == _process_docstring):\n has_process_docstring = True\n elif(args[0] == 'autodoc-skip-member' and\n args[1] == _skip_member):\n has_skip_member = True\n if not has_process_docstring:\n self.fail('autodoc-process-docstring never connected')\n if not has_skip_member:\n self.fail('autodoc-skip-member never connected')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SkipMemberTest_SkipMemberTest.assertSkip.self_assertEqual_None__s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SkipMemberTest_SkipMemberTest.assertSkip.self_assertEqual_None__s", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon.py", "file_name": "test_ext_napoleon.py", "file_type": "text/x-python", "category": "test", "start_line": 129, "end_line": 143, "span_ids": ["SkipMemberTest", "SkipMemberTest.assertSkip"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SkipMemberTest(TestCase):\n def assertSkip(self, what, member, obj, expect_default_skip, config_name):\n skip = True\n app = mock.Mock()\n app.config = Config()\n setattr(app.config, config_name, True)\n if expect_default_skip:\n self.assertEqual(None, _skip_member(app, what, member, obj, skip,\n mock.Mock()))\n else:\n self.assertIs(_skip_member(app, what, member, obj, skip,\n mock.Mock()), False)\n setattr(app.config, config_name, False)\n self.assertEqual(None, _skip_member(app, what, member, obj, skip,\n mock.Mock()))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_InlineAttributeTest_InlineAttributeTest.test_class_data_member_inline_ref_in_type.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_InlineAttributeTest_InlineAttributeTest.test_class_data_member_inline_ref_in_type.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 74, "end_line": 121, "span_ids": ["InlineAttributeTest", "InlineAttributeTest.test_class_data_member_inline_no_type", "InlineAttributeTest.test_class_data_member", "InlineAttributeTest.test_class_data_member_inline", "InlineAttributeTest.test_class_data_member_inline_ref_in_type"], "tokens": 383}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InlineAttributeTest(BaseDocstringTest):\n\n def test_class_data_member(self):\n config = Config()\n docstring = dedent(\"\"\"\\\n data member description:\n\n - a: b\n \"\"\")\n actual = str(GoogleDocstring(docstring, config=config, app=None,\n what='attribute', name='some_data', obj=0))\n expected = dedent(\"\"\"\\\n data member description:\n\n - a: b\"\"\")\n\n self.assertEqual(expected, actual)\n\n def test_class_data_member_inline(self):\n config = Config()\n docstring = \"\"\"b: data member description with :ref:`reference`\"\"\"\n actual = str(GoogleDocstring(docstring, config=config, app=None,\n what='attribute', name='some_data', obj=0))\n expected = dedent(\"\"\"\\\n data member description with :ref:`reference`\n\n :type: b\"\"\")\n self.assertEqual(expected, actual)\n\n def test_class_data_member_inline_no_type(self):\n config = Config()\n docstring = \"\"\"data with ``a : in code`` and :ref:`reference` and no type\"\"\"\n actual = str(GoogleDocstring(docstring, config=config, app=None,\n what='attribute', name='some_data', obj=0))\n expected = \"\"\"data with ``a : in code`` and :ref:`reference` and no type\"\"\"\n\n self.assertEqual(expected, actual)\n\n def test_class_data_member_inline_ref_in_type(self):\n config = Config()\n docstring = \"\"\":class:`int`: data member description\"\"\"\n actual = str(GoogleDocstring(docstring, config=config, app=None,\n what='attribute', name='some_data', obj=0))\n expected = dedent(\"\"\"\\\n data member description\n\n :type: :class:`int`\"\"\")\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest_GoogleDocstringTest.docstrings._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest_GoogleDocstringTest.docstrings._", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 129, "end_line": 361, "span_ids": ["GoogleDocstringTest"], "tokens": 1122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n docstrings = [(\n \"\"\"Single line summary\"\"\",\n \"\"\"Single line summary\"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Extended description\n\n \"\"\",\n \"\"\"\n Single line summary\n\n Extended description\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Args:\n arg1(str):Extended\n description of arg1\n \"\"\",\n \"\"\"\n Single line summary\n\n :Parameters: **arg1** (*str*) -- Extended\n description of arg1\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Args:\n arg1(str):Extended\n description of arg1\n arg2 ( int ) : Extended\n description of arg2\n\n Keyword Args:\n kwarg1(str):Extended\n description of kwarg1\n kwarg2 ( int ) : Extended\n description of kwarg2\"\"\",\n \"\"\"\n Single line summary\n\n :Parameters: * **arg1** (*str*) -- Extended\n description of arg1\n * **arg2** (*int*) -- Extended\n description of arg2\n\n :Keyword Arguments: * **kwarg1** (*str*) -- Extended\n description of kwarg1\n * **kwarg2** (*int*) -- Extended\n description of kwarg2\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Arguments:\n arg1(str):Extended\n description of arg1\n arg2 ( int ) : Extended\n description of arg2\n\n Keyword Arguments:\n kwarg1(str):Extended\n description of kwarg1\n kwarg2 ( int ) : Extended\n description of kwarg2\"\"\",\n \"\"\"\n Single line summary\n\n :Parameters: * **arg1** (*str*) -- Extended\n description of arg1\n * **arg2** (*int*) -- Extended\n description of arg2\n\n :Keyword Arguments: * **kwarg1** (*str*) -- Extended\n description of kwarg1\n * **kwarg2** (*int*) -- Extended\n description of kwarg2\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Return:\n str:Extended\n description of return value\n \"\"\",\n \"\"\"\n Single line summary\n\n :returns: *str* -- Extended\n description of return value\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Returns:\n str:Extended\n description of return value\n \"\"\",\n \"\"\"\n Single line summary\n\n :returns: *str* -- Extended\n description of return value\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Returns:\n Extended\n description of return value\n \"\"\",\n \"\"\"\n Single line summary\n\n :returns: Extended\n description of return value\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Returns:\n Extended\n \"\"\",\n \"\"\"\n Single line summary\n\n :returns: Extended\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Args:\n arg1(str):Extended\n description of arg1\n *args: Variable length argument list.\n **kwargs: Arbitrary keyword arguments.\n \"\"\",\n \"\"\"\n Single line summary\n\n :Parameters: * **arg1** (*str*) -- Extended\n description of arg1\n * **\\\\*args** -- Variable length argument list.\n * **\\\\*\\\\*kwargs** -- Arbitrary keyword arguments.\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Args:\n arg1 (list(int)): Description\n arg2 (list[int]): Description\n arg3 (dict(str, int)): Description\n arg4 (dict[str, int]): Description\n \"\"\",\n \"\"\"\n Single line summary\n\n :Parameters: * **arg1** (*list(int)*) -- Description\n * **arg2** (*list[int]*) -- Description\n * **arg3** (*dict(str, int)*) -- Description\n * **arg4** (*dict[str, int]*) -- Description\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Receive:\n arg1 (list(int)): Description\n arg2 (list[int]): Description\n \"\"\",\n \"\"\"\n Single line summary\n\n :Receives: * **arg1** (*list(int)*) -- Description\n * **arg2** (*list[int]*) -- Description\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Receives:\n arg1 (list(int)): Description\n arg2 (list[int]): Description\n \"\"\",\n \"\"\"\n Single line summary\n\n :Receives: * **arg1** (*list(int)*) -- Description\n * **arg2** (*list[int]*) -- Description\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Yield:\n str:Extended\n description of yielded value\n \"\"\",\n \"\"\"\n Single line summary\n\n :Yields: *str* -- Extended\n description of yielded value\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Yields:\n Extended\n description of yielded value\n \"\"\",\n \"\"\"\n Single line summary\n\n :Yields: Extended\n description of yielded value\n \"\"\"\n )]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_sphinx_admonitions_GoogleDocstringTest.test_sphinx_admonitions.for_section_admonition_i.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_sphinx_admonitions_GoogleDocstringTest.test_sphinx_admonitions.for_section_admonition_i.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 318, "end_line": 354, "span_ids": ["GoogleDocstringTest.test_sphinx_admonitions"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_sphinx_admonitions(self):\n admonition_map = {\n 'Attention': 'attention',\n 'Caution': 'caution',\n 'Danger': 'danger',\n 'Error': 'error',\n 'Hint': 'hint',\n 'Important': 'important',\n 'Note': 'note',\n 'Tip': 'tip',\n 'Todo': 'todo',\n 'Warning': 'warning',\n 'Warnings': 'warning',\n }\n config = Config()\n for section, admonition in admonition_map.items():\n # Multiline\n actual = str(GoogleDocstring((\"{}:\\n\"\n \" this is the first line\\n\"\n \"\\n\"\n \" and this is the second line\\n\"\n ).format(section), config))\n expect = (\".. {}::\\n\"\n \"\\n\"\n \" this is the first line\\n\"\n \" \\n\"\n \" and this is the second line\\n\"\n ).format(admonition)\n self.assertEqual(expect, actual)\n\n # Single line\n actual = str(GoogleDocstring((\"{}:\\n\"\n \" this is a single line\\n\"\n ).format(section), config))\n expect = (\".. {}:: this is a single line\\n\"\n ).format(admonition)\n self.assertEqual(expect, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_docstrings_GoogleDocstringTest.test_parameters_with_class_reference.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_docstrings_GoogleDocstringTest.test_parameters_with_class_reference.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 356, "end_line": 401, "span_ids": ["GoogleDocstringTest.test_docstrings", "GoogleDocstringTest.test_parameters_with_class_reference"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_docstrings(self):\n config = Config(\n napoleon_use_param=False,\n napoleon_use_rtype=False,\n napoleon_use_keyword=False\n )\n for docstring, expected in self.docstrings:\n actual = str(GoogleDocstring(dedent(docstring), config))\n expected = dedent(expected)\n self.assertEqual(expected, actual)\n\n def test_parameters_with_class_reference(self):\n docstring = \"\"\"\\\nConstruct a new XBlock.\n\nThis class should only be used by runtimes.\n\nArguments:\n runtime (:class:`~typing.Dict`\\\\[:class:`int`,:class:`str`\\\\]): Use it to\n access the environment. It is available in XBlock code\n as ``self.runtime``.\n\n field_data (:class:`FieldData`): Interface used by the XBlock\n fields to access their data from wherever it is persisted.\n\n scope_ids (:class:`ScopeIds`): Identifiers needed to resolve scopes.\n\n\"\"\"\n\n actual = str(GoogleDocstring(docstring))\n expected = \"\"\"\\\nConstruct a new XBlock.\n\nThis class should only be used by runtimes.\n\n:param runtime: Use it to\n access the environment. It is available in XBlock code\n as ``self.runtime``.\n:type runtime: :class:`~typing.Dict`\\\\[:class:`int`,:class:`str`\\\\]\n:param field_data: Interface used by the XBlock\n fields to access their data from wherever it is persisted.\n:type field_data: :class:`FieldData`\n:param scope_ids: Identifiers needed to resolve scopes.\n:type scope_ids: :class:`ScopeIds`\n\"\"\"\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_xrefs_in_return_type_GoogleDocstringTest.test_xrefs_in_return_type.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_xrefs_in_return_type_GoogleDocstringTest.test_xrefs_in_return_type.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 468, "end_line": 482, "span_ids": ["GoogleDocstringTest.test_xrefs_in_return_type"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_xrefs_in_return_type(self):\n docstring = \"\"\"Example Function\n\nReturns:\n :class:`numpy.ndarray`: A :math:`n \\\\times 2` array containing\n a bunch of math items\n\"\"\"\n expected = \"\"\"Example Function\n\n:returns: A :math:`n \\\\times 2` array containing\n a bunch of math items\n:rtype: :class:`numpy.ndarray`\n\"\"\"\n actual = str(GoogleDocstring(docstring))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_raises_types_GoogleDocstringTest.test_raises_types.for_docstring_expected_i.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_raises_types_GoogleDocstringTest.test_raises_types.for_docstring_expected_i.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 484, "end_line": 652, "span_ids": ["GoogleDocstringTest.test_raises_types"], "tokens": 727}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_raises_types(self):\n docstrings = [(\"\"\"\nExample Function\n\nRaises:\n RuntimeError:\n A setting wasn't specified, or was invalid.\n ValueError:\n Something something value error.\n :py:class:`AttributeError`\n errors for missing attributes.\n ~InvalidDimensionsError\n If the dimensions couldn't be parsed.\n `InvalidArgumentsError`\n If the arguments are invalid.\n :exc:`~ValueError`\n If the arguments are wrong.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises RuntimeError: A setting wasn't specified, or was invalid.\n:raises ValueError: Something something value error.\n:raises AttributeError: errors for missing attributes.\n:raises ~InvalidDimensionsError: If the dimensions couldn't be parsed.\n:raises InvalidArgumentsError: If the arguments are invalid.\n:raises ~ValueError: If the arguments are wrong.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n InvalidDimensionsError\n\n\"\"\", \"\"\"\nExample Function\n\n:raises InvalidDimensionsError:\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n Invalid Dimensions Error\n\n\"\"\", \"\"\"\nExample Function\n\n:raises Invalid Dimensions Error:\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n Invalid Dimensions Error: With description\n\n\"\"\", \"\"\"\nExample Function\n\n:raises Invalid Dimensions Error: With description\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n InvalidDimensionsError: If the dimensions couldn't be parsed.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises InvalidDimensionsError: If the dimensions couldn't be parsed.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n Invalid Dimensions Error: If the dimensions couldn't be parsed.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises Invalid Dimensions Error: If the dimensions couldn't be parsed.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n If the dimensions couldn't be parsed.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises If the dimensions couldn't be parsed.:\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n :class:`exc.InvalidDimensionsError`\n\n\"\"\", \"\"\"\nExample Function\n\n:raises exc.InvalidDimensionsError:\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n :class:`exc.InvalidDimensionsError`: If the dimensions couldn't be parsed.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises exc.InvalidDimensionsError: If the dimensions couldn't be parsed.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n :class:`exc.InvalidDimensionsError`: If the dimensions couldn't be parsed,\n then a :class:`exc.InvalidDimensionsError` will be raised.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises exc.InvalidDimensionsError: If the dimensions couldn't be parsed,\n then a :class:`exc.InvalidDimensionsError` will be raised.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n :class:`exc.InvalidDimensionsError`: If the dimensions couldn't be parsed.\n :class:`exc.InvalidArgumentsError`: If the arguments are invalid.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises exc.InvalidDimensionsError: If the dimensions couldn't be parsed.\n:raises exc.InvalidArgumentsError: If the arguments are invalid.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises:\n :class:`exc.InvalidDimensionsError`\n :class:`exc.InvalidArgumentsError`\n\n\"\"\", \"\"\"\nExample Function\n\n:raises exc.InvalidDimensionsError:\n:raises exc.InvalidArgumentsError:\n\"\"\")]\n for docstring, expected in docstrings:\n actual = str(GoogleDocstring(docstring))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_kwargs_in_arguments_GoogleDocstringTest.test_kwargs_in_arguments.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_kwargs_in_arguments_GoogleDocstringTest.test_kwargs_in_arguments.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 654, "end_line": 683, "span_ids": ["GoogleDocstringTest.test_kwargs_in_arguments"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_kwargs_in_arguments(self):\n docstring = \"\"\"Allows to create attributes binded to this device.\n\nSome other paragraph.\n\nCode sample for usage::\n\n dev.bind(loopback=Loopback)\n dev.loopback.configure()\n\nArguments:\n **kwargs: name/class pairs that will create resource-managers\n bound as instance attributes to this instance. See code\n example above.\n\"\"\"\n expected = \"\"\"Allows to create attributes binded to this device.\n\nSome other paragraph.\n\nCode sample for usage::\n\n dev.bind(loopback=Loopback)\n dev.loopback.configure()\n\n:param \\\\*\\\\*kwargs: name/class pairs that will create resource-managers\n bound as instance attributes to this instance. See code\n example above.\n\"\"\"\n actual = str(GoogleDocstring(docstring))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_section_header_formatting_GoogleDocstringTest.test_section_header_formatting.for_docstring_expected_i.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_section_header_formatting_GoogleDocstringTest.test_section_header_formatting.for_docstring_expected_i.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 685, "end_line": 737, "span_ids": ["GoogleDocstringTest.test_section_header_formatting"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_section_header_formatting(self):\n docstrings = [(\"\"\"\nSummary line\n\nExample:\n Multiline reStructuredText\n literal code block\n\n\"\"\", \"\"\"\nSummary line\n\n.. rubric:: Example\n\nMultiline reStructuredText\nliteral code block\n\"\"\"),\n ################################\n (\"\"\"\nSummary line\n\nExample::\n\n Multiline reStructuredText\n literal code block\n\n\"\"\", \"\"\"\nSummary line\n\nExample::\n\n Multiline reStructuredText\n literal code block\n\"\"\"),\n ################################\n (\"\"\"\nSummary line\n\n:Example:\n\n Multiline reStructuredText\n literal code block\n\n\"\"\", \"\"\"\nSummary line\n\n:Example:\n\n Multiline reStructuredText\n literal code block\n\"\"\")]\n for docstring, expected in docstrings:\n actual = str(GoogleDocstring(docstring))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_list_in_parameter_description_GoogleDocstringTest.test_list_in_parameter_description.docstring._One_line_summary_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_list_in_parameter_description_GoogleDocstringTest.test_list_in_parameter_description.docstring._One_line_summary_", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 739, "end_line": 821, "span_ids": ["GoogleDocstringTest.test_list_in_parameter_description"], "tokens": 412}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_list_in_parameter_description(self):\n docstring = \"\"\"One line summary.\n\nParameters:\n no_list (int):\n one_bullet_empty (int):\n *\n one_bullet_single_line (int):\n - first line\n one_bullet_two_lines (int):\n + first line\n continued\n two_bullets_single_line (int):\n - first line\n - second line\n two_bullets_two_lines (int):\n * first line\n continued\n * second line\n continued\n one_enumeration_single_line (int):\n 1. first line\n one_enumeration_two_lines (int):\n 1) first line\n continued\n two_enumerations_one_line (int):\n (iii) first line\n (iv) second line\n two_enumerations_two_lines (int):\n a. first line\n continued\n b. second line\n continued\n one_definition_one_line (int):\n item 1\n first line\n one_definition_two_lines (int):\n item 1\n first line\n continued\n two_definitions_one_line (int):\n item 1\n first line\n item 2\n second line\n two_definitions_two_lines (int):\n item 1\n first line\n continued\n item 2\n second line\n continued\n one_definition_blank_line (int):\n item 1\n\n first line\n\n extra first line\n\n two_definitions_blank_lines (int):\n item 1\n\n first line\n\n extra first line\n\n item 2\n\n second line\n\n extra second line\n\n definition_after_inline_text (int): text line\n\n item 1\n first line\n\n definition_after_normal_text (int):\n text line\n\n item 1\n first line\n\"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_list_in_parameter_description.expected_GoogleDocstringTest.test_list_in_parameter_description.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_list_in_parameter_description.expected_GoogleDocstringTest.test_list_in_parameter_description.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 823, "end_line": 920, "span_ids": ["GoogleDocstringTest.test_list_in_parameter_description"], "tokens": 560}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_list_in_parameter_description(self):\n # ... other code\n\n expected = \"\"\"One line summary.\n\n:param no_list:\n:type no_list: int\n:param one_bullet_empty:\n *\n:type one_bullet_empty: int\n:param one_bullet_single_line:\n - first line\n:type one_bullet_single_line: int\n:param one_bullet_two_lines:\n + first line\n continued\n:type one_bullet_two_lines: int\n:param two_bullets_single_line:\n - first line\n - second line\n:type two_bullets_single_line: int\n:param two_bullets_two_lines:\n * first line\n continued\n * second line\n continued\n:type two_bullets_two_lines: int\n:param one_enumeration_single_line:\n 1. first line\n:type one_enumeration_single_line: int\n:param one_enumeration_two_lines:\n 1) first line\n continued\n:type one_enumeration_two_lines: int\n:param two_enumerations_one_line:\n (iii) first line\n (iv) second line\n:type two_enumerations_one_line: int\n:param two_enumerations_two_lines:\n a. first line\n continued\n b. second line\n continued\n:type two_enumerations_two_lines: int\n:param one_definition_one_line:\n item 1\n first line\n:type one_definition_one_line: int\n:param one_definition_two_lines:\n item 1\n first line\n continued\n:type one_definition_two_lines: int\n:param two_definitions_one_line:\n item 1\n first line\n item 2\n second line\n:type two_definitions_one_line: int\n:param two_definitions_two_lines:\n item 1\n first line\n continued\n item 2\n second line\n continued\n:type two_definitions_two_lines: int\n:param one_definition_blank_line:\n item 1\n\n first line\n\n extra first line\n:type one_definition_blank_line: int\n:param two_definitions_blank_lines:\n item 1\n\n first line\n\n extra first line\n\n item 2\n\n second line\n\n extra second line\n:type two_definitions_blank_lines: int\n:param definition_after_inline_text: text line\n\n item 1\n first line\n:type definition_after_inline_text: int\n:param definition_after_normal_text: text line\n\n item 1\n first line\n:type definition_after_normal_text: int\n\"\"\"\n config = Config(napoleon_use_param=True)\n actual = str(GoogleDocstring(docstring, config))\n self.assertEqual(expected, actual)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_list_in_parameter_description.expected_4_GoogleDocstringTest.test_list_in_parameter_description.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_list_in_parameter_description.expected_4_GoogleDocstringTest.test_list_in_parameter_description.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 922, "end_line": 1016, "span_ids": ["GoogleDocstringTest.test_list_in_parameter_description"], "tokens": 513}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_list_in_parameter_description(self):\n # ... other code\n\n expected = \"\"\"One line summary.\n\n:Parameters: * **no_list** (*int*)\n * **one_bullet_empty** (*int*) --\n\n *\n * **one_bullet_single_line** (*int*) --\n\n - first line\n * **one_bullet_two_lines** (*int*) --\n\n + first line\n continued\n * **two_bullets_single_line** (*int*) --\n\n - first line\n - second line\n * **two_bullets_two_lines** (*int*) --\n\n * first line\n continued\n * second line\n continued\n * **one_enumeration_single_line** (*int*) --\n\n 1. first line\n * **one_enumeration_two_lines** (*int*) --\n\n 1) first line\n continued\n * **two_enumerations_one_line** (*int*) --\n\n (iii) first line\n (iv) second line\n * **two_enumerations_two_lines** (*int*) --\n\n a. first line\n continued\n b. second line\n continued\n * **one_definition_one_line** (*int*) --\n\n item 1\n first line\n * **one_definition_two_lines** (*int*) --\n\n item 1\n first line\n continued\n * **two_definitions_one_line** (*int*) --\n\n item 1\n first line\n item 2\n second line\n * **two_definitions_two_lines** (*int*) --\n\n item 1\n first line\n continued\n item 2\n second line\n continued\n * **one_definition_blank_line** (*int*) --\n\n item 1\n\n first line\n\n extra first line\n * **two_definitions_blank_lines** (*int*) --\n\n item 1\n\n first line\n\n extra first line\n\n item 2\n\n second line\n\n extra second line\n * **definition_after_inline_text** (*int*) -- text line\n\n item 1\n first line\n * **definition_after_normal_text** (*int*) -- text line\n\n item 1\n first line\n\"\"\"\n config = Config(napoleon_use_param=False)\n actual = str(GoogleDocstring(docstring, config))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_custom_generic_sections_GoogleDocstringTest.test_custom_generic_sections.for_docstring_expected_i.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_custom_generic_sections_GoogleDocstringTest.test_custom_generic_sections.for_docstring_expected_i.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1062, "end_line": 1099, "span_ids": ["GoogleDocstringTest.test_custom_generic_sections"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_custom_generic_sections(self):\n\n docstrings = ((\"\"\"\\\nReally Important Details:\n You should listen to me!\n\"\"\", \"\"\".. rubric:: Really Important Details\n\nYou should listen to me!\n\"\"\"),\n (\"\"\"\\\nSooper Warning:\n Stop hitting yourself!\n\"\"\", \"\"\":Warns: **Stop hitting yourself!**\n\"\"\"),\n (\"\"\"\\\nParams Style:\n arg1 (int): Description of arg1\n arg2 (str): Description of arg2\n\n\"\"\", \"\"\"\\\n:Params Style: * **arg1** (*int*) -- Description of arg1\n * **arg2** (*str*) -- Description of arg2\n\"\"\"),\n (\"\"\"\\\nReturns Style:\n description of custom section\n\n\"\"\", \"\"\":Returns Style: description of custom section\n\"\"\"))\n\n testConfig = Config(napoleon_custom_sections=['Really Important Details',\n ('Sooper Warning', 'warns'),\n ('Params Style', 'params_style'),\n ('Returns Style', 'returns_style')])\n\n for docstring, expected in docstrings:\n actual = str(GoogleDocstring(docstring, testConfig))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest_NumpyDocstringTest.docstrings._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest_NumpyDocstringTest.docstrings._", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1154, "end_line": 1364, "span_ids": ["NumpyDocstringTest"], "tokens": 954}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n docstrings = [(\n \"\"\"Single line summary\"\"\",\n \"\"\"Single line summary\"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Extended description\n\n \"\"\",\n \"\"\"\n Single line summary\n\n Extended description\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Parameters\n ----------\n arg1:str\n Extended\n description of arg1\n \"\"\",\n \"\"\"\n Single line summary\n\n :Parameters: **arg1** (:class:`str`) -- Extended\n description of arg1\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Parameters\n ----------\n arg1:str\n Extended\n description of arg1\n arg2 : int\n Extended\n description of arg2\n\n Keyword Arguments\n -----------------\n kwarg1:str\n Extended\n description of kwarg1\n kwarg2 : int\n Extended\n description of kwarg2\n \"\"\",\n \"\"\"\n Single line summary\n\n :Parameters: * **arg1** (:class:`str`) -- Extended\n description of arg1\n * **arg2** (:class:`int`) -- Extended\n description of arg2\n\n :Keyword Arguments: * **kwarg1** (:class:`str`) -- Extended\n description of kwarg1\n * **kwarg2** (:class:`int`) -- Extended\n description of kwarg2\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Return\n ------\n str\n Extended\n description of return value\n \"\"\",\n \"\"\"\n Single line summary\n\n :returns: :class:`str` -- Extended\n description of return value\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Returns\n -------\n str\n Extended\n description of return value\n \"\"\",\n \"\"\"\n Single line summary\n\n :returns: :class:`str` -- Extended\n description of return value\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Parameters\n ----------\n arg1:str\n Extended description of arg1\n *args:\n Variable length argument list.\n **kwargs:\n Arbitrary keyword arguments.\n \"\"\",\n \"\"\"\n Single line summary\n\n :Parameters: * **arg1** (:class:`str`) -- Extended description of arg1\n * **\\\\*args** -- Variable length argument list.\n * **\\\\*\\\\*kwargs** -- Arbitrary keyword arguments.\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Parameters\n ----------\n arg1:str\n Extended description of arg1\n *args, **kwargs:\n Variable length argument list and arbitrary keyword arguments.\n \"\"\",\n \"\"\"\n Single line summary\n\n :Parameters: * **arg1** (:class:`str`) -- Extended description of arg1\n * **\\\\*args, \\\\*\\\\*kwargs** -- Variable length argument list and arbitrary keyword arguments.\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Receive\n -------\n arg1:str\n Extended\n description of arg1\n arg2 : int\n Extended\n description of arg2\n \"\"\",\n \"\"\"\n Single line summary\n\n :Receives: * **arg1** (:class:`str`) -- Extended\n description of arg1\n * **arg2** (:class:`int`) -- Extended\n description of arg2\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Receives\n --------\n arg1:str\n Extended\n description of arg1\n arg2 : int\n Extended\n description of arg2\n \"\"\",\n \"\"\"\n Single line summary\n\n :Receives: * **arg1** (:class:`str`) -- Extended\n description of arg1\n * **arg2** (:class:`int`) -- Extended\n description of arg2\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Yield\n -----\n str\n Extended\n description of yielded value\n \"\"\",\n \"\"\"\n Single line summary\n\n :Yields: :class:`str` -- Extended\n description of yielded value\n \"\"\"\n ), (\n \"\"\"\n Single line summary\n\n Yields\n ------\n str\n Extended\n description of yielded value\n \"\"\",\n \"\"\"\n Single line summary\n\n :Yields: :class:`str` -- Extended\n description of yielded value\n \"\"\"\n )]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_sphinx_admonitions_NumpyDocstringTest.test_sphinx_admonitions.for_section_admonition_i.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_sphinx_admonitions_NumpyDocstringTest.test_sphinx_admonitions.for_section_admonition_i.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1222, "end_line": 1260, "span_ids": ["NumpyDocstringTest.test_sphinx_admonitions"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_sphinx_admonitions(self):\n admonition_map = {\n 'Attention': 'attention',\n 'Caution': 'caution',\n 'Danger': 'danger',\n 'Error': 'error',\n 'Hint': 'hint',\n 'Important': 'important',\n 'Note': 'note',\n 'Tip': 'tip',\n 'Todo': 'todo',\n 'Warning': 'warning',\n 'Warnings': 'warning',\n }\n config = Config()\n for section, admonition in admonition_map.items():\n # Multiline\n actual = str(NumpyDocstring((\"{}\\n\"\n \"{}\\n\"\n \" this is the first line\\n\"\n \"\\n\"\n \" and this is the second line\\n\"\n ).format(section, '-' * len(section)), config))\n expect = (\".. {}::\\n\"\n \"\\n\"\n \" this is the first line\\n\"\n \" \\n\"\n \" and this is the second line\\n\"\n ).format(admonition)\n self.assertEqual(expect, actual)\n\n # Single line\n actual = str(NumpyDocstring((\"{}\\n\"\n \"{}\\n\"\n \" this is a single line\\n\"\n ).format(section, '-' * len(section)), config))\n expect = (\".. {}:: this is a single line\\n\"\n ).format(admonition)\n self.assertEqual(expect, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_parameters_without_class_reference_NumpyDocstringTest.test_parameters_without_class_reference.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_parameters_without_class_reference_NumpyDocstringTest.test_parameters_without_class_reference.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1295, "end_line": 1316, "span_ids": ["NumpyDocstringTest.test_parameters_without_class_reference"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_parameters_without_class_reference(self):\n docstring = \"\"\"\\\nParameters\n----------\nparam1 : MyClass instance\n\n\"\"\"\n\n config = Config(napoleon_use_param=False)\n actual = str(NumpyDocstring(docstring, config))\n expected = \"\"\"\\\n:Parameters: **param1** (*MyClass instance*)\n\"\"\"\n self.assertEqual(expected, actual)\n\n config = Config(napoleon_use_param=True)\n actual = str(NumpyDocstring(dedent(docstring), config))\n expected = \"\"\"\\\n:param param1:\n:type param1: MyClass instance\n\"\"\"\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_raises_types_NumpyDocstringTest.test_raises_types.for_docstring_expected_i.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_raises_types_NumpyDocstringTest.test_raises_types.for_docstring_expected_i.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1600, "end_line": 1811, "span_ids": ["NumpyDocstringTest.test_raises_types"], "tokens": 779}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_raises_types(self):\n docstrings = [(\"\"\"\nExample Function\n\nRaises\n------\n RuntimeError\n\n A setting wasn't specified, or was invalid.\n ValueError\n\n Something something value error.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises RuntimeError: A setting wasn't specified, or was invalid.\n:raises ValueError: Something something value error.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\nInvalidDimensionsError\n\n\"\"\", \"\"\"\nExample Function\n\n:raises InvalidDimensionsError:\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\nInvalid Dimensions Error\n\n\"\"\", \"\"\"\nExample Function\n\n:raises Invalid Dimensions Error:\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\nInvalid Dimensions Error\n With description\n\n\"\"\", \"\"\"\nExample Function\n\n:raises Invalid Dimensions Error: With description\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\nInvalidDimensionsError\n If the dimensions couldn't be parsed.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises InvalidDimensionsError: If the dimensions couldn't be parsed.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\nInvalid Dimensions Error\n If the dimensions couldn't be parsed.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises Invalid Dimensions Error: If the dimensions couldn't be parsed.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\nIf the dimensions couldn't be parsed.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises If the dimensions couldn't be parsed.:\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\n:class:`exc.InvalidDimensionsError`\n\n\"\"\", \"\"\"\nExample Function\n\n:raises exc.InvalidDimensionsError:\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\n:class:`exc.InvalidDimensionsError`\n If the dimensions couldn't be parsed.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises exc.InvalidDimensionsError: If the dimensions couldn't be parsed.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\n:class:`exc.InvalidDimensionsError`\n If the dimensions couldn't be parsed,\n then a :class:`exc.InvalidDimensionsError` will be raised.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises exc.InvalidDimensionsError: If the dimensions couldn't be parsed,\n then a :class:`exc.InvalidDimensionsError` will be raised.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\n:class:`exc.InvalidDimensionsError`\n If the dimensions couldn't be parsed.\n:class:`exc.InvalidArgumentsError`\n If the arguments are invalid.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises exc.InvalidDimensionsError: If the dimensions couldn't be parsed.\n:raises exc.InvalidArgumentsError: If the arguments are invalid.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\nCustomError\n If the dimensions couldn't be parsed.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises package.CustomError: If the dimensions couldn't be parsed.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\nAnotherError\n If the dimensions couldn't be parsed.\n\n\"\"\", \"\"\"\nExample Function\n\n:raises ~package.AnotherError: If the dimensions couldn't be parsed.\n\"\"\"),\n ################################\n (\"\"\"\nExample Function\n\nRaises\n------\n:class:`exc.InvalidDimensionsError`\n:class:`exc.InvalidArgumentsError`\n\n\"\"\", \"\"\"\nExample Function\n\n:raises exc.InvalidDimensionsError:\n:raises exc.InvalidArgumentsError:\n\"\"\")]\n for docstring, expected in docstrings:\n translations = {\n \"CustomError\": \"package.CustomError\",\n \"AnotherError\": \":py:exc:`~package.AnotherError`\",\n }\n config = Config(napoleon_type_aliases=translations, napoleon_preprocess_types=True)\n app = mock.Mock()\n actual = str(NumpyDocstring(docstring, config, app, \"method\"))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_xrefs_in_return_type_NumpyDocstringTest.test_xrefs_in_return_type.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_xrefs_in_return_type_NumpyDocstringTest.test_xrefs_in_return_type.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1593, "end_line": 1613, "span_ids": ["NumpyDocstringTest.test_xrefs_in_return_type"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_xrefs_in_return_type(self):\n docstring = \"\"\"\nExample Function\n\nReturns\n-------\n:class:`numpy.ndarray`\n A :math:`n \\\\times 2` array containing\n a bunch of math items\n\"\"\"\n expected = \"\"\"\nExample Function\n\n:returns: A :math:`n \\\\times 2` array containing\n a bunch of math items\n:rtype: :class:`numpy.ndarray`\n\"\"\"\n config = Config()\n app = mock.Mock()\n actual = str(NumpyDocstring(docstring, config, app, \"method\"))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_section_header_underline_length_NumpyDocstringTest.test_section_header_underline_length.for_docstring_expected_i.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_section_header_underline_length_NumpyDocstringTest.test_section_header_underline_length.for_docstring_expected_i.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1615, "end_line": 1685, "span_ids": ["NumpyDocstringTest.test_section_header_underline_length"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_section_header_underline_length(self):\n docstrings = [(\"\"\"\nSummary line\n\nExample\n-\nMultiline example\nbody\n\n\"\"\", \"\"\"\nSummary line\n\nExample\n-\nMultiline example\nbody\n\"\"\"),\n ################################\n (\"\"\"\nSummary line\n\nExample\n--\nMultiline example\nbody\n\n\"\"\", \"\"\"\nSummary line\n\n.. rubric:: Example\n\nMultiline example\nbody\n\"\"\"),\n ################################\n (\"\"\"\nSummary line\n\nExample\n-------\nMultiline example\nbody\n\n\"\"\", \"\"\"\nSummary line\n\n.. rubric:: Example\n\nMultiline example\nbody\n\"\"\"),\n ################################\n (\"\"\"\nSummary line\n\nExample\n------------\nMultiline example\nbody\n\n\"\"\", \"\"\"\nSummary line\n\n.. rubric:: Example\n\nMultiline example\nbody\n\"\"\")]\n for docstring, expected in docstrings:\n actual = str(NumpyDocstring(docstring))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_list_in_parameter_description_NumpyDocstringTest.test_list_in_parameter_description.docstring._One_line_summary_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_list_in_parameter_description_NumpyDocstringTest.test_list_in_parameter_description.docstring._One_line_summary_", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1687, "end_line": 1765, "span_ids": ["NumpyDocstringTest.test_list_in_parameter_description"], "tokens": 377}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_list_in_parameter_description(self):\n docstring = \"\"\"One line summary.\n\nParameters\n----------\nno_list : int\none_bullet_empty : int\n *\none_bullet_single_line : int\n - first line\none_bullet_two_lines : int\n + first line\n continued\ntwo_bullets_single_line : int\n - first line\n - second line\ntwo_bullets_two_lines : int\n * first line\n continued\n * second line\n continued\none_enumeration_single_line : int\n 1. first line\none_enumeration_two_lines : int\n 1) first line\n continued\ntwo_enumerations_one_line : int\n (iii) first line\n (iv) second line\ntwo_enumerations_two_lines : int\n a. first line\n continued\n b. second line\n continued\none_definition_one_line : int\n item 1\n first line\none_definition_two_lines : int\n item 1\n first line\n continued\ntwo_definitions_one_line : int\n item 1\n first line\n item 2\n second line\ntwo_definitions_two_lines : int\n item 1\n first line\n continued\n item 2\n second line\n continued\none_definition_blank_line : int\n item 1\n\n first line\n\n extra first line\n\ntwo_definitions_blank_lines : int\n item 1\n\n first line\n\n extra first line\n\n item 2\n\n second line\n\n extra second line\n\ndefinition_after_normal_text : int\n text line\n\n item 1\n first line\n\"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_list_in_parameter_description.expected_NumpyDocstringTest.test_list_in_parameter_description.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_list_in_parameter_description.expected_NumpyDocstringTest.test_list_in_parameter_description.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1767, "end_line": 1859, "span_ids": ["NumpyDocstringTest.test_list_in_parameter_description"], "tokens": 535}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_list_in_parameter_description(self):\n # ... other code\n\n expected = \"\"\"One line summary.\n\n:param no_list:\n:type no_list: int\n:param one_bullet_empty:\n *\n:type one_bullet_empty: int\n:param one_bullet_single_line:\n - first line\n:type one_bullet_single_line: int\n:param one_bullet_two_lines:\n + first line\n continued\n:type one_bullet_two_lines: int\n:param two_bullets_single_line:\n - first line\n - second line\n:type two_bullets_single_line: int\n:param two_bullets_two_lines:\n * first line\n continued\n * second line\n continued\n:type two_bullets_two_lines: int\n:param one_enumeration_single_line:\n 1. first line\n:type one_enumeration_single_line: int\n:param one_enumeration_two_lines:\n 1) first line\n continued\n:type one_enumeration_two_lines: int\n:param two_enumerations_one_line:\n (iii) first line\n (iv) second line\n:type two_enumerations_one_line: int\n:param two_enumerations_two_lines:\n a. first line\n continued\n b. second line\n continued\n:type two_enumerations_two_lines: int\n:param one_definition_one_line:\n item 1\n first line\n:type one_definition_one_line: int\n:param one_definition_two_lines:\n item 1\n first line\n continued\n:type one_definition_two_lines: int\n:param two_definitions_one_line:\n item 1\n first line\n item 2\n second line\n:type two_definitions_one_line: int\n:param two_definitions_two_lines:\n item 1\n first line\n continued\n item 2\n second line\n continued\n:type two_definitions_two_lines: int\n:param one_definition_blank_line:\n item 1\n\n first line\n\n extra first line\n:type one_definition_blank_line: int\n:param two_definitions_blank_lines:\n item 1\n\n first line\n\n extra first line\n\n item 2\n\n second line\n\n extra second line\n:type two_definitions_blank_lines: int\n:param definition_after_normal_text: text line\n\n item 1\n first line\n:type definition_after_normal_text: int\n\"\"\"\n config = Config(napoleon_use_param=True)\n actual = str(NumpyDocstring(docstring, config))\n self.assertEqual(expected, actual)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest_PeekIterTest.test_iter.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest_PeekIterTest.test_iter.None_4", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 80, "span_ids": ["PeekIterTest.test_init_with_sentinel", "PeekIterTest", "PeekIterTest.test_iter"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PeekIterTest(BaseIteratorsTest):\n def test_init_with_sentinel(self):\n a = iter(['1', '2', 'DONE'])\n sentinel = 'DONE'\n self.assertRaises(TypeError, peek_iter, a, sentinel)\n\n def get_next():\n return next(a)\n it = peek_iter(get_next, sentinel)\n self.assertEqual(it.sentinel, sentinel)\n self.assertNext(it, '1', is_last=False)\n self.assertNext(it, '2', is_last=True)\n\n def test_iter(self):\n a = ['1', '2', '3']\n it = peek_iter(a)\n self.assertTrue(it is it.__iter__())\n\n a = []\n b = [i for i in peek_iter(a)]\n self.assertEqual([], b)\n\n a = ['1']\n b = [i for i in peek_iter(a)]\n self.assertEqual(['1'], b)\n\n a = ['1', '2']\n b = [i for i in peek_iter(a)]\n self.assertEqual(['1', '2'], b)\n\n a = ['1', '2', '3']\n b = [i for i in peek_iter(a)]\n self.assertEqual(['1', '2', '3'], b)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_multi_PeekIterTest.test_next_with_multi.None_19": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_multi_PeekIterTest.test_next_with_multi.None_19", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 82, "end_line": 116, "span_ids": ["PeekIterTest.test_next_with_multi"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PeekIterTest(BaseIteratorsTest):\n\n def test_next_with_multi(self):\n a = []\n it = peek_iter(a)\n self.assertFalseTwice(it.has_next)\n self.assertRaisesTwice(StopIteration, it.next, 2)\n\n a = ['1']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertRaisesTwice(StopIteration, it.next, 2)\n self.assertTrueTwice(it.has_next)\n\n a = ['1', '2']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqual(['1', '2'], it.next(2))\n self.assertFalseTwice(it.has_next)\n\n a = ['1', '2', '3']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqual(['1', '2'], it.next(2))\n self.assertTrueTwice(it.has_next)\n self.assertRaisesTwice(StopIteration, it.next, 2)\n self.assertTrueTwice(it.has_next)\n\n a = ['1', '2', '3', '4']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqual(['1', '2'], it.next(2))\n self.assertTrueTwice(it.has_next)\n self.assertEqual(['3', '4'], it.next(2))\n self.assertFalseTwice(it.has_next)\n self.assertRaisesTwice(StopIteration, it.next, 2)\n self.assertFalseTwice(it.has_next)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_none_PeekIterTest.test_next_with_none.self_assertNext_it_3_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_none_PeekIterTest.test_next_with_none.self_assertNext_it_3_", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 118, "end_line": 142, "span_ids": ["PeekIterTest.test_next_with_none"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PeekIterTest(BaseIteratorsTest):\n\n def test_next_with_none(self):\n a = []\n it = peek_iter(a)\n self.assertFalseTwice(it.has_next)\n self.assertRaisesTwice(StopIteration, it.next)\n self.assertFalseTwice(it.has_next)\n\n a = ['1']\n it = peek_iter(a)\n self.assertEqual('1', it.__next__())\n\n a = ['1']\n it = peek_iter(a)\n self.assertNext(it, '1', is_last=True)\n\n a = ['1', '2']\n it = peek_iter(a)\n self.assertNext(it, '1', is_last=False)\n self.assertNext(it, '2', is_last=True)\n\n a = ['1', '2', '3']\n it = peek_iter(a)\n self.assertNext(it, '1', is_last=False)\n self.assertNext(it, '2', is_last=False)\n self.assertNext(it, '3', is_last=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_one_PeekIterTest.test_next_with_one.None_11": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_one_PeekIterTest.test_next_with_one.None_11", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 144, "end_line": 164, "span_ids": ["PeekIterTest.test_next_with_one"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PeekIterTest(BaseIteratorsTest):\n\n def test_next_with_one(self):\n a = []\n it = peek_iter(a)\n self.assertFalseTwice(it.has_next)\n self.assertRaisesTwice(StopIteration, it.next, 1)\n\n a = ['1']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqual(['1'], it.next(1))\n self.assertFalseTwice(it.has_next)\n self.assertRaisesTwice(StopIteration, it.next, 1)\n\n a = ['1', '2']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqual(['1'], it.next(1))\n self.assertTrueTwice(it.has_next)\n self.assertEqual(['2'], it.next(1))\n self.assertFalseTwice(it.has_next)\n self.assertRaisesTwice(StopIteration, it.next, 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_zero_PeekIterTest.test_next_with_zero.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_next_with_zero_PeekIterTest.test_next_with_zero.None_9", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 166, "end_line": 184, "span_ids": ["PeekIterTest.test_next_with_zero"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PeekIterTest(BaseIteratorsTest):\n\n def test_next_with_zero(self):\n a = []\n it = peek_iter(a)\n self.assertFalseTwice(it.has_next)\n self.assertRaisesTwice(StopIteration, it.next, 0)\n\n a = ['1']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice([], it.next, 0)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice([], it.next, 0)\n\n a = ['1', '2']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice([], it.next, 0)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice([], it.next, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_multi_PeekIterTest.test_peek_with_multi.None_29": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_multi_PeekIterTest.test_peek_with_multi.None_29", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 186, "end_line": 227, "span_ids": ["PeekIterTest.test_peek_with_multi"], "tokens": 486}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PeekIterTest(BaseIteratorsTest):\n\n def test_peek_with_multi(self):\n a = []\n it = peek_iter(a)\n self.assertFalseTwice(it.has_next)\n self.assertEqualTwice([it.sentinel, it.sentinel], it.peek, 2)\n self.assertFalseTwice(it.has_next)\n\n a = ['1']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['1', it.sentinel], it.peek, 2)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['1', it.sentinel, it.sentinel], it.peek, 3)\n self.assertTrueTwice(it.has_next)\n\n a = ['1', '2']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['1', '2'], it.peek, 2)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['1', '2', it.sentinel], it.peek, 3)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['1', '2', it.sentinel, it.sentinel], it.peek, 4)\n self.assertTrueTwice(it.has_next)\n\n a = ['1', '2', '3']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['1', '2'], it.peek, 2)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['1', '2', '3'], it.peek, 3)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['1', '2', '3', it.sentinel], it.peek, 4)\n self.assertTrueTwice(it.has_next)\n self.assertEqual('1', next(it))\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['2', '3'], it.peek, 2)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['2', '3', it.sentinel], it.peek, 3)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['2', '3', it.sentinel, it.sentinel], it.peek, 4)\n self.assertTrueTwice(it.has_next)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_none_PeekIterTest.test_peek_with_none.None_17": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_none_PeekIterTest.test_peek_with_none.None_17", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 229, "end_line": 255, "span_ids": ["PeekIterTest.test_peek_with_none"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PeekIterTest(BaseIteratorsTest):\n\n def test_peek_with_none(self):\n a = []\n it = peek_iter(a)\n self.assertFalseTwice(it.has_next)\n self.assertEqualTwice(it.sentinel, it.peek)\n self.assertFalseTwice(it.has_next)\n\n a = ['1']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice('1', it.peek)\n self.assertEqual('1', next(it))\n self.assertFalseTwice(it.has_next)\n self.assertEqualTwice(it.sentinel, it.peek)\n self.assertFalseTwice(it.has_next)\n\n a = ['1', '2']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice('1', it.peek)\n self.assertEqual('1', next(it))\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice('2', it.peek)\n self.assertEqual('2', next(it))\n self.assertFalseTwice(it.has_next)\n self.assertEqualTwice(it.sentinel, it.peek)\n self.assertFalseTwice(it.has_next)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_one_PeekIterTest.test_peek_with_one.None_17": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_one_PeekIterTest.test_peek_with_one.None_17", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 257, "end_line": 283, "span_ids": ["PeekIterTest.test_peek_with_one"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PeekIterTest(BaseIteratorsTest):\n\n def test_peek_with_one(self):\n a = []\n it = peek_iter(a)\n self.assertFalseTwice(it.has_next)\n self.assertEqualTwice([it.sentinel], it.peek, 1)\n self.assertFalseTwice(it.has_next)\n\n a = ['1']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['1'], it.peek, 1)\n self.assertEqual('1', next(it))\n self.assertFalseTwice(it.has_next)\n self.assertEqualTwice([it.sentinel], it.peek, 1)\n self.assertFalseTwice(it.has_next)\n\n a = ['1', '2']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['1'], it.peek, 1)\n self.assertEqual('1', next(it))\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(['2'], it.peek, 1)\n self.assertEqual('2', next(it))\n self.assertFalseTwice(it.has_next)\n self.assertEqualTwice([it.sentinel], it.peek, 1)\n self.assertFalseTwice(it.has_next)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_zero_PeekIterTest.test_peek_with_zero.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_PeekIterTest.test_peek_with_zero_PeekIterTest.test_peek_with_zero.None_9", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 285, "end_line": 303, "span_ids": ["PeekIterTest.test_peek_with_zero"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PeekIterTest(BaseIteratorsTest):\n\n def test_peek_with_zero(self):\n a = []\n it = peek_iter(a)\n self.assertFalseTwice(it.has_next)\n self.assertEqualTwice([], it.peek, 0)\n\n a = ['1']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice([], it.peek, 0)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice([], it.peek, 0)\n\n a = ['1', '2']\n it = peek_iter(a)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice([], it.peek, 0)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice([], it.peek, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_ModifyIterTest_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py_ModifyIterTest_", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 306, "end_line": 347, "span_ids": ["ModifyIterTest", "ModifyIterTest.test_modifier_rstrip", "ModifyIterTest.test_modifier_rstrip_unicode", "ModifyIterTest.test_modifier_not_callable", "ModifyIterTest.test_init_with_sentinel_kwargs", "ModifyIterTest.test_modifier_default", "ModifyIterTest.test_init_with_sentinel_args"], "tokens": 423}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModifyIterTest(BaseIteratorsTest):\n def test_init_with_sentinel_args(self):\n a = iter(['1', '2', '3', 'DONE'])\n sentinel = 'DONE'\n\n def get_next():\n return next(a)\n it = modify_iter(get_next, sentinel, int)\n expected = [1, 2, 3]\n self.assertEqual(expected, [i for i in it])\n\n def test_init_with_sentinel_kwargs(self):\n a = iter([1, 2, 3, 4])\n sentinel = 4\n\n def get_next():\n return next(a)\n it = modify_iter(get_next, sentinel, modifier=str)\n expected = ['1', '2', '3']\n self.assertEqual(expected, [i for i in it])\n\n def test_modifier_default(self):\n a = ['', ' ', ' a ', 'b ', ' c', ' ', '']\n it = modify_iter(a)\n expected = ['', ' ', ' a ', 'b ', ' c', ' ', '']\n self.assertEqual(expected, [i for i in it])\n\n def test_modifier_not_callable(self):\n self.assertRaises(TypeError, modify_iter, [1], modifier='not_callable')\n\n def test_modifier_rstrip(self):\n a = ['', ' ', ' a ', 'b ', ' c', ' ', '']\n it = modify_iter(a, modifier=lambda s: s.rstrip())\n expected = ['', '', ' a', 'b', ' c', '', '']\n self.assertEqual(expected, [i for i in it])\n\n def test_modifier_rstrip_unicode(self):\n a = ['', ' ', ' a ', 'b ', ' c', ' ', '']\n it = modify_iter(a, modifier=lambda s: s.rstrip())\n expected = ['', '', ' a', 'b', ' c', '', '']\n self.assertEqual(expected, [i for i in it])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_todo.py_test_todo_not_included_test_todo_not_included.assert_todo_1_astext_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_todo.py_test_todo_not_included_test_todo_not_included.assert_todo_1_astext_", "embedding": null, "metadata": {"file_path": "tests/test_ext_todo.py", "file_name": "test_ext_todo.py", "file_type": "text/x-python", "category": "test", "start_line": 58, "end_line": 90, "span_ids": ["test_todo_not_included"], "tokens": 312}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-todo', freshenv=True,\n confoverrides={'todo_include_todos': False, 'todo_emit_warnings': True})\ndef test_todo_not_included(app, status, warning):\n todos = []\n\n def on_todo_defined(app, node):\n todos.append(node)\n\n app.connect('todo-defined', on_todo_defined)\n app.builder.build_all()\n\n # check todolist\n content = (app.outdir / 'index.html').read_text()\n assert ('<p class=\"admonition-title\">Todo</p>\\n'\n '<p>todo in foo</p>') not in content\n\n assert ('<p class=\"admonition-title\">Todo</p>\\n'\n '<p>todo in bar</p>') not in content\n\n # check todo\n content = (app.outdir / 'foo.html').read_text()\n assert ('<p class=\"admonition-title\">Todo</p>\\n'\n '<p>todo in foo</p>') not in content\n\n # check emitted warnings\n assert 'WARNING: TODO entry found: todo in foo' in warning.getvalue()\n assert 'WARNING: TODO entry found: todo in bar' in warning.getvalue()\n\n # check handled event\n assert len(todos) == 3\n assert {todo[1].astext() for todo in todos} == {'todo in foo',\n 'todo in bar',\n 'todo in param field'}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_todo.py_test_todo_valid_link_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_todo.py_test_todo_valid_link_", "embedding": null, "metadata": {"file_path": "tests/test_ext_todo.py", "file_name": "test_ext_todo.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 122, "span_ids": ["test_todo_valid_link"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='ext-todo', freshenv=True,\n confoverrides={'todo_include_todos': True})\ndef test_todo_valid_link(app, status, warning):\n \"\"\"\n Test that the inserted \"original entry\" links for todo items have a target\n that exists in the LaTeX output. The target was previously incorrectly\n omitted (GitHub issue #1020).\n \"\"\"\n\n # Ensure the LaTeX output is built.\n app.builder.build_all()\n\n content = (app.outdir / 'python.tex').read_text()\n\n # Look for the link to foo. Note that there are two of them because the\n # source document uses todolist twice. We could equally well look for links\n # to bar.\n link = (r'{\\\\hyperref\\[\\\\detokenize{(.*?foo.*?)}]{\\\\sphinxcrossref{'\n r'\\\\sphinxstyleemphasis{original entry}}}}')\n m = re.findall(link, content)\n assert len(m) == 4\n target = m[0]\n\n # Look for the targets of this link.\n labels = re.findall(r'\\\\label{\\\\detokenize{([^}]*)}}', content)\n matched = [l for l in labels if l == target]\n\n # If everything is correct we should have exactly one target.\n assert len(matched) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py_test_local_source_files.app_connect_viewcode_fin_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py_test_local_source_files.app_connect_viewcode_fin_", "embedding": null, "metadata": {"file_path": "tests/test_ext_viewcode.py", "file_name": "test_ext_viewcode.py", "file_type": "text/x-python", "category": "test", "start_line": 86, "end_line": 105, "span_ids": ["test_local_source_files"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-viewcode-find')\ndef test_local_source_files(app, status, warning):\n # ... other code\n\n app.connect('viewcode-find-source', find_source)\n app.builder.build_all()\n\n warnings = re.sub(r'\\\\+', '/', warning.getvalue())\n assert re.findall(\n r\"index.rst:\\d+: WARNING: Object named 'func1' not found in include \" +\n r\"file .*/not_a_package/__init__.py'\",\n warnings\n )\n\n result = (app.outdir / 'index.html').read_text()\n assert result.count('href=\"_modules/not_a_package.html#func1\"') == 1\n assert result.count('href=\"_modules/not_a_package.html#not_a_package.submodule.func1\"') == 1\n assert result.count('href=\"_modules/not_a_package/submodule.html#Class1\"') == 1\n assert result.count('href=\"_modules/not_a_package/submodule.html#Class3\"') == 1\n assert result.count('href=\"_modules/not_a_package/submodule.html#not_a_package.submodule.Class1\"') == 1\n\n assert result.count('href=\"_modules/not_a_package/submodule.html#not_a_package.submodule.Class3.class_attr\"') == 1\n assert result.count('This is the class attribute class_attr') == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_highlighting.py_test_default_highlight_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_highlighting.py_test_default_highlight_", "embedding": null, "metadata": {"file_path": "tests/test_highlighting.py", "file_name": "test_highlighting.py", "file_type": "text/x-python", "category": "test", "start_line": 79, "end_line": 103, "span_ids": ["test_default_highlight"], "tokens": 315}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@mock.patch('sphinx.highlighting.logger')\ndef test_default_highlight(logger):\n bridge = PygmentsBridge('html')\n\n # default: highlights as python3\n ret = bridge.highlight_block('print \"Hello sphinx world\"', 'default')\n assert ret == ('<div class=\"highlight\"><pre><span></span><span class=\"nb\">print</span> '\n '<span class=\"s2\">"Hello sphinx world"</span>\\n</pre></div>\\n')\n\n # default: fallbacks to none if highlighting failed\n ret = bridge.highlight_block('reST ``like`` text', 'default')\n assert ret == '<div class=\"highlight\"><pre><span></span>reST ``like`` text\\n</pre></div>\\n'\n\n # python3: highlights as python3\n ret = bridge.highlight_block('print \"Hello sphinx world\"', 'python3')\n assert ret == ('<div class=\"highlight\"><pre><span></span><span class=\"nb\">print</span> '\n '<span class=\"s2\">"Hello sphinx world"</span>\\n</pre></div>\\n')\n\n # python3: raises error if highlighting failed\n ret = bridge.highlight_block('reST ``like`` text', 'python3')\n logger.warning.assert_called_with('Could not lex literal_block as \"%s\". '\n 'Highlighting skipped.', 'python3',\n type='misc', subtype='highlighting_failure',\n location=None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py__info_test_text_warning_node.assert_result_expect": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py__info_test_text_warning_node.assert_result_expect", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 114, "span_ids": ["assert_count", "_info", "assert_elem", "elem_getref", "test_text_emit_warnings", "elem_gettexts", "test_text_warning_node"], "tokens": 412}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(autouse=True)\ndef _info(app):\n yield\n print('# language:', app.config.language)\n print('# locale_dirs:', app.config.locale_dirs)\n\n\ndef elem_gettexts(elem):\n return [_f for _f in [s.strip() for s in elem.itertext()] if _f]\n\n\ndef elem_getref(elem):\n return elem.attrib.get('refid') or elem.attrib.get('refuri')\n\n\ndef assert_elem(elem, texts=None, refs=None, names=None):\n if texts is not None:\n _texts = elem_gettexts(elem)\n assert _texts == texts\n if refs is not None:\n _refs = [elem_getref(x) for x in elem.findall('reference')]\n assert _refs == refs\n if names is not None:\n _names = elem.attrib.get('names').split()\n assert _names == names\n\n\ndef assert_count(expected_expr, result, count):\n find_pair = (expected_expr, result)\n assert len(re.findall(*find_pair)) == count, find_pair\n\n\n@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_emit_warnings(app, warning):\n app.build()\n # test warnings in translation\n warnings = getwarning(warning)\n warning_expr = ('.*/warnings.txt:4:<translated>:1: '\n 'WARNING: Inline literal start-string without end-string.\\n')\n assert_re_search(warning_expr, warnings)\n\n\n@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_warning_node(app):\n app.build()\n # test warnings in translation\n result = (app.outdir / 'warnings.txt').read_text()\n expect = (\"3. I18N WITH REST WARNINGS\"\n \"\\n**************************\\n\"\n \"\\nLINE OF >>``<<BROKEN LITERAL MARKUP.\\n\")\n assert result == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_title_underline_test_text_subdirs.assert_startswith_result_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_title_underline_test_text_subdirs.assert_startswith_result_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 127, "end_line": 148, "span_ids": ["test_text_subdirs", "test_text_title_underline"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_text_title_underline(app):\n app.build()\n # --- simple translation; check title underlines\n result = (app.outdir / 'bom.txt').read_text()\n expect = (\"2. Datei mit UTF-8\"\n \"\\n******************\\n\" # underline matches new translation\n \"\\nThis file has umlauts: \u00e4\u00f6\u00fc.\\n\")\n assert result == expect\n\n\n@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_subdirs(app):\n app.build()\n # --- check translation in subdirs\n result = (app.outdir / 'subdir' / 'index.txt').read_text()\n assert_startswith(result, \"1. subdir contents\\n******************\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_inconsistency_warnings_test_text_inconsistency_warnings.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_inconsistency_warnings_test_text_inconsistency_warnings.None_2", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 151, "end_line": 198, "span_ids": ["test_text_inconsistency_warnings"], "tokens": 492}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_inconsistency_warnings(app, warning):\n app.build()\n # --- check warnings for inconsistency in number of references\n result = (app.outdir / 'refs_inconsistency.txt').read_text()\n expect = (\"8. I18N WITH REFS INCONSISTENCY\"\n \"\\n*******************************\\n\"\n \"\\n* FOR CITATION [ref3].\\n\"\n \"\\n* reference FOR reference.\\n\"\n \"\\n* ORPHAN REFERENCE: I18N WITH REFS INCONSISTENCY.\\n\"\n \"\\n[1] THIS IS A AUTO NUMBERED FOOTNOTE.\\n\"\n \"\\n[ref2] THIS IS A CITATION.\\n\"\n \"\\n[100] THIS IS A NUMBERED FOOTNOTE.\\n\")\n assert result == expect\n\n warnings = getwarning(warning)\n warning_fmt = ('.*/refs_inconsistency.txt:\\\\d+: '\n 'WARNING: inconsistent %(reftype)s in translated message.'\n ' original: %(original)s, translated: %(translated)s\\n')\n expected_warning_expr = (\n warning_fmt % {\n 'reftype': 'footnote references',\n 'original': \"\\\\['\\\\[#\\\\]_'\\\\]\",\n 'translated': \"\\\\[\\\\]\"\n } +\n warning_fmt % {\n 'reftype': 'footnote references',\n 'original': \"\\\\['\\\\[100\\\\]_'\\\\]\",\n 'translated': \"\\\\[\\\\]\"\n } +\n warning_fmt % {\n 'reftype': 'references',\n 'original': \"\\\\['reference_'\\\\]\",\n 'translated': \"\\\\['reference_', 'reference_'\\\\]\"\n } +\n warning_fmt % {\n 'reftype': 'references',\n 'original': \"\\\\[\\\\]\",\n 'translated': \"\\\\['`I18N WITH REFS INCONSISTENCY`_'\\\\]\"\n })\n assert_re_search(expected_warning_expr, warnings)\n\n expected_citation_warning_expr = (\n '.*/refs_inconsistency.txt:\\\\d+: WARNING: Citation \\\\[ref2\\\\] is not referenced.\\n' +\n '.*/refs_inconsistency.txt:\\\\d+: WARNING: citation not found: ref3')\n assert_re_search(expected_citation_warning_expr, warnings)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_literalblock_warnings_test_text_literalblock_warnings.assert_re_search_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_literalblock_warnings_test_text_literalblock_warnings.assert_re_search_expected", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 201, "end_line": 220, "span_ids": ["test_text_literalblock_warnings"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_literalblock_warnings(app, warning):\n app.build()\n # --- check warning for literal block\n result = (app.outdir / 'literalblock.txt').read_text()\n expect = (\"9. I18N WITH LITERAL BLOCK\"\n \"\\n**************************\\n\"\n \"\\nCORRECT LITERAL BLOCK:\\n\"\n \"\\n this is\"\n \"\\n literal block\\n\"\n \"\\nMISSING LITERAL BLOCK:\\n\"\n \"\\n<SYSTEM MESSAGE:\")\n assert_startswith(result, expect)\n\n warnings = getwarning(warning)\n expected_warning_expr = ('.*/literalblock.txt:\\\\d+: '\n 'WARNING: Literal block expected; none found.')\n assert_re_search(expected_warning_expr, warnings)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_definition_terms_test_text_definition_terms.assert_result_expect": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_definition_terms_test_text_definition_terms.assert_result_expect", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 223, "end_line": 240, "span_ids": ["test_text_definition_terms"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_definition_terms(app):\n app.build()\n # --- definition terms: regression test for #975, #2198, #2205\n result = (app.outdir / 'definition_terms.txt').read_text()\n expect = (\"13. I18N WITH DEFINITION TERMS\"\n \"\\n******************************\\n\"\n \"\\nSOME TERM\"\n \"\\n THE CORRESPONDING DEFINITION\\n\"\n \"\\nSOME *TERM* WITH LINK\"\n \"\\n THE CORRESPONDING DEFINITION #2\\n\"\n \"\\nSOME **TERM** WITH : CLASSIFIER1 : CLASSIFIER2\"\n \"\\n THE CORRESPONDING DEFINITION\\n\"\n \"\\nSOME TERM WITH : CLASSIFIER[]\"\n \"\\n THE CORRESPONDING DEFINITION\\n\")\n assert result == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_glossary_term_test_text_glossary_term.assert_term_not_in_gloss": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_glossary_term_test_text_glossary_term.assert_term_not_in_gloss", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 257, "end_line": 289, "span_ids": ["test_text_glossary_term"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_glossary_term(app, warning):\n app.build()\n # --- glossary terms: regression test for #1090\n result = (app.outdir / 'glossary_terms.txt').read_text()\n expect = (r\"\"\"18. I18N WITH GLOSSARY TERMS\n****************************\n\nSOME NEW TERM\n THE CORRESPONDING GLOSSARY\n\nSOME OTHER NEW TERM\n THE CORRESPONDING GLOSSARY #2\n\nLINK TO *SOME NEW TERM*.\n\nTRANSLATED GLOSSARY SHOULD BE SORTED BY TRANSLATED TERMS:\n\nTRANSLATED TERM XXX\n DEFINE XXX\n\nTRANSLATED TERM YYY\n DEFINE YYY\n\nTRANSLATED TERM ZZZ\nVVV\n DEFINE ZZZ\n\"\"\")\n assert result == expect\n warnings = getwarning(warning)\n assert 'term not in glossary' not in warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_glossary_term_inconsistencies_test_text_glossary_term_inconsistencies.assert_re_search_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_glossary_term_inconsistencies_test_text_glossary_term_inconsistencies.assert_re_search_expected", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 262, "end_line": 280, "span_ids": ["test_text_glossary_term_inconsistencies"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_glossary_term_inconsistencies(app, warning):\n app.build()\n # --- glossary term inconsistencies: regression test for #1090\n result = (app.outdir / 'glossary_terms_inconsistency.txt').read_text()\n expect = (\"19. I18N WITH GLOSSARY TERMS INCONSISTENCY\"\n \"\\n******************************************\\n\"\n \"\\n1. LINK TO *SOME NEW TERM*.\\n\")\n assert result == expect\n\n warnings = getwarning(warning)\n expected_warning_expr = (\n '.*/glossary_terms_inconsistency.txt:\\\\d+: '\n 'WARNING: inconsistent term references in translated message.'\n \" original: \\\\[':term:`Some term`', ':term:`Some other term`'\\\\],\"\n \" translated: \\\\[':term:`SOME NEW TERM`'\\\\]\\n\")\n assert_re_search(expected_warning_expr, warnings)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_section_test_text_section.for_expect_msg_in_m_for_.assert_expect_msg_string_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_section_test_text_section.for_expect_msg_in_m_for_.assert_expect_msg_string_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 283, "end_line": 304, "span_ids": ["test_gettext_section", "test_text_section"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('gettext')\n@pytest.mark.test_params(shared_result='test_intl_gettext')\ndef test_gettext_section(app):\n app.build()\n # --- section\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'section.po')\n actual = read_po(app.outdir / 'section.pot')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.id in [m.id for m in actual if m.id]\n\n\n@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_section(app):\n app.build()\n # --- section\n result = (app.outdir / 'section.txt').read_text()\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'section.po')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.string in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_seealso_test_text_seealso.assert_result_expect": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_seealso_test_text_seealso.assert_result_expect", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 307, "end_line": 321, "span_ids": ["test_text_seealso"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_seealso(app):\n app.build()\n # --- seealso\n result = (app.outdir / 'seealso.txt').read_text()\n expect = (\"12. I18N WITH SEEALSO\"\n \"\\n*********************\\n\"\n \"\\nSee also: SHORT TEXT 1\\n\"\n \"\\nSee also: LONG TEXT 1\\n\"\n \"\\nSee also:\\n\"\n \"\\n SHORT TEXT 2\\n\"\n \"\\n LONG TEXT 2\\n\")\n assert result == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_figure_captions_test_text_figure_captions.assert_result_expect": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_figure_captions_test_text_figure_captions.assert_result_expect", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 354, "end_line": 395, "span_ids": ["test_text_figure_captions"], "tokens": 389}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_figure_captions(app):\n app.build()\n # --- figure captions: regression test for #940\n result = (app.outdir / 'figure.txt').read_text()\n expect = (\"14. I18N WITH FIGURE CAPTION\"\n \"\\n****************************\\n\"\n \"\\n [image]MY CAPTION OF THE FIGURE\\n\"\n \"\\n MY DESCRIPTION PARAGRAPH1 OF THE FIGURE.\\n\"\n \"\\n MY DESCRIPTION PARAGRAPH2 OF THE FIGURE.\\n\"\n \"\\n\"\n \"\\n14.1. FIGURE IN THE BLOCK\"\n \"\\n=========================\\n\"\n \"\\nBLOCK\\n\"\n \"\\n [image]MY CAPTION OF THE FIGURE\\n\"\n \"\\n MY DESCRIPTION PARAGRAPH1 OF THE FIGURE.\\n\"\n \"\\n MY DESCRIPTION PARAGRAPH2 OF THE FIGURE.\\n\"\n \"\\n\"\n \"\\n\"\n \"14.2. IMAGE URL AND ALT\\n\"\n \"=======================\\n\"\n \"\\n\"\n \"[image: I18N -> IMG][image]\\n\"\n \"\\n\"\n \" [image: IMG -> I18N][image]\\n\"\n \"\\n\"\n \"\\n\"\n \"14.3. IMAGE ON SUBSTITUTION\\n\"\n \"===========================\\n\"\n \"\\n\"\n \"\\n\"\n \"14.4. IMAGE UNDER NOTE\\n\"\n \"======================\\n\"\n \"\\n\"\n \"Note:\\n\"\n \"\\n\"\n \" [image: i18n under note][image]\\n\"\n \"\\n\"\n \" [image: img under note][image]\\n\")\n assert result == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_rubric_test_text_rubric.assert_result_expect": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_rubric_test_text_rubric.assert_result_expect", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 368, "end_line": 383, "span_ids": ["test_text_rubric"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_rubric(app):\n app.build()\n # --- rubric: regression test for pull request #190\n result = (app.outdir / 'rubric.txt').read_text()\n expect = (\"I18N WITH RUBRIC\"\n \"\\n****************\\n\"\n \"\\n-[ RUBRIC TITLE ]-\\n\"\n \"\\n\"\n \"\\nRUBRIC IN THE BLOCK\"\n \"\\n===================\\n\"\n \"\\nBLOCK\\n\"\n \"\\n -[ RUBRIC TITLE ]-\\n\")\n assert result == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_docfields_test_text_docfields.assert_result_expect": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_docfields_test_text_docfields.assert_result_expect", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 386, "end_line": 412, "span_ids": ["test_text_docfields"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_docfields(app):\n app.build()\n # --- docfields\n result = (app.outdir / 'docfields.txt').read_text()\n expect = (\"21. I18N WITH DOCFIELDS\"\n \"\\n***********************\\n\"\n \"\\nclass Cls1\\n\"\n \"\\n Parameters:\"\n \"\\n **param** -- DESCRIPTION OF PARAMETER param\\n\"\n \"\\nclass Cls2\\n\"\n \"\\n Parameters:\"\n \"\\n * **foo** -- DESCRIPTION OF PARAMETER foo\\n\"\n \"\\n * **bar** -- DESCRIPTION OF PARAMETER bar\\n\"\n \"\\nclass Cls3(values)\\n\"\n \"\\n Raises:\"\n \"\\n **ValueError** -- IF THE VALUES ARE OUT OF RANGE\\n\"\n \"\\nclass Cls4(values)\\n\"\n \"\\n Raises:\"\n \"\\n * **TypeError** -- IF THE VALUES ARE NOT VALID\\n\"\n \"\\n * **ValueError** -- IF THE VALUES ARE OUT OF RANGE\\n\"\n \"\\nclass Cls5\\n\"\n \"\\n Returns:\"\n '\\n A NEW \"Cls3\" INSTANCE\\n')\n assert result == expect", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_admonitions_test_text_admonitions.assert_1_ADMONITION_TIT": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_admonitions_test_text_admonitions.assert_1_ADMONITION_TIT", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 445, "end_line": 462, "span_ids": ["test_text_admonitions"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_admonitions(app):\n app.build()\n # --- admonitions\n # #1206: gettext did not translate admonition directive's title\n # seealso: https://docutils.sourceforge.io/docs/ref/rst/directives.html#admonitions\n result = (app.outdir / 'admonitions.txt').read_text()\n directives = (\n \"attention\", \"caution\", \"danger\", \"error\", \"hint\",\n \"important\", \"note\", \"tip\", \"warning\", \"admonition\")\n for d in directives:\n assert d.upper() + \" TITLE\" in result\n assert d.upper() + \" BODY\" in result\n\n # for #4938 `1. ` prefixed admonition title\n assert \"1. ADMONITION TITLE\" in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_table_test_text_table.for_expect_msg_in_m_for_.assert_expect_msg_string_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_table_test_text_table.for_expect_msg_in_m_for_.assert_expect_msg_string_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 447, "end_line": 468, "span_ids": ["test_gettext_table", "test_text_table"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('gettext')\n@pytest.mark.test_params(shared_result='test_intl_gettext')\ndef test_gettext_table(app):\n app.build()\n # --- toctree\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'table.po')\n actual = read_po(app.outdir / 'table.pot')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.id in [m.id for m in actual if m.id]\n\n\n@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_table(app):\n app.build()\n # --- toctree\n result = (app.outdir / 'table.txt').read_text()\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'table.po')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.string in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_glossary_terms_test_gettext_glossary_terms.assert_term_not_in_gloss": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_glossary_terms_test_gettext_glossary_terms.assert_term_not_in_gloss", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 531, "end_line": 542, "span_ids": ["test_gettext_glossary_terms"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('gettext')\n@pytest.mark.test_params(shared_result='test_intl_gettext')\ndef test_gettext_glossary_terms(app, warning):\n app.build()\n # --- glossary terms: regression test for #1090\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'glossary_terms.po')\n actual = read_po(app.outdir / 'glossary_terms.pot')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.id in [m.id for m in actual if m.id]\n warnings = warning.getvalue().replace(os.sep, '/')\n assert 'term not in glossary' not in warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_glossary_term_inconsistencies_test_gettext_glossary_term_inconsistencies.for_expect_msg_in_m_for_.assert_expect_msg_id_in_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_glossary_term_inconsistencies_test_gettext_glossary_term_inconsistencies.for_expect_msg_in_m_for_.assert_expect_msg_id_in_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 545, "end_line": 554, "span_ids": ["test_gettext_glossary_term_inconsistencies"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('gettext')\n@pytest.mark.test_params(shared_result='test_intl_gettext')\ndef test_gettext_glossary_term_inconsistencies(app):\n app.build()\n # --- glossary term inconsistencies: regression test for #1090\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'glossary_terms_inconsistency.po')\n actual = read_po(app.outdir / 'glossary_terms_inconsistency.pot')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.id in [m.id for m in actual if m.id]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_literalblock_test_gettext_literalblock.for_expect_msg_in_m_for_.if_len_expect_msg_id_spli.else_._skip_code_blocks_and_li": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_literalblock_test_gettext_literalblock.for_expect_msg_in_m_for_.if_len_expect_msg_id_spli.else_._skip_code_blocks_and_li", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 557, "end_line": 570, "span_ids": ["test_gettext_literalblock"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('gettext')\n@pytest.mark.test_params(shared_result='test_intl_gettext')\ndef test_gettext_literalblock(app):\n app.build()\n # --- gettext builder always ignores ``only`` directive\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'literalblock.po')\n actual = read_po(app.outdir / 'literalblock.pot')\n for expect_msg in [m for m in expect if m.id]:\n if len(expect_msg.id.splitlines()) == 1:\n # compare tranlsations only labels\n assert expect_msg.id in [m.id for m in actual if m.id]\n else:\n pass # skip code-blocks and literalblocks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_buildr_ignores_only_directive_test_gettext_buildr_ignores_only_directive.for_expect_msg_in_m_for_.assert_expect_msg_id_in_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_buildr_ignores_only_directive_test_gettext_buildr_ignores_only_directive.for_expect_msg_in_m_for_.assert_expect_msg_id_in_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 573, "end_line": 582, "span_ids": ["test_gettext_buildr_ignores_only_directive"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('gettext')\n@pytest.mark.test_params(shared_result='test_intl_gettext')\ndef test_gettext_buildr_ignores_only_directive(app):\n app.build()\n # --- gettext builder always ignores ``only`` directive\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'only.po')\n actual = read_po(app.outdir / 'only.pot')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.id in [m.id for m in actual if m.id]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_dont_rebuild_mo_test_gettext_dont_rebuild_mo.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_dont_rebuild_mo_test_gettext_dont_rebuild_mo.None_5", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 585, "end_line": 622, "span_ids": ["test_gettext_dont_rebuild_mo"], "tokens": 516}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n# use individual shared_result directory to avoid \"incompatible doctree\" error\n@pytest.mark.sphinx(testroot='builder-gettext-dont-rebuild-mo')\ndef test_gettext_dont_rebuild_mo(make_app, app_params):\n # --- don't rebuild by .mo mtime\n def get_number_of_update_targets(app_):\n app_.env.find_files(app_.config, app_.builder)\n _, updated, _ = app_.env.get_outdated_files(config_changed=False)\n return len(updated)\n\n args, kwargs = app_params\n\n # phase1: build document with non-gettext builder and generate mo file in srcdir\n app0 = make_app('dummy', *args, **kwargs)\n app0.build()\n assert (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').exists()\n # Since it is after the build, the number of documents to be updated is 0\n assert get_number_of_update_targets(app0) == 0\n # When rewriting the timestamp of mo file, the number of documents to be\n # updated will be changed.\n mtime = (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').stat().st_mtime\n (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').utime((mtime + 5, mtime + 5))\n assert get_number_of_update_targets(app0) == 1\n\n # Because doctree for gettext builder can not be shared with other builders,\n # erase doctreedir before gettext build.\n app0.doctreedir.rmtree()\n\n # phase2: build document with gettext builder.\n # The mo file in the srcdir directory is retained.\n app = make_app('gettext', *args, **kwargs)\n app.build()\n # Since it is after the build, the number of documents to be updated is 0\n assert get_number_of_update_targets(app) == 0\n # Even if the timestamp of the mo file is updated, the number of documents\n # to be updated is 0. gettext builder does not rebuild because of mo update.\n (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').utime((mtime + 10, mtime + 10))\n assert get_number_of_update_targets(app) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_meta_test_html_footnotes._app_outdir_footnote_h": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_meta_test_html_footnotes._app_outdir_footnote_h", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 653, "end_line": 675, "span_ids": ["test_html_meta", "test_html_footnotes"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_html_meta(app):\n app.build()\n # --- test for meta\n result = (app.outdir / 'index.html').read_text()\n expected_expr = '<meta content=\"TESTDATA FOR I18N\" name=\"description\" />'\n assert expected_expr in result\n expected_expr = '<meta content=\"I18N, SPHINX, MARKUP\" name=\"keywords\" />'\n assert expected_expr in result\n expected_expr = '<p class=\"caption\" role=\"heading\"><span class=\"caption-text\">HIDDEN TOC</span></p>'\n assert expected_expr in result\n\n\n@sphinx_intl\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_html_footnotes(app):\n app.build()\n # --- test for #955 cant-build-html-with-footnotes-when-using\n # expect no error by build\n (app.outdir / 'footnote.html').read_text()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_undefined_refs_test_html_undefined_refs.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_undefined_refs_test_html_undefined_refs.None_2", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 650, "end_line": 669, "span_ids": ["test_html_undefined_refs"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_html_undefined_refs(app):\n app.build()\n # --- links to undefined reference\n result = (app.outdir / 'refs_inconsistency.html').read_text()\n\n expected_expr = ('<a class=\"reference external\" '\n 'href=\"http://www.example.com\">reference</a>')\n assert len(re.findall(expected_expr, result)) == 2\n\n expected_expr = ('<a class=\"reference internal\" '\n 'href=\"#reference\">reference</a>')\n assert len(re.findall(expected_expr, result)) == 0\n\n expected_expr = ('<a class=\"reference internal\" '\n 'href=\"#i18n-with-refs-inconsistency\">I18N WITH '\n 'REFS INCONSISTENCY</a>')\n assert len(re.findall(expected_expr, result)) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_index_entries_test_html_index_entries.for_expr_in_expected_expr.assert_re_search_expr_re": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_index_entries_test_html_index_entries.for_expr_in_expected_expr.assert_re_search_expr_re", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 672, "end_line": 707, "span_ids": ["test_html_index_entries"], "tokens": 365}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_html_index_entries(app):\n app.build()\n # --- index entries: regression test for #976\n result = (app.outdir / 'genindex.html').read_text()\n\n def wrap(tag, keyword):\n start_tag = \"<%s[^>]*>\" % tag\n end_tag = \"</%s>\" % tag\n return r\"%s\\s*%s\\s*%s\" % (start_tag, keyword, end_tag)\n\n def wrap_nest(parenttag, childtag, keyword):\n start_tag1 = \"<%s[^>]*>\" % parenttag\n start_tag2 = \"<%s[^>]*>\" % childtag\n return r\"%s\\s*%s\\s*%s\" % (start_tag1, keyword, start_tag2)\n expected_exprs = [\n wrap('a', 'NEWSLETTER'),\n wrap('a', 'MAILING LIST'),\n wrap('a', 'RECIPIENTS LIST'),\n wrap('a', 'FIRST SECOND'),\n wrap('a', 'SECOND THIRD'),\n wrap('a', 'THIRD, FIRST'),\n wrap_nest('li', 'ul', 'ENTRY'),\n wrap_nest('li', 'ul', 'SEE'),\n wrap('a', 'MODULE'),\n wrap('a', 'KEYWORD'),\n wrap('a', 'OPERATOR'),\n wrap('a', 'OBJECT'),\n wrap('a', 'EXCEPTION'),\n wrap('a', 'STATEMENT'),\n wrap('a', 'BUILTIN'),\n ]\n for expr in expected_exprs:\n assert_re_search(expr, result, re.M)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_versionchanges_test_html_versionchanges.assert_expect3_matched": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_versionchanges_test_html_versionchanges.assert_expect3_matched", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 710, "end_line": 743, "span_ids": ["test_html_versionchanges"], "tokens": 353}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_html_versionchanges(app):\n app.build()\n # --- versionchanges\n result = (app.outdir / 'versionchange.html').read_text()\n\n def get_content(result, name):\n matched = re.search(r'<div class=\"%s\">\\n*(.*?)</div>' % name,\n result, re.DOTALL)\n if matched:\n return matched.group(1)\n else:\n return ''\n\n expect1 = (\n \"\"\"<p><span class=\"versionmodified deprecated\">Deprecated since version 1.0: </span>\"\"\"\n \"\"\"THIS IS THE <em>FIRST</em> PARAGRAPH OF DEPRECATED.</p>\\n\"\"\"\n \"\"\"<p>THIS IS THE <em>SECOND</em> PARAGRAPH OF DEPRECATED.</p>\\n\"\"\")\n matched_content = get_content(result, \"deprecated\")\n assert expect1 == matched_content\n\n expect2 = (\n \"\"\"<p><span class=\"versionmodified added\">New in version 1.0: </span>\"\"\"\n \"\"\"THIS IS THE <em>FIRST</em> PARAGRAPH OF VERSIONADDED.</p>\\n\"\"\")\n matched_content = get_content(result, \"versionadded\")\n assert expect2 == matched_content\n\n expect3 = (\n \"\"\"<p><span class=\"versionmodified changed\">Changed in version 1.0: </span>\"\"\"\n \"\"\"THIS IS THE <em>FIRST</em> PARAGRAPH OF VERSIONCHANGED.</p>\\n\"\"\")\n matched_content = get_content(result, \"versionchanged\")\n assert expect3 == matched_content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_docfields_test_html_template.assert_SPHINX_2013_120_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_docfields_test_html_template.assert_SPHINX_2013_120_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 746, "end_line": 764, "span_ids": ["test_html_template", "test_html_docfields"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_html_docfields(app):\n app.build()\n # --- docfields\n # expect no error by build\n (app.outdir / 'docfields.html').read_text()\n\n\n@sphinx_intl\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_html_template(app):\n app.build()\n # --- gettext template\n result = (app.outdir / 'contents.html').read_text()\n assert \"WELCOME\" in result\n assert \"SPHINX 2013.120\" in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_rebuild_mo_test_html_rebuild_mo.assert_len_updated_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_html_rebuild_mo_test_html_rebuild_mo.assert_len_updated_1", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 767, "end_line": 782, "span_ids": ["test_html_rebuild_mo"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_html_rebuild_mo(app):\n app.build()\n # --- rebuild by .mo mtime\n app.builder.build_update()\n app.env.find_files(app.config, app.builder)\n _, updated, _ = app.env.get_outdated_files(config_changed=False)\n assert len(updated) == 0\n\n mtime = (app.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').stat().st_mtime\n (app.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').utime((mtime + 5, mtime + 5))\n app.env.find_files(app.config, app.builder)\n _, updated, _ = app.env.get_outdated_files(config_changed=False)\n assert len(updated) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_footnotes_test_xml_footnotes.assert_not_re_search_warn": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_footnotes_test_xml_footnotes.assert_not_re_search_warn", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 785, "end_line": 836, "span_ids": ["test_xml_footnotes"], "tokens": 446}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('xml')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_xml_footnotes(app, warning):\n app.build()\n # --- footnotes: regression test for fix #955, #1176\n et = etree_parse(app.outdir / 'footnote.xml')\n secs = et.findall('section')\n\n para0 = secs[0].findall('paragraph')\n assert_elem(\n para0[0],\n ['I18N WITH FOOTNOTE', 'INCLUDE THIS CONTENTS',\n '2', '[ref]', '1', '100', '*', '. SECOND FOOTNOTE_REF', '100', '.'],\n ['i18n-with-footnote', 'ref'])\n\n # check node_id for footnote_references which refer same footnote (refs: #3002)\n assert para0[0][4].text == para0[0][6].text == '100'\n assert para0[0][4].attrib['ids'] != para0[0][6].attrib['ids']\n\n footnote0 = secs[0].findall('footnote')\n assert_elem(\n footnote0[0],\n ['1', 'THIS IS A AUTO NUMBERED FOOTNOTE.'],\n None,\n ['1'])\n assert_elem(\n footnote0[1],\n ['100', 'THIS IS A NUMBERED FOOTNOTE.'],\n None,\n ['100'])\n assert_elem(\n footnote0[2],\n ['2', 'THIS IS A AUTO NUMBERED NAMED FOOTNOTE.'],\n None,\n ['named'])\n assert_elem(\n footnote0[3],\n ['*', 'THIS IS A AUTO SYMBOL FOOTNOTE.'],\n None,\n None)\n\n citation0 = secs[0].findall('citation')\n assert_elem(\n citation0[0],\n ['ref', 'THIS IS A NAMED FOOTNOTE.'],\n None,\n ['ref'])\n\n warnings = getwarning(warning)\n warning_expr = '.*/footnote.xml:\\\\d*: SEVERE: Duplicate ID: \".*\".\\n'\n assert_not_re_search(warning_expr, warnings)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_footnote_backlinks_test_xml_footnote_backlinks.for_footnote_in_footnote0.assert_refid2id_ids_in_b": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_footnote_backlinks_test_xml_footnote_backlinks.for_footnote_in_footnote0.assert_refid2id_ids_in_b", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 839, "end_line": 856, "span_ids": ["test_xml_footnote_backlinks"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('xml')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_xml_footnote_backlinks(app):\n app.build()\n # --- footnote backlinks: i18n test for #1058\n et = etree_parse(app.outdir / 'footnote.xml')\n secs = et.findall('section')\n\n para0 = secs[0].findall('paragraph')\n refs0 = para0[0].findall('footnote_reference')\n refid2id = {r.attrib.get('refid'): r.attrib.get('ids') for r in refs0}\n\n footnote0 = secs[0].findall('footnote')\n for footnote in footnote0:\n ids = footnote.attrib.get('ids')\n backrefs = footnote.attrib.get('backrefs').split()\n assert refid2id[ids] in backrefs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_refs_in_python_domain_test_xml_refs_in_python_domain.assert_elem_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_refs_in_python_domain_test_xml_refs_in_python_domain.assert_elem_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 859, "end_line": 873, "span_ids": ["test_xml_refs_in_python_domain"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('xml')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_xml_refs_in_python_domain(app):\n app.build()\n # --- refs in the Python domain\n et = etree_parse(app.outdir / 'refs_python_domain.xml')\n secs = et.findall('section')\n\n # regression test for fix #1363\n para0 = secs[0].findall('paragraph')\n assert_elem(\n para0[0],\n ['SEE THIS DECORATOR:', 'sensitive_variables()', '.'],\n ['sensitive.sensitive_variables'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_keep_external_links_test_xml_keep_external_links.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_keep_external_links_test_xml_keep_external_links.None_7", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 876, "end_line": 931, "span_ids": ["test_xml_keep_external_links"], "tokens": 466}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('xml')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_xml_keep_external_links(app):\n app.build()\n # --- keep external links: regression test for #1044\n et = etree_parse(app.outdir / 'external_links.xml')\n secs = et.findall('section')\n\n para0 = secs[0].findall('paragraph')\n # external link check\n assert_elem(\n para0[0],\n ['EXTERNAL LINK TO', 'Python', '.'],\n ['http://python.org/index.html'])\n\n # internal link check\n assert_elem(\n para0[1],\n ['EXTERNAL LINKS', 'IS INTERNAL LINK.'],\n ['i18n-with-external-links'])\n\n # inline link check\n assert_elem(\n para0[2],\n ['INLINE LINK BY', 'THE SPHINX SITE', '.'],\n ['http://sphinx-doc.org'])\n\n # unnamed link check\n assert_elem(\n para0[3],\n ['UNNAMED', 'LINK', '.'],\n ['http://google.com'])\n\n # link target swapped translation\n para1 = secs[1].findall('paragraph')\n assert_elem(\n para1[0],\n ['LINK TO', 'external2', 'AND', 'external1', '.'],\n ['https://www.google.com/external2',\n 'https://www.google.com/external1'])\n assert_elem(\n para1[1],\n ['LINK TO', 'THE PYTHON SITE', 'AND', 'THE SPHINX SITE', '.'],\n ['http://python.org', 'http://sphinx-doc.org'])\n\n # multiple references in the same line\n para2 = secs[2].findall('paragraph')\n assert_elem(\n para2[0],\n ['LINK TO', 'EXTERNAL LINKS', ',', 'Python', ',',\n 'THE SPHINX SITE', ',', 'UNNAMED', 'AND',\n 'THE PYTHON SITE', '.'],\n ['i18n-with-external-links', 'http://python.org/index.html',\n 'http://sphinx-doc.org', 'http://google.com',\n 'http://python.org'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_role_xref_test_xml_role_xref.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_role_xref_test_xml_role_xref.None_8", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 934, "end_line": 981, "span_ids": ["test_xml_role_xref"], "tokens": 495}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('xml')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_xml_role_xref(app):\n app.build()\n # --- role xref: regression test for #1090, #1193\n et = etree_parse(app.outdir / 'role_xref.xml')\n sec1, sec2 = et.findall('section')\n\n para1, = sec1.findall('paragraph')\n assert_elem(\n para1,\n ['LINK TO', \"I18N ROCK'N ROLE XREF\", ',', 'CONTENTS', ',',\n 'SOME NEW TERM', '.'],\n ['i18n-role-xref', 'index',\n 'glossary_terms#term-Some-term'])\n\n para2 = sec2.findall('paragraph')\n assert_elem(\n para2[0],\n ['LINK TO', 'SOME OTHER NEW TERM', 'AND', 'SOME NEW TERM', '.'],\n ['glossary_terms#term-Some-other-term',\n 'glossary_terms#term-Some-term'])\n assert_elem(\n para2[1],\n ['LINK TO', 'LABEL', 'AND',\n 'SAME TYPE LINKS', 'AND', 'SAME TYPE LINKS', '.'],\n ['i18n-role-xref', 'same-type-links', 'same-type-links'])\n assert_elem(\n para2[2],\n ['LINK TO', 'I18N WITH GLOSSARY TERMS', 'AND', 'CONTENTS', '.'],\n ['glossary_terms', 'index'])\n assert_elem(\n para2[3],\n ['LINK TO', '--module', 'AND', '-m', '.'],\n ['cmdoption-module', 'cmdoption-m'])\n assert_elem(\n para2[4],\n ['LINK TO', 'env2', 'AND', 'env1', '.'],\n ['envvar-env2', 'envvar-env1'])\n assert_elem(\n para2[5],\n ['LINK TO', 'token2', 'AND', 'token1', '.'],\n []) # TODO: how do I link token role to productionlist?\n assert_elem(\n para2[6],\n ['LINK TO', 'same-type-links', 'AND', \"i18n-role-xref\", '.'],\n ['same-type-links', 'i18n-role-xref'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_warnings_test_xml_label_targets.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_xml_warnings_test_xml_label_targets.None_6", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 984, "end_line": 1050, "span_ids": ["test_xml_label_targets", "test_xml_warnings"], "tokens": 563}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('xml')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_xml_warnings(app, warning):\n app.build()\n # warnings\n warnings = getwarning(warning)\n assert 'term not in glossary' not in warnings\n assert 'undefined label' not in warnings\n assert 'unknown document' not in warnings\n\n\n@sphinx_intl\n@pytest.mark.sphinx('xml')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_xml_label_targets(app):\n app.build()\n # --- label targets: regression test for #1193, #1265\n et = etree_parse(app.outdir / 'label_target.xml')\n secs = et.findall('section')\n\n para0 = secs[0].findall('paragraph')\n assert_elem(\n para0[0],\n ['X SECTION AND LABEL', 'POINT TO', 'implicit-target', 'AND',\n 'X SECTION AND LABEL', 'POINT TO', 'section-and-label', '.'],\n ['implicit-target', 'section-and-label'])\n\n para1 = secs[1].findall('paragraph')\n assert_elem(\n para1[0],\n ['X EXPLICIT-TARGET', 'POINT TO', 'explicit-target', 'AND',\n 'X EXPLICIT-TARGET', 'POINT TO DUPLICATED ID LIKE', 'id1',\n '.'],\n ['explicit-target', 'id1'])\n\n para2 = secs[2].findall('paragraph')\n assert_elem(\n para2[0],\n ['X IMPLICIT SECTION NAME', 'POINT TO',\n 'implicit-section-name', '.'],\n ['implicit-section-name'])\n\n sec2 = secs[2].findall('section')\n\n para2_0 = sec2[0].findall('paragraph')\n assert_elem(\n para2_0[0],\n ['`X DUPLICATED SUB SECTION`_', 'IS BROKEN LINK.'],\n [])\n\n para3 = secs[3].findall('paragraph')\n assert_elem(\n para3[0],\n ['X', 'bridge label',\n 'IS NOT TRANSLATABLE BUT LINKED TO TRANSLATED ' +\n 'SECTION TITLE.'],\n ['label-bridged-target-section'])\n assert_elem(\n para3[1],\n ['X', 'bridge label', 'POINT TO',\n 'LABEL BRIDGED TARGET SECTION', 'AND', 'bridge label2',\n 'POINT TO', 'SECTION AND LABEL', '. THE SECOND APPEARED',\n 'bridge label2', 'POINT TO CORRECT TARGET.'],\n ['label-bridged-target-section',\n 'section-and-label',\n 'section-and-label'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_additional_targets_should_be_translated_test_additional_targets_should_be_translated.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_additional_targets_should_be_translated_test_additional_targets_should_be_translated.None_9", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 1151, "end_line": 1234, "span_ids": ["test_additional_targets_should_be_translated"], "tokens": 819}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx(\n 'html',\n srcdir='test_additional_targets_should_be_translated',\n confoverrides={\n 'language': 'xx', 'locale_dirs': ['.'],\n 'gettext_compact': False,\n 'gettext_additional_targets': [\n 'index',\n 'literal-block',\n 'doctest-block',\n 'raw',\n 'image',\n ],\n }\n)\ndef test_additional_targets_should_be_translated(app):\n app.build()\n # [literalblock.txt]\n result = (app.outdir / 'literalblock.html').read_text()\n\n # title should be translated\n expected_expr = 'CODE-BLOCKS'\n assert_count(expected_expr, result, 2)\n\n # ruby code block should be translated and be highlighted\n expected_expr = \"\"\"<span class=\"s1\">'RESULT'</span>\"\"\"\n assert_count(expected_expr, result, 1)\n\n # C code block without lang should be translated and *ruby* highlighted\n expected_expr = \"\"\"<span class=\"c1\">#include <STDLIB.H></span>\"\"\"\n assert_count(expected_expr, result, 1)\n\n # C code block with lang should be translated and be *C* highlighted\n if pygments_version < (2, 10, 0):\n expected_expr = (\"\"\"<span class=\"cp\">#include</span> \"\"\"\n \"\"\"<span class=\"cpf\"><STDIO.H></span>\"\"\")\n else:\n expected_expr = (\"\"\"<span class=\"cp\">#include</span>\"\"\"\n \"\"\"<span class=\"w\"> </span>\"\"\"\n \"\"\"<span class=\"cpf\"><STDIO.H></span>\"\"\")\n assert_count(expected_expr, result, 1)\n\n # literal block in list item should be translated\n expected_expr = (\"\"\"<span class=\"no\">LITERAL</span>\"\"\"\n \"\"\"<span class=\"o\">-</span>\"\"\"\n \"\"\"<span class=\"no\">BLOCK</span>\\n\"\"\"\n \"\"\"<span class=\"no\">IN</span> \"\"\"\n \"\"\"<span class=\"no\">LIST</span>\"\"\")\n assert_count(expected_expr, result, 1)\n\n # doctest block should not be translated but be highlighted\n expected_expr = (\n \"\"\"<span class=\"gp\">>>> </span>\"\"\"\n \"\"\"<span class=\"kn\">import</span> <span class=\"nn\">sys</span> \"\"\"\n \"\"\"<span class=\"c1\"># SYS IMPORTING</span>\"\"\")\n assert_count(expected_expr, result, 1)\n\n # '#noqa' should remain in literal blocks.\n assert_count(\"#noqa\", result, 1)\n\n # [raw.txt]\n\n result = (app.outdir / 'raw.html').read_text()\n\n # raw block should be translated\n if docutils.__version_info__ < (0, 17):\n expected_expr = \"\"\"<iframe src=\"HTTP://SPHINX-DOC.ORG\"></iframe></div>\"\"\"\n assert_count(expected_expr, result, 1)\n else:\n expected_expr = \"\"\"<iframe src=\"HTTP://SPHINX-DOC.ORG\"></iframe></section>\"\"\"\n assert_count(expected_expr, result, 1)\n\n # [figure.txt]\n\n result = (app.outdir / 'figure.html').read_text()\n\n # alt and src for image block should be translated\n expected_expr = \"\"\"<img alt=\"I18N -> IMG\" src=\"_images/img.png\" />\"\"\"\n assert_count(expected_expr, result, 1)\n\n # alt and src for figure block should be translated\n expected_expr = \"\"\"<img alt=\"IMG -> I18N\" src=\"_images/i18n.png\" />\"\"\"\n assert_count(expected_expr, result, 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_references_test_image_glob_intl.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_references_test_image_glob_intl.None_7", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 1188, "end_line": 1240, "span_ids": ["test_image_glob_intl", "test_text_references"], "tokens": 532}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_references(app, warning):\n app.builder.build_specific([app.srcdir / 'refs.txt'])\n\n warnings = warning.getvalue().replace(os.sep, '/')\n warning_expr = 'refs.txt:\\\\d+: ERROR: Unknown target name:'\n assert_count(warning_expr, warnings, 0)\n\n\n@pytest.mark.sphinx(\n 'dummy', testroot='images',\n srcdir='test_intl_images',\n confoverrides={'language': 'xx'}\n)\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_image_glob_intl(app):\n app.build()\n\n # index.rst\n doctree = app.env.get_doctree('index')\n assert_node(doctree[0][1], nodes.image, uri='rimg.xx.png',\n candidates={'*': 'rimg.xx.png'})\n\n assert isinstance(doctree[0][2], nodes.figure)\n assert_node(doctree[0][2][0], nodes.image, uri='rimg.xx.png',\n candidates={'*': 'rimg.xx.png'})\n\n assert_node(doctree[0][3], nodes.image, uri='img.*',\n candidates={'application/pdf': 'img.pdf',\n 'image/gif': 'img.gif',\n 'image/png': 'img.png'})\n\n assert isinstance(doctree[0][4], nodes.figure)\n assert_node(doctree[0][4][0], nodes.image, uri='img.*',\n candidates={'application/pdf': 'img.pdf',\n 'image/gif': 'img.gif',\n 'image/png': 'img.png'})\n\n # subdir/index.rst\n doctree = app.env.get_doctree('subdir/index')\n assert_node(doctree[0][1], nodes.image, uri='subdir/rimg.xx.png',\n candidates={'*': 'subdir/rimg.xx.png'})\n\n assert_node(doctree[0][2], nodes.image, uri='subdir/svgimg.*',\n candidates={'application/pdf': 'subdir/svgimg.pdf',\n 'image/svg+xml': 'subdir/svgimg.xx.svg'})\n\n assert isinstance(doctree[0][3], nodes.figure)\n assert_node(doctree[0][3][0], nodes.image, uri='subdir/svgimg.*',\n candidates={'application/pdf': 'subdir/svgimg.pdf',\n 'image/svg+xml': 'subdir/svgimg.xx.svg'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_locale.py_test_init_with_unknown_language_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_locale.py_test_init_with_unknown_language_", "embedding": null, "metadata": {"file_path": "tests/test_locale.py", "file_name": "test_locale.py", "file_type": "text/x-python", "category": "test", "start_line": 51, "end_line": 66, "span_ids": ["test_add_message_catalog", "test_init_with_unknown_language"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_init_with_unknown_language(rootdir):\n locale.init([rootdir / 'test-locale' / 'locale1'], 'unknown', 'myext')\n _ = locale.get_translation('myext')\n assert _('Hello world') == 'Hello world'\n assert _('Hello sphinx') == 'Hello sphinx'\n assert _('Hello reST') == 'Hello reST'\n\n\ndef test_add_message_catalog(app, rootdir):\n app.config.language = 'en'\n app.add_message_catalog('myext', rootdir / 'test-locale' / 'locale1')\n _ = locale.get_translation('myext')\n assert _('Hello world') == 'HELLO WORLD'\n assert _('Hello sphinx') == 'Hello sphinx'\n assert _('Hello reST') == 'Hello reST'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_verify_re_latex_verify_re_latex.return.verify": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_verify_re_latex_verify_re_latex.return.verify", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 108, "end_line": 121, "span_ids": ["verify_re_latex"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef verify_re_latex(app, parse):\n def verify(rst, latex_expected):\n document = parse(rst)\n app.builder = LaTeXBuilder(app)\n app.builder.set_environment(app.env)\n app.builder.init()\n theme = app.builder.themes.get('manual')\n latex_translator = ForgivingLaTeXTranslator(document, app.builder, theme)\n latex_translator.first_document = -1 # don't write \\begin{document}\n document.walkabout(latex_translator)\n latex_translated = ''.join(latex_translator.body).strip()\n assert re.match(latex_expected, latex_translated), 'from ' + repr(rst)\n return verify", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_verify_re_get_verifier.return.get": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_verify_re_get_verifier.return.get", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 124, "end_line": 153, "span_ids": ["verify", "get_verifier", "verify_re"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef verify_re(verify_re_html, verify_re_latex):\n def verify_re_(rst, html_expected, latex_expected):\n if html_expected:\n verify_re_html(rst, html_expected)\n if latex_expected:\n verify_re_latex(rst, latex_expected)\n return verify_re_\n\n\n@pytest.fixture\ndef verify(verify_re_html, verify_re_latex):\n def verify_(rst, html_expected, latex_expected):\n if html_expected:\n verify_re_html(rst, re.escape(html_expected) + '$')\n if latex_expected:\n verify_re_latex(rst, re.escape(latex_expected) + '$')\n return verify_\n\n\n@pytest.fixture\ndef get_verifier(verify, verify_re):\n v = {\n 'verify': verify,\n 'verify_re': verify_re,\n }\n\n def get(name):\n return v[name]\n return get", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_inline_docutils16_test_inline_docutils16.verifier_rst_html_expect": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_inline_docutils16_test_inline_docutils16.verifier_rst_html_expect", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 353, "end_line": 365, "span_ids": ["test_inline_docutils16"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize('type,rst,html_expected,latex_expected', [\n (\n 'verify',\n r'4 backslashes \\\\\\\\',\n r'<p>4 backslashes \\\\</p>',\n None,\n ),\n])\n@pytest.mark.skipif(docutils.__version_info__ < (0, 16),\n reason='docutils-0.16 or above is required')\ndef test_inline_docutils16(get_verifier, type, rst, html_expected, latex_expected):\n verifier = get_verifier(type)\n verifier(rst, html_expected, latex_expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_inline_for_unicode_latex_engine_test_inline_for_unicode_latex_engine.verifier_rst_html_expect": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_inline_for_unicode_latex_engine_test_inline_for_unicode_latex_engine.verifier_rst_html_expect", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 368, "end_line": 383, "span_ids": ["test_inline_for_unicode_latex_engine"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(confoverrides={'latex_engine': 'xelatex'})\n@pytest.mark.parametrize('type,rst,html_expected,latex_expected', [\n (\n # in verbatim code fragments\n 'verify',\n '::\\n\\n @\u0393\\\\\u221e${}',\n None,\n ('\\\\begin{sphinxVerbatim}[commandchars=\\\\\\\\\\\\{\\\\}]\\n'\n '@\u0393\\\\PYGZbs{}\u221e\\\\PYGZdl{}\\\\PYGZob{}\\\\PYGZcb{}\\n'\n '\\\\end{sphinxVerbatim}'),\n ),\n])\ndef test_inline_for_unicode_latex_engine(get_verifier, type, rst,\n html_expected, latex_expected):\n verifier = get_verifier(type)\n verifier(rst, html_expected, latex_expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_samp_role_test_samp_role.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_samp_role_test_samp_role.None_4", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 386, "end_line": 413, "span_ids": ["test_samp_role"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_samp_role(parse):\n # no braces\n text = ':samp:`a{b}c`'\n doctree = parse(text)\n assert_node(doctree[0], [nodes.paragraph, nodes.literal, (\"a\",\n [nodes.emphasis, \"b\"],\n \"c\")])\n # nested braces\n text = ':samp:`a{{b}}c`'\n doctree = parse(text)\n assert_node(doctree[0], [nodes.paragraph, nodes.literal, (\"a\",\n [nodes.emphasis, \"{b\"],\n \"}c\")])\n\n # half-opened braces\n text = ':samp:`a{bc`'\n doctree = parse(text)\n assert_node(doctree[0], [nodes.paragraph, nodes.literal, \"a{bc\"])\n\n # escaped braces\n text = ':samp:`a\\\\\\\\{b}c`'\n doctree = parse(text)\n assert_node(doctree[0], [nodes.paragraph, nodes.literal, \"a{b}c\"])\n\n # no braces (whitespaces are keeped as is)\n text = ':samp:`code sample`'\n doctree = parse(text)\n assert_node(doctree[0], [nodes.paragraph, nodes.literal, \"code sample\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_download_role_test_download_role.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_download_role_test_download_role.None_5", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 416, "end_line": 433, "span_ids": ["test_download_role"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_download_role(parse):\n # implicit\n text = ':download:`sphinx.rst`'\n doctree = parse(text)\n assert_node(doctree[0], [nodes.paragraph, addnodes.download_reference,\n nodes.literal, \"sphinx.rst\"])\n assert_node(doctree[0][0], refdoc='dummy', refdomain='', reftype='download',\n refexplicit=False, reftarget='sphinx.rst', refwarn=False)\n assert_node(doctree[0][0][0], classes=['xref', 'download'])\n\n # explicit\n text = ':download:`reftitle <sphinx.rst>`'\n doctree = parse(text)\n assert_node(doctree[0], [nodes.paragraph, addnodes.download_reference,\n nodes.literal, \"reftitle\"])\n assert_node(doctree[0][0], refdoc='dummy', refdomain='', reftype='download',\n refexplicit=True, reftarget='sphinx.rst', refwarn=False)\n assert_node(doctree[0][0][0], classes=['xref', 'download'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_XRefRole_test_XRefRole.None_10": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_XRefRole_test_XRefRole.None_10", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 436, "end_line": 475, "span_ids": ["test_XRefRole"], "tokens": 561}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_XRefRole(inliner):\n role = XRefRole()\n\n # implicit\n doctrees, errors = role('ref', 'rawtext', 'text', 5, inliner, {}, [])\n assert len(doctrees) == 1\n assert_node(doctrees[0], [addnodes.pending_xref, nodes.literal, 'text'])\n assert_node(doctrees[0], refdoc='dummy', refdomain='', reftype='ref', reftarget='text',\n refexplicit=False, refwarn=False)\n assert errors == []\n\n # explicit\n doctrees, errors = role('ref', 'rawtext', 'title <target>', 5, inliner, {}, [])\n assert_node(doctrees[0], [addnodes.pending_xref, nodes.literal, 'title'])\n assert_node(doctrees[0], refdoc='dummy', refdomain='', reftype='ref', reftarget='target',\n refexplicit=True, refwarn=False)\n\n # bang\n doctrees, errors = role('ref', 'rawtext', '!title <target>', 5, inliner, {}, [])\n assert_node(doctrees[0], [nodes.literal, 'title <target>'])\n\n # refdomain\n doctrees, errors = role('test:doc', 'rawtext', 'text', 5, inliner, {}, [])\n assert_node(doctrees[0], [addnodes.pending_xref, nodes.literal, 'text'])\n assert_node(doctrees[0], refdoc='dummy', refdomain='test', reftype='doc', reftarget='text',\n refexplicit=False, refwarn=False)\n\n # fix_parens\n role = XRefRole(fix_parens=True)\n doctrees, errors = role('ref', 'rawtext', 'text()', 5, inliner, {}, [])\n assert_node(doctrees[0], [addnodes.pending_xref, nodes.literal, 'text()'])\n assert_node(doctrees[0], refdoc='dummy', refdomain='', reftype='ref', reftarget='text',\n refexplicit=False, refwarn=False)\n\n # lowercase\n role = XRefRole(lowercase=True)\n doctrees, errors = role('ref', 'rawtext', 'TEXT', 5, inliner, {}, [])\n assert_node(doctrees[0], [addnodes.pending_xref, nodes.literal, 'TEXT'])\n assert_node(doctrees[0], refdoc='dummy', refdomain='', reftype='ref', reftarget='text',\n refexplicit=False, refwarn=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_rst_prolog_test_rst_prolog.assert_not_md_rawsource_e": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_rst_prolog_test_rst_prolog.assert_not_md_rawsource_e", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 478, "end_line": 499, "span_ids": ["test_rst_prolog"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='prolog')\ndef test_rst_prolog(app, status, warning):\n app.builder.build_all()\n rst = app.env.get_doctree('restructuredtext')\n md = app.env.get_doctree('markdown')\n\n # rst_prolog\n assert_node(rst[0], nodes.paragraph)\n assert_node(rst[0][0], nodes.emphasis)\n assert_node(rst[0][0][0], nodes.Text)\n assert rst[0][0][0] == 'Hello world'\n\n # rst_epilog\n assert_node(rst[-1], nodes.section)\n assert_node(rst[-1][-1], nodes.paragraph)\n assert_node(rst[-1][-1][0], nodes.emphasis)\n assert_node(rst[-1][-1][0][0], nodes.Text)\n assert rst[-1][-1][0][0] == 'Good-bye world'\n\n # rst_prolog & rst_epilog on exlucding reST parser\n assert not md.rawsource.startswith('*Hello world*.')\n assert not md.rawsource.endswith('*Good-bye world*.\\n')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_keep_warnings_is_True_test_keep_warnings_is_False.assert_len_doctree_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_keep_warnings_is_True_test_keep_warnings_is_False.assert_len_doctree_0_", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 502, "end_line": 517, "span_ids": ["test_keep_warnings_is_True", "test_keep_warnings_is_False"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='keep_warnings')\ndef test_keep_warnings_is_True(app, status, warning):\n app.builder.build_all()\n doctree = app.env.get_doctree('index')\n assert_node(doctree[0], nodes.section)\n assert len(doctree[0]) == 2\n assert_node(doctree[0][1], nodes.system_message)\n\n\n@pytest.mark.sphinx('dummy', testroot='keep_warnings',\n confoverrides={'keep_warnings': False})\ndef test_keep_warnings_is_False(app, status, warning):\n app.builder.build_all()\n doctree = app.env.get_doctree('index')\n assert_node(doctree[0], nodes.section)\n assert len(doctree[0]) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_compact_refonly_bullet_list_test_compact_refonly_bullet_list.assert_doctree_0_4_0_0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_compact_refonly_bullet_list_test_compact_refonly_bullet_list.assert_doctree_0_4_0_0", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 520, "end_line": 535, "span_ids": ["test_compact_refonly_bullet_list"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='refonly_bullet_list')\ndef test_compact_refonly_bullet_list(app, status, warning):\n app.builder.build_all()\n doctree = app.env.get_doctree('index')\n assert_node(doctree[0], nodes.section)\n assert len(doctree[0]) == 5\n\n assert doctree[0][1].astext() == 'List A:'\n assert_node(doctree[0][2], nodes.bullet_list)\n assert_node(doctree[0][2][0][0], addnodes.compact_paragraph)\n assert doctree[0][2][0][0].astext() == 'genindex'\n\n assert doctree[0][3].astext() == 'List B:'\n assert_node(doctree[0][4], nodes.bullet_list)\n assert_node(doctree[0][4][0][0], nodes.paragraph)\n assert doctree[0][4][0][0].astext() == 'Hello'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_default_role1_test_default_role1.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_default_role1_test_default_role1.None_9", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 538, "end_line": 555, "span_ids": ["test_default_role1"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='default_role')\ndef test_default_role1(app, status, warning):\n app.builder.build_all()\n\n # default-role: pep\n doctree = app.env.get_doctree('index')\n assert_node(doctree[0], nodes.section)\n assert_node(doctree[0][1], nodes.paragraph)\n assert_node(doctree[0][1][0], addnodes.index)\n assert_node(doctree[0][1][1], nodes.target)\n assert_node(doctree[0][1][2], nodes.reference, classes=[\"pep\"])\n\n # no default-role\n doctree = app.env.get_doctree('foo')\n assert_node(doctree[0], nodes.section)\n assert_node(doctree[0][1], nodes.paragraph)\n assert_node(doctree[0][1][0], nodes.title_reference)\n assert_node(doctree[0][1][1], nodes.Text)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_default_role2_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py_test_default_role2_", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 558, "end_line": 577, "span_ids": ["test_default_role2"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='default_role',\n confoverrides={'default_role': 'guilabel'})\ndef test_default_role2(app, status, warning):\n app.builder.build_all()\n\n # default-role directive is stronger than configratuion\n doctree = app.env.get_doctree('index')\n assert_node(doctree[0], nodes.section)\n assert_node(doctree[0][1], nodes.paragraph)\n assert_node(doctree[0][1][0], addnodes.index)\n assert_node(doctree[0][1][1], nodes.target)\n assert_node(doctree[0][1][2], nodes.reference, classes=[\"pep\"])\n\n # default_role changes the default behavior\n doctree = app.env.get_doctree('foo')\n assert_node(doctree[0], nodes.section)\n assert_node(doctree[0][1], nodes.paragraph)\n assert_node(doctree[0][1][0], nodes.inline, classes=[\"guilabel\"])\n assert_node(doctree[0][1][1], nodes.Text)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_project.py_test_project_path2doc_test_project_path2doc.assert_project_path2doc_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_project.py_test_project_path2doc_test_project_path2doc.assert_project_path2doc_a", "embedding": null, "metadata": {"file_path": "tests/test_project.py", "file_name": "test_project.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 62, "span_ids": ["test_project_path2doc"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='basic')\ndef test_project_path2doc(app):\n project = Project(app.srcdir, app.config.source_suffix)\n assert project.path2doc('index.rst') == 'index'\n assert project.path2doc('index.foo') is None # unknown extension\n assert project.path2doc('index.foo.rst') == 'index.foo'\n assert project.path2doc('index') is None\n assert project.path2doc('path/to/index.rst') == 'path/to/index'\n assert project.path2doc(app.srcdir / 'to/index.rst') == 'to/index'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_project.py_test_project_doc2path_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_project.py_test_project_doc2path_", "embedding": null, "metadata": {"file_path": "tests/test_project.py", "file_name": "test_project.py", "file_type": "text/x-python", "category": "test", "start_line": 65, "end_line": 85, "span_ids": ["test_project_doc2path"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(srcdir='project_doc2path', testroot='basic')\ndef test_project_doc2path(app):\n source_suffix = OrderedDict([('.rst', 'restructuredtext'),\n ('.txt', 'restructuredtext')])\n\n project = Project(app.srcdir, source_suffix)\n assert project.doc2path('index') == (app.srcdir / 'index.rst')\n\n # first source_suffix is used for missing file\n assert project.doc2path('foo') == (app.srcdir / 'foo.rst')\n\n # matched source_suffix is used if exists\n (app.srcdir / 'foo.txt').write_text('')\n assert project.doc2path('foo') == (app.srcdir / 'foo.txt')\n\n # absolute path\n assert project.doc2path('index', basedir=True) == (app.srcdir / 'index.rst')\n\n # relative path\n assert project.doc2path('index', basedir=False) == 'index.rst'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_for_module_test_ModuleAnalyzer_for_module.try_.finally_.sys_path_pop_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_for_module_test_ModuleAnalyzer_for_module.try_.finally_.sys_path_pop_0_", "embedding": null, "metadata": {"file_path": "tests/test_pycode.py", "file_name": "test_pycode.py", "file_type": "text/x-python", "category": "test", "start_line": 43, "end_line": 56, "span_ids": ["test_ModuleAnalyzer_for_module"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ModuleAnalyzer_for_module(rootdir):\n analyzer = ModuleAnalyzer.for_module('sphinx')\n assert analyzer.modname == 'sphinx'\n assert analyzer.srcname in (SPHINX_MODULE_PATH,\n os.path.abspath(SPHINX_MODULE_PATH))\n\n path = rootdir / 'test-pycode'\n sys.path.insert(0, path)\n try:\n analyzer = ModuleAnalyzer.for_module('cp_1251_coded')\n docs = analyzer.find_attr_docs()\n assert docs == {('', 'X'): ['It MUST look like X=\"\\u0425\"', '']}\n finally:\n sys.path.pop(0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_for_file_in_egg_test_ModuleAnalyzer_for_module_in_egg.try_.finally_.sys_path_pop_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_for_file_in_egg_test_ModuleAnalyzer_for_module_in_egg.try_.finally_.sys_path_pop_0_", "embedding": null, "metadata": {"file_path": "tests/test_pycode.py", "file_name": "test_pycode.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 81, "span_ids": ["test_ModuleAnalyzer_for_file_in_egg", "test_ModuleAnalyzer_for_module_in_egg"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ModuleAnalyzer_for_file_in_egg(rootdir):\n try:\n path = rootdir / 'test-pycode-egg' / 'sample-0.0.0-py3.7.egg'\n sys.path.insert(0, path)\n\n import sample\n analyzer = ModuleAnalyzer.for_file(sample.__file__, 'sample')\n docs = analyzer.find_attr_docs()\n assert docs == {('', 'CONSTANT'): ['constant on sample.py', '']}\n finally:\n sys.path.pop(0)\n\n\ndef test_ModuleAnalyzer_for_module_in_egg(rootdir):\n try:\n path = rootdir / 'test-pycode-egg' / 'sample-0.0.0-py3.7.egg'\n sys.path.insert(0, path)\n\n analyzer = ModuleAnalyzer.for_module('sample')\n docs = analyzer.find_attr_docs()\n assert docs == {('', 'CONSTANT'): ['constant on sample.py', '']}\n finally:\n sys.path.pop(0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_find_tags_test_ModuleAnalyzer_find_tags.assert_tags_Corge_grault": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_find_tags_test_ModuleAnalyzer_find_tags.assert_tags_Corge_grault", "embedding": null, "metadata": {"file_path": "tests/test_pycode.py", "file_name": "test_pycode.py", "file_type": "text/x-python", "category": "test", "start_line": 84, "end_line": 125, "span_ids": ["test_ModuleAnalyzer_find_tags"], "tokens": 487}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ModuleAnalyzer_find_tags():\n code = ('class Foo(object):\\n' # line: 1\n ' \"\"\"class Foo!\"\"\"\\n'\n ' def __init__(self):\\n'\n ' pass\\n'\n '\\n'\n ' def bar(self, arg1, arg2=True, *args, **kwargs):\\n'\n ' \"\"\"method Foo.bar\"\"\"\\n'\n ' pass\\n'\n '\\n'\n ' class Baz(object):\\n'\n ' def __init__(self):\\n' # line: 11\n ' pass\\n'\n '\\n'\n 'def qux():\\n'\n ' \"\"\"function baz\"\"\"\\n'\n ' pass\\n'\n '\\n'\n '@decorator1\\n'\n '@decorator2\\n'\n 'def quux():\\n'\n ' pass\\n' # line: 21\n '\\n'\n 'class Corge(object):\\n'\n ' @decorator1\\n'\n ' @decorator2\\n'\n ' def grault(self):\\n'\n ' pass\\n')\n analyzer = ModuleAnalyzer.for_string(code, 'module')\n tags = analyzer.find_tags()\n assert set(tags.keys()) == {'Foo', 'Foo.__init__', 'Foo.bar',\n 'Foo.Baz', 'Foo.Baz.__init__', 'qux', 'quux',\n 'Corge', 'Corge.grault'}\n assert tags['Foo'] == ('class', 1, 12) # type, start, end\n assert tags['Foo.__init__'] == ('def', 3, 4)\n assert tags['Foo.bar'] == ('def', 6, 8)\n assert tags['Foo.Baz'] == ('class', 10, 12)\n assert tags['Foo.Baz.__init__'] == ('def', 11, 12)\n assert tags['qux'] == ('def', 14, 16)\n assert tags['quux'] == ('def', 18, 21)\n assert tags['Corge'] == ('class', 23, 27)\n assert tags['Corge.grault'] == ('def', 24, 27)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_ast.py_test_unparse_None_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_ast.py_test_unparse_None_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_ast.py", "file_name": "test_pycode_ast.py", "file_type": "text/x-python", "category": "test", "start_line": 64, "end_line": 78, "span_ids": ["test_unparse_None", "test_unparse_py38"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_unparse_None():\n assert ast.unparse(None) is None\n\n\n@pytest.mark.skipif(sys.version_info < (3, 8), reason='python 3.8+ is required.')\n@pytest.mark.parametrize('source,expected', [\n (\"lambda x=0, /, y=1, *args, z, **kwargs: x + y + z\",\n \"lambda x=0, /, y=1, *args, z, **kwargs: ...\"), # posonlyargs\n (\"0x1234\", \"0x1234\"), # Constant\n (\"1_000_000\", \"1_000_000\"), # Constant\n])\ndef test_unparse_py38(source, expected):\n module = ast.parse(source)\n assert ast.unparse(module.body[0].value, source) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_comment_picker_location_test_comment_picker_location.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_comment_picker_location_test_comment_picker_location.None_5", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 38, "end_line": 94, "span_ids": ["test_comment_picker_location"], "tokens": 526}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_comment_picker_location():\n # multiple \"before\" comments\n source = ('#: comment before assignment1\\n'\n '#:\\n'\n '#: comment before assignment2\\n'\n 'a = 1 + 1\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'a'): ('comment before assignment1\\n'\n '\\n'\n 'comment before assignment2')}\n\n # before and after comments\n source = ('#: comment before assignment\\n'\n 'a = 1 + 1 #: comment after assignment\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'a'): 'comment after assignment'}\n\n # after comment and next line string\n source = ('a = 1 + 1\\n #: comment after assignment\\n'\n '\"\"\"string on next line\"\"\"\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'a'): 'string on next line'}\n\n # before comment and next line string\n source = ('#: comment before assignment\\n'\n 'a = 1 + 1\\n'\n '\"\"\"string on next line\"\"\"\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'a'): 'string on next line'}\n\n # before comment, after comment and next line string\n source = ('#: comment before assignment\\n'\n 'a = 1 + 1 #: comment after assignment\\n'\n '\"\"\"string on next line\"\"\"\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'a'): 'string on next line'}\n\n # inside __init__ method\n source = ('class Foo(object):\\n'\n ' def __init__(self):\\n'\n ' #: comment before assignment\\n'\n ' self.attr1 = None\\n'\n ' self.attr2 = None #: comment after assignment\\n'\n '\\n'\n ' #: comment for attr3(1)\\n'\n ' self.attr3 = None #: comment for attr3(2)\\n'\n ' \"\"\"comment for attr3(3)\"\"\"\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('Foo', 'attr1'): 'comment before assignment',\n ('Foo', 'attr2'): 'comment after assignment',\n ('Foo', 'attr3'): 'comment for attr3(3)'}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_complex_assignment_test_complex_assignment.assert_parser_definitions": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_complex_assignment_test_complex_assignment.assert_parser_definitions", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 118, "end_line": 140, "span_ids": ["test_complex_assignment"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_complex_assignment():\n source = ('a = 1 + 1; b = a #: compound statement\\n'\n 'c, d = (1, 1) #: unpack assignment\\n'\n 'e = True #: first assignment\\n'\n 'e = False #: second assignment\\n'\n 'f = g = None #: multiple assignment at once\\n'\n '(theta, phi) = (0, 0.5) #: unpack assignment via tuple\\n'\n '[x, y] = (5, 6) #: unpack assignment via list\\n'\n )\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'b'): 'compound statement',\n ('', 'c'): 'unpack assignment',\n ('', 'd'): 'unpack assignment',\n ('', 'e'): 'second assignment',\n ('', 'f'): 'multiple assignment at once',\n ('', 'g'): 'multiple assignment at once',\n ('', 'theta'): 'unpack assignment via tuple',\n ('', 'phi'): 'unpack assignment via tuple',\n ('', 'x'): 'unpack assignment via list',\n ('', 'y'): 'unpack assignment via list',\n }\n assert parser.definitions == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_complex_assignment_py3_test_complex_assignment_py3.assert_parser_definitions": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_complex_assignment_py3_test_complex_assignment_py3.assert_parser_definitions", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 143, "end_line": 156, "span_ids": ["test_complex_assignment_py3"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_complex_assignment_py3():\n source = ('a, *b, c = (1, 2, 3, 4) #: unpack assignment\\n'\n 'd, *self.attr = (5, 6, 7) #: unpack assignment2\\n'\n 'e, *f[0] = (8, 9, 0) #: unpack assignment3\\n'\n )\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'a'): 'unpack assignment',\n ('', 'b'): 'unpack assignment',\n ('', 'c'): 'unpack assignment',\n ('', 'd'): 'unpack assignment2',\n ('', 'e'): 'unpack assignment3',\n }\n assert parser.definitions == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_assignment_in_try_clause_test_obj_assignment.assert_parser_definitions": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_assignment_in_try_clause_test_obj_assignment.assert_parser_definitions", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 159, "end_line": 181, "span_ids": ["test_obj_assignment", "test_assignment_in_try_clause"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_assignment_in_try_clause():\n source = ('try:\\n'\n ' a = None #: comment\\n'\n 'except:\\n'\n ' b = None #: ignored\\n'\n 'else:\\n'\n ' c = None #: comment\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'a'): 'comment',\n ('', 'c'): 'comment'}\n assert parser.deforders == {'a': 0,\n 'c': 1}\n\n\ndef test_obj_assignment():\n source = ('obj = SomeObject() #: some object\\n'\n 'obj.attr = 1 #: attr1\\n'\n 'obj.attr.attr = 1 #: attr2\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'obj'): 'some object'}\n assert parser.definitions == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_container_assignment_test_container_assignment.assert_parser_definitions": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_container_assignment_test_container_assignment.assert_parser_definitions", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 184, "end_line": 195, "span_ids": ["test_container_assignment"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_container_assignment():\n source = ('l = [] #: list\\n'\n 'l[1] = True #: list assignment\\n'\n 'l[0:0] = [] #: list assignment\\n'\n 'l[_from:_to] = [] #: list assignment\\n'\n 'd = {} #: dict\\n'\n 'd[\"doc\"] = 1 #: dict assignment\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'l'): 'list',\n ('', 'd'): 'dict'}\n assert parser.definitions == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_function_test_nested_function.assert_parser_deforders_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_function_test_nested_function.assert_parser_deforders_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 198, "end_line": 221, "span_ids": ["test_function", "test_nested_function"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_function():\n source = ('def some_function():\\n'\n ' \"\"\"docstring\"\"\"\\n'\n ' a = 1 + 1 #: comment1\\n'\n '\\n'\n ' b = a #: comment2\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {}\n assert parser.definitions == {'some_function': ('def', 1, 5)}\n assert parser.deforders == {'some_function': 0}\n\n\ndef test_nested_function():\n source = ('def some_function():\\n'\n ' a = 1 + 1 #: comment1\\n'\n '\\n'\n ' def inner_function():\\n'\n ' b = 1 + 1 #: comment2\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {}\n assert parser.definitions == {'some_function': ('def', 1, 5)}\n assert parser.deforders == {'some_function': 0}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_class_test_class.assert_parser_deforders_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_class_test_class.assert_parser_deforders_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 212, "end_line": 237, "span_ids": ["test_class"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_class():\n source = ('class Foo(object):\\n'\n ' attr1 = None #: comment1\\n'\n ' attr2 = None #: comment2\\n'\n '\\n'\n ' def __init__(self):\\n'\n ' self.a = 1 + 1 #: comment3\\n'\n ' self.attr2 = 1 + 1 #: overridden\\n'\n ' b = 1 + 1 #: comment5\\n'\n '\\n'\n ' def some_method(self):\\n'\n ' c = 1 + 1 #: comment6\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('Foo', 'attr1'): 'comment1',\n ('Foo', 'a'): 'comment3',\n ('Foo', 'attr2'): 'overridden'}\n assert parser.definitions == {'Foo': ('class', 1, 11),\n 'Foo.__init__': ('def', 5, 8),\n 'Foo.some_method': ('def', 10, 11)}\n assert parser.deforders == {'Foo': 0,\n 'Foo.attr1': 1,\n 'Foo.__init__': 3,\n 'Foo.a': 4,\n 'Foo.attr2': 5,\n 'Foo.some_method': 6}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_class_uses_non_self_test_class_uses_non_self.assert_parser_deforders_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_class_uses_non_self_test_class_uses_non_self.assert_parser_deforders_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 252, "end_line": 263, "span_ids": ["test_class_uses_non_self"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_class_uses_non_self():\n source = ('class Foo(object):\\n'\n ' def __init__(this):\\n'\n ' this.a = 1 + 1 #: comment\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('Foo', 'a'): 'comment'}\n assert parser.definitions == {'Foo': ('class', 1, 3),\n 'Foo.__init__': ('def', 2, 3)}\n assert parser.deforders == {'Foo': 0,\n 'Foo.__init__': 1,\n 'Foo.a': 2}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_nested_class_test_nested_class.assert_parser_deforders_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_nested_class_test_nested_class.assert_parser_deforders_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 266, "end_line": 281, "span_ids": ["test_nested_class"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_nested_class():\n source = ('class Foo(object):\\n'\n ' attr1 = None #: comment1\\n'\n '\\n'\n ' class Bar(object):\\n'\n ' attr2 = None #: comment2\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('Foo', 'attr1'): 'comment1',\n ('Foo.Bar', 'attr2'): 'comment2'}\n assert parser.definitions == {'Foo': ('class', 1, 5),\n 'Foo.Bar': ('class', 4, 5)}\n assert parser.deforders == {'Foo': 0,\n 'Foo.attr1': 1,\n 'Foo.Bar': 2,\n 'Foo.Bar.attr2': 3}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_class_comment_test_comment_picker_multiline_string.assert_parser_comments_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_class_comment_test_comment_picker_multiline_string.assert_parser_comments_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 284, "end_line": 311, "span_ids": ["test_comment_picker_multiline_string", "test_class_comment"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_class_comment():\n source = ('import logging\\n'\n 'logger = logging.getLogger(__name__)\\n'\n '\\n'\n 'class Foo(object):\\n'\n ' \"\"\"Bar\"\"\"\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {}\n assert parser.definitions == {'Foo': ('class', 4, 5)}\n\n\ndef test_comment_picker_multiline_string():\n source = ('class Foo(object):\\n'\n ' a = None\\n'\n ' \"\"\"multiline\\n'\n ' docstring\\n'\n ' \"\"\"\\n'\n ' b = None\\n'\n ' \"\"\"\\n'\n ' docstring\\n'\n ' starts with::\\n'\n '\\n'\n ' empty line\"\"\"\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('Foo', 'a'): 'multiline\\ndocstring',\n ('Foo', 'b'): 'docstring\\nstarts with::\\n\\n empty line'}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_decorators_test_decorators.assert_parser_definitions": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_decorators_test_decorators.assert_parser_definitions", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 314, "end_line": 336, "span_ids": ["test_decorators"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_decorators():\n source = ('@deco\\n'\n 'def func1(): pass\\n'\n '\\n'\n '@deco(param1, param2)\\n'\n 'def func2(): pass\\n'\n '\\n'\n '@deco1\\n'\n '@deco2\\n'\n 'def func3(): pass\\n'\n '\\n'\n '@deco\\n'\n 'class Foo():\\n'\n ' @deco1\\n'\n ' @deco2\\n'\n ' def method(self): pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.definitions == {'func1': ('def', 1, 2),\n 'func2': ('def', 4, 5),\n 'func3': ('def', 7, 9),\n 'Foo': ('class', 11, 15),\n 'Foo.method': ('def', 13, 15)}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_async_function_and_method_test_async_function_and_method.assert_parser_definitions": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_async_function_and_method_test_async_function_and_method.assert_parser_definitions", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 339, "end_line": 351, "span_ids": ["test_async_function_and_method"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_async_function_and_method():\n source = ('async def some_function():\\n'\n ' \"\"\"docstring\"\"\"\\n'\n ' a = 1 + 1 #: comment1\\n'\n '\\n'\n 'class Foo:\\n'\n ' async def method(self):\\n'\n ' pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.definitions == {'some_function': ('def', 1, 3),\n 'Foo': ('class', 5, 7),\n 'Foo.method': ('def', 6, 7)}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_imports_test_imports.assert_parser_deforders_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_imports_test_imports.assert_parser_deforders_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 354, "end_line": 367, "span_ids": ["test_imports"], "tokens": 106}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_imports():\n source = ('import sys\\n'\n 'from os import environment, path\\n'\n '\\n'\n 'import sphinx as Sphinx\\n'\n 'from sphinx.application import Sphinx as App\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.definitions == {}\n assert parser.deforders == {'sys': 0,\n 'environment': 1,\n 'path': 2,\n 'Sphinx': 3,\n 'App': 4}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_do_prompt_test_do_prompt.with_pytest_raises_Assert.qs_do_prompt_Q6_valida": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_do_prompt_test_do_prompt.with_pytest_raises_Assert.qs_do_prompt_Q6_valida", "embedding": null, "metadata": {"file_path": "tests/test_quickstart.py", "file_name": "test_quickstart.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 70, "span_ids": ["test_do_prompt"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_do_prompt():\n answers = {\n 'Q2': 'v2',\n 'Q3': 'v3',\n 'Q4': 'yes',\n 'Q5': 'no',\n 'Q6': 'foo',\n }\n qs.term_input = mock_input(answers)\n\n assert qs.do_prompt('Q1', default='v1') == 'v1'\n assert qs.do_prompt('Q3', default='v3_default') == 'v3'\n assert qs.do_prompt('Q2') == 'v2'\n assert qs.do_prompt('Q4', validator=qs.boolean) is True\n assert qs.do_prompt('Q5', validator=qs.boolean) is False\n with pytest.raises(AssertionError):\n qs.do_prompt('Q6', validator=qs.boolean)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_do_prompt_inputstrip_test_do_prompt_with_nonascii.assert_result_u30c9_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_do_prompt_inputstrip_test_do_prompt_with_nonascii.assert_result_u30c9_", "embedding": null, "metadata": {"file_path": "tests/test_quickstart.py", "file_name": "test_quickstart.py", "file_type": "text/x-python", "category": "test", "start_line": 73, "end_line": 94, "span_ids": ["test_do_prompt_inputstrip", "test_do_prompt_with_nonascii"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_do_prompt_inputstrip():\n answers = {\n 'Q1': 'Y',\n 'Q2': ' Yes ',\n 'Q3': 'N',\n 'Q4': 'N ',\n }\n qs.term_input = mock_input(answers)\n\n assert qs.do_prompt('Q1') == 'Y'\n assert qs.do_prompt('Q2') == 'Yes'\n assert qs.do_prompt('Q3') == 'N'\n assert qs.do_prompt('Q4') == 'N'\n\n\ndef test_do_prompt_with_nonascii():\n answers = {\n 'Q1': '\\u30c9\\u30a4\\u30c4',\n }\n qs.term_input = mock_input(answers)\n result = qs.do_prompt('Q1', default='\\u65e5\\u672c')\n assert result == '\\u30c9\\u30a4\\u30c4'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_quickstart_defaults_test_quickstart_defaults.assert_tempdir_make_b": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_quickstart_defaults_test_quickstart_defaults.assert_tempdir_make_b", "embedding": null, "metadata": {"file_path": "tests/test_quickstart.py", "file_name": "test_quickstart.py", "file_type": "text/x-python", "category": "test", "start_line": 88, "end_line": 116, "span_ids": ["test_quickstart_defaults"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_quickstart_defaults(tempdir):\n answers = {\n 'Root path': tempdir,\n 'Project name': 'Sphinx Test',\n 'Author name': 'Georg Brandl',\n 'Project version': '0.1',\n }\n qs.term_input = mock_input(answers)\n d = {}\n qs.ask_user(d)\n qs.generate(d)\n\n conffile = tempdir / 'conf.py'\n assert conffile.isfile()\n ns = {}\n exec(conffile.read_text(), ns)\n assert ns['extensions'] == []\n assert ns['templates_path'] == ['_templates']\n assert ns['project'] == 'Sphinx Test'\n assert ns['copyright'] == '%s, Georg Brandl' % time.strftime('%Y')\n assert ns['version'] == '0.1'\n assert ns['release'] == '0.1'\n assert ns['html_static_path'] == ['_static']\n\n assert (tempdir / '_static').isdir()\n assert (tempdir / '_templates').isdir()\n assert (tempdir / 'index.rst').isfile()\n assert (tempdir / 'Makefile').isfile()\n assert (tempdir / 'make.bat').isfile()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_quickstart_all_answers_test_quickstart_all_answers.None_14": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_quickstart_all_answers_test_quickstart_all_answers.None_14", "embedding": null, "metadata": {"file_path": "tests/test_quickstart.py", "file_name": "test_quickstart.py", "file_type": "text/x-python", "category": "test", "start_line": 119, "end_line": 171, "span_ids": ["test_quickstart_all_answers"], "tokens": 517}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_quickstart_all_answers(tempdir):\n answers = {\n 'Root path': tempdir,\n 'Separate source and build': 'y',\n 'Name prefix for templates': '.',\n 'Project name': 'STASI\u2122',\n 'Author name': 'Wolfgang Sch\u00e4uble & G\\'Beckstein',\n 'Project version': '2.0',\n 'Project release': '2.0.1',\n 'Project language': 'de',\n 'Source file suffix': '.txt',\n 'Name of your master document': 'contents',\n 'autodoc': 'y',\n 'doctest': 'yes',\n 'intersphinx': 'no',\n 'todo': 'y',\n 'coverage': 'no',\n 'imgmath': 'N',\n 'mathjax': 'no',\n 'ifconfig': 'no',\n 'viewcode': 'no',\n 'githubpages': 'no',\n 'Create Makefile': 'no',\n 'Create Windows command file': 'no',\n 'Do you want to use the epub builder': 'yes',\n }\n qs.term_input = mock_input(answers, needanswer=True)\n d = {}\n qs.ask_user(d)\n qs.generate(d)\n\n conffile = tempdir / 'source' / 'conf.py'\n assert conffile.isfile()\n ns = {}\n exec(conffile.read_text(), ns)\n assert ns['extensions'] == [\n 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo'\n ]\n assert ns['templates_path'] == ['.templates']\n assert ns['source_suffix'] == '.txt'\n assert ns['root_doc'] == 'contents'\n assert ns['project'] == 'STASI\u2122'\n assert ns['copyright'] == '%s, Wolfgang Sch\u00e4uble & G\\'Beckstein' % \\\n time.strftime('%Y')\n assert ns['version'] == '2.0'\n assert ns['release'] == '2.0.1'\n assert ns['todo_include_todos'] is True\n assert ns['html_static_path'] == ['.static']\n\n assert (tempdir / 'build').isdir()\n assert (tempdir / 'source' / '.static').isdir()\n assert (tempdir / 'source' / '.templates').isdir()\n assert (tempdir / 'source' / 'contents.txt').isfile()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_generated_files_eol_test_generated_files_eol.assert_eol_tempdir_Mak": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_generated_files_eol_test_generated_files_eol.assert_eol_tempdir_Mak", "embedding": null, "metadata": {"file_path": "tests/test_quickstart.py", "file_name": "test_quickstart.py", "file_type": "text/x-python", "category": "test", "start_line": 183, "end_line": 200, "span_ids": ["test_generated_files_eol"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_generated_files_eol(tempdir):\n answers = {\n 'Root path': tempdir,\n 'Project name': 'Sphinx Test',\n 'Author name': 'Georg Brandl',\n 'Project version': '0.1',\n }\n qs.term_input = mock_input(answers)\n d = {}\n qs.ask_user(d)\n qs.generate(d)\n\n def assert_eol(filename, eol):\n content = filename.read_bytes().decode()\n assert all([l[-len(eol):] == eol for l in content.splitlines(True)])\n\n assert_eol(tempdir / 'make.bat', '\\r\\n')\n assert_eol(tempdir / 'Makefile', '\\n')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_quickstart_and_build_test_quickstart_and_build.assert_not_warnings": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_quickstart_and_build_test_quickstart_and_build.assert_not_warnings", "embedding": null, "metadata": {"file_path": "tests/test_quickstart.py", "file_name": "test_quickstart.py", "file_type": "text/x-python", "category": "test", "start_line": 203, "end_line": 225, "span_ids": ["test_quickstart_and_build"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_quickstart_and_build(tempdir):\n answers = {\n 'Root path': tempdir,\n 'Project name': 'Fullwidth characters: \\u30c9\\u30a4\\u30c4',\n 'Author name': 'Georg Brandl',\n 'Project version': '0.1',\n }\n qs.term_input = mock_input(answers)\n d = {}\n qs.ask_user(d)\n qs.generate(d)\n\n app = application.Sphinx(\n tempdir, # srcdir\n tempdir, # confdir\n (tempdir / '_build' / 'html'), # outdir\n (tempdir / '_build' / '.doctree'), # doctreedir\n 'html', # buildername\n status=StringIO(),\n warning=warnfile)\n app.builder.build_all()\n warnings = warnfile.getvalue()\n assert not warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_meta_keys_are_handled_for_language_en_test_meta_keys_are_handled_for_language_en.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_meta_keys_are_handled_for_language_en_test_meta_keys_are_handled_for_language_en.None_6", "embedding": null, "metadata": {"file_path": "tests/test_search.py", "file_name": "test_search.py", "file_type": "text/x-python", "category": "test", "start_line": 72, "end_line": 82, "span_ids": ["test_meta_keys_are_handled_for_language_en"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='search')\ndef test_meta_keys_are_handled_for_language_en(app, status, warning):\n app.builder.build_all()\n searchindex = jsload(app.outdir / 'searchindex.js')\n assert not is_registered_term(searchindex, 'thisnoteith')\n assert is_registered_term(searchindex, 'thisonetoo')\n assert is_registered_term(searchindex, 'findthiskei')\n assert is_registered_term(searchindex, 'thistoo')\n assert not is_registered_term(searchindex, 'onlygerman')\n assert is_registered_term(searchindex, 'notgerman')\n assert not is_registered_term(searchindex, 'onlytoogerman')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_meta_keys_are_handled_for_language_de_test_meta_keys_are_handled_for_language_de.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_meta_keys_are_handled_for_language_de_test_meta_keys_are_handled_for_language_de.None_6", "embedding": null, "metadata": {"file_path": "tests/test_search.py", "file_name": "test_search.py", "file_type": "text/x-python", "category": "test", "start_line": 85, "end_line": 95, "span_ids": ["test_meta_keys_are_handled_for_language_de"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='search', confoverrides={'html_search_language': 'de'})\ndef test_meta_keys_are_handled_for_language_de(app, status, warning):\n app.builder.build_all()\n searchindex = jsload(app.outdir / 'searchindex.js')\n assert not is_registered_term(searchindex, 'thisnoteith')\n assert is_registered_term(searchindex, 'thisonetoo')\n assert not is_registered_term(searchindex, 'findthiskei')\n assert not is_registered_term(searchindex, 'thistoo')\n assert is_registered_term(searchindex, 'onlygerman')\n assert not is_registered_term(searchindex, 'notgerman')\n assert is_registered_term(searchindex, 'onlytoogerman')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_stemmer_does_not_remove_short_words_test_term_in_raw_directive.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_stemmer_does_not_remove_short_words_test_term_in_raw_directive.None_2", "embedding": null, "metadata": {"file_path": "tests/test_search.py", "file_name": "test_search.py", "file_type": "text/x-python", "category": "test", "start_line": 98, "end_line": 128, "span_ids": ["test_stemmer_does_not_remove_short_words", "test_term_in_heading_and_section", "test_stemmer", "test_term_in_raw_directive"], "tokens": 305}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='search')\ndef test_stemmer_does_not_remove_short_words(app, status, warning):\n app.builder.build_all()\n searchindex = (app.outdir / 'searchindex.js').read_text()\n assert 'zfs' in searchindex\n\n\n@pytest.mark.sphinx(testroot='search')\ndef test_stemmer(app, status, warning):\n searchindex = jsload(app.outdir / 'searchindex.js')\n print(searchindex)\n assert is_registered_term(searchindex, 'findthisstemmedkei')\n assert is_registered_term(searchindex, 'intern')\n\n\n@pytest.mark.sphinx(testroot='search')\ndef test_term_in_heading_and_section(app, status, warning):\n searchindex = (app.outdir / 'searchindex.js').read_text()\n # if search term is in the title of one doc and in the text of another\n # both documents should be a hit in the search index as a title,\n # respectively text hit\n assert 'textinhead:2' in searchindex\n assert 'textinhead:0' in searchindex\n\n\n@pytest.mark.sphinx(testroot='search')\ndef test_term_in_raw_directive(app, status, warning):\n searchindex = jsload(app.outdir / 'searchindex.js')\n assert not is_registered_term(searchindex, 'raw')\n assert is_registered_term(searchindex, 'rawword')\n assert not is_registered_term(searchindex, 'latex_keyword')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder_lookup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder_lookup_", "embedding": null, "metadata": {"file_path": "tests/test_search.py", "file_name": "test_search.py", "file_type": "text/x-python", "category": "test", "start_line": 239, "end_line": 274, "span_ids": ["test_IndexBuilder_lookup", "test_nosearch", "test_search_index_gen_zh"], "tokens": 305}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_IndexBuilder_lookup():\n env = DummyEnvironment('1.0', {})\n\n # zh\n index = IndexBuilder(env, 'zh', {}, None)\n assert index.lang.lang == 'zh'\n\n # zh_CN\n index = IndexBuilder(env, 'zh_CN', {}, None)\n assert index.lang.lang == 'zh'\n\n\n@pytest.mark.sphinx(\n testroot='search',\n confoverrides={'html_search_language': 'zh'},\n srcdir='search_zh'\n)\ndef test_search_index_gen_zh(app, status, warning):\n app.builder.build_all()\n # jsdump fails if search language is 'zh'; hence we just get the text:\n searchindex = (app.outdir / 'searchindex.js').read_text()\n assert 'chinesetest ' not in searchindex\n assert 'chinesetest' in searchindex\n assert 'chinesetesttwo' in searchindex\n assert 'cas' in searchindex\n\n\n@pytest.mark.sphinx(testroot='search')\ndef test_nosearch(app):\n app.build()\n index = jsload(app.outdir / 'searchindex.js')\n assert index['docnames'] == ['index', 'nosearch', 'tocitem']\n assert 'latex' not in index['terms']\n assert 'zfs' in index['terms']\n assert index['terms']['zfs'] == [] # zfs on nosearch.rst is not registered to index", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py_test_build_sphinx_test_build_sphinx_multiple_invalid_builders.assert_proc_returncode_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py_test_build_sphinx_test_build_sphinx_multiple_invalid_builders.assert_proc_returncode_", "embedding": null, "metadata": {"file_path": "tests/test_setup_command.py", "file_name": "test_setup_command.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 76, "span_ids": ["test_build_sphinx_multiple_invalid_builders", "test_build_sphinx", "test_build_sphinx_multiple_builders"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_build_sphinx(setup_command):\n proc = setup_command.proc\n out, err = proc.communicate()\n print(out.decode())\n print(err.decode())\n assert proc.returncode == 0\n\n\n@pytest.mark.setup_command('-b', 'html,man')\ndef test_build_sphinx_multiple_builders(setup_command):\n proc = setup_command.proc\n out, err = proc.communicate()\n print(out.decode())\n print(err.decode())\n assert proc.returncode == 0\n\n\n@pytest.mark.setup_command('-b', 'html,bar')\ndef test_build_sphinx_multiple_invalid_builders(setup_command):\n proc = setup_command.proc\n out, err = proc.communicate()\n print(out.decode())\n print(err.decode())\n assert proc.returncode == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py_test_build_sphinx_with_nonascii_path_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py_test_build_sphinx_with_nonascii_path_", "embedding": null, "metadata": {"file_path": "tests/test_setup_command.py", "file_name": "test_setup_command.py", "file_type": "text/x-python", "category": "test", "start_line": 104, "end_line": 146, "span_ids": ["test_build_sphinx_return_nonzero_status", "test_build_sphinx_with_nonascii_path", "test_build_sphinx_warning_is_error_return_nonzero_status", "test_build_sphinx_warning_return_zero_status"], "tokens": 353}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.usefixtures('nonascii_srcdir')\ndef test_build_sphinx_with_nonascii_path(setup_command):\n proc = setup_command.proc\n out, err = proc.communicate()\n print(out.decode())\n print(err.decode())\n assert proc.returncode == 0\n\n\n@pytest.mark.setup_command('-b', 'linkcheck')\ndef test_build_sphinx_return_nonzero_status(setup_command):\n srcdir = (setup_command.pkgroot / 'doc')\n (srcdir / 'contents.txt').write_text(\n 'http://localhost.unexistentdomain/index.html')\n proc = setup_command.proc\n out, err = proc.communicate()\n print(out.decode())\n print(err.decode())\n assert proc.returncode != 0, 'expect non-zero status for setup.py'\n\n\ndef test_build_sphinx_warning_return_zero_status(setup_command):\n srcdir = (setup_command.pkgroot / 'doc')\n (srcdir / 'contents.txt').write_text(\n 'See :ref:`unexisting-reference-label`')\n proc = setup_command.proc\n out, err = proc.communicate()\n print(out.decode())\n print(err.decode())\n assert proc.returncode == 0\n\n\n@pytest.mark.setup_command('--warning-is-error')\ndef test_build_sphinx_warning_is_error_return_nonzero_status(setup_command):\n srcdir = (setup_command.pkgroot / 'doc')\n (srcdir / 'contents.txt').write_text(\n 'See :ref:`unexisting-reference-label`')\n proc = setup_command.proc\n out, err = proc.communicate()\n print(out.decode())\n print(err.decode())\n assert proc.returncode != 0, 'expect non-zero status for setup.py'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_templating.py_test_autosummary_context_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_templating.py_test_autosummary_context_", "embedding": null, "metadata": {"file_path": "tests/test_templating.py", "file_name": "test_templating.py", "file_type": "text/x-python", "category": "test", "start_line": 39, "end_line": 50, "span_ids": ["test_autosummary_context"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='templating',\n confoverrides={'autosummary_context': {'sentence': 'foobar'}})\ndef test_autosummary_context(make_app, app_params):\n args, kwargs = app_params\n app = make_app(*args, **kwargs)\n setup_documenters(app)\n app.builder.build_update()\n\n result = (app.outdir / 'generated' / 'sphinx.application.TemplateBridge.html').read_text()\n assert 'autosummary/class.rst method block overloading' in result\n assert 'foobar' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_js_source_test_js_source.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_js_source_test_js_source.None_3", "embedding": null, "metadata": {"file_path": "tests/test_theming.py", "file_name": "test_theming.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 81, "span_ids": ["test_js_source"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='tocdepth') # a minimal root\ndef test_js_source(app, status, warning):\n # Now sphinx provides non-minified JS files for jquery.js and underscore.js\n # to clarify the source of the minified files. see also #1434.\n # If you update the version of the JS file, please update the source of the\n # JS file and version number in this test.\n\n app.builder.build(['contents'])\n\n v = '3.5.1'\n msg = 'jquery.js version does not match to {v}'.format(v=v)\n jquery_min = (app.outdir / '_static' / 'jquery.js').read_text()\n assert 'jQuery v{v}'.format(v=v) in jquery_min, msg\n jquery_src = (app.outdir / '_static' / 'jquery-{v}.js'.format(v=v)).read_text()\n assert 'jQuery JavaScript Library v{v}'.format(v=v) in jquery_src, msg\n\n v = '1.13.1'\n msg = 'underscore.js version does not match to {v}'.format(v=v)\n underscore_min = (app.outdir / '_static' / 'underscore.js').read_text()\n assert 'Underscore.js {v}'.format(v=v) in underscore_min, msg\n underscore_src = (app.outdir / '_static' / 'underscore-{v}.js'.format(v=v)).read_text()\n assert 'Underscore.js {v}'.format(v=v) in underscore_src, msg", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_double_inheriting_theme_test_staticfiles.assert_meta_name_testo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_double_inheriting_theme_test_staticfiles.assert_meta_name_testo", "embedding": null, "metadata": {"file_path": "tests/test_theming.py", "file_name": "test_theming.py", "file_type": "text/x-python", "category": "test", "start_line": 92, "end_line": 117, "span_ids": ["test_staticfiles", "test_nested_zipped_theme", "test_double_inheriting_theme"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='double-inheriting-theme')\ndef test_double_inheriting_theme(app, status, warning):\n assert app.builder.theme.name == 'base_theme2'\n app.build() # => not raises TemplateNotFound\n\n\n@pytest.mark.sphinx(testroot='theming',\n confoverrides={'html_theme': 'child'})\ndef test_nested_zipped_theme(app, status, warning):\n assert app.builder.theme.name == 'child'\n app.build() # => not raises TemplateNotFound\n\n\n@pytest.mark.sphinx(testroot='theming',\n confoverrides={'html_theme': 'staticfiles'})\ndef test_staticfiles(app, status, warning):\n app.build()\n assert (app.outdir / '_static' / 'staticimg.png').exists()\n assert (app.outdir / '_static' / 'statictmpl.html').exists()\n assert (app.outdir / '_static' / 'statictmpl.html').read_text() == (\n '<!-- testing static templates -->\\n'\n '<html><project>Python</project></html>'\n )\n\n result = (app.outdir / 'index.html').read_text()\n assert '<meta name=\"testopt\" content=\"optdefault\" />' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_dark_style_test_dark_style.assert_link_id_pygmen": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_dark_style_test_dark_style.assert_link_id_pygmen", "embedding": null, "metadata": {"file_path": "tests/test_theming.py", "file_name": "test_theming.py", "file_type": "text/x-python", "category": "test", "start_line": 112, "end_line": 125, "span_ids": ["test_dark_style"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='theming',\n confoverrides={'html_theme': 'test-theme'})\ndef test_dark_style(app, status, warning):\n style = app.builder.dark_highlighter.formatter_args.get('style')\n assert style.__name__ == 'MonokaiStyle'\n\n app.build()\n assert (app.outdir / '_static' / 'pygments_dark.css').exists()\n\n result = (app.outdir / 'index.html').read_text()\n assert '<link rel=\"stylesheet\" type=\"text/css\" href=\"_static/pygments.css\" />' in result\n assert ('<link id=\"pygments_dark_css\" media=\"(prefers-color-scheme: dark)\" '\n 'rel=\"stylesheet\" type=\"text/css\" '\n 'href=\"_static/pygments_dark.css\" />') in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_theme_sidebars_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py_test_theme_sidebars_", "embedding": null, "metadata": {"file_path": "tests/test_theming.py", "file_name": "test_theming.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 146, "span_ids": ["test_theme_sidebars"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='theming')\ndef test_theme_sidebars(app, status, warning):\n app.build()\n\n # test-theme specifies globaltoc and searchbox as default sidebars\n result = (app.outdir / 'index.html').read_text()\n assert '<h3><a href=\"#\">Table of Contents</a></h3>' in result\n assert '<h3>Related Topics</h3>' not in result\n assert '<h3>This Page</h3>' not in result\n assert '<h3 id=\"searchlabel\">Quick search</h3>' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_toctree.py_test_singlehtml_toctree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_toctree.py_test_singlehtml_toctree_", "embedding": null, "metadata": {"file_path": "tests/test_toctree.py", "file_name": "test_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 32, "end_line": 48, "span_ids": ["test_singlehtml_toctree", "test_numbered_toctree"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('singlehtml', testroot='toctree-empty')\ndef test_singlehtml_toctree(app, status, warning):\n app.builder.build_all()\n try:\n app.builder._get_local_toctree('index')\n except AttributeError:\n pytest.fail('Unexpected AttributeError in app.builder.fix_refuris')\n\n\n@pytest.mark.sphinx(testroot='toctree', srcdir=\"numbered-toctree\")\ndef test_numbered_toctree(app, status, warning):\n # give argument to :numbered: option\n index = (app.srcdir / 'index.rst').read_text()\n index = re.sub(':numbered:.*', ':numbered: 1', index)\n (app.srcdir / 'index.rst').write_text(index)\n app.builder.build_all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms_code.py_pytest_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms_code.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/test_transforms_post_transforms_code.py", "file_name": "test_transforms_post_transforms_code.py", "file_type": "text/x-python", "category": "test", "start_line": 9, "end_line": 53, "span_ids": ["test_trim_doctest_flags_html", "test_trim_doctest_flags_disabled", "test_trim_doctest_flags_latex", "imports"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\n\n@pytest.mark.sphinx('html', testroot='trim_doctest_flags')\ndef test_trim_doctest_flags_html(app, status, warning):\n app.build()\n\n result = (app.outdir / 'index.html').read_text()\n assert 'FOO' not in result\n assert 'BAR' in result\n assert 'BAZ' not in result\n assert 'QUX' not in result\n assert 'QUUX' not in result\n assert 'CORGE' not in result\n assert 'GRAULT' in result\n\n\n@pytest.mark.sphinx('html', testroot='trim_doctest_flags',\n confoverrides={'trim_doctest_flags': False})\ndef test_trim_doctest_flags_disabled(app, status, warning):\n app.build()\n\n result = (app.outdir / 'index.html').read_text()\n assert 'FOO' in result\n assert 'BAR' in result\n assert 'BAZ' in result\n assert 'QUX' in result\n assert 'QUUX' not in result\n assert 'CORGE' not in result\n assert 'GRAULT' in result\n\n\n@pytest.mark.sphinx('latex', testroot='trim_doctest_flags')\ndef test_trim_doctest_flags_latex(app, status, warning):\n app.build()\n\n result = (app.outdir / 'python.tex').read_text()\n assert 'FOO' not in result\n assert 'BAR' in result\n assert 'BAZ' not in result\n assert 'QUX' not in result\n assert 'QUUX' not in result\n assert 'CORGE' not in result\n assert 'GRAULT' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_ensuredir_test_display_chunk.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_ensuredir_test_display_chunk.None_4", "embedding": null, "metadata": {"file_path": "tests/test_util.py", "file_name": "test_util.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 61, "span_ids": ["test_ensuredir", "test_display_chunk"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ensuredir():\n with tempfile.TemporaryDirectory() as tmp_path:\n # Does not raise an exception for an existing directory.\n ensuredir(tmp_path)\n\n path = os.path.join(tmp_path, 'a', 'b', 'c')\n ensuredir(path)\n assert os.path.isdir(path)\n\n with tempfile.NamedTemporaryFile() as tmp:\n with pytest.raises(OSError):\n ensuredir(tmp.name)\n\n\ndef test_display_chunk():\n assert display_chunk('hello') == 'hello'\n assert display_chunk(['hello']) == 'hello'\n assert display_chunk(['hello', 'sphinx', 'world']) == 'hello .. world'\n assert display_chunk(('hello',)) == 'hello'\n assert display_chunk(('hello', 'sphinx', 'world')) == 'hello .. world'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_import_object_test_import_object.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_import_object_test_import_object.None_4", "embedding": null, "metadata": {"file_path": "tests/test_util.py", "file_name": "test_util.py", "file_type": "text/x-python", "category": "test", "start_line": 64, "end_line": 81, "span_ids": ["test_import_object"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_object():\n module = import_object('sphinx')\n assert module.__name__ == 'sphinx'\n\n module = import_object('sphinx.application')\n assert module.__name__ == 'sphinx.application'\n\n obj = import_object('sphinx.application.Sphinx')\n assert obj.__name__ == 'Sphinx'\n\n with pytest.raises(ExtensionError) as exc:\n import_object('sphinx.unknown_module')\n assert exc.value.args[0] == 'Could not import sphinx.unknown_module'\n\n with pytest.raises(ExtensionError) as exc:\n import_object('sphinx.unknown_module', 'my extension')\n assert exc.value.args[0] == ('Could not import sphinx.unknown_module '\n '(needed for my extension)')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_status_iterator_test_status_iterator.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_status_iterator_test_status_iterator.None_9", "embedding": null, "metadata": {"file_path": "tests/test_util.py", "file_name": "test_util.py", "file_type": "text/x-python", "category": "test", "start_line": 84, "end_line": 114, "span_ids": ["test_status_iterator"], "tokens": 364}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy')\n@patch('sphinx.util.console._tw', 40) # terminal width = 40\ndef test_status_iterator(app, status, warning):\n logging.setup(app, status, warning)\n\n # test for old_status_iterator\n status.truncate(0)\n yields = list(status_iterator(['hello', 'sphinx', 'world'], 'testing ... '))\n output = strip_escseq(status.getvalue())\n assert 'testing ... hello sphinx world \\n' in output\n assert yields == ['hello', 'sphinx', 'world']\n\n # test for status_iterator (verbosity=0)\n status.truncate(0)\n yields = list(status_iterator(['hello', 'sphinx', 'world'], 'testing ... ',\n length=3, verbosity=0))\n output = strip_escseq(status.getvalue())\n assert 'testing ... [ 33%] hello \\r' in output\n assert 'testing ... [ 66%] sphinx \\r' in output\n assert 'testing ... [100%] world \\r\\n' in output\n assert yields == ['hello', 'sphinx', 'world']\n\n # test for status_iterator (verbosity=1)\n status.truncate(0)\n yields = list(status_iterator(['hello', 'sphinx', 'world'], 'testing ... ',\n length=3, verbosity=1))\n output = strip_escseq(status.getvalue())\n assert 'testing ... [ 33%] hello\\n' in output\n assert 'testing ... [ 66%] sphinx\\n' in output\n assert 'testing ... [100%] world\\n\\n' in output\n assert yields == ['hello', 'sphinx', 'world']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_parselinenos_test_parselinenos.None_3.parselinenos_3_1_10_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_parselinenos_test_parselinenos.None_3.parselinenos_3_1_10_", "embedding": null, "metadata": {"file_path": "tests/test_util.py", "file_name": "test_util.py", "file_type": "text/x-python", "category": "test", "start_line": 117, "end_line": 133, "span_ids": ["test_parselinenos"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_parselinenos():\n assert parselinenos('1,2,3', 10) == [0, 1, 2]\n assert parselinenos('4, 5, 6', 10) == [3, 4, 5]\n assert parselinenos('-4', 10) == [0, 1, 2, 3]\n assert parselinenos('7-9', 10) == [6, 7, 8]\n assert parselinenos('7-', 10) == [6, 7, 8, 9]\n assert parselinenos('1,7-', 10) == [0, 6, 7, 8, 9]\n assert parselinenos('7-7', 10) == [6]\n assert parselinenos('11-', 10) == [10]\n with pytest.raises(ValueError):\n parselinenos('1-2-3', 10)\n with pytest.raises(ValueError):\n parselinenos('abc-def', 10)\n with pytest.raises(ValueError):\n parselinenos('-', 10)\n with pytest.raises(ValueError):\n parselinenos('3-1', 10)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_progress_message_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py_test_progress_message_", "embedding": null, "metadata": {"file_path": "tests/test_util.py", "file_name": "test_util.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 179, "span_ids": ["test_progress_message", "test_xmlname_check"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_progress_message(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n # standard case\n with progress_message('testing'):\n logger.info('blah ', nonl=True)\n\n output = strip_escseq(status.getvalue())\n assert 'testing... blah done\\n' in output\n\n # skipping case\n with progress_message('testing'):\n raise SkipProgressMessage('Reason: %s', 'error')\n\n output = strip_escseq(status.getvalue())\n assert 'testing... skipped\\nReason: error\\n' in output\n\n # error case\n try:\n with progress_message('testing'):\n raise\n except Exception:\n pass\n\n output = strip_escseq(status.getvalue())\n assert 'testing... failed\\n' in output\n\n # decorator\n @progress_message('testing')\n def func():\n logger.info('in func ', nonl=True)\n\n func()\n output = strip_escseq(status.getvalue())\n assert 'testing... in func done\\n' in output\n\n\ndef test_xmlname_check():\n checker = xmlname_checker()\n assert checker.match('id-pub')\n assert checker.match('webpage')\n assert not checker.match('1bfda21')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docstrings.py_test_prepare_docstring_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docstrings.py_test_prepare_docstring_", "embedding": null, "metadata": {"file_path": "tests/test_util_docstrings.py", "file_name": "test_util_docstrings.py", "file_type": "text/x-python", "category": "test", "start_line": 41, "end_line": 82, "span_ids": ["test_prepare_commentdoc", "test_prepare_docstring"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_prepare_docstring():\n docstring = \"\"\"multiline docstring\n\n Lorem ipsum dolor sit amet, consectetur adipiscing elit,\n sed do eiusmod tempor incididunt ut labore et dolore magna\n aliqua::\n\n Ut enim ad minim veniam, quis nostrud exercitation\n ullamco laboris nisi ut aliquip ex ea commodo consequat.\n \"\"\"\n\n assert (prepare_docstring(docstring) ==\n [\"multiline docstring\",\n \"\",\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit,\",\n \"sed do eiusmod tempor incididunt ut labore et dolore magna\",\n \"aliqua::\",\n \"\",\n \" Ut enim ad minim veniam, quis nostrud exercitation\",\n \" ullamco laboris nisi ut aliquip ex ea commodo consequat.\",\n \"\"])\n\n docstring = \"\"\"\n\n multiline docstring with leading empty lines\n \"\"\"\n assert (prepare_docstring(docstring) ==\n [\"multiline docstring with leading empty lines\",\n \"\"])\n\n docstring = \"single line docstring\"\n assert (prepare_docstring(docstring) ==\n [\"single line docstring\",\n \"\"])\n\n\ndef test_prepare_commentdoc():\n assert prepare_commentdoc(\"hello world\") == []\n assert prepare_commentdoc(\"#: hello world\") == [\"hello world\", \"\"]\n assert prepare_commentdoc(\"#: hello world\") == [\" hello world\", \"\"]\n assert prepare_commentdoc(\"#: hello\\n#: world\\n\") == [\"hello\", \"world\", \"\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docutils.py_test_SphinxFileOutput_test_SphinxFileOutput.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docutils.py_test_SphinxFileOutput_test_SphinxFileOutput.None_7", "embedding": null, "metadata": {"file_path": "tests/test_util_docutils.py", "file_name": "test_util_docutils.py", "file_type": "text/x-python", "category": "test", "start_line": 31, "end_line": 56, "span_ids": ["test_SphinxFileOutput"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_SphinxFileOutput(tmpdir):\n content = 'Hello Sphinx World'\n\n # write test.txt at first\n filename = str(tmpdir / 'test.txt')\n output = SphinxFileOutput(destination_path=filename)\n output.write(content)\n os.utime(filename, (0, 0))\n\n # overwrite it again\n output.write(content)\n assert os.stat(filename).st_mtime != 0 # updated\n\n # write test2.txt at first\n filename = str(tmpdir / 'test2.txt')\n output = SphinxFileOutput(destination_path=filename, overwrite_if_changed=True)\n output.write(content)\n os.utime(filename, (0, 0))\n\n # overwrite it again\n output.write(content)\n assert os.stat(filename).st_mtime == 0 # not updated\n\n # overwrite it again (content changed)\n output.write(content + \"; content change\")\n assert os.stat(filename).st_mtime != 0 # updated", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docutils.py_test_SphinxTranslator_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docutils.py_test_SphinxTranslator_", "embedding": null, "metadata": {"file_path": "tests/test_util_docutils.py", "file_name": "test_util_docutils.py", "file_type": "text/x-python", "category": "test", "start_line": 68, "end_line": 97, "span_ids": ["test_SphinxTranslator.CustomNode", "test_SphinxTranslator.MyTranslator", "test_SphinxTranslator", "test_SphinxTranslator.MyTranslator.__init__", "test_SphinxTranslator.CustomNode:2"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_SphinxTranslator(app):\n class CustomNode(nodes.inline):\n pass\n\n class MyTranslator(SphinxTranslator):\n def __init__(self, *args):\n self.called = []\n super().__init__(*args)\n\n def visit_document(self, node):\n pass\n\n def depart_document(self, node):\n pass\n\n def visit_inline(self, node):\n self.called.append('visit_inline')\n\n def depart_inline(self, node):\n self.called.append('depart_inline')\n\n document = new_document('')\n document += CustomNode()\n\n translator = MyTranslator(document, app.builder)\n document.walkabout(translator)\n\n # MyTranslator does not have visit_CustomNode. But it calls visit_inline instead.\n assert translator.called == ['visit_inline', 'depart_inline']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_fileutil.py_test_copy_asset_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_fileutil.py_test_copy_asset_", "embedding": null, "metadata": {"file_path": "tests/test_util_fileutil.py", "file_name": "test_util_fileutil.py", "file_type": "text/x-python", "category": "test", "start_line": 69, "end_line": 112, "span_ids": ["test_copy_asset"], "tokens": 526}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_copy_asset(tempdir):\n renderer = DummyTemplateLoader()\n\n # prepare source files\n source = (tempdir / 'source')\n source.makedirs()\n (source / 'index.rst').write_text('index.rst')\n (source / 'foo.rst_t').write_text('{{var1}}.rst')\n (source / '_static').makedirs()\n (source / '_static' / 'basic.css').write_text('basic.css')\n (source / '_templates').makedirs()\n (source / '_templates' / 'layout.html').write_text('layout.html')\n (source / '_templates' / 'sidebar.html_t').write_text('sidebar: {{var2}}')\n\n # copy a single file\n assert not (tempdir / 'test1').exists()\n copy_asset(source / 'index.rst', tempdir / 'test1')\n assert (tempdir / 'test1').exists()\n assert (tempdir / 'test1/index.rst').exists()\n\n # copy directories\n destdir = tempdir / 'test2'\n copy_asset(source, destdir, context=dict(var1='bar', var2='baz'), renderer=renderer)\n assert (destdir / 'index.rst').exists()\n assert (destdir / 'foo.rst').exists()\n assert (destdir / 'foo.rst').read_text() == 'bar.rst'\n assert (destdir / '_static' / 'basic.css').exists()\n assert (destdir / '_templates' / 'layout.html').exists()\n assert (destdir / '_templates' / 'sidebar.html').exists()\n assert (destdir / '_templates' / 'sidebar.html').read_text() == 'sidebar: baz'\n\n # copy with exclusion\n def excluded(path):\n return ('sidebar.html' in path or 'basic.css' in path)\n\n destdir = tempdir / 'test3'\n copy_asset(source, destdir, excluded,\n context=dict(var1='bar', var2='baz'), renderer=renderer)\n assert (destdir / 'index.rst').exists()\n assert (destdir / 'foo.rst').exists()\n assert not (destdir / '_static' / 'basic.css').exists()\n assert (destdir / '_templates' / 'layout.html').exists()\n assert not (destdir / '_templates' / 'sidebar.html').exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_catalog_outdated_test_catalog_write_mo.with_open_cat_mo_path_r.assert_read_mo_f_is_not_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_catalog_outdated_test_catalog_write_mo.with_open_cat_mo_path_r.assert_read_mo_f_is_not_", "embedding": null, "metadata": {"file_path": "tests/test_util_i18n.py", "file_name": "test_util_i18n.py", "file_type": "text/x-python", "category": "test", "start_line": 37, "end_line": 56, "span_ids": ["test_catalog_outdated", "test_catalog_write_mo"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_catalog_outdated(tempdir):\n (tempdir / 'test.po').write_text('#')\n cat = i18n.CatalogInfo(tempdir, 'test', 'utf-8')\n assert cat.is_outdated() # if mo is not exist\n\n mo_file = (tempdir / 'test.mo')\n mo_file.write_text('#')\n assert not cat.is_outdated() # if mo is exist and newer than po\n\n os.utime(mo_file, (os.stat(mo_file).st_mtime - 10,) * 2) # to be outdate\n assert cat.is_outdated() # if mo is exist and older than po\n\n\ndef test_catalog_write_mo(tempdir):\n (tempdir / 'test.po').write_text('#')\n cat = i18n.CatalogInfo(tempdir, 'test', 'utf-8')\n cat.write_mo('en')\n assert os.path.exists(cat.mo_path)\n with open(cat.mo_path, 'rb') as f:\n assert read_mo(f) is not None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_CatalogRepository_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_CatalogRepository_", "embedding": null, "metadata": {"file_path": "tests/test_util_i18n.py", "file_name": "test_util_i18n.py", "file_type": "text/x-python", "category": "test", "start_line": 149, "end_line": 191, "span_ids": ["test_CatalogRepository"], "tokens": 706}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_CatalogRepository(tempdir):\n (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES').makedirs()\n (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'test1.po').write_text('#')\n (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'test2.po').write_text('#')\n (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'sub').makedirs()\n (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'sub' / 'test3.po').write_text('#')\n (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'sub' / 'test4.po').write_text('#')\n (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / '.dotdir').makedirs()\n (tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / '.dotdir' / 'test5.po').write_text('#')\n (tempdir / 'loc1' / 'yy' / 'LC_MESSAGES').makedirs()\n (tempdir / 'loc1' / 'yy' / 'LC_MESSAGES' / 'test6.po').write_text('#')\n (tempdir / 'loc2' / 'xx' / 'LC_MESSAGES').makedirs()\n (tempdir / 'loc2' / 'xx' / 'LC_MESSAGES' / 'test1.po').write_text('#')\n (tempdir / 'loc2' / 'xx' / 'LC_MESSAGES' / 'test7.po').write_text('#')\n\n # for language xx\n repo = i18n.CatalogRepository(tempdir, ['loc1', 'loc2'], 'xx', 'utf-8')\n assert list(repo.locale_dirs) == [str(tempdir / 'loc1'),\n str(tempdir / 'loc2')]\n assert all(isinstance(c, i18n.CatalogInfo) for c in repo.catalogs)\n assert sorted(c.domain for c in repo.catalogs) == ['sub/test3', 'sub/test4',\n 'test1', 'test1', 'test2', 'test7']\n\n # for language yy\n repo = i18n.CatalogRepository(tempdir, ['loc1', 'loc2'], 'yy', 'utf-8')\n assert sorted(c.domain for c in repo.catalogs) == ['test6']\n\n # unknown languages\n repo = i18n.CatalogRepository(tempdir, ['loc1', 'loc2'], 'zz', 'utf-8')\n assert sorted(c.domain for c in repo.catalogs) == []\n\n # no languages\n repo = i18n.CatalogRepository(tempdir, ['loc1', 'loc2'], None, 'utf-8')\n assert sorted(c.domain for c in repo.catalogs) == []\n\n # unknown locale_dirs\n repo = i18n.CatalogRepository(tempdir, ['loc3'], None, 'utf-8')\n assert sorted(c.domain for c in repo.catalogs) == []\n\n # no locale_dirs\n repo = i18n.CatalogRepository(tempdir, [], None, 'utf-8')\n assert sorted(c.domain for c in repo.catalogs) == []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_images.py_test_guess_mimetype_test_get_image_extension.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_images.py_test_guess_mimetype_test_get_image_extension.None_3", "embedding": null, "metadata": {"file_path": "tests/test_util_images.py", "file_name": "test_util_images.py", "file_type": "text/x-python", "category": "test", "start_line": 30, "end_line": 49, "span_ids": ["test_guess_mimetype", "test_get_image_extension"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.filterwarnings('ignore:The content argument')\ndef test_guess_mimetype():\n # guess by filename\n assert guess_mimetype('img.png') == 'image/png'\n assert guess_mimetype('img.jpg') == 'image/jpeg'\n assert guess_mimetype('img.txt') is None\n assert guess_mimetype('img.txt', default='text/plain') == 'text/plain'\n assert guess_mimetype('no_extension') is None\n assert guess_mimetype('IMG.PNG') == 'image/png'\n\n # default parameter is used when no extension\n assert guess_mimetype('img.png', 'text/plain') == 'image/png'\n assert guess_mimetype('no_extension', 'text/plain') == 'text/plain'\n\n\ndef test_get_image_extension():\n assert get_image_extension('image/png') == '.png'\n assert get_image_extension('image/jpeg') == '.jpg'\n assert get_image_extension('image/svg+xml') == '.svg'\n assert get_image_extension('text/plain') is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_images.py_test_parse_data_uri_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_images.py_test_parse_data_uri_", "embedding": null, "metadata": {"file_path": "tests/test_util_images.py", "file_name": "test_util_images.py", "file_type": "text/x-python", "category": "test", "start_line": 52, "end_line": 80, "span_ids": ["test_parse_data_uri"], "tokens": 441}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_parse_data_uri():\n # standard case\n uri = (\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4\"\n \"//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\")\n image = parse_data_uri(uri)\n assert image is not None\n assert image.mimetype == 'image/png'\n assert image.charset == 'US-ASCII'\n\n # no mimetype\n uri = (\"data:charset=utf-8,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElE\"\n \"QVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\")\n image = parse_data_uri(uri)\n assert image is not None\n assert image.mimetype == 'text/plain'\n assert image.charset == 'utf-8'\n\n # non data URI\n uri = (\"image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4\"\n \"//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\")\n image = parse_data_uri(uri)\n assert image is None\n\n # invalid data URI (no properties)\n with pytest.raises(ValueError):\n uri = (\"data:iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4\"\n \"//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\")\n parse_data_uri(uri)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_methods_test_signature_methods.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_methods_test_signature_methods.None_7", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 103, "span_ids": ["test_signature_methods.Foo", "test_signature_methods", "test_signature_methods.Foo.meth1"], "tokens": 344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_signature_methods():\n class Foo:\n def meth1(self, arg1, **kwargs):\n pass\n\n @classmethod\n def meth2(cls, arg1, *args, **kwargs):\n pass\n\n @staticmethod\n def meth3(arg1, *args, **kwargs):\n pass\n\n @functools.wraps(Foo().meth1)\n def wrapped_bound_method(*args, **kwargs):\n pass\n\n # unbound method\n sig = inspect.signature(Foo.meth1)\n assert stringify_signature(sig) == '(self, arg1, **kwargs)'\n\n sig = inspect.signature(Foo.meth1, bound_method=True)\n assert stringify_signature(sig) == '(arg1, **kwargs)'\n\n # bound method\n sig = inspect.signature(Foo().meth1)\n assert stringify_signature(sig) == '(arg1, **kwargs)'\n\n # class method\n sig = inspect.signature(Foo.meth2)\n assert stringify_signature(sig) == '(arg1, *args, **kwargs)'\n\n sig = inspect.signature(Foo().meth2)\n assert stringify_signature(sig) == '(arg1, *args, **kwargs)'\n\n # static method\n sig = inspect.signature(Foo.meth3)\n assert stringify_signature(sig) == '(arg1, *args, **kwargs)'\n\n sig = inspect.signature(Foo().meth3)\n assert stringify_signature(sig) == '(arg1, *args, **kwargs)'\n\n # wrapped bound method\n sig = inspect.signature(wrapped_bound_method)\n assert stringify_signature(sig) == '(arg1, **kwargs)'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_partialmethod_test_signature_partialmethod.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_partialmethod_test_signature_partialmethod.None_2", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 125, "span_ids": ["test_signature_partialmethod", "test_signature_partialmethod.Foo", "test_signature_partialmethod.Foo.meth1"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_signature_partialmethod():\n from functools import partialmethod\n\n class Foo:\n def meth1(self, arg1, arg2, arg3=None, arg4=None):\n pass\n\n def meth2(self, arg1, arg2):\n pass\n\n foo = partialmethod(meth1, 1, 2)\n bar = partialmethod(meth1, 1, arg3=3)\n baz = partialmethod(meth2, 1, 2)\n\n subject = Foo()\n sig = inspect.signature(subject.foo)\n assert stringify_signature(sig) == '(arg3=None, arg4=None)'\n\n sig = inspect.signature(subject.bar)\n assert stringify_signature(sig) == '(arg2, *, arg3=3, arg4=None)'\n\n sig = inspect.signature(subject.baz)\n assert stringify_signature(sig) == '()'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_annotations_py38_test_signature_annotations_py38.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_annotations_py38_test_signature_annotations_py38.None_3", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 243, "end_line": 261, "span_ids": ["test_signature_annotations_py38"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8), reason='python 3.8+ is required.')\n@pytest.mark.sphinx(testroot='ext-autodoc')\ndef test_signature_annotations_py38(app):\n from target.pep570 import bar, baz, foo, qux\n\n # case: separator at head\n sig = inspect.signature(foo)\n assert stringify_signature(sig) == '(*, a, b)'\n\n # case: separator in the middle\n sig = inspect.signature(bar)\n assert stringify_signature(sig) == '(a, b, /, c, d)'\n\n sig = inspect.signature(baz)\n assert stringify_signature(sig) == '(a, /, *, b)'\n\n # case: separator at tail\n sig = inspect.signature(qux)\n assert stringify_signature(sig) == '(a, b, /)'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_basic_test_signature_from_str_basic.assert_sig_return_annotat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_basic_test_signature_from_str_basic.assert_sig_return_annotat", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 254, "end_line": 282, "span_ids": ["test_signature_from_str_basic"], "tokens": 375}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_signature_from_str_basic():\n signature = '(a, b, *args, c=0, d=\"blah\", **kwargs)'\n sig = inspect.signature_from_str(signature)\n assert list(sig.parameters.keys()) == ['a', 'b', 'args', 'c', 'd', 'kwargs']\n assert sig.parameters['a'].name == 'a'\n assert sig.parameters['a'].kind == Parameter.POSITIONAL_OR_KEYWORD\n assert sig.parameters['a'].default == Parameter.empty\n assert sig.parameters['a'].annotation == Parameter.empty\n assert sig.parameters['b'].name == 'b'\n assert sig.parameters['b'].kind == Parameter.POSITIONAL_OR_KEYWORD\n assert sig.parameters['b'].default == Parameter.empty\n assert sig.parameters['b'].annotation == Parameter.empty\n assert sig.parameters['args'].name == 'args'\n assert sig.parameters['args'].kind == Parameter.VAR_POSITIONAL\n assert sig.parameters['args'].default == Parameter.empty\n assert sig.parameters['args'].annotation == Parameter.empty\n assert sig.parameters['c'].name == 'c'\n assert sig.parameters['c'].kind == Parameter.KEYWORD_ONLY\n assert sig.parameters['c'].default == '0'\n assert sig.parameters['c'].annotation == Parameter.empty\n assert sig.parameters['d'].name == 'd'\n assert sig.parameters['d'].kind == Parameter.KEYWORD_ONLY\n assert sig.parameters['d'].default == \"'blah'\"\n assert sig.parameters['d'].annotation == Parameter.empty\n assert sig.parameters['kwargs'].name == 'kwargs'\n assert sig.parameters['kwargs'].kind == Parameter.VAR_KEYWORD\n assert sig.parameters['kwargs'].default == Parameter.empty\n assert sig.parameters['kwargs'].annotation == Parameter.empty\n assert sig.return_annotation == Parameter.empty", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_default_values_test_signature_from_str_default_values.assert_sig_parameters_m_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_default_values_test_signature_from_str_default_values.assert_sig_parameters_m_", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 285, "end_line": 302, "span_ids": ["test_signature_from_str_default_values"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_signature_from_str_default_values():\n signature = ('(a=0, b=0.0, c=\"str\", d=b\"bytes\", e=..., f=True, '\n 'g=[1, 2, 3], h={\"a\": 1}, i={1, 2, 3}, '\n 'j=lambda x, y: None, k=None, l=object(), m=foo.bar.CONSTANT)')\n sig = inspect.signature_from_str(signature)\n assert sig.parameters['a'].default == '0'\n assert sig.parameters['b'].default == '0.0'\n assert sig.parameters['c'].default == \"'str'\"\n assert sig.parameters['d'].default == \"b'bytes'\"\n assert sig.parameters['e'].default == '...'\n assert sig.parameters['f'].default == 'True'\n assert sig.parameters['g'].default == '[1, 2, 3]'\n assert sig.parameters['h'].default == \"{'a': 1}\"\n assert sig.parameters['i'].default == '{1, 2, 3}'\n assert sig.parameters['j'].default == 'lambda x, y: ...'\n assert sig.parameters['k'].default == 'None'\n assert sig.parameters['l'].default == 'object()'\n assert sig.parameters['m'].default == 'foo.bar.CONSTANT'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_annotations_test_signature_from_str_annotations.assert_sig_return_annotat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_annotations_test_signature_from_str_annotations.assert_sig_return_annotat", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 305, "end_line": 313, "span_ids": ["test_signature_from_str_annotations"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_signature_from_str_annotations():\n signature = '(a: int, *args: bytes, b: str = \"blah\", **kwargs: float) -> None'\n sig = inspect.signature_from_str(signature)\n assert list(sig.parameters.keys()) == ['a', 'args', 'b', 'kwargs']\n assert sig.parameters['a'].annotation == \"int\"\n assert sig.parameters['args'].annotation == \"bytes\"\n assert sig.parameters['b'].annotation == \"str\"\n assert sig.parameters['kwargs'].annotation == \"float\"\n assert sig.return_annotation == 'None'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isfunction_test_isfunction._partial_ed_builtin_func": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isfunction_test_isfunction._partial_ed_builtin_func", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 554, "end_line": 565, "span_ids": ["test_isfunction"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autodoc')\ndef test_isfunction(app):\n from target.functions import builtin_func, func, partial_builtin_func, partial_func\n from target.methods import Base\n\n assert inspect.isfunction(func) is True # function\n assert inspect.isfunction(partial_func) is True # partial-ed function\n assert inspect.isfunction(Base.meth) is True # method of class\n assert inspect.isfunction(Base.partialmeth) is True # partial-ed method of class\n assert inspect.isfunction(Base().meth) is False # method of instance\n assert inspect.isfunction(builtin_func) is False # builtin function\n assert inspect.isfunction(partial_builtin_func) is False # partial-ed builtin function", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isbuiltin_test_isdescriptor._function": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isbuiltin_test_isdescriptor._function", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 568, "end_line": 590, "span_ids": ["test_isdescriptor", "test_isbuiltin"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autodoc')\ndef test_isbuiltin(app):\n from target.functions import builtin_func, func, partial_builtin_func, partial_func\n from target.methods import Base\n\n assert inspect.isbuiltin(builtin_func) is True # builtin function\n assert inspect.isbuiltin(partial_builtin_func) is True # partial-ed builtin function\n assert inspect.isbuiltin(func) is False # function\n assert inspect.isbuiltin(partial_func) is False # partial-ed function\n assert inspect.isbuiltin(Base.meth) is False # method of class\n assert inspect.isbuiltin(Base().meth) is False # method of instance\n\n\n@pytest.mark.sphinx(testroot='ext-autodoc')\ndef test_isdescriptor(app):\n from target.functions import func\n from target.methods import Base\n\n assert inspect.isdescriptor(Base.prop) is True # property of class\n assert inspect.isdescriptor(Base().prop) is False # property of instance\n assert inspect.isdescriptor(Base.meth) is True # method of class\n assert inspect.isdescriptor(Base().meth) is True # method of instance\n assert inspect.isdescriptor(func) is True # function", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isproperty_test_getdoc_inherited_decorated_method.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isproperty_test_getdoc_inherited_decorated_method.None_1", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 660, "end_line": 729, "span_ids": ["test_getdoc_inherited_decorated_method.Bar", "test_isproperty", "test_getdoc_inherited_classmethod.Bar", "test_getdoc_inherited_decorated_method.Bar.meth", "test_unpartial", "test_getdoc_inherited_decorated_method.Foo.meth", "test_getdoc_inherited_decorated_method.Foo", "test_getdoc_inherited_classmethod", "test_getdoc_inherited_classmethod.Foo", "test_getdoc_inherited_classmethod.Foo.meth", "test_getdoc_inherited_decorated_method", "test_getdoc_inherited_classmethod.Bar.meth", "test_isgenericalias"], "tokens": 512}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_isproperty(app):\n from target.functions import func\n from target.methods import Base\n\n assert inspect.isproperty(Base.prop) is True # property of class\n assert inspect.isproperty(Base().prop) is False # property of instance\n assert inspect.isproperty(Base.meth) is False # method of class\n assert inspect.isproperty(Base().meth) is False # method of instance\n assert inspect.isproperty(func) is False # function\n\n\n@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.')\n@pytest.mark.sphinx(testroot='ext-autodoc')\ndef test_isgenericalias(app):\n from target.genericalias import C, T\n from target.methods import Base\n\n assert inspect.isgenericalias(C) is True\n assert inspect.isgenericalias(T) is True\n assert inspect.isgenericalias(object()) is False\n assert inspect.isgenericalias(Base) is False\n\n\ndef test_unpartial():\n def func1(a, b, c):\n pass\n\n func2 = functools.partial(func1, 1)\n func2.__doc__ = \"func2\"\n func3 = functools.partial(func2, 2) # nested partial object\n\n assert inspect.unpartial(func2) is func1\n assert inspect.unpartial(func3) is func1\n\n\ndef test_getdoc_inherited_classmethod():\n class Foo:\n @classmethod\n def meth(self):\n \"\"\"\n docstring\n indented text\n \"\"\"\n\n class Bar(Foo):\n @classmethod\n def meth(self):\n # inherited classmethod\n pass\n\n assert inspect.getdoc(Bar.meth, getattr, False, Bar, \"meth\") is None\n assert inspect.getdoc(Bar.meth, getattr, True, Bar, \"meth\") == Foo.meth.__doc__\n\n\ndef test_getdoc_inherited_decorated_method():\n class Foo:\n def meth(self):\n \"\"\"\n docstring\n indented text\n \"\"\"\n\n class Bar(Foo):\n @functools.lru_cache()\n def meth(self):\n # inherited and decorated method\n pass\n\n assert inspect.getdoc(Bar.meth, getattr, False, Bar, \"meth\") is None\n assert inspect.getdoc(Bar.meth, getattr, True, Bar, \"meth\") == Foo.meth.__doc__", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_is_builtin_class_method_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_is_builtin_class_method_", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 588, "end_line": 604, "span_ids": ["test_is_builtin_class_method.ObjectWithMroAttr", "test_is_builtin_class_method.MyInt", "test_is_builtin_class_method.MyInt.my_method", "test_is_builtin_class_method.ObjectWithMroAttr.__init__", "test_is_builtin_class_method"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_is_builtin_class_method():\n class MyInt(int):\n def my_method(self):\n pass\n\n assert inspect.is_builtin_class_method(MyInt, 'to_bytes')\n assert inspect.is_builtin_class_method(MyInt, '__init__')\n assert not inspect.is_builtin_class_method(MyInt, 'my_method')\n assert not inspect.is_builtin_class_method(MyInt, 'does_not_exist')\n assert not inspect.is_builtin_class_method(4, 'still does not crash')\n\n class ObjectWithMroAttr:\n def __init__(self, mro_attr):\n self.__mro__ = mro_attr\n\n assert not inspect.is_builtin_class_method(ObjectWithMroAttr([1, 2, 3]), 'still does not crash')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inventory.py_test_read_inventory_v2_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inventory.py_test_read_inventory_v2_", "embedding": null, "metadata": {"file_path": "tests/test_util_inventory.py", "file_name": "test_util_inventory.py", "file_type": "text/x-python", "category": "test", "start_line": 71, "end_line": 94, "span_ids": ["test_read_inventory_v2", "test_read_inventory_v2_not_having_version"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_read_inventory_v2():\n f = BytesIO(inventory_v2)\n invdata = InventoryFile.load(f, '/util', posixpath.join)\n\n assert len(invdata['py:module']) == 2\n assert invdata['py:module']['module1'] == \\\n ('foo', '2.0', '/util/foo.html#module-module1', 'Long Module desc')\n assert invdata['py:module']['module2'] == \\\n ('foo', '2.0', '/util/foo.html#module-module2', '-')\n assert invdata['py:function']['module1.func'][2] == \\\n '/util/sub/foo.html#module1.func'\n assert invdata['c:function']['CFunc'][2] == '/util/cfunc.html#CFunc'\n assert invdata['std:term']['a term'][2] == \\\n '/util/glossary.html#term-a-term'\n assert invdata['std:term']['a term including:colon'][2] == \\\n '/util/glossary.html#term-a-term-including-colon'\n\n\ndef test_read_inventory_v2_not_having_version():\n f = BytesIO(inventory_v2_not_having_version)\n invdata = InventoryFile.load(f, '/util', posixpath.join)\n assert invdata['py:module']['module1'] == \\\n ('foo', '', '/util/foo.html#module-module1', 'Long Module desc')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_jsdump.py_from_sphinx_util_jsdump_i_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_jsdump.py_from_sphinx_util_jsdump_i_", "embedding": null, "metadata": {"file_path": "tests/test_util_jsdump.py", "file_name": "test_util_jsdump.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 20, "span_ids": ["test_jsdump", "imports"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from sphinx.util.jsdump import dumps, loads\n\n\ndef test_jsdump():\n data = {'1a': 1}\n assert dumps(data) == '{\"1a\":1}'\n assert data == loads(dumps(data))\n\n data = {'a1': 1}\n assert dumps(data) == '{a1:1}'\n assert data == loads(dumps(data))\n\n data = {'a\\xe8': 1}\n assert dumps(data) == '{\"a\\\\u00e8\":1}'\n assert data == loads(dumps(data))\n\n data = {'_foo': 1}\n assert dumps(data) == '{_foo:1}'\n assert data == loads(dumps(data))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_verbosity_filter_test_verbosity_filter.None_11": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_verbosity_filter_test_verbosity_filter.None_11", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 100, "span_ids": ["test_verbosity_filter"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_verbosity_filter(app, status, warning):\n # verbosity = 0: INFO\n app.verbosity = 0\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.info('message1')\n logger.verbose('message2')\n logger.debug('message3')\n\n assert 'message1' in status.getvalue()\n assert 'message2' not in status.getvalue()\n assert 'message3' not in status.getvalue()\n assert 'message4' not in status.getvalue()\n\n # verbosity = 1: VERBOSE\n app.verbosity = 1\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.info('message1')\n logger.verbose('message2')\n logger.debug('message3')\n\n assert 'message1' in status.getvalue()\n assert 'message2' in status.getvalue()\n assert 'message3' not in status.getvalue()\n assert 'message4' not in status.getvalue()\n\n # verbosity = 2: DEBUG\n app.verbosity = 2\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.info('message1')\n logger.verbose('message2')\n logger.debug('message3')\n\n assert 'message1' in status.getvalue()\n assert 'message2' in status.getvalue()\n assert 'message3' in status.getvalue()\n assert 'message4' not in status.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_nonl_info_log_test_once_warning_log.assert_WARNING_message_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_nonl_info_log_test_once_warning_log.assert_WARNING_message_", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 122, "span_ids": ["test_nonl_info_log", "test_once_warning_log"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_nonl_info_log(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.info('message1', nonl=True)\n logger.info('message2')\n logger.info('message3')\n\n assert 'message1message2\\nmessage3' in status.getvalue()\n\n\ndef test_once_warning_log(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.warning('message: %d', 1, once=True)\n logger.warning('message: %d', 1, once=True)\n logger.warning('message: %d', 2, once=True)\n\n assert 'WARNING: message: 1\\nWARNING: message: 2\\n' in strip_escseq(warning.getvalue())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_warningiserror_test_warningiserror.None_1.logger_warning_s_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_warningiserror_test_warningiserror.None_1.logger_warning_s_", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 175, "end_line": 190, "span_ids": ["test_warningiserror"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_warningiserror(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n # if False, warning is not error\n app.warningiserror = False\n logger.warning('message')\n\n # if True, warning raises SphinxWarning exception\n app.warningiserror = True\n with pytest.raises(SphinxWarning):\n logger.warning('message: %s', 'arg')\n\n # message contains format string (refs: #4070)\n with pytest.raises(SphinxWarning):\n logger.warning('%s')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_info_location_test_info_location.assert_nmessage7_in_st": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_info_location_test_info_location.assert_nmessage7_in_st", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 193, "end_line": 221, "span_ids": ["test_info_location"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_info_location(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.info('message1', location='index')\n assert 'index.txt: message1' in status.getvalue()\n\n logger.info('message2', location=('index', 10))\n assert 'index.txt:10: message2' in status.getvalue()\n\n logger.info('message3', location=None)\n assert '\\nmessage3' in status.getvalue()\n\n node = nodes.Node()\n node.source, node.line = ('index.txt', 10)\n logger.info('message4', location=node)\n assert 'index.txt:10: message4' in status.getvalue()\n\n node.source, node.line = ('index.txt', None)\n logger.info('message5', location=node)\n assert 'index.txt:: message5' in status.getvalue()\n\n node.source, node.line = (None, 10)\n logger.info('message6', location=node)\n assert '<unknown>:10: message6' in status.getvalue()\n\n node.source, node.line = (None, None)\n logger.info('message7', location=node)\n assert '\\nmessage7' in status.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_warning_location_test_warning_location.None_10": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_warning_location_test_warning_location.None_10", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 224, "end_line": 252, "span_ids": ["test_warning_location"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_warning_location(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.warning('message1', location='index')\n assert 'index.txt: WARNING: message1' in warning.getvalue()\n\n logger.warning('message2', location=('index', 10))\n assert 'index.txt:10: WARNING: message2' in warning.getvalue()\n\n logger.warning('message3', location=None)\n assert colorize('red', 'WARNING: message3') in warning.getvalue()\n\n node = nodes.Node()\n node.source, node.line = ('index.txt', 10)\n logger.warning('message4', location=node)\n assert 'index.txt:10: WARNING: message4' in warning.getvalue()\n\n node.source, node.line = ('index.txt', None)\n logger.warning('message5', location=node)\n assert 'index.txt:: WARNING: message5' in warning.getvalue()\n\n node.source, node.line = (None, 10)\n logger.warning('message6', location=node)\n assert '<unknown>:10: WARNING: message6' in warning.getvalue()\n\n node.source, node.line = (None, None)\n logger.warning('message7', location=node)\n assert colorize('red', 'WARNING: message7') in warning.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_suppress_logging_test_pending_warnings.assert_WARNING_message2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_suppress_logging_test_pending_warnings.assert_WARNING_message2", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 252, "end_line": 280, "span_ids": ["test_suppress_logging", "test_pending_warnings"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_suppress_logging(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.warning('message1')\n with logging.suppress_logging():\n logger.warning('message2')\n assert 'WARNING: message1' in warning.getvalue()\n assert 'WARNING: message2' not in warning.getvalue()\n\n assert 'WARNING: message1' in warning.getvalue()\n assert 'WARNING: message2' not in warning.getvalue()\n\n\ndef test_pending_warnings(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.warning('message1')\n with logging.pending_warnings():\n # not logged yet (buffered) in here\n logger.warning('message2')\n logger.warning('message3')\n assert 'WARNING: message1' in warning.getvalue()\n assert 'WARNING: message2' not in warning.getvalue()\n assert 'WARNING: message3' not in warning.getvalue()\n\n # actually logged as ordered\n assert 'WARNING: message2\\nWARNING: message3' in strip_escseq(warning.getvalue())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_colored_logs_test_colored_logs.assert_colorize_red_m": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_colored_logs_test_colored_logs.assert_colorize_red_m", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 283, "end_line": 307, "span_ids": ["test_colored_logs"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_colored_logs(app, status, warning):\n app.verbosity = 2\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n # default colors\n logger.debug('message1')\n logger.verbose('message2')\n logger.info('message3')\n logger.warning('message4')\n logger.critical('message5')\n logger.error('message6')\n\n assert colorize('darkgray', 'message1') in status.getvalue()\n assert 'message2\\n' in status.getvalue() # not colored\n assert 'message3\\n' in status.getvalue() # not colored\n assert colorize('red', 'WARNING: message4') in warning.getvalue()\n assert 'CRITICAL: message5\\n' in warning.getvalue() # not colored\n assert colorize('darkred', 'ERROR: message6') in warning.getvalue()\n\n # color specification\n logger.debug('message7', color='white')\n logger.info('message8', color='red')\n assert colorize('white', 'message7') in status.getvalue()\n assert colorize('red', 'message8') in status.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_prefixed_warnings_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_prefixed_warnings_", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 370, "end_line": 387, "span_ids": ["test_prefixed_warnings"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_prefixed_warnings(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.warning('message1')\n with prefixed_warnings('PREFIX:'):\n logger.warning('message2')\n with prefixed_warnings('Another PREFIX:'):\n logger.warning('message3')\n logger.warning('message4')\n logger.warning('message5')\n\n assert 'WARNING: message1' in warning.getvalue()\n assert 'WARNING: PREFIX: message2' in warning.getvalue()\n assert 'WARNING: Another PREFIX: message3' in warning.getvalue()\n assert 'WARNING: PREFIX: message4' in warning.getvalue()\n assert 'WARNING: message5' in warning.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_NodeMatcher_test_NodeMatcher.None_10": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_NodeMatcher_test_NodeMatcher.None_10", "embedding": null, "metadata": {"file_path": "tests/test_util_nodes.py", "file_name": "test_util_nodes.py", "file_type": "text/x-python", "category": "test", "start_line": 46, "end_line": 79, "span_ids": ["test_NodeMatcher"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_NodeMatcher():\n doctree = nodes.document(None, None)\n doctree += nodes.paragraph('', 'Hello')\n doctree += nodes.paragraph('', 'Sphinx', block=1)\n doctree += nodes.paragraph('', 'World', block=2)\n doctree += nodes.literal_block('', 'blah blah blah', block=3)\n\n # search by node class\n matcher = NodeMatcher(nodes.paragraph)\n assert len(list(doctree.findall(matcher))) == 3\n\n # search by multiple node classes\n matcher = NodeMatcher(nodes.paragraph, nodes.literal_block)\n assert len(list(doctree.findall(matcher))) == 4\n\n # search by node attribute\n matcher = NodeMatcher(block=1)\n assert len(list(doctree.findall(matcher))) == 1\n\n # search by node attribute (Any)\n matcher = NodeMatcher(block=Any)\n assert len(list(doctree.findall(matcher))) == 3\n\n # search by both class and attribute\n matcher = NodeMatcher(nodes.paragraph, block=Any)\n assert len(list(doctree.findall(matcher))) == 2\n\n # mismatched\n matcher = NodeMatcher(nodes.title)\n assert len(list(doctree.findall(matcher))) == 0\n\n # search with Any does not match to Text node\n matcher = NodeMatcher(blah=Any)\n assert len(list(doctree.findall(matcher))) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_extract_messages_test_extract_messages.assert_node_count_msg_no": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_extract_messages_test_extract_messages.assert_node_count_msg_no", "embedding": null, "metadata": {"file_path": "tests/test_util_nodes.py", "file_name": "test_util_nodes.py", "file_type": "text/x-python", "category": "test", "start_line": 92, "end_line": 148, "span_ids": ["test_extract_messages"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n 'rst,node_cls,count',\n [\n (\n \"\"\"\n .. admonition:: admonition title\n\n admonition body\n \"\"\",\n nodes.title, 1\n ),\n (\n \"\"\"\n .. figure:: foo.jpg\n\n this is title\n \"\"\",\n nodes.caption, 1,\n ),\n (\n \"\"\"\n .. rubric:: spam\n \"\"\",\n nodes.rubric, 1,\n ),\n (\n \"\"\"\n | spam\n | egg\n \"\"\",\n nodes.line, 2,\n ),\n (\n \"\"\"\n section\n =======\n\n +----------------+\n | | **Title 1** |\n | | Message 1 |\n +----------------+\n \"\"\",\n nodes.line, 2,\n ),\n (\n \"\"\"\n * | **Title 1**\n | Message 1\n \"\"\",\n nodes.line, 2,\n\n ),\n ]\n)\ndef test_extract_messages(rst, node_cls, count):\n msg = extract_messages(_get_doctree(dedent(rst)))\n assert_node_count(msg, node_cls, count)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_extract_messages_without_rawsource_test_clean_astext.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_extract_messages_without_rawsource_test_clean_astext.None_3", "embedding": null, "metadata": {"file_path": "tests/test_util_nodes.py", "file_name": "test_util_nodes.py", "file_type": "text/x-python", "category": "test", "start_line": 151, "end_line": 183, "span_ids": ["test_clean_astext", "test_extract_messages_without_rawsource"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_extract_messages_without_rawsource():\n \"\"\"\n Check node.rawsource is fall-backed by using node.astext() value.\n\n `extract_message` which is used from Sphinx i18n feature drop ``not node.rawsource``\n nodes. So, all nodes which want to translate must have ``rawsource`` value.\n However, sometimes node.rawsource is not set.\n\n For example: recommonmark-0.2.0 doesn't set rawsource to `paragraph` node.\n\n refs #1994: Fall back to node's astext() during i18n message extraction.\n \"\"\"\n p = nodes.paragraph()\n p.append(nodes.Text('test'))\n p.append(nodes.Text('sentence'))\n assert not p.rawsource # target node must not have rawsource value\n document = create_new_document()\n document.append(p)\n _transform(document)\n assert_node_count(extract_messages(document), nodes.TextElement, 1)\n assert [m for n, m in extract_messages(document)][0], 'text sentence'\n\n\ndef test_clean_astext():\n node = nodes.paragraph(text='hello world')\n assert 'hello world' == clean_astext(node)\n\n node = nodes.image(alt='hello world')\n assert '' == clean_astext(node)\n\n node = nodes.paragraph(text='hello world')\n node += nodes.raw('', 'raw text', format='html')\n assert 'hello world' == clean_astext(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_make_id_test_make_id.assert_make_id_app_env_d": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_make_id_test_make_id.assert_make_id_app_env_d", "embedding": null, "metadata": {"file_path": "tests/test_util_nodes.py", "file_name": "test_util_nodes.py", "file_type": "text/x-python", "category": "test", "start_line": 186, "end_line": 204, "span_ids": ["test_make_id"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n 'prefix, term, expected',\n [\n ('', '', 'id0'),\n ('term', '', 'term-0'),\n ('term', 'Sphinx', 'term-Sphinx'),\n ('', 'io.StringIO', 'io.StringIO'), # contains a dot\n ('', 'sphinx.setup_command', 'sphinx.setup_command'), # contains a dot & underscore\n ('', '_io.StringIO', 'io.StringIO'), # starts with underscore\n ('', '\uff53\uff50\uff48\uff49\uff4e\uff58', 'sphinx'), # alphabets in unicode fullwidth characters\n ('', '\u60a0\u597d', 'id0'), # multibytes text (in Chinese)\n ('', 'Hello=\u60a0\u597d=\u3053\u3093\u306b\u3061\u306f', 'Hello'), # alphabets and multibytes text\n ('', 'f\u00fcnf', 'funf'), # latin1 (umlaut)\n ('', '0sphinx', 'sphinx'), # starts with number\n ('', 'sphinx-', 'sphinx'), # ends with hyphen\n ])\ndef test_make_id(app, prefix, term, expected):\n document = create_new_document()\n assert make_id(app.env, document, prefix, term) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_make_id_already_registered_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py_test_make_id_already_registered_", "embedding": null, "metadata": {"file_path": "tests/test_util_nodes.py", "file_name": "test_util_nodes.py", "file_type": "text/x-python", "category": "test", "start_line": 207, "end_line": 232, "span_ids": ["test_make_id_sequential", "test_split_explicit_target", "test_make_id_already_registered"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_make_id_already_registered(app):\n document = create_new_document()\n document.ids['term-Sphinx'] = True # register \"term-Sphinx\" manually\n assert make_id(app.env, document, 'term', 'Sphinx') == 'term-0'\n\n\ndef test_make_id_sequential(app):\n document = create_new_document()\n document.ids['term-0'] = True\n assert make_id(app.env, document, 'term') == 'term-1'\n\n\n@pytest.mark.parametrize(\n 'title, expected',\n [\n # implicit\n ('hello', (False, 'hello', 'hello')),\n # explicit\n ('hello <world>', (True, 'hello', 'world')),\n # explicit (title having angle brackets)\n ('hello <world> <sphinx>', (True, 'hello <world>', 'sphinx')),\n ]\n)\ndef test_split_explicit_target(title, expected):\n assert expected == split_explicit_title(title)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_append_epilog_test_append_epilog.assert_list_content_xitem": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_append_epilog_test_append_epilog.assert_list_content_xitem", "embedding": null, "metadata": {"file_path": "tests/test_util_rst.py", "file_name": "test_util_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 26, "end_line": 37, "span_ids": ["test_append_epilog"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_append_epilog(app):\n epilog = 'this is rst_epilog\\ngood-bye reST!'\n content = StringList(['hello Sphinx world',\n 'Sphinx is a document generator'],\n 'dummy.rst')\n append_epilog(content, epilog)\n\n assert list(content.xitems()) == [('dummy.rst', 0, 'hello Sphinx world'),\n ('dummy.rst', 1, 'Sphinx is a document generator'),\n ('dummy.rst', 2, ''),\n ('<rst_epilog>', 0, 'this is rst_epilog'),\n ('<rst_epilog>', 1, 'good-bye reST!')]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_prepend_prolog_test_prepend_prolog.assert_list_content_xitem": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_prepend_prolog_test_prepend_prolog.assert_list_content_xitem", "embedding": null, "metadata": {"file_path": "tests/test_util_rst.py", "file_name": "test_util_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 40, "end_line": 58, "span_ids": ["test_prepend_prolog"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_prepend_prolog(app):\n prolog = 'this is rst_prolog\\nhello reST!'\n content = StringList([':title: test of SphinxFileInput',\n ':author: Sphinx team',\n '',\n 'hello Sphinx world',\n 'Sphinx is a document generator'],\n 'dummy.rst')\n prepend_prolog(content, prolog)\n\n assert list(content.xitems()) == [('dummy.rst', 0, ':title: test of SphinxFileInput'),\n ('dummy.rst', 1, ':author: Sphinx team'),\n ('<generated>', 0, ''),\n ('<rst_prolog>', 0, 'this is rst_prolog'),\n ('<rst_prolog>', 1, 'hello reST!'),\n ('<generated>', 0, ''),\n ('dummy.rst', 2, ''),\n ('dummy.rst', 3, 'hello Sphinx world'),\n ('dummy.rst', 4, 'Sphinx is a document generator')]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_prepend_prolog_with_CR_test_prepend_prolog_with_CR.assert_list_content_xitem": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_prepend_prolog_with_CR_test_prepend_prolog_with_CR.assert_list_content_xitem", "embedding": null, "metadata": {"file_path": "tests/test_util_rst.py", "file_name": "test_util_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 61, "end_line": 73, "span_ids": ["test_prepend_prolog_with_CR"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_prepend_prolog_with_CR(app):\n # prolog having CR at tail\n prolog = 'this is rst_prolog\\nhello reST!\\n'\n content = StringList(['hello Sphinx world',\n 'Sphinx is a document generator'],\n 'dummy.rst')\n prepend_prolog(content, prolog)\n\n assert list(content.xitems()) == [('<rst_prolog>', 0, 'this is rst_prolog'),\n ('<rst_prolog>', 1, 'hello reST!'),\n ('<generated>', 0, ''),\n ('dummy.rst', 0, 'hello Sphinx world'),\n ('dummy.rst', 1, 'Sphinx is a document generator')]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_prepend_prolog_without_CR_test_textwidth._Cyrillic_are_ambiguous_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_prepend_prolog_without_CR_test_textwidth._Cyrillic_are_ambiguous_", "embedding": null, "metadata": {"file_path": "tests/test_util_rst.py", "file_name": "test_util_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 94, "span_ids": ["test_prepend_prolog_without_CR", "test_textwidth"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_prepend_prolog_without_CR(app):\n # prolog not having CR at tail\n prolog = 'this is rst_prolog\\nhello reST!'\n content = StringList(['hello Sphinx world',\n 'Sphinx is a document generator'],\n 'dummy.rst')\n prepend_prolog(content, prolog)\n\n assert list(content.xitems()) == [('<rst_prolog>', 0, 'this is rst_prolog'),\n ('<rst_prolog>', 1, 'hello reST!'),\n ('<generated>', 0, ''),\n ('dummy.rst', 0, 'hello Sphinx world'),\n ('dummy.rst', 1, 'Sphinx is a document generator')]\n\n\ndef test_textwidth():\n assert textwidth('Hello') == 5\n assert textwidth('\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a') == 12\n assert textwidth('\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a', 'WFA') == 23 # Cyrillic are ambiguous chars", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_heading_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py_test_heading_", "embedding": null, "metadata": {"file_path": "tests/test_util_rst.py", "file_name": "test_util_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 97, "end_line": 120, "span_ids": ["test_heading"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_heading():\n env = Environment()\n env.extend(language=None)\n\n assert heading(env, 'Hello') == ('Hello\\n'\n '=====')\n assert heading(env, 'Hello', 1) == ('Hello\\n'\n '=====')\n assert heading(env, 'Hello', 2) == ('Hello\\n'\n '-----')\n assert heading(env, 'Hello', 3) == ('Hello\\n'\n '~~~~~')\n assert heading(env, '\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a', 1) == (\n '\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a\\n'\n '============'\n )\n\n # language=ja: ambiguous\n env.language = 'ja'\n assert heading(env, '\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a', 1) == (\n '\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a\\n'\n '======================='\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_versioning.py_doctrees_test_picklablility.assert_all_getattr_n_ui": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_versioning.py_doctrees_test_picklablility.assert_all_getattr_n_ui", "embedding": null, "metadata": {"file_path": "tests/test_versioning.py", "file_name": "test_versioning.py", "file_type": "text/x-python", "category": "test", "start_line": 37, "end_line": 68, "span_ids": ["test_picklablility", "is_paragraph", "test_add_uids", "test_get_ratio", "impl:9", "on_doctree_resolved"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "doctrees = {}\n\n\ndef on_doctree_resolved(app, doctree, docname):\n doctrees[docname] = doctree\n\n\ndef is_paragraph(node):\n return node.__class__.__name__ == 'paragraph'\n\n\ndef test_get_ratio():\n assert get_ratio('', 'a')\n assert get_ratio('a', '')\n\n\ndef test_add_uids():\n assert len(original_uids) == 3\n\n\ndef test_picklablility():\n # we have to modify the doctree so we can pickle it\n copy = original.copy()\n copy.reporter = None\n copy.transformer = None\n copy.settings.warning_stream = None\n copy.settings.env = None\n copy.settings.record_dependencies = None\n for metanode in copy.findall(meta):\n metanode.__class__ = addnodes.meta\n loaded = pickle.loads(pickle.dumps(copy, pickle.HIGHEST_PROTOCOL))\n assert all(getattr(n, 'uid', False) for n in loaded.findall(is_paragraph))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_versioning.py_test_modified_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_versioning.py_test_modified_", "embedding": null, "metadata": {"file_path": "tests/test_versioning.py", "file_name": "test_versioning.py", "file_type": "text/x-python", "category": "test", "start_line": 71, "end_line": 130, "span_ids": ["test_deleted", "test_modified", "test_insert_beginning", "test_deleted_end", "test_added", "test_insert", "test_insert_similar"], "tokens": 551}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_modified():\n modified = doctrees['modified']\n new_nodes = list(merge_doctrees(original, modified, is_paragraph))\n uids = [n.uid for n in modified.findall(is_paragraph)]\n assert not new_nodes\n assert original_uids == uids\n\n\ndef test_added():\n added = doctrees['added']\n new_nodes = list(merge_doctrees(original, added, is_paragraph))\n uids = [n.uid for n in added.findall(is_paragraph)]\n assert len(new_nodes) == 1\n assert original_uids == uids[:-1]\n\n\ndef test_deleted():\n deleted = doctrees['deleted']\n new_nodes = list(merge_doctrees(original, deleted, is_paragraph))\n uids = [n.uid for n in deleted.findall(is_paragraph)]\n assert not new_nodes\n assert original_uids[::2] == uids\n\n\ndef test_deleted_end():\n deleted_end = doctrees['deleted_end']\n new_nodes = list(merge_doctrees(original, deleted_end, is_paragraph))\n uids = [n.uid for n in deleted_end.findall(is_paragraph)]\n assert not new_nodes\n assert original_uids[:-1] == uids\n\n\ndef test_insert():\n insert = doctrees['insert']\n new_nodes = list(merge_doctrees(original, insert, is_paragraph))\n uids = [n.uid for n in insert.findall(is_paragraph)]\n assert len(new_nodes) == 1\n assert original_uids[0] == uids[0]\n assert original_uids[1:] == uids[2:]\n\n\ndef test_insert_beginning():\n insert_beginning = doctrees['insert_beginning']\n new_nodes = list(merge_doctrees(original, insert_beginning, is_paragraph))\n uids = [n.uid for n in insert_beginning.findall(is_paragraph)]\n assert len(new_nodes) == 1\n assert len(uids) == 4\n assert original_uids == uids[1:]\n assert original_uids[0] != uids[0]\n\n\ndef test_insert_similar():\n insert_similar = doctrees['insert_similar']\n new_nodes = list(merge_doctrees(original, insert_similar, is_paragraph))\n uids = [n.uid for n in insert_similar.findall(is_paragraph)]\n assert len(new_nodes) == 1\n assert new_nodes[0].rawsource == 'Anyway I need more'\n assert original_uids[0] == uids[0]\n assert original_uids[1:] == uids[2:]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py__usr_bin_env_python3_stringify_version.return.version": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py__usr_bin_env_python3_stringify_version.return.version", "embedding": null, "metadata": {"file_path": "utils/bump_version.py", "file_name": "bump_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["stringify_version", "impl", "docstring", "imports"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "#!/usr/bin/env python3\n\nimport argparse\nimport os\nimport re\nimport sys\nfrom contextlib import contextmanager\nfrom datetime import datetime\n\nscript_dir = os.path.dirname(__file__)\npackage_dir = os.path.abspath(os.path.join(script_dir, '..'))\n\nRELEASE_TYPE = {'a': 'alpha', 'b': 'beta'}\n\n\ndef stringify_version(version_info, in_develop=True):\n version = '.'.join(str(v) for v in version_info[:3])\n if not in_develop and version_info[3] != 'final':\n version += version_info[3][0] + str(version_info[4])\n\n return version", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_bump_version_bump_version.with_open_path_r_as_.f_write_body_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_bump_version_bump_version.with_open_path_r_as_.f_write_body_", "embedding": null, "metadata": {"file_path": "utils/bump_version.py", "file_name": "bump_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 38, "span_ids": ["bump_version"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def bump_version(path, version_info, in_develop=True):\n version = stringify_version(version_info, in_develop)\n release = version\n if in_develop:\n version += '+'\n\n with open(path, 'r+') as f:\n body = f.read()\n body = re.sub(r\"(?<=__version__ = ')[^']+\", version, body)\n body = re.sub(r\"(?<=__released__ = ')[^']+\", release, body)\n body = re.sub(r\"(?<=version_info = )\\(.*\\)\", str(version_info), body)\n\n f.seek(0)\n f.truncate(0)\n f.write(body)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_parse_version_parse_version.raise_RuntimeError_Unkno": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_parse_version_parse_version.raise_RuntimeError_Unkno", "embedding": null, "metadata": {"file_path": "utils/bump_version.py", "file_name": "bump_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 64, "span_ids": ["parse_version"], "tokens": 288}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_version(version):\n matched = re.search(r'^(\\d+)\\.(\\d+)$', version)\n if matched:\n major, minor = matched.groups()\n return (int(major), int(minor), 0, 'final', 0)\n\n matched = re.search(r'^(\\d+)\\.(\\d+)\\.(\\d+)$', version)\n if matched:\n major, minor, rev = matched.groups()\n return (int(major), int(minor), int(rev), 'final', 0)\n\n matched = re.search(r'^(\\d+)\\.(\\d+)\\s*(a|b|alpha|beta)(\\d+)$', version)\n if matched:\n major, minor, typ, relver = matched.groups()\n release = RELEASE_TYPE.get(typ, typ)\n return (int(major), int(minor), 0, release, int(relver))\n\n matched = re.search(r'^(\\d+)\\.(\\d+)\\.(\\d+)\\s*(a|b|alpha|beta)(\\d+)$', version)\n if matched:\n major, minor, rev, typ, relver = matched.groups()\n release = RELEASE_TYPE.get(typ, typ)\n return (int(major), int(minor), int(rev), release, int(relver))\n\n raise RuntimeError('Unknown version: %s' % version)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_Skip_Changes.fetch_version.with_open_self_path_as_f.if_self_release_date_.else_.self.in_development.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_Skip_Changes.fetch_version.with_open_self_path_as_f.if_self_release_date_.else_.self.in_development.False", "embedding": null, "metadata": {"file_path": "utils/bump_version.py", "file_name": "bump_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 67, "end_line": 102, "span_ids": ["Skip", "processing", "Changes.fetch_version", "Changes"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Skip(Exception):\n pass\n\n\n@contextmanager\ndef processing(message):\n try:\n print(message + ' ... ', end='')\n yield\n except Skip as exc:\n print('skip: %s' % exc)\n except Exception:\n print('error')\n raise\n else:\n print('done')\n\n\nclass Changes:\n def __init__(self, path):\n self.path = path\n self.fetch_version()\n\n def fetch_version(self):\n with open(self.path) as f:\n version = f.readline().strip()\n matched = re.search(r'^Release (.*) \\((.*)\\)$', version)\n if matched is None:\n raise RuntimeError('Unknown CHANGES format: %s' % version)\n\n self.version, self.release_date = matched.groups()\n self.version_info = parse_version(self.version)\n if self.release_date == 'in development':\n self.in_development = True\n else:\n self.in_development = False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_Changes.finalize_release_date_Changes.finalize_release_date.with_open_self_path_r_.f_write_self_filter_empty": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_Changes.finalize_release_date_Changes.finalize_release_date.with_open_self_path_r_.f_write_self_filter_empty", "embedding": null, "metadata": {"file_path": "utils/bump_version.py", "file_name": "bump_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 104, "end_line": 117, "span_ids": ["Changes.finalize_release_date"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Changes:\n\n def finalize_release_date(self):\n release_date = datetime.now().strftime('%b %d, %Y')\n heading = 'Release %s (released %s)' % (self.version, release_date)\n\n with open(self.path, 'r+') as f:\n f.readline() # skip first two lines\n f.readline()\n body = f.read()\n\n f.seek(0)\n f.truncate(0)\n f.write(heading + '\\n')\n f.write('=' * len(heading) + '\\n')\n f.write(self.filter_empty_sections(body))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_Changes.add_release_Changes.filter_empty_sections.return.re_sub_n_n_3_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_Changes.add_release_Changes.filter_empty_sections.return.re_sub_n_n_3_n_", "embedding": null, "metadata": {"file_path": "utils/bump_version.py", "file_name": "bump_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 119, "end_line": 146, "span_ids": ["Changes.filter_empty_sections", "Changes.add_release"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Changes:\n\n def add_release(self, version_info):\n if version_info[-2:] in (('beta', 0), ('final', 0)):\n version = stringify_version(version_info)\n else:\n reltype = version_info[3]\n version = '%s %s%s' % (stringify_version(version_info),\n RELEASE_TYPE.get(reltype, reltype),\n version_info[4] or '')\n heading = 'Release %s (in development)' % version\n\n with open(os.path.join(script_dir, 'CHANGES_template')) as f:\n f.readline() # skip first two lines\n f.readline()\n tmpl = f.read()\n\n with open(self.path, 'r+') as f:\n body = f.read()\n\n f.seek(0)\n f.truncate(0)\n f.write(heading + '\\n')\n f.write('=' * len(heading) + '\\n')\n f.write(tmpl)\n f.write('\\n')\n f.write(body)\n\n def filter_empty_sections(self, body):\n return re.sub('^\\n.+\\n-{3,}\\n+(?=\\n.+\\n[-=]{3,}\\n)', '', body, flags=re.M)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_parse_options_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/bump_version.py_parse_options_", "embedding": null, "metadata": {"file_path": "utils/bump_version.py", "file_name": "bump_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 149, "end_line": 180, "span_ids": ["impl:7", "main", "parse_options"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_options(argv):\n parser = argparse.ArgumentParser()\n parser.add_argument('version', help='A version number (cf. 1.6b0)')\n parser.add_argument('--in-develop', action='store_true')\n options = parser.parse_args(argv)\n options.version = parse_version(options.version)\n return options\n\n\ndef main():\n options = parse_options(sys.argv[1:])\n\n with processing(\"Rewriting sphinx/__init__.py\"):\n bump_version(os.path.join(package_dir, 'sphinx/__init__.py'),\n options.version, options.in_develop)\n\n with processing('Rewriting CHANGES'):\n changes = Changes(os.path.join(package_dir, 'CHANGES'))\n if changes.version_info == options.version:\n if changes.in_development:\n changes.finalize_release_date()\n else:\n raise Skip('version not changed')\n else:\n if changes.in_development:\n print('WARNING: last version is not released yet: %s' % changes.version)\n changes.add_release(options.version)\n\n\nif __name__ == '__main__':\n main()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_object_members_Documenter.get_object_members.if_not_want_all_.else_.return.False_m_name_m_value_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_object_members_Documenter.get_object_members.if_not_want_all_.else_.return.False_m_name_m_value_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 639, "end_line": 665, "span_ids": ["Documenter.get_object_members"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def get_object_members(self, want_all: bool) -> Tuple[bool, ObjectMembers]:\n \"\"\"Return `(members_check_module, members)` where `members` is a\n list of `(membername, member)` pairs of the members of *self.object*.\n\n If *want_all* is True, return all members. Else, only return those\n members given by *self.options.members* (which may also be None).\n \"\"\"\n warnings.warn('The implementation of Documenter.get_object_members() will be '\n 'removed from Sphinx-6.0.', RemovedInSphinx60Warning)\n members = get_object_members(self.object, self.objpath, self.get_attr, self.analyzer)\n if not want_all:\n if not self.options.members:\n return False, [] # type: ignore\n # specific members given\n selected = []\n for name in self.options.members: # type: str\n if name in members:\n selected.append((name, members[name].value))\n else:\n logger.warning(__('missing attribute %s in object %s') %\n (name, self.fullname), type='autodoc')\n return False, selected\n elif self.options.inherited_members:\n return False, [(m.name, m.value) for m in members.values()]\n else:\n return False, [(m.name, m.value) for m in members.values()\n if m.directly_defined]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autosectionlabel.py_register_sections_as_label_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autosectionlabel.py_register_sections_as_label_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autosectionlabel.py", "file_name": "autosectionlabel.py", "file_type": "text/x-python", "category": "implementation", "start_line": 26, "end_line": 61, "span_ids": ["setup", "register_sections_as_label"], "tokens": 338}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def register_sections_as_label(app: Sphinx, document: Node) -> None:\n domain = cast(StandardDomain, app.env.get_domain('std'))\n for node in document.findall(nodes.section):\n if (app.config.autosectionlabel_maxdepth and\n get_node_depth(node) >= app.config.autosectionlabel_maxdepth):\n continue\n labelid = node['ids'][0]\n docname = app.env.docname\n title = cast(nodes.title, node[0])\n ref_name = getattr(title, 'rawsource', title.astext())\n if app.config.autosectionlabel_prefix_document:\n name = nodes.fully_normalize_name(docname + ':' + ref_name)\n else:\n name = nodes.fully_normalize_name(ref_name)\n sectname = clean_astext(title)\n\n if name in domain.labels:\n logger.warning(__('duplicate label %s, other instance in %s'),\n name, app.env.doc2path(domain.labels[name][0]),\n location=node, type='autosectionlabel', subtype=docname)\n\n domain.anonlabels[name] = docname, labelid\n domain.labels[name] = docname, labelid, sectname\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_config_value('autosectionlabel_prefix_document', False, 'env')\n app.add_config_value('autosectionlabel_maxdepth', None, 'env')\n app.connect('doctree-read', register_sections_as_label)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_transform_SphinxComponentRegistry.add_latex_package.if_after_hyperref_.else_.self_latex_packages_appen": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_transform_SphinxComponentRegistry.add_latex_package.if_after_hyperref_.else_.self_latex_packages_appen", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 348, "end_line": 388, "span_ids": ["SphinxComponentRegistry.get_post_transforms", "SphinxComponentRegistry.add_post_transform", "SphinxComponentRegistry.add_css_files", "SphinxComponentRegistry.add_js_file", "SphinxComponentRegistry.add_transform", "SphinxComponentRegistry.add_documenter", "SphinxComponentRegistry.add_autodoc_attrgetter", "SphinxComponentRegistry.add_latex_package", "SphinxComponentRegistry.has_latex_package", "SphinxComponentRegistry.get_transforms"], "tokens": 426}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_transform(self, transform: Type[Transform]) -> None:\n logger.debug('[app] adding transform: %r', transform)\n self.transforms.append(transform)\n\n def get_transforms(self) -> List[Type[Transform]]:\n return self.transforms\n\n def add_post_transform(self, transform: Type[Transform]) -> None:\n logger.debug('[app] adding post transform: %r', transform)\n self.post_transforms.append(transform)\n\n def get_post_transforms(self) -> List[Type[Transform]]:\n return self.post_transforms\n\n def add_documenter(self, objtype: str, documenter: Type[\"Documenter\"]) -> None:\n self.documenters[objtype] = documenter\n\n def add_autodoc_attrgetter(self, typ: Type,\n attrgetter: Callable[[Any, str, Any], Any]) -> None:\n self.autodoc_attrgettrs[typ] = attrgetter\n\n def add_css_files(self, filename: str, **attributes: Any) -> None:\n self.css_files.append((filename, attributes))\n\n def add_js_file(self, filename: str, **attributes: Any) -> None:\n logger.debug('[app] adding js_file: %r, %r', filename, attributes)\n self.js_files.append((filename, attributes))\n\n def has_latex_package(self, name: str) -> bool:\n packages = self.latex_packages + self.latex_packages_after_hyperref\n return bool([x for x in packages if x[0] == name])\n\n def add_latex_package(self, name: str, options: str, after_hyperref: bool = False) -> None:\n if self.has_latex_package(name):\n logger.warn(\"latex package '%s' already included\" % name)\n\n logger.debug('[app] adding latex package: %r', name)\n if after_hyperref:\n self.latex_packages_after_hyperref.append((name, options))\n else:\n self.latex_packages.append((name, options))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_automethod_for_builtin_test_automethod_for_decorated.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_automethod_for_builtin_test_automethod_for_decorated.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1265, "end_line": 1286, "span_ids": ["test_automethod_for_builtin", "test_automethod_for_decorated"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_automethod_for_builtin(app):\n actual = do_autodoc(app, 'method', 'builtins.int.__add__')\n assert list(actual) == [\n '',\n '.. py:method:: int.__add__(value, /)',\n ' :module: builtins',\n '',\n ' Return self+value.',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_automethod_for_decorated(app):\n actual = do_autodoc(app, 'method', 'target.decorator.Bar.meth')\n assert list(actual) == [\n '',\n '.. py:method:: Bar.meth(name=None, age=None)',\n ' :module: target.decorator',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_partialmethod_test_partialmethod.assert_list_actual_ex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_partialmethod_test_partialmethod.assert_list_actual_ex", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1454, "end_line": 1481, "span_ids": ["test_partialmethod"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_partialmethod(app):\n expected = [\n '',\n '.. py:class:: Cell()',\n ' :module: target.partialmethod',\n '',\n ' An example for partialmethod.',\n '',\n ' refs: https://docs.python.jp/3/library/functools.html#functools.partialmethod',\n '',\n '',\n ' .. py:method:: Cell.set_alive()',\n ' :module: target.partialmethod',\n '',\n ' Make a cell alive.',\n '',\n '',\n ' .. py:method:: Cell.set_state(state)',\n ' :module: target.partialmethod',\n '',\n ' Update state of cell to *state*.',\n '',\n ]\n\n options = {\"members\": None}\n actual = do_autodoc(app, 'class', 'target.partialmethod.Cell', options)\n assert list(actual) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_callable_test_decorated.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_callable_test_decorated.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autofunction.py", "file_name": "test_ext_autodoc_autofunction.py", "file_type": "text/x-python", "category": "test", "start_line": 44, "end_line": 104, "span_ids": ["test_methoddescriptor", "test_builtin_function", "test_callable", "test_decorated", "test_method"], "tokens": 425}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_callable(app):\n actual = do_autodoc(app, 'function', 'target.callable.function')\n assert list(actual) == [\n '',\n '.. py:function:: function(arg1, arg2, **kwargs)',\n ' :module: target.callable',\n '',\n ' A callable object that behaves like a function.',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_method(app):\n actual = do_autodoc(app, 'function', 'target.callable.method')\n assert list(actual) == [\n '',\n '.. py:function:: method(arg1, arg2)',\n ' :module: target.callable',\n '',\n ' docstring of Callable.method().',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_builtin_function(app):\n actual = do_autodoc(app, 'function', 'os.umask')\n assert list(actual) == [\n '',\n '.. py:function:: umask(mask, /)',\n ' :module: os',\n '',\n ' Set the current numeric umask and return the previous umask.',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_methoddescriptor(app):\n actual = do_autodoc(app, 'function', 'builtins.int.__add__')\n assert list(actual) == [\n '',\n '.. py:function:: __add__(self, value, /)',\n ' :module: builtins.int',\n '',\n ' Return self+value.',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_decorated(app):\n actual = do_autodoc(app, 'function', 'target.decorator.foo')\n assert list(actual) == [\n '',\n '.. py:function:: foo(name=None, age=None)',\n ' :module: target.decorator',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module_test_autosummary_generate_content_for_module.assert_context_objtype_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module_test_autosummary_generate_content_for_module.assert_context_objtype_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 200, "end_line": 226, "span_ids": ["test_autosummary_generate_content_for_module"], "tokens": 342}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autosummary')\ndef test_autosummary_generate_content_for_module(app):\n import autosummary_dummy_module\n template = Mock()\n\n generate_autosummary_content('autosummary_dummy_module', autosummary_dummy_module, None,\n template, None, False, app, False, {})\n assert template.render.call_args[0][0] == 'module'\n\n context = template.render.call_args[0][1]\n assert context['members'] == ['CONSTANT1', 'CONSTANT2', 'Exc', 'Foo', '_Baz', '_Exc',\n '__all__', '__builtins__', '__cached__', '__doc__',\n '__file__', '__name__', '__package__', '_quux', 'bar',\n 'quuz', 'qux']\n assert context['functions'] == ['bar']\n assert context['all_functions'] == ['_quux', 'bar']\n assert context['classes'] == ['Foo']\n assert context['all_classes'] == ['Foo', '_Baz']\n assert context['exceptions'] == ['Exc']\n assert context['all_exceptions'] == ['Exc', '_Exc']\n assert context['attributes'] == ['CONSTANT1', 'qux', 'quuz']\n assert context['all_attributes'] == ['CONSTANT1', 'qux', 'quuz']\n assert context['fullname'] == 'autosummary_dummy_module'\n assert context['module'] == 'autosummary_dummy_module'\n assert context['objname'] == ''\n assert context['name'] == ''\n assert context['objtype'] == 'module'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module_skipped_test_autosummary_generate_content_for_module_skipped.assert_context_exception": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module_skipped_test_autosummary_generate_content_for_module_skipped.assert_context_exception", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 256, "end_line": 274, "span_ids": ["test_autosummary_generate_content_for_module_skipped"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autosummary')\ndef test_autosummary_generate_content_for_module_skipped(app):\n import autosummary_dummy_module\n template = Mock()\n\n def skip_member(app, what, name, obj, skip, options):\n if name in ('Foo', 'bar', 'Exc'):\n return True\n\n app.connect('autodoc-skip-member', skip_member)\n generate_autosummary_content('autosummary_dummy_module', autosummary_dummy_module, None,\n template, None, False, app, False, {})\n context = template.render.call_args[0][1]\n assert context['members'] == ['CONSTANT1', 'CONSTANT2', '_Baz', '_Exc', '__all__',\n '__builtins__', '__cached__', '__doc__', '__file__',\n '__name__', '__package__', '_quux', 'quuz', 'qux']\n assert context['functions'] == []\n assert context['classes'] == []\n assert context['exceptions'] == []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module_imported_members_test_autosummary_generate_content_for_module_imported_members.assert_context_objtype_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module_imported_members_test_autosummary_generate_content_for_module_imported_members.assert_context_objtype_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 277, "end_line": 303, "span_ids": ["test_autosummary_generate_content_for_module_imported_members"], "tokens": 358}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autosummary')\ndef test_autosummary_generate_content_for_module_imported_members(app):\n import autosummary_dummy_module\n template = Mock()\n\n generate_autosummary_content('autosummary_dummy_module', autosummary_dummy_module, None,\n template, None, True, app, False, {})\n assert template.render.call_args[0][0] == 'module'\n\n context = template.render.call_args[0][1]\n assert context['members'] == ['CONSTANT1', 'CONSTANT2', 'Exc', 'Foo', 'Union', '_Baz',\n '_Exc', '__all__', '__builtins__', '__cached__', '__doc__',\n '__file__', '__loader__', '__name__', '__package__',\n '__spec__', '_quux', 'bar', 'path', 'quuz', 'qux']\n assert context['functions'] == ['bar']\n assert context['all_functions'] == ['_quux', 'bar']\n assert context['classes'] == ['Foo']\n assert context['all_classes'] == ['Foo', '_Baz']\n assert context['exceptions'] == ['Exc']\n assert context['all_exceptions'] == ['Exc', '_Exc']\n assert context['attributes'] == ['CONSTANT1', 'qux', 'quuz']\n assert context['all_attributes'] == ['CONSTANT1', 'qux', 'quuz']\n assert context['fullname'] == 'autosummary_dummy_module'\n assert context['module'] == 'autosummary_dummy_module'\n assert context['objname'] == ''\n assert context['name'] == ''\n assert context['objtype'] == 'module'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_TodoDirective_TodoDirective.run.return._targetnode_todo_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_TodoDirective_TodoDirective.run.return._targetnode_todo_node_", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 30, "end_line": 53, "span_ids": ["TodoDirective", "TodoDirective.run"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TodoDirective(SphinxDirective):\n\n # this enables content in the directive\n has_content = True\n\n def run(self):\n targetid = 'todo-%d' % self.env.new_serialno('todo')\n targetnode = nodes.target('', '', ids=[targetid])\n\n todo_node = todo('\\n'.join(self.content))\n todo_node += nodes.title(_('Todo'), _('Todo'))\n self.state.nested_parse(self.content, self.content_offset, todo_node)\n\n if not hasattr(self.env, 'todo_all_todos'):\n self.env.todo_all_todos = []\n\n self.env.todo_all_todos.append({\n 'docname': self.env.docname,\n 'lineno': self.lineno,\n 'todo': todo_node.deepcopy(),\n 'target': targetnode,\n })\n\n return [targetnode, todo_node]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_purge_todos_merge_todos.if_hasattr_other_todo_a.env_todo_all_todos_extend": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/todo.py_purge_todos_merge_todos.if_hasattr_other_todo_a.env_todo_all_todos_extend", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 56, "end_line": 68, "span_ids": ["purge_todos", "merge_todos"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def purge_todos(app, env, docname):\n if not hasattr(env, 'todo_all_todos'):\n return\n\n env.todo_all_todos = [todo for todo in env.todo_all_todos\n if todo['docname'] != docname]\n\n\ndef merge_todos(app, env, docnames, other):\n if not hasattr(env, 'todo_all_todos'):\n env.todo_all_todos = []\n if hasattr(other, 'todo_all_todos'):\n env.todo_all_todos.extend(other.todo_all_todos)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_translatable_not_smartquotable.support_smartquotes.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_translatable_not_smartquotable.support_smartquotes.False", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 83, "span_ids": ["translatable", "translatable.apply_translated_message", "translatable.extract_original_messages", "not_smartquotable", "translatable.preserve_original_messages"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class translatable(nodes.Node):\n \"\"\"Node which supports translation.\n\n The translation goes forward with following steps:\n\n 1. Preserve original translatable messages\n 2. Apply translated messages from message catalog\n 3. Extract preserved messages (for gettext builder)\n\n The translatable nodes MUST preserve original messages.\n And these messages should not be overridden at applying step.\n Because they are used at final step; extraction.\n \"\"\"\n\n def preserve_original_messages(self) -> None:\n \"\"\"Preserve original translatable messages.\"\"\"\n raise NotImplementedError\n\n def apply_translated_message(self, original_message: str, translated_message: str) -> None:\n \"\"\"Apply translated message.\"\"\"\n raise NotImplementedError\n\n def extract_original_messages(self) -> Sequence[str]:\n \"\"\"Extract translation messages.\n\n :returns: list of extracted messages or messages generator\n \"\"\"\n raise NotImplementedError\n\n\nclass not_smartquotable:\n \"\"\"A node which does not support smart-quotes.\"\"\"\n support_smartquotes = False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.add_sidebars_StandaloneHTMLBuilder.get_target_uri.return.quote_docname_self_lin": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.add_sidebars_StandaloneHTMLBuilder.get_target_uri.return.quote_docname_self_lin", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 898, "end_line": 951, "span_ids": ["StandaloneHTMLBuilder.get_target_uri", "StandaloneHTMLBuilder.add_sidebars"], "tokens": 492}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def add_sidebars(self, pagename: str, ctx: Dict) -> None:\n def has_wildcard(pattern: str) -> bool:\n return any(char in pattern for char in '*?[')\n\n sidebars = None\n matched = None\n customsidebar = None\n\n # default sidebars settings for selected theme\n if self.theme.name == 'alabaster':\n # provide default settings for alabaster (for compatibility)\n # Note: this will be removed before Sphinx-2.0\n try:\n # get default sidebars settings from alabaster (if defined)\n theme_default_sidebars = self.theme.config.get('theme', 'sidebars')\n if theme_default_sidebars:\n sidebars = [name.strip() for name in theme_default_sidebars.split(',')]\n except Exception:\n # fallback to better default settings\n sidebars = ['about.html', 'navigation.html', 'relations.html',\n 'searchbox.html', 'donate.html']\n else:\n theme_default_sidebars = self.theme.get_config('theme', 'sidebars', None)\n if theme_default_sidebars:\n sidebars = [name.strip() for name in theme_default_sidebars.split(',')]\n\n # user sidebar settings\n html_sidebars = self.get_builder_config('sidebars', 'html')\n for pattern, patsidebars in html_sidebars.items():\n if patmatch(pagename, pattern):\n if matched:\n if has_wildcard(pattern):\n # warn if both patterns contain wildcards\n if has_wildcard(matched):\n logger.warning(__('page %s matches two patterns in '\n 'html_sidebars: %r and %r'),\n pagename, matched, pattern)\n # else the already matched pattern is more specific\n # than the present one, because it contains no wildcard\n continue\n matched = pattern\n sidebars = patsidebars\n\n if sidebars is None:\n # keep defaults\n pass\n\n ctx['sidebars'] = sidebars\n ctx['customsidebar'] = customsidebar\n\n # --------- these are overwritten by the serialization builder\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n return quote(docname) + self.link_suffix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/deprecation.py__ModuleWrapper__ModuleWrapper.__getattr__.return.self__objects_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/deprecation.py__ModuleWrapper__ModuleWrapper.__getattr__.return.self__objects_name_", "embedding": null, "metadata": {"file_path": "sphinx/deprecation.py", "file_name": "deprecation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 56, "span_ids": ["_ModuleWrapper.__getattr__", "_ModuleWrapper"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ModuleWrapper:\n def __init__(self, module: Any, modname: str,\n objects: Dict[str, object],\n warning: Type[Warning],\n names: Dict[str, str]) -> None:\n self._module = module\n self._modname = modname\n self._objects = objects\n self._warning = warning\n self._names = names\n\n def __getattr__(self, name: str) -> Any:\n if name not in self._objects:\n return getattr(self._module, name)\n\n canonical_name = self._names.get(name, None)\n if canonical_name is not None:\n warnings.warn(\n \"The alias '{}.{}' is deprecated, use '{}' instead. Check CHANGES for \"\n \"Sphinx API modifications.\".format(self._modname, name, canonical_name),\n self._warning, stacklevel=3)\n else:\n warnings.warn(\"{}.{} is deprecated. Check CHANGES for Sphinx \"\n \"API modifications.\".format(self._modname, name),\n self._warning, stacklevel=3)\n return self._objects[name]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.read_file_LiteralIncludeReader.read_file.try_.except_UnicodeError_as_ex.raise_UnicodeError____En": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_LiteralIncludeReader.read_file_LiteralIncludeReader.read_file.try_.except_UnicodeError_as_ex.raise_UnicodeError____En", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 222, "end_line": 236, "span_ids": ["LiteralIncludeReader.read_file"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LiteralIncludeReader:\n\n def read_file(self, filename: str, location: Tuple[str, int] = None) -> List[str]:\n try:\n with open(filename, encoding=self.encoding, errors='strict') as f:\n text = f.read()\n if 'tab-width' in self.options:\n text = text.expandtabs(self.options['tab-width'])\n\n return text.splitlines(True)\n except OSError as exc:\n raise OSError(__('Include file %r not found or reading it failed') %\n filename) from exc\n except UnicodeError as exc:\n raise UnicodeError(__('Encoding %r used for reading included file %r seems to '\n 'be wrong, try giving an :encoding: option') %\n (self.encoding, filename)) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Names_ASTIdentifier.get_display_string.return._anonymous_if_self_is_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Names_ASTIdentifier.get_display_string.return._anonymous_if_self_is_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 106, "end_line": 127, "span_ids": ["ASTIdentifier", "ASTIdentifier.get_display_string", "ASTIdentifier.__str__", "ASTBase.describe_signature", "ASTIdentifier.is_anon", "ASTIdentifier.__eq__"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Names\n################################################################################\n\nclass ASTIdentifier(ASTBaseBase):\n def __init__(self, identifier: str) -> None:\n assert identifier is not None\n assert len(identifier) != 0\n self.identifier = identifier\n\n def __eq__(self, other: Any) -> bool:\n return type(other) is ASTIdentifier and self.identifier == other.identifier\n\n def is_anon(self) -> bool:\n return self.identifier[0] == '@'\n\n # and this is where we finally make a difference between __str__ and the display string\n\n def __str__(self) -> str:\n return self.identifier\n\n def get_display_string(self) -> str:\n return \"[anonymous]\" if self.is_anon() else self.identifier", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTIdentifier.describe_signature_ASTIdentifier.describe_signature.if_mode_markType_.else_.raise_Exception_Unknown_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTIdentifier.describe_signature_ASTIdentifier.describe_signature.if_mode_markType_.else_.raise_Exception_Unknown_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 147, "end_line": 171, "span_ids": ["ASTIdentifier.describe_signature"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTIdentifier(ASTBaseBase):\n\n def describe_signature(self, signode: TextElement, mode: str, env: \"BuildEnvironment\",\n prefix: str, symbol: \"Symbol\") -> None:\n # note: slightly different signature of describe_signature due to the prefix\n verify_description_mode(mode)\n if self.is_anon():\n node = addnodes.desc_sig_name(text=\"[anonymous]\")\n else:\n node = addnodes.desc_sig_name(self.identifier, self.identifier)\n if mode == 'markType':\n targetText = prefix + self.identifier\n pnode = addnodes.pending_xref('', refdomain='c',\n reftype='identifier',\n reftarget=targetText, modname=None,\n classname=None)\n pnode['c:parent_key'] = symbol.get_lookup_key()\n pnode += node\n signode += pnode\n elif mode == 'lastIsName':\n nameNode = addnodes.desc_name()\n nameNode += node\n signode += nameNode\n elif mode == 'noneIsName':\n signode += node\n else:\n raise Exception('Unknown description mode: %s' % mode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.remove_Symbol.clear_doc.for_sChild_in_self__child.if_sChild_declaration_and.sChild.siblingBelow.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol.remove_Symbol.clear_doc.for_sChild_in_self__child.if_sChild_declaration_and.sChild.siblingBelow.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1561, "end_line": 1580, "span_ids": ["Symbol.clear_doc", "Symbol.remove"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def remove(self) -> None:\n if self.parent is None:\n return\n assert self in self.parent._children\n self.parent._children.remove(self)\n self.parent = None\n\n def clear_doc(self, docname: str) -> None:\n for sChild in self._children:\n sChild.clear_doc(docname)\n if sChild.declaration and sChild.docname == docname:\n sChild.declaration = None\n sChild.docname = None\n sChild.line = None\n if sChild.siblingAbove is not None:\n sChild.siblingAbove.siblingBelow = sChild.siblingBelow\n if sChild.siblingBelow is not None:\n sChild.siblingBelow.siblingAbove = sChild.siblingAbove\n sChild.siblingAbove = None\n sChild.siblingBelow = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser.parse_pre_v3_type_definition_DefinitionParser.parse_pre_v3_type_definition.return.ASTDeclaration_typ_typ_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser.parse_pre_v3_type_definition_DefinitionParser.parse_pre_v3_type_definition.return.ASTDeclaration_typ_typ_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3048, "end_line": 3063, "span_ids": ["DefinitionParser.parse_pre_v3_type_definition"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def parse_pre_v3_type_definition(self) -> ASTDeclaration:\n self.skip_ws()\n declaration: DeclarationType = None\n if self.skip_word('struct'):\n typ = 'struct'\n declaration = self._parse_struct()\n elif self.skip_word('union'):\n typ = 'union'\n declaration = self._parse_union()\n elif self.skip_word('enum'):\n typ = 'enum'\n declaration = self._parse_enum()\n else:\n self.fail(\"Could not parse pre-v3 type directive.\"\n \" Must start with 'struct', 'union', or 'enum'.\")\n return ASTDeclaration(typ, typ, declaration, False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.add_target_and_index_CObject.add_target_and_index.if_noindexentry_not_in_.self_indexnode_entries_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject.add_target_and_index_CObject.add_target_and_index.if_noindexentry_not_in_.self_indexnode_entries_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3158, "end_line": 3188, "span_ids": ["CObject.add_target_and_index"], "tokens": 290}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CObject(ObjectDescription[ASTDeclaration]):\n\n def add_target_and_index(self, ast: ASTDeclaration, sig: str,\n signode: TextElement) -> None:\n ids = []\n for i in range(1, _max_id + 1):\n try:\n id = ast.get_id(version=i)\n ids.append(id)\n except NoOldIdError:\n assert i < _max_id\n # let's keep the newest first\n ids = list(reversed(ids))\n newestId = ids[0]\n assert newestId # shouldn't be None\n\n name = ast.symbol.get_full_nested_name().get_display_string().lstrip('.')\n if newestId not in self.state.document.ids:\n # always add the newest id\n assert newestId\n signode['ids'].append(newestId)\n # only add compatibility ids when there are no conflicts\n for id in ids[1:]:\n if not id: # is None when the element didn't exist in that version\n continue\n if id not in self.state.document.ids:\n signode['ids'].append(id)\n\n self.state.document.note_explicit_target(signode)\n\n if 'noindexentry' not in self.options:\n indexText = self.get_index_text(name)\n self.indexnode['entries'].append(('single', indexText, newestId, '', None))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CAliasObject_CAliasObject.run.return._node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CAliasObject_CAliasObject.run.return._node_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3614, "end_line": 3651, "span_ids": ["CAliasObject.run", "CAliasObject"], "tokens": 347}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CAliasObject(ObjectDescription):\n option_spec: OptionSpec = {\n 'maxdepth': directives.nonnegative_int,\n 'noroot': directives.flag,\n }\n\n def run(self) -> List[Node]:\n \"\"\"\n On purpose this doesn't call the ObjectDescription version, but is based on it.\n Each alias signature may expand into multiple real signatures if 'noroot'.\n The code is therefore based on the ObjectDescription version.\n \"\"\"\n if ':' in self.name:\n self.domain, self.objtype = self.name.split(':', 1)\n else:\n self.domain, self.objtype = '', self.name\n\n node = addnodes.desc()\n node.document = self.state.document\n node['domain'] = self.domain\n # 'desctype' is a backwards compatible attribute\n node['objtype'] = node['desctype'] = self.objtype\n node['noindex'] = True\n\n self.names: List[str] = []\n aliasOptions = {\n 'maxdepth': self.options.get('maxdepth', 1),\n 'noroot': 'noroot' in self.options,\n }\n if aliasOptions['noroot'] and aliasOptions['maxdepth'] == 1:\n logger.warning(\"Error in C alias declaration.\"\n \" Requested 'noroot' but 'maxdepth' 1.\"\n \" When skipping the root declaration,\"\n \" need 'maxdepth' 0 for infinite or at least 2.\",\n location=self.get_location())\n for sig in self.get_signatures():\n node.append(AliasNode(sig, aliasOptions, self.state.document, env=self.env))\n return [node]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CXRefRole.run_CXRefRole.run.try_.except_DefinitionError_as.return._signode_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CXRefRole.run_CXRefRole.run.try_.except_DefinitionError_as.return._signode_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3675, "end_line": 3706, "span_ids": ["CXRefRole.run"], "tokens": 332}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CXRefRole(XRefRole):\n\n def run(self) -> Tuple[List[Node], List[system_message]]:\n if not self.env.config['c_allow_pre_v3']:\n return super().run()\n\n text = self.text.replace('\\n', ' ')\n parser = DefinitionParser(text, location=self.get_location(),\n config=self.env.config)\n try:\n parser.parse_xref_object()\n # it succeeded, so let it through\n return super().run()\n except DefinitionError as eOrig:\n # try as if it was an c:expr\n parser.pos = 0\n try:\n ast = parser.parse_expression()\n except DefinitionError:\n # that didn't go well, just default back\n return super().run()\n classes = ['xref', 'c', 'c-texpr']\n parentSymbol = self.env.temp_data.get('cpp:parent_symbol', None)\n if parentSymbol is None:\n parentSymbol = self.env.domaindata['c']['root_symbol']\n signode = nodes.inline(classes=classes)\n ast.describe_signature(signode, 'markType', self.env, parentSymbol)\n\n if self.env.config['c_warn_on_allowed_pre_v3']:\n msg = \"{}: Pre-v3 C type role ':c:type:`{}`' converted to ':c:expr:`{}`'.\"\n msg += \"\\nThe original parsing error was:\\n{}\"\n msg = msg.format(RemovedInSphinx60Warning.__name__, text, text, eOrig)\n logger.warning(msg, location=self.get_location())\n return [signode], []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.merge_domaindata_CDomain.merge_domaindata.for_fullname_fn_id__o.if_fn_in_docnames_._no_need_to_warn_on_dupl": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.merge_domaindata_CDomain.merge_domaindata.for_fullname_fn_id__o.if_fn_in_docnames_._no_need_to_warn_on_dupl", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3652, "end_line": 3670, "span_ids": ["CDomain.merge_domaindata"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CDomain(Domain):\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:\n if Symbol.debug_show_tree:\n print(\"merge_domaindata:\")\n print(\"\\tself:\")\n print(self.data['root_symbol'].dump(1))\n print(\"\\tself end\")\n print(\"\\tother:\")\n print(otherdata['root_symbol'].dump(1))\n print(\"\\tother end\")\n print(\"merge_domaindata end\")\n\n self.data['root_symbol'].merge_with(otherdata['root_symbol'],\n docnames, self.env)\n ourObjects = self.data['objects']\n for fullname, (fn, id_, objtype) in otherdata['objects'].items():\n if fn in docnames:\n if fullname not in ourObjects:\n ourObjects[fullname] = (fn, id_, objtype)\n # no need to warn on duplicates, the symbol merge already does that", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3910, "end_line": 3926, "span_ids": ["setup"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_domain(CDomain)\n app.add_config_value(\"c_id_attributes\", [], 'env')\n app.add_config_value(\"c_paren_attributes\", [], 'env')\n app.add_config_value(\"c_extra_keywords\", _macroKeywords, 'env')\n app.add_post_transform(AliasTransform)\n\n app.add_config_value(\"c_allow_pre_v3\", False, 'env')\n app.add_config_value(\"c_warn_on_allowed_pre_v3\", True, 'env')\n\n return {\n 'version': 'builtin',\n 'env_version': 2,\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaration.describe_signature_Symbol.clear_doc.self._children.newChildren": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaration.describe_signature_Symbol.clear_doc.self._children.newChildren", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3954, "end_line": 4201, "span_ids": ["Symbol.__init__", "ASTNamespace", "Symbol.__setattr__", "Symbol.__deepcopy__", "Symbol", "Symbol.__copy__", "ASTDeclaration.describe_signature", "ASTNamespace._stringify", "LookupKey", "Symbol.debug_print", "SymbolLookupResult", "Symbol._add_template_and_function_params", "Symbol._assert_invariants", "Symbol.clear_doc", "Symbol._fill_empty", "Symbol.remove"], "tokens": 2238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaration(ASTBase):\n\n def describe_signature(self, signode: desc_signature, mode: str,\n env: \"BuildEnvironment\", options: Dict) -> None:\n verify_description_mode(mode)\n assert self.symbol\n # The caller of the domain added a desc_signature node.\n # Always enable multiline:\n signode['is_multiline'] = True\n # Put each line in a desc_signature_line node.\n mainDeclNode = addnodes.desc_signature_line()\n mainDeclNode.sphinx_line_type = 'declarator'\n mainDeclNode['add_permalink'] = not self.symbol.isRedeclaration\n\n if self.templatePrefix:\n self.templatePrefix.describe_signature(signode, mode, env,\n symbol=self.symbol,\n lineSpec=options.get('tparam-line-spec'))\n if self.requiresClause:\n reqNode = addnodes.desc_signature_line()\n reqNode.sphinx_line_type = 'requiresClause'\n signode.append(reqNode)\n self.requiresClause.describe_signature(reqNode, 'markType', env, self.symbol)\n signode += mainDeclNode\n if self.visibility and self.visibility != \"public\":\n mainDeclNode += addnodes.desc_sig_keyword(self.visibility, self.visibility)\n mainDeclNode += addnodes.desc_sig_space()\n if self.objectType == 'type':\n prefix = self.declaration.get_type_declaration_prefix()\n mainDeclNode += addnodes.desc_sig_keyword(prefix, prefix)\n mainDeclNode += addnodes.desc_sig_space()\n elif self.objectType == 'concept':\n mainDeclNode += addnodes.desc_sig_keyword('concept', 'concept')\n mainDeclNode += addnodes.desc_sig_space()\n elif self.objectType == 'member':\n pass\n elif self.objectType == 'function':\n pass\n elif self.objectType == 'class':\n assert self.directiveType in ('class', 'struct')\n mainDeclNode += addnodes.desc_sig_keyword(self.directiveType, self.directiveType)\n mainDeclNode += addnodes.desc_sig_space()\n elif self.objectType == 'union':\n mainDeclNode += addnodes.desc_sig_keyword('union', 'union')\n mainDeclNode += addnodes.desc_sig_space()\n elif self.objectType == 'enum':\n mainDeclNode += addnodes.desc_sig_keyword('enum', 'enum')\n mainDeclNode += addnodes.desc_sig_space()\n if self.directiveType == 'enum-class':\n mainDeclNode += addnodes.desc_sig_keyword('class', 'class')\n mainDeclNode += addnodes.desc_sig_space()\n elif self.directiveType == 'enum-struct':\n mainDeclNode += addnodes.desc_sig_keyword('struct', 'struct')\n mainDeclNode += addnodes.desc_sig_space()\n else:\n assert self.directiveType == 'enum', self.directiveType\n elif self.objectType == 'enumerator':\n mainDeclNode += addnodes.desc_sig_keyword('enumerator', 'enumerator')\n mainDeclNode += addnodes.desc_sig_space()\n else:\n assert False, self.objectType\n self.declaration.describe_signature(mainDeclNode, mode, env, self.symbol)\n lastDeclNode = mainDeclNode\n if self.trailingRequiresClause:\n trailingReqNode = addnodes.desc_signature_line()\n trailingReqNode.sphinx_line_type = 'trailingRequiresClause'\n signode.append(trailingReqNode)\n lastDeclNode = trailingReqNode\n self.trailingRequiresClause.describe_signature(\n trailingReqNode, 'markType', env, self.symbol)\n if self.semicolon:\n lastDeclNode += addnodes.desc_sig_punctuation(';', ';')\n\n\nclass ASTNamespace(ASTBase):\n def __init__(self, nestedName: ASTNestedName,\n templatePrefix: ASTTemplateDeclarationPrefix) -> None:\n self.nestedName = nestedName\n self.templatePrefix = templatePrefix\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.templatePrefix:\n res.append(transform(self.templatePrefix))\n res.append(transform(self.nestedName))\n return ''.join(res)\n\n\nclass SymbolLookupResult:\n def __init__(self, symbols: Iterator[\"Symbol\"], parentSymbol: \"Symbol\",\n identOrOp: Union[ASTIdentifier, ASTOperator], templateParams: Any,\n templateArgs: ASTTemplateArgs) -> None:\n self.symbols = symbols\n self.parentSymbol = parentSymbol\n self.identOrOp = identOrOp\n self.templateParams = templateParams\n self.templateArgs = templateArgs\n\n\nclass LookupKey:\n def __init__(self, data: List[Tuple[ASTNestedNameElement,\n Union[ASTTemplateParams,\n ASTTemplateIntroduction],\n str]]) -> None:\n self.data = data\n\n\nclass Symbol:\n debug_indent = 0\n debug_indent_string = \" \"\n debug_lookup = False # overridden by the corresponding config value\n debug_show_tree = False # overridden by the corresponding config value\n\n def __copy__(self):\n assert False # shouldn't happen\n\n def __deepcopy__(self, memo):\n if self.parent:\n assert False # shouldn't happen\n else:\n # the domain base class makes a copy of the initial data, which is fine\n return Symbol(None, None, None, None, None, None, None)\n\n @staticmethod\n def debug_print(*args: Any) -> None:\n print(Symbol.debug_indent_string * Symbol.debug_indent, end=\"\")\n print(*args)\n\n def _assert_invariants(self) -> None:\n if not self.parent:\n # parent == None means global scope, so declaration means a parent\n assert not self.identOrOp\n assert not self.templateParams\n assert not self.templateArgs\n assert not self.declaration\n assert not self.docname\n else:\n if self.declaration:\n assert self.docname\n\n def __setattr__(self, key: str, value: Any) -> None:\n if key == \"children\":\n assert False\n else:\n return super().__setattr__(key, value)\n\n def __init__(self, parent: \"Symbol\", identOrOp: Union[ASTIdentifier, ASTOperator],\n templateParams: Union[ASTTemplateParams, ASTTemplateIntroduction],\n templateArgs: Any, declaration: ASTDeclaration,\n docname: str, line: int) -> None:\n self.parent = parent\n # declarations in a single directive are linked together\n self.siblingAbove: Symbol = None\n self.siblingBelow: Symbol = None\n self.identOrOp = identOrOp\n self.templateParams = templateParams # template<templateParams>\n self.templateArgs = templateArgs # identifier<templateArgs>\n self.declaration = declaration\n self.docname = docname\n self.line = line\n self.isRedeclaration = False\n self._assert_invariants()\n\n # Remember to modify Symbol.remove if modifications to the parent change.\n self._children: List[Symbol] = []\n self._anonChildren: List[Symbol] = []\n # note: _children includes _anonChildren\n if self.parent:\n self.parent._children.append(self)\n if self.declaration:\n self.declaration.symbol = self\n\n # Do symbol addition after self._children has been initialised.\n self._add_template_and_function_params()\n\n def _fill_empty(self, declaration: ASTDeclaration, docname: str, line: int) -> None:\n self._assert_invariants()\n assert self.declaration is None\n assert self.docname is None\n assert self.line is None\n assert declaration is not None\n assert docname is not None\n assert line is not None\n self.declaration = declaration\n self.declaration.symbol = self\n self.docname = docname\n self.line = line\n self._assert_invariants()\n # and symbol addition should be done as well\n self._add_template_and_function_params()\n\n def _add_template_and_function_params(self) -> None:\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"_add_template_and_function_params:\")\n # Note: we may be called from _fill_empty, so the symbols we want\n # to add may actually already be present (as empty symbols).\n\n # add symbols for the template params\n if self.templateParams:\n for tp in self.templateParams.params:\n if not tp.get_identifier():\n continue\n # only add a declaration if we our self are from a declaration\n if self.declaration:\n decl = ASTDeclaration('templateParam', None, None, None, None, tp, None)\n else:\n decl = None\n nne = ASTNestedNameElement(tp.get_identifier(), None)\n nn = ASTNestedName([nne], [False], rooted=False)\n self._add_symbols(nn, [], decl, self.docname, self.line)\n # add symbols for function parameters, if any\n if self.declaration is not None and self.declaration.function_params is not None:\n for fp in self.declaration.function_params:\n if fp.arg is None:\n continue\n nn = fp.arg.name\n if nn is None:\n continue\n # (comparing to the template params: we have checked that we are a declaration)\n decl = ASTDeclaration('functionParam', None, None, None, None, fp, None)\n assert not nn.rooted\n assert len(nn.names) == 1\n self._add_symbols(nn, [], decl, self.docname, self.line)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 1\n\n def remove(self) -> None:\n if self.parent is None:\n return\n assert self in self.parent._children\n self.parent._children.remove(self)\n self.parent = None\n\n def clear_doc(self, docname: str) -> None:\n newChildren: List[Symbol] = []\n for sChild in self._children:\n sChild.clear_doc(docname)\n if sChild.declaration and sChild.docname == docname:\n sChild.declaration = None\n sChild.docname = None\n sChild.line = None\n if sChild.siblingAbove is not None:\n sChild.siblingAbove.siblingBelow = sChild.siblingBelow\n if sChild.siblingBelow is not None:\n sChild.siblingBelow.siblingAbove = sChild.siblingAbove\n sChild.siblingAbove = None\n sChild.siblingBelow = None\n newChildren.append(sChild)\n self._children = newChildren", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol.get_all_symbols_Symbol._symbol_lookup.iTemplateDecl.0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol.get_all_symbols_Symbol._symbol_lookup.iTemplateDecl.0", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3927, "end_line": 4159, "span_ids": ["Symbol._symbol_lookup", "Symbol.get_all_symbols", "Symbol._find_named_symbols", "Symbol.children_recurse_anon", "Symbol.get_lookup_key", "Symbol.get_full_nested_name", "Symbol._find_first_named_symbol"], "tokens": 2116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def get_all_symbols(self) -> Iterator[Any]:\n yield self\n for sChild in self._children:\n yield from sChild.get_all_symbols()\n\n @property\n def children_recurse_anon(self) -> Generator[\"Symbol\", None, None]:\n for c in self._children:\n yield c\n if not c.identOrOp.is_anon():\n continue\n\n yield from c.children_recurse_anon\n\n def get_lookup_key(self) -> \"LookupKey\":\n # The pickle files for the environment and for each document are distinct.\n # The environment has all the symbols, but the documents has xrefs that\n # must know their scope. A lookup key is essentially a specification of\n # how to find a specific symbol.\n symbols = []\n s = self\n while s.parent:\n symbols.append(s)\n s = s.parent\n symbols.reverse()\n key = []\n for s in symbols:\n nne = ASTNestedNameElement(s.identOrOp, s.templateArgs)\n if s.declaration is not None:\n key.append((nne, s.templateParams, s.declaration.get_newest_id()))\n else:\n key.append((nne, s.templateParams, None))\n return LookupKey(key)\n\n def get_full_nested_name(self) -> ASTNestedName:\n symbols = []\n s = self\n while s.parent:\n symbols.append(s)\n s = s.parent\n symbols.reverse()\n names = []\n templates = []\n for s in symbols:\n names.append(ASTNestedNameElement(s.identOrOp, s.templateArgs))\n templates.append(False)\n return ASTNestedName(names, templates, rooted=False)\n\n def _find_first_named_symbol(self, identOrOp: Union[ASTIdentifier, ASTOperator],\n templateParams: Any, templateArgs: ASTTemplateArgs,\n templateShorthand: bool, matchSelf: bool,\n recurseInAnon: bool, correctPrimaryTemplateArgs: bool\n ) -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_print(\"_find_first_named_symbol ->\")\n res = self._find_named_symbols(identOrOp, templateParams, templateArgs,\n templateShorthand, matchSelf, recurseInAnon,\n correctPrimaryTemplateArgs,\n searchInSiblings=False)\n try:\n return next(res)\n except StopIteration:\n return None\n\n def _find_named_symbols(self, identOrOp: Union[ASTIdentifier, ASTOperator],\n templateParams: Any, templateArgs: ASTTemplateArgs,\n templateShorthand: bool, matchSelf: bool,\n recurseInAnon: bool, correctPrimaryTemplateArgs: bool,\n searchInSiblings: bool) -> Iterator[\"Symbol\"]:\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"_find_named_symbols:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"self:\")\n print(self.to_string(Symbol.debug_indent + 1), end=\"\")\n Symbol.debug_print(\"identOrOp: \", identOrOp)\n Symbol.debug_print(\"templateParams: \", templateParams)\n Symbol.debug_print(\"templateArgs: \", templateArgs)\n Symbol.debug_print(\"templateShorthand: \", templateShorthand)\n Symbol.debug_print(\"matchSelf: \", matchSelf)\n Symbol.debug_print(\"recurseInAnon: \", recurseInAnon)\n Symbol.debug_print(\"correctPrimaryTemplateAargs:\", correctPrimaryTemplateArgs)\n Symbol.debug_print(\"searchInSiblings: \", searchInSiblings)\n\n def isSpecialization() -> bool:\n # the names of the template parameters must be given exactly as args\n # and params that are packs must in the args be the name expanded\n if len(templateParams.params) != len(templateArgs.args):\n return True\n # having no template params and no arguments is also a specialization\n if len(templateParams.params) == 0:\n return True\n for i in range(len(templateParams.params)):\n param = templateParams.params[i]\n arg = templateArgs.args[i]\n # TODO: doing this by string manipulation is probably not the most efficient\n paramName = str(param.name)\n argTxt = str(arg)\n isArgPackExpansion = argTxt.endswith('...')\n if param.isPack != isArgPackExpansion:\n return True\n argName = argTxt[:-3] if isArgPackExpansion else argTxt\n if paramName != argName:\n return True\n return False\n if correctPrimaryTemplateArgs:\n if templateParams is not None and templateArgs is not None:\n # If both are given, but it's not a specialization, then do lookup as if\n # there is no argument list.\n # For example: template<typename T> int A<T>::var;\n if not isSpecialization():\n templateArgs = None\n\n def matches(s: \"Symbol\") -> bool:\n if s.identOrOp != identOrOp:\n return False\n if (s.templateParams is None) != (templateParams is None):\n if templateParams is not None:\n # we query with params, they must match params\n return False\n if not templateShorthand:\n # we don't query with params, and we do care about them\n return False\n if templateParams:\n # TODO: do better comparison\n if str(s.templateParams) != str(templateParams):\n return False\n if (s.templateArgs is None) != (templateArgs is None):\n return False\n if s.templateArgs:\n # TODO: do better comparison\n if str(s.templateArgs) != str(templateArgs):\n return False\n return True\n\n def candidates() -> Generator[Symbol, None, None]:\n s = self\n if Symbol.debug_lookup:\n Symbol.debug_print(\"searching in self:\")\n print(s.to_string(Symbol.debug_indent + 1), end=\"\")\n while True:\n if matchSelf:\n yield s\n if recurseInAnon:\n yield from s.children_recurse_anon\n else:\n yield from s._children\n\n if s.siblingAbove is None:\n break\n s = s.siblingAbove\n if Symbol.debug_lookup:\n Symbol.debug_print(\"searching in sibling:\")\n print(s.to_string(Symbol.debug_indent + 1), end=\"\")\n\n for s in candidates():\n if Symbol.debug_lookup:\n Symbol.debug_print(\"candidate:\")\n print(s.to_string(Symbol.debug_indent + 1), end=\"\")\n if matches(s):\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"matches\")\n Symbol.debug_indent -= 3\n yield s\n if Symbol.debug_lookup:\n Symbol.debug_indent += 2\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n\n def _symbol_lookup(self, nestedName: ASTNestedName, templateDecls: List[Any],\n onMissingQualifiedSymbol: Callable[[\"Symbol\", Union[ASTIdentifier, ASTOperator], Any, ASTTemplateArgs], \"Symbol\"], # NOQA\n strictTemplateParamArgLists: bool, ancestorLookupType: str,\n templateShorthand: bool, matchSelf: bool,\n recurseInAnon: bool, correctPrimaryTemplateArgs: bool,\n searchInSiblings: bool) -> SymbolLookupResult:\n # ancestorLookupType: if not None, specifies the target type of the lookup\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"_symbol_lookup:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"self:\")\n print(self.to_string(Symbol.debug_indent + 1), end=\"\")\n Symbol.debug_print(\"nestedName: \", nestedName)\n Symbol.debug_print(\"templateDecls: \", \",\".join(str(t) for t in templateDecls))\n Symbol.debug_print(\"strictTemplateParamArgLists:\", strictTemplateParamArgLists)\n Symbol.debug_print(\"ancestorLookupType:\", ancestorLookupType)\n Symbol.debug_print(\"templateShorthand: \", templateShorthand)\n Symbol.debug_print(\"matchSelf: \", matchSelf)\n Symbol.debug_print(\"recurseInAnon: \", recurseInAnon)\n Symbol.debug_print(\"correctPrimaryTemplateArgs: \", correctPrimaryTemplateArgs)\n Symbol.debug_print(\"searchInSiblings: \", searchInSiblings)\n\n if strictTemplateParamArgLists:\n # Each template argument list must have a template parameter list.\n # But to declare a template there must be an additional template parameter list.\n assert (nestedName.num_templates() == len(templateDecls) or\n nestedName.num_templates() + 1 == len(templateDecls))\n else:\n assert len(templateDecls) <= nestedName.num_templates() + 1\n\n names = nestedName.names\n\n # find the right starting point for lookup\n parentSymbol = self\n if nestedName.rooted:\n while parentSymbol.parent:\n parentSymbol = parentSymbol.parent\n if ancestorLookupType is not None:\n # walk up until we find the first identifier\n firstName = names[0]\n if not firstName.is_operator():\n while parentSymbol.parent:\n if parentSymbol.find_identifier(firstName.identOrOp,\n matchSelf=matchSelf,\n recurseInAnon=recurseInAnon,\n searchInSiblings=searchInSiblings):\n # if we are in the scope of a constructor but wants to\n # reference the class we need to walk one extra up\n if (len(names) == 1 and ancestorLookupType == 'class' and matchSelf and\n parentSymbol.parent and\n parentSymbol.parent.identOrOp == firstName.identOrOp):\n pass\n else:\n break\n parentSymbol = parentSymbol.parent\n\n if Symbol.debug_lookup:\n Symbol.debug_print(\"starting point:\")\n print(parentSymbol.to_string(Symbol.debug_indent + 1), end=\"\")\n\n # and now the actual lookup\n iTemplateDecl = 0\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol._symbol_lookup.for_name_in_names_1__Symbol._add_symbols.if_len_noDecl_0_.else_.return.symbol": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_Symbol._symbol_lookup.for_name_in_names_1__Symbol._add_symbols.if_len_noDecl_0_.else_.return.symbol", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4161, "end_line": 4406, "span_ids": ["Symbol._symbol_lookup", "Symbol._add_symbols"], "tokens": 2343}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def _symbol_lookup(self, nestedName: ASTNestedName, templateDecls: List[Any],\n onMissingQualifiedSymbol: Callable[[\"Symbol\", Union[ASTIdentifier, ASTOperator], Any, ASTTemplateArgs], \"Symbol\"], # NOQA\n strictTemplateParamArgLists: bool, ancestorLookupType: str,\n templateShorthand: bool, matchSelf: bool,\n recurseInAnon: bool, correctPrimaryTemplateArgs: bool,\n searchInSiblings: bool) -> SymbolLookupResult:\n # ... other code\n for name in names[:-1]:\n identOrOp = name.identOrOp\n templateArgs = name.templateArgs\n if strictTemplateParamArgLists:\n # there must be a parameter list\n if templateArgs:\n assert iTemplateDecl < len(templateDecls)\n templateParams = templateDecls[iTemplateDecl]\n iTemplateDecl += 1\n else:\n templateParams = None\n else:\n # take the next template parameter list if there is one\n # otherwise it's ok\n if templateArgs and iTemplateDecl < len(templateDecls):\n templateParams = templateDecls[iTemplateDecl]\n iTemplateDecl += 1\n else:\n templateParams = None\n\n symbol = parentSymbol._find_first_named_symbol(\n identOrOp,\n templateParams, templateArgs,\n templateShorthand=templateShorthand,\n matchSelf=matchSelf,\n recurseInAnon=recurseInAnon,\n correctPrimaryTemplateArgs=correctPrimaryTemplateArgs)\n if symbol is None:\n symbol = onMissingQualifiedSymbol(parentSymbol, identOrOp,\n templateParams, templateArgs)\n if symbol is None:\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n return None\n # We have now matched part of a nested name, and need to match more\n # so even if we should matchSelf before, we definitely shouldn't\n # even more. (see also issue #2666)\n matchSelf = False\n parentSymbol = symbol\n\n if Symbol.debug_lookup:\n Symbol.debug_print(\"handle last name from:\")\n print(parentSymbol.to_string(Symbol.debug_indent + 1), end=\"\")\n\n # handle the last name\n name = names[-1]\n identOrOp = name.identOrOp\n templateArgs = name.templateArgs\n if iTemplateDecl < len(templateDecls):\n assert iTemplateDecl + 1 == len(templateDecls)\n templateParams = templateDecls[iTemplateDecl]\n else:\n assert iTemplateDecl == len(templateDecls)\n templateParams = None\n\n symbols = parentSymbol._find_named_symbols(\n identOrOp, templateParams, templateArgs,\n templateShorthand=templateShorthand, matchSelf=matchSelf,\n recurseInAnon=recurseInAnon, correctPrimaryTemplateArgs=False,\n searchInSiblings=searchInSiblings)\n if Symbol.debug_lookup:\n symbols = list(symbols) # type: ignore\n Symbol.debug_indent -= 2\n return SymbolLookupResult(symbols, parentSymbol,\n identOrOp, templateParams, templateArgs)\n\n def _add_symbols(self, nestedName: ASTNestedName, templateDecls: List[Any],\n declaration: ASTDeclaration, docname: str, line: int) -> \"Symbol\":\n # Used for adding a whole path of symbols, where the last may or may not\n # be an actual declaration.\n\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"_add_symbols:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"tdecls:\", \",\".join(str(t) for t in templateDecls))\n Symbol.debug_print(\"nn: \", nestedName)\n Symbol.debug_print(\"decl: \", declaration)\n Symbol.debug_print(\"location: {}:{}\".format(docname, line))\n\n def onMissingQualifiedSymbol(parentSymbol: \"Symbol\",\n identOrOp: Union[ASTIdentifier, ASTOperator],\n templateParams: Any, templateArgs: ASTTemplateArgs\n ) -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"_add_symbols, onMissingQualifiedSymbol:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"templateParams:\", templateParams)\n Symbol.debug_print(\"identOrOp: \", identOrOp)\n Symbol.debug_print(\"templateARgs: \", templateArgs)\n Symbol.debug_indent -= 2\n return Symbol(parent=parentSymbol, identOrOp=identOrOp,\n templateParams=templateParams,\n templateArgs=templateArgs, declaration=None,\n docname=None, line=None)\n\n lookupResult = self._symbol_lookup(nestedName, templateDecls,\n onMissingQualifiedSymbol,\n strictTemplateParamArgLists=True,\n ancestorLookupType=None,\n templateShorthand=False,\n matchSelf=False,\n recurseInAnon=False,\n correctPrimaryTemplateArgs=True,\n searchInSiblings=False)\n assert lookupResult is not None # we create symbols all the way, so that can't happen\n symbols = list(lookupResult.symbols)\n if len(symbols) == 0:\n if Symbol.debug_lookup:\n Symbol.debug_print(\"_add_symbols, result, no symbol:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"templateParams:\", lookupResult.templateParams)\n Symbol.debug_print(\"identOrOp: \", lookupResult.identOrOp)\n Symbol.debug_print(\"templateArgs: \", lookupResult.templateArgs)\n Symbol.debug_print(\"declaration: \", declaration)\n Symbol.debug_print(\"location: {}:{}\".format(docname, line))\n Symbol.debug_indent -= 1\n symbol = Symbol(parent=lookupResult.parentSymbol,\n identOrOp=lookupResult.identOrOp,\n templateParams=lookupResult.templateParams,\n templateArgs=lookupResult.templateArgs,\n declaration=declaration,\n docname=docname, line=line)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n return symbol\n\n if Symbol.debug_lookup:\n Symbol.debug_print(\"_add_symbols, result, symbols:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"number symbols:\", len(symbols))\n Symbol.debug_indent -= 1\n\n if not declaration:\n if Symbol.debug_lookup:\n Symbol.debug_print(\"no declaration\")\n Symbol.debug_indent -= 2\n # good, just a scope creation\n # TODO: what if we have more than one symbol?\n return symbols[0]\n\n noDecl = []\n withDecl = []\n dupDecl = []\n for s in symbols:\n if s.declaration is None:\n noDecl.append(s)\n elif s.isRedeclaration:\n dupDecl.append(s)\n else:\n withDecl.append(s)\n if Symbol.debug_lookup:\n Symbol.debug_print(\"#noDecl: \", len(noDecl))\n Symbol.debug_print(\"#withDecl:\", len(withDecl))\n Symbol.debug_print(\"#dupDecl: \", len(dupDecl))\n # With partial builds we may start with a large symbol tree stripped of declarations.\n # Essentially any combination of noDecl, withDecl, and dupDecls seems possible.\n # TODO: make partial builds fully work. What should happen when the primary symbol gets\n # deleted, and other duplicates exist? The full document should probably be rebuild.\n\n # First check if one of those with a declaration matches.\n # If it's a function, we need to compare IDs,\n # otherwise there should be only one symbol with a declaration.\n def makeCandSymbol() -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_print(\"begin: creating candidate symbol\")\n symbol = Symbol(parent=lookupResult.parentSymbol,\n identOrOp=lookupResult.identOrOp,\n templateParams=lookupResult.templateParams,\n templateArgs=lookupResult.templateArgs,\n declaration=declaration,\n docname=docname, line=line)\n if Symbol.debug_lookup:\n Symbol.debug_print(\"end: creating candidate symbol\")\n return symbol\n if len(withDecl) == 0:\n candSymbol = None\n else:\n candSymbol = makeCandSymbol()\n\n def handleDuplicateDeclaration(symbol: \"Symbol\", candSymbol: \"Symbol\") -> None:\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"redeclaration\")\n Symbol.debug_indent -= 1\n Symbol.debug_indent -= 2\n # Redeclaration of the same symbol.\n # Let the new one be there, but raise an error to the client\n # so it can use the real symbol as subscope.\n # This will probably result in a duplicate id warning.\n candSymbol.isRedeclaration = True\n raise _DuplicateSymbolError(symbol, declaration)\n\n if declaration.objectType != \"function\":\n assert len(withDecl) <= 1\n handleDuplicateDeclaration(withDecl[0], candSymbol)\n # (not reachable)\n\n # a function, so compare IDs\n candId = declaration.get_newest_id()\n if Symbol.debug_lookup:\n Symbol.debug_print(\"candId:\", candId)\n for symbol in withDecl:\n # but all existing must be functions as well,\n # otherwise we declare it to be a duplicate\n if symbol.declaration.objectType != 'function':\n handleDuplicateDeclaration(symbol, candSymbol)\n # (not reachable)\n oldId = symbol.declaration.get_newest_id()\n if Symbol.debug_lookup:\n Symbol.debug_print(\"oldId: \", oldId)\n if candId == oldId:\n handleDuplicateDeclaration(symbol, candSymbol)\n # (not reachable)\n # no candidate symbol found with matching ID\n # if there is an empty symbol, fill that one\n if len(noDecl) == 0:\n if Symbol.debug_lookup:\n Symbol.debug_print(\"no match, no empty\")\n if candSymbol is not None:\n Symbol.debug_print(\"result is already created candSymbol\")\n else:\n Symbol.debug_print(\"result is makeCandSymbol()\")\n Symbol.debug_indent -= 2\n if candSymbol is not None:\n return candSymbol\n else:\n return makeCandSymbol()\n else:\n if Symbol.debug_lookup:\n Symbol.debug_print(\"no match, but fill an empty declaration, candSybmol is not None?:\", candSymbol is not None) # NOQA\n Symbol.debug_indent -= 2\n if candSymbol is not None:\n candSymbol.remove()\n # assert len(noDecl) == 1\n # TODO: enable assertion when we at some point find out how to do cleanup\n # for now, just take the first one, it should work fine ... right?\n symbol = noDecl[0]\n # If someone first opened the scope, and then later\n # declares it, e.g,\n # .. namespace:: Test\n # .. namespace:: nullptr\n # .. class:: Test\n symbol._fill_empty(declaration, docname, line)\n return symbol", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser.parse_declaration_CPPObject.add_target_and_index.if_newestId_not_in_self_s.self_state_document_note_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser.parse_declaration_CPPObject.add_target_and_index.if_newestId_not_in_self_s.self_state_document_note_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 6916, "end_line": 7161, "span_ids": ["_make_phony_error_name", "DefinitionParser.parse_expression", "DefinitionParser.parse_declaration", "CPPObject._add_enumerator_to_parent", "DefinitionParser.parse_namespace_object", "CPPObject", "CPPObject.add_target_and_index", "DefinitionParser.parse_xref_object"], "tokens": 2165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def parse_declaration(self, objectType: str, directiveType: str) -> ASTDeclaration:\n if objectType not in ('class', 'union', 'function', 'member', 'type',\n 'concept', 'enum', 'enumerator'):\n raise Exception('Internal error, unknown objectType \"%s\".' % objectType)\n if directiveType not in ('class', 'struct', 'union', 'function', 'member', 'var',\n 'type', 'concept',\n 'enum', 'enum-struct', 'enum-class', 'enumerator'):\n raise Exception('Internal error, unknown directiveType \"%s\".' % directiveType)\n visibility = None\n templatePrefix = None\n requiresClause = None\n trailingRequiresClause = None\n declaration: Any = None\n\n self.skip_ws()\n if self.match(_visibility_re):\n visibility = self.matched_text\n\n if objectType in ('type', 'concept', 'member', 'function', 'class'):\n templatePrefix = self._parse_template_declaration_prefix(objectType)\n if objectType == 'function' and templatePrefix is not None:\n requiresClause = self._parse_requires_clause()\n\n if objectType == 'type':\n prevErrors = []\n pos = self.pos\n try:\n if not templatePrefix:\n declaration = self._parse_type(named=True, outer='type')\n except DefinitionError as e:\n prevErrors.append((e, \"If typedef-like declaration\"))\n self.pos = pos\n pos = self.pos\n try:\n if not declaration:\n declaration = self._parse_type_using()\n except DefinitionError as e:\n self.pos = pos\n prevErrors.append((e, \"If type alias or template alias\"))\n header = \"Error in type declaration.\"\n raise self._make_multi_error(prevErrors, header) from e\n elif objectType == 'concept':\n declaration = self._parse_concept()\n elif objectType == 'member':\n declaration = self._parse_type_with_init(named=True, outer='member')\n elif objectType == 'function':\n declaration = self._parse_type(named=True, outer='function')\n if templatePrefix is not None:\n trailingRequiresClause = self._parse_requires_clause()\n elif objectType == 'class':\n declaration = self._parse_class()\n elif objectType == 'union':\n declaration = self._parse_union()\n elif objectType == 'enum':\n declaration = self._parse_enum()\n elif objectType == 'enumerator':\n declaration = self._parse_enumerator()\n else:\n assert False\n templatePrefix = self._check_template_consistency(declaration.name,\n templatePrefix,\n fullSpecShorthand=False,\n isMember=objectType == 'member')\n self.skip_ws()\n semicolon = self.skip_string(';')\n return ASTDeclaration(objectType, directiveType, visibility,\n templatePrefix, requiresClause, declaration,\n trailingRequiresClause, semicolon)\n\n def parse_namespace_object(self) -> ASTNamespace:\n templatePrefix = self._parse_template_declaration_prefix(objectType=\"namespace\")\n name = self._parse_nested_name()\n templatePrefix = self._check_template_consistency(name, templatePrefix,\n fullSpecShorthand=False)\n res = ASTNamespace(name, templatePrefix)\n res.objectType = 'namespace' # type: ignore\n return res\n\n def parse_xref_object(self) -> Tuple[Union[ASTNamespace, ASTDeclaration], bool]:\n pos = self.pos\n try:\n templatePrefix = self._parse_template_declaration_prefix(objectType=\"xref\")\n name = self._parse_nested_name()\n # if there are '()' left, just skip them\n self.skip_ws()\n self.skip_string('()')\n self.assert_end()\n templatePrefix = self._check_template_consistency(name, templatePrefix,\n fullSpecShorthand=True)\n res1 = ASTNamespace(name, templatePrefix)\n res1.objectType = 'xref' # type: ignore\n return res1, True\n except DefinitionError as e1:\n try:\n self.pos = pos\n res2 = self.parse_declaration('function', 'function')\n # if there are '()' left, just skip them\n self.skip_ws()\n self.skip_string('()')\n self.assert_end()\n return res2, False\n except DefinitionError as e2:\n errs = []\n errs.append((e1, \"If shorthand ref\"))\n errs.append((e2, \"If full function ref\"))\n msg = \"Error in cross-reference.\"\n raise self._make_multi_error(errs, msg) from e2\n\n def parse_expression(self) -> Union[ASTExpression, ASTType]:\n pos = self.pos\n try:\n expr = self._parse_expression()\n self.skip_ws()\n self.assert_end()\n return expr\n except DefinitionError as exExpr:\n self.pos = pos\n try:\n typ = self._parse_type(False)\n self.skip_ws()\n self.assert_end()\n return typ\n except DefinitionError as exType:\n header = \"Error when parsing (type) expression.\"\n errs = []\n errs.append((exExpr, \"If expression\"))\n errs.append((exType, \"If type\"))\n raise self._make_multi_error(errs, header) from exType\n\n\ndef _make_phony_error_name() -> ASTNestedName:\n nne = ASTNestedNameElement(ASTIdentifier(\"PhonyNameDueToError\"), None)\n return ASTNestedName([nne], [False], rooted=False)\n\n\nclass CPPObject(ObjectDescription[ASTDeclaration]):\n \"\"\"Description of a C++ language object.\"\"\"\n\n doc_field_types: List[Field] = [\n GroupedField('template parameter', label=_('Template Parameters'),\n names=('tparam', 'template parameter'),\n can_collapse=True),\n ]\n\n option_spec: OptionSpec = {\n 'noindexentry': directives.flag,\n 'tparam-line-spec': directives.flag,\n }\n\n def _add_enumerator_to_parent(self, ast: ASTDeclaration) -> None:\n assert ast.objectType == 'enumerator'\n # find the parent, if it exists && is an enum\n # && it's unscoped,\n # then add the name to the parent scope\n symbol = ast.symbol\n assert symbol\n assert symbol.identOrOp is not None\n assert symbol.templateParams is None\n assert symbol.templateArgs is None\n parentSymbol = symbol.parent\n assert parentSymbol\n if parentSymbol.parent is None:\n # TODO: we could warn, but it is somewhat equivalent to unscoped\n # enums, without the enum\n return # no parent\n parentDecl = parentSymbol.declaration\n if parentDecl is None:\n # the parent is not explicitly declared\n # TODO: we could warn, but it could be a style to just assume\n # enumerator parents to be scoped\n return\n if parentDecl.objectType != 'enum':\n # TODO: maybe issue a warning, enumerators in non-enums is weird,\n # but it is somewhat equivalent to unscoped enums, without the enum\n return\n if parentDecl.directiveType != 'enum':\n return\n\n targetSymbol = parentSymbol.parent\n s = targetSymbol.find_identifier(symbol.identOrOp, matchSelf=False, recurseInAnon=True,\n searchInSiblings=False)\n if s is not None:\n # something is already declared with that name\n return\n declClone = symbol.declaration.clone()\n declClone.enumeratorScopedSymbol = symbol\n Symbol(parent=targetSymbol, identOrOp=symbol.identOrOp,\n templateParams=None, templateArgs=None,\n declaration=declClone,\n docname=self.env.docname, line=self.get_source_info()[1])\n\n def add_target_and_index(self, ast: ASTDeclaration, sig: str,\n signode: TextElement) -> None:\n # general note: name must be lstrip(':')'ed, to remove \"::\"\n ids = []\n for i in range(1, _max_id + 1):\n try:\n id = ast.get_id(version=i)\n ids.append(id)\n except NoOldIdError:\n assert i < _max_id\n # let's keep the newest first\n ids = list(reversed(ids))\n newestId = ids[0]\n assert newestId # shouldn't be None\n if not re.compile(r'^[a-zA-Z0-9_]*$').match(newestId):\n logger.warning('Index id generation for C++ object \"%s\" failed, please '\n 'report as bug (id=%s).', ast, newestId,\n location=self.get_location())\n\n name = ast.symbol.get_full_nested_name().get_display_string().lstrip(':')\n # Add index entry, but not if it's a declaration inside a concept\n isInConcept = False\n s = ast.symbol.parent\n while s is not None:\n decl = s.declaration\n s = s.parent\n if decl is None:\n continue\n if decl.objectType == 'concept':\n isInConcept = True\n break\n if not isInConcept and 'noindexentry' not in self.options:\n strippedName = name\n for prefix in self.env.config.cpp_index_common_prefix:\n if name.startswith(prefix):\n strippedName = strippedName[len(prefix):]\n break\n indexText = self.get_index_text(strippedName)\n self.indexnode['entries'].append(('single', indexText, newestId, '', None))\n\n if newestId not in self.state.document.ids:\n # if the name is not unique, the first one will win\n names = self.env.domaindata['cpp']['names']\n if name not in names:\n names[name] = ast.symbol.docname\n # always add the newest id\n assert newestId\n signode['ids'].append(newestId)\n # only add compatibility ids when there are no conflicts\n for id in ids[1:]:\n if not id: # is None when the element didn't exist in that version\n continue\n if id not in self.state.document.ids:\n signode['ids'].append(id)\n self.state.document.note_explicit_target(signode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPObject.object_type_CPPObject.run.return.super_run_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPObject.object_type_CPPObject.run.return.super_run_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 7163, "end_line": 7216, "span_ids": ["CPPObject.get_index_text", "CPPObject.display_object_type", "CPPObject.parse_definition", "CPPObject.describe_signature", "CPPObject.object_type", "CPPObject.run"], "tokens": 513}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CPPObject(ObjectDescription[ASTDeclaration]):\n\n @property\n def object_type(self) -> str:\n raise NotImplementedError()\n\n @property\n def display_object_type(self) -> str:\n return self.object_type\n\n def get_index_text(self, name: str) -> str:\n return _('%s (C++ %s)') % (name, self.display_object_type)\n\n def parse_definition(self, parser: DefinitionParser) -> ASTDeclaration:\n return parser.parse_declaration(self.object_type, self.objtype)\n\n def describe_signature(self, signode: desc_signature,\n ast: ASTDeclaration, options: Dict) -> None:\n ast.describe_signature(signode, 'lastIsName', self.env, options)\n\n def run(self) -> List[Node]:\n env = self.state.document.settings.env # from ObjectDescription.run\n if 'cpp:parent_symbol' not in env.temp_data:\n root = env.domaindata['cpp']['root_symbol']\n env.temp_data['cpp:parent_symbol'] = root\n env.ref_context['cpp:parent_key'] = root.get_lookup_key()\n\n # The lookup keys assume that no nested scopes exists inside overloaded functions.\n # (see also #5191)\n # Example:\n # .. cpp:function:: void f(int)\n # .. cpp:function:: void f(double)\n #\n # .. cpp:function:: void g()\n #\n # :cpp:any:`boom`\n #\n # So we disallow any signatures inside functions.\n parentSymbol = env.temp_data['cpp:parent_symbol']\n parentDecl = parentSymbol.declaration\n if parentDecl is not None and parentDecl.objectType == 'function':\n msg = \"C++ declarations inside functions are not supported.\" \\\n \" Parent function: {}\\nDirective name: {}\\nDirective arg: {}\"\n logger.warning(msg.format(\n str(parentSymbol.get_full_nested_name()),\n self.name, self.arguments[0]\n ), location=self.get_location())\n name = _make_phony_error_name()\n symbol = parentSymbol.add_name(name)\n env.temp_data['cpp:last_symbol'] = symbol\n return []\n # When multiple declarations are made in the same directive\n # they need to know about each other to provide symbol lookup for function parameters.\n # We use last_symbol to store the latest added declaration in a directive.\n env.temp_data['cpp:last_symbol'] = None\n return super().run()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.handle_signature_JSObject.handle_signature.return.fullname_prefix": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.handle_signature_JSObject.handle_signature.return.fullname_prefix", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 49, "end_line": 109, "span_ids": ["JSObject.handle_signature"], "tokens": 480}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JSObject(ObjectDescription[Tuple[str, str]]):\n\n def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]:\n \"\"\"Breaks down construct signatures\n\n Parses out prefix and argument list from construct definition. The\n namespace and class will be determined by the nesting of domain\n directives.\n \"\"\"\n sig = sig.strip()\n if '(' in sig and sig[-1:] == ')':\n member, arglist = sig.split('(', 1)\n member = member.strip()\n arglist = arglist[:-1].strip()\n else:\n member = sig\n arglist = None\n # If construct is nested, prefix the current prefix\n prefix = self.env.ref_context.get('js:object', None)\n mod_name = self.env.ref_context.get('js:module')\n\n name = member\n try:\n member_prefix, member_name = member.rsplit('.', 1)\n except ValueError:\n member_name = name\n member_prefix = ''\n finally:\n name = member_name\n if prefix and member_prefix:\n prefix = '.'.join([prefix, member_prefix])\n elif prefix is None and member_prefix:\n prefix = member_prefix\n fullname = name\n if prefix:\n fullname = '.'.join([prefix, name])\n\n signode['module'] = mod_name\n signode['object'] = prefix\n signode['fullname'] = fullname\n\n display_prefix = self.get_display_prefix()\n if display_prefix:\n signode += addnodes.desc_annotation('', '', *display_prefix)\n\n actual_prefix = None\n if prefix:\n actual_prefix = prefix\n elif mod_name:\n actual_prefix = mod_name\n if actual_prefix:\n addName = addnodes.desc_addname('', '')\n for p in actual_prefix.split('.'):\n addName += addnodes.desc_sig_name(p, p)\n addName += addnodes.desc_sig_punctuation('.', '.')\n signode += addName\n signode += addnodes.desc_name('', '', addnodes.desc_sig_name(name, name))\n if self.has_arguments:\n if not arglist:\n signode += addnodes.desc_parameterlist()\n else:\n _pseudo_parse_arglist(signode, arglist)\n return fullname, prefix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.add_target_and_index_JSObject.add_target_and_index.if_noindexentry_not_in_.if_indextext_.self_indexnode_entries_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject.add_target_and_index_JSObject.add_target_and_index.if_noindexentry_not_in_.if_indextext_.self_indexnode_entries_", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 108, "end_line": 129, "span_ids": ["JSObject.add_target_and_index"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JSObject(ObjectDescription[Tuple[str, str]]):\n\n def add_target_and_index(self, name_obj: Tuple[str, str], sig: str,\n signode: desc_signature) -> None:\n mod_name = self.env.ref_context.get('js:module')\n fullname = (mod_name + '.' if mod_name else '') + name_obj[0]\n node_id = make_id(self.env, self.state.document, '', fullname)\n signode['ids'].append(node_id)\n\n # Assign old styled node_id not to break old hyperlinks (if possible)\n # Note: Will be removed in Sphinx-5.0 (RemovedInSphinx50Warning)\n old_node_id = self.make_old_id(fullname)\n if old_node_id not in self.state.document.ids and old_node_id not in signode['ids']:\n signode['ids'].append(old_node_id)\n\n self.state.document.note_explicit_target(signode)\n\n domain = cast(JavaScriptDomain, self.env.get_domain('js'))\n domain.note_object(fullname, self.objtype, node_id, location=signode)\n\n if 'noindexentry' not in self.options:\n indextext = self.get_index_text(mod_name, name_obj)\n if indextext:\n self.indexnode['entries'].append(('single', indextext, node_id, '', None))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.get_index_text_PyObject.add_target_and_index.if_noindexentry_not_in_.if_indextext_.self_indexnode_entries_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyObject.get_index_text_PyObject.add_target_and_index.if_noindexentry_not_in_.if_indextext_.self_indexnode_entries_", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 558, "end_line": 587, "span_ids": ["PyObject.add_target_and_index", "PyObject.get_index_text"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyObject(ObjectDescription[Tuple[str, str]]):\n\n def get_index_text(self, modname: str, name: Tuple[str, str]) -> str:\n \"\"\"Return the text for the index entry of the object.\"\"\"\n raise NotImplementedError('must be implemented in subclasses')\n\n def add_target_and_index(self, name_cls: Tuple[str, str], sig: str,\n signode: desc_signature) -> None:\n modname = self.options.get('module', self.env.ref_context.get('py:module'))\n fullname = (modname + '.' if modname else '') + name_cls[0]\n node_id = make_id(self.env, self.state.document, '', fullname)\n signode['ids'].append(node_id)\n\n # Assign old styled node_id(fullname) not to break old hyperlinks (if possible)\n # Note: Will removed in Sphinx-5.0 (RemovedInSphinx50Warning)\n if node_id != fullname and fullname not in self.state.document.ids:\n signode['ids'].append(fullname)\n\n self.state.document.note_explicit_target(signode)\n\n domain = cast(PythonDomain, self.env.get_domain('py'))\n domain.note_object(fullname, self.objtype, node_id, location=signode)\n\n canonical_name = self.options.get('canonical')\n if canonical_name:\n domain.note_object(canonical_name, self.objtype, node_id, aliased=True,\n location=signode)\n\n if 'noindexentry' not in self.options:\n indextext = self.get_index_text(modname, name_cls)\n if indextext:\n self.indexnode['entries'].append(('single', indextext, node_id, '', None))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_real_modname_Documenter._call_format_args.return.self_format_args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_real_modname_Documenter._call_format_args.return.self_format_args_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 360, "end_line": 408, "span_ids": ["Documenter.get_real_modname", "Documenter._call_format_args", "Documenter.check_module", "Documenter.format_args", "Documenter.format_name"], "tokens": 359}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def get_real_modname(self) -> str:\n \"\"\"Get the real module name of an object to document.\n\n It can differ from the name of the module through which the object was\n imported.\n \"\"\"\n return self.get_attr(self.object, '__module__', None) or self.modname\n\n def check_module(self) -> bool:\n \"\"\"Check if *self.object* is really defined in the module given by\n *self.modname*.\n \"\"\"\n if self.options.imported_members:\n return True\n\n subject = inspect.unpartial(self.object)\n modname = self.get_attr(subject, '__module__', None)\n if modname and modname != self.modname:\n return False\n return True\n\n def format_args(self, **kwargs: Any) -> str:\n \"\"\"Format the argument signature of *self.object*.\n\n Should return None if the object does not have a signature.\n \"\"\"\n return None\n\n def format_name(self) -> str:\n \"\"\"Format the name of *self.object*.\n\n This normally should be something that can be parsed by the generated\n directive, but doesn't need to be (Sphinx will display it unparsed\n then).\n \"\"\"\n # normally the name doesn't contain the module (except for module\n # directives of course)\n return '.'.join(self.objpath) or self.modname\n\n def _call_format_args(self, **kwargs: Any) -> str:\n if kwargs:\n try:\n return self.format_args(**kwargs)\n except TypeError:\n # avoid chaining exceptions, by putting nothing here\n pass\n\n # retry without arguments for old documenters\n return self.format_args()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.sort_members_Documenter.sort_members.return.documenters": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.sort_members_Documenter.sort_members.return.documenters", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 734, "end_line": 757, "span_ids": ["Documenter.sort_members"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def sort_members(self, documenters: List[Tuple[\"Documenter\", bool]],\n order: str) -> List[Tuple[\"Documenter\", bool]]:\n \"\"\"Sort the given member list.\"\"\"\n if order == 'groupwise':\n # sort by group; alphabetically within groups\n documenters.sort(key=lambda e: (e[0].member_order, e[0].name))\n elif order == 'bysource':\n if self.analyzer:\n # sort by source order, by virtue of the module analyzer\n tagorder = self.analyzer.tagorder\n\n def keyfunc(entry: Tuple[Documenter, bool]) -> int:\n fullname = entry[0].name.split('::')[1]\n return tagorder.get(fullname, len(tagorder))\n documenters.sort(key=keyfunc)\n else:\n # Assume that member discovery order matches source order.\n # This is a reasonable assumption in Python 3.6 and up, where\n # module.__dict__ is insertion-ordered.\n pass\n else: # alphabetical\n documenters.sort(key=lambda e: e[0].name)\n\n return documenters", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.import_object_ModuleDocumenter.import_object.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.import_object_ModuleDocumenter.import_object.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1017, "end_line": 1029, "span_ids": ["ModuleDocumenter.import_object"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleDocumenter(Documenter):\n\n def import_object(self, raiseerror: bool = False) -> bool:\n ret = super().import_object(raiseerror)\n\n try:\n if not self.options.ignore_module_all:\n self.__all__ = inspect.getall(self.object)\n except ValueError as exc:\n # invalid __all__ found.\n logger.warning(__('__all__ should be a list of strings, not %r '\n '(in module %s) -- ignoring __all__') %\n (exc.args[0], self.fullname), type='autodoc')\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.sort_members_ModuleDocumenter.sort_members.if_order_bysource_an.else_.return.super_sort_members_docu": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.sort_members_ModuleDocumenter.sort_members.if_order_bysource_an.else_.return.super_sort_members_docu", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1109, "end_line": 1126, "span_ids": ["ModuleDocumenter.sort_members"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleDocumenter(Documenter):\n\n def sort_members(self, documenters: List[Tuple[\"Documenter\", bool]],\n order: str) -> List[Tuple[\"Documenter\", bool]]:\n if order == 'bysource' and self.__all__:\n # Sort alphabetically first (for members not listed on the __all__)\n documenters.sort(key=lambda e: e[0].name)\n\n # Sort by __all__\n def keyfunc(entry: Tuple[Documenter, bool]) -> int:\n name = entry[0].name.split('::')[1]\n if self.__all__ and name in self.__all__:\n return self.__all__.index(name)\n else:\n return len(self.__all__)\n documenters.sort(key=keyfunc)\n\n return documenters\n else:\n return super().sort_members(documenters, order)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter.format_signature_FunctionDocumenter.format_signature.return._n_join_sigs_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter.format_signature_FunctionDocumenter.format_signature.return._n_join_sigs_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1325, "end_line": 1364, "span_ids": ["FunctionDocumenter.format_signature"], "tokens": 360}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def format_signature(self, **kwargs: Any) -> str:\n if self.config.autodoc_typehints_format == \"short\":\n kwargs.setdefault('unqualified_typehints', True)\n\n sigs = []\n if (self.analyzer and\n '.'.join(self.objpath) in self.analyzer.overloads and\n self.config.autodoc_typehints != 'none'):\n # Use signatures for overloaded functions instead of the implementation function.\n overloaded = True\n else:\n overloaded = False\n sig = super().format_signature(**kwargs)\n sigs.append(sig)\n\n if inspect.is_singledispatch_function(self.object):\n # append signature of singledispatch'ed functions\n for typ, func in self.object.registry.items():\n if typ is object:\n pass # default implementation. skipped.\n else:\n dispatchfunc = self.annotate_to_first_argument(func, typ)\n if dispatchfunc:\n documenter = FunctionDocumenter(self.directive, '')\n documenter.object = dispatchfunc\n documenter.objpath = [None]\n sigs.append(documenter.format_signature())\n if overloaded:\n actual = inspect.signature(self.object,\n type_aliases=self.config.autodoc_type_aliases)\n __globals__ = safe_getattr(self.object, '__globals__', {})\n for overload in self.analyzer.overloads.get('.'.join(self.objpath)):\n overload = self.merge_default_value(actual, overload)\n overload = evaluate_signature(overload, __globals__,\n self.config.autodoc_type_aliases)\n\n sig = stringify_signature(overload, **kwargs)\n sigs.append(sig)\n\n return \"\\n\".join(sigs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter._get_signature_ClassDocumenter._get_signature.return.None_None_None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter._get_signature_ClassDocumenter._get_signature.return.None_None_None", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1425, "end_line": 1501, "span_ids": ["ClassDocumenter._get_signature"], "tokens": 736}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def _get_signature(self) -> Tuple[Optional[Any], Optional[str], Optional[Signature]]:\n def get_user_defined_function_or_method(obj: Any, attr: str) -> Any:\n \"\"\" Get the `attr` function or method from `obj`, if it is user-defined. \"\"\"\n if inspect.is_builtin_class_method(obj, attr):\n return None\n attr = self.get_attr(obj, attr, None)\n if not (inspect.ismethod(attr) or inspect.isfunction(attr)):\n return None\n return attr\n\n # This sequence is copied from inspect._signature_from_callable.\n # ValueError means that no signature could be found, so we keep going.\n\n # First, we check the obj has a __signature__ attribute\n if (hasattr(self.object, '__signature__') and\n isinstance(self.object.__signature__, Signature)):\n return None, None, self.object.__signature__\n\n # Next, let's see if it has an overloaded __call__ defined\n # in its metaclass\n call = get_user_defined_function_or_method(type(self.object), '__call__')\n\n if call is not None:\n if \"{0.__module__}.{0.__qualname__}\".format(call) in _METACLASS_CALL_BLACKLIST:\n call = None\n\n if call is not None:\n self.env.app.emit('autodoc-before-process-signature', call, True)\n try:\n sig = inspect.signature(call, bound_method=True,\n type_aliases=self.config.autodoc_type_aliases)\n return type(self.object), '__call__', sig\n except ValueError:\n pass\n\n # Now we check if the 'obj' class has a '__new__' method\n new = get_user_defined_function_or_method(self.object, '__new__')\n\n if new is not None:\n if \"{0.__module__}.{0.__qualname__}\".format(new) in _CLASS_NEW_BLACKLIST:\n new = None\n\n if new is not None:\n self.env.app.emit('autodoc-before-process-signature', new, True)\n try:\n sig = inspect.signature(new, bound_method=True,\n type_aliases=self.config.autodoc_type_aliases)\n return self.object, '__new__', sig\n except ValueError:\n pass\n\n # Finally, we should have at least __init__ implemented\n init = get_user_defined_function_or_method(self.object, '__init__')\n if init is not None:\n self.env.app.emit('autodoc-before-process-signature', init, True)\n try:\n sig = inspect.signature(init, bound_method=True,\n type_aliases=self.config.autodoc_type_aliases)\n return self.object, '__init__', sig\n except ValueError:\n pass\n\n # None of the attributes are user-defined, so fall back to let inspect\n # handle it.\n # We don't know the exact method that inspect.signature will read\n # the signature from, so just pass the object itself to our hook.\n self.env.app.emit('autodoc-before-process-signature', self.object, False)\n try:\n sig = inspect.signature(self.object, bound_method=False,\n type_aliases=self.config.autodoc_type_aliases)\n return None, None, sig\n except ValueError:\n pass\n\n # Still no signature: happens e.g. for old-style classes\n # with __init__ in C and no `__text_signature__`.\n return None, None, None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.format_args_ClassDocumenter.format_args.return.stringify_signature_sig_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.format_args_ClassDocumenter.format_args.return.stringify_signature_sig_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1564, "end_line": 1581, "span_ids": ["ClassDocumenter.format_args"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def format_args(self, **kwargs: Any) -> str:\n if self.config.autodoc_typehints in ('none', 'description'):\n kwargs.setdefault('show_annotation', False)\n if self.config.autodoc_typehints_format == \"short\":\n kwargs.setdefault('unqualified_typehints', True)\n\n try:\n self._signature_class, self._signature_method_name, sig = self._get_signature()\n except TypeError as exc:\n # __signature__ attribute contained junk\n logger.warning(__(\"Failed to get a constructor signature for %s: %s\"),\n self.fullname, exc)\n return None\n\n if sig is None:\n return None\n\n return stringify_signature(sig, show_return_annotation=False, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.format_signature_MethodDocumenter.format_signature.return._n_join_sigs_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.format_signature_MethodDocumenter.format_signature.return._n_join_sigs_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2210, "end_line": 2260, "span_ids": ["MethodDocumenter.format_signature"], "tokens": 470}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter):\n\n def format_signature(self, **kwargs: Any) -> str:\n if self.config.autodoc_typehints_format == \"short\":\n kwargs.setdefault('unqualified_typehints', True)\n\n sigs = []\n if (self.analyzer and\n '.'.join(self.objpath) in self.analyzer.overloads and\n self.config.autodoc_typehints != 'none'):\n # Use signatures for overloaded methods instead of the implementation method.\n overloaded = True\n else:\n overloaded = False\n sig = super().format_signature(**kwargs)\n sigs.append(sig)\n\n meth = self.parent.__dict__.get(self.objpath[-1])\n if inspect.is_singledispatch_method(meth):\n # append signature of singledispatch'ed functions\n for typ, func in meth.dispatcher.registry.items():\n if typ is object:\n pass # default implementation. skipped.\n else:\n dispatchmeth = self.annotate_to_first_argument(func, typ)\n if dispatchmeth:\n documenter = MethodDocumenter(self.directive, '')\n documenter.parent = self.parent\n documenter.object = dispatchmeth\n documenter.objpath = [None]\n sigs.append(documenter.format_signature())\n if overloaded:\n if inspect.isstaticmethod(self.object, cls=self.parent, name=self.object_name):\n actual = inspect.signature(self.object, bound_method=False,\n type_aliases=self.config.autodoc_type_aliases)\n else:\n actual = inspect.signature(self.object, bound_method=True,\n type_aliases=self.config.autodoc_type_aliases)\n\n __globals__ = safe_getattr(self.object, '__globals__', {})\n for overload in self.analyzer.overloads.get('.'.join(self.objpath)):\n overload = self.merge_default_value(actual, overload)\n overload = evaluate_signature(overload, __globals__,\n self.config.autodoc_type_aliases)\n\n if not inspect.isstaticmethod(self.object, cls=self.parent,\n name=self.object_name):\n parameters = list(overload.parameters.values())\n overload = overload.replace(parameters=parameters[1:])\n sig = stringify_signature(overload, **kwargs)\n sigs.append(sig)\n\n return \"\\n\".join(sigs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.get_doc_AttributeDocumenter.add_content.super_add_content_more_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.get_doc_AttributeDocumenter.add_content.super_add_content_more_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2706, "end_line": 2731, "span_ids": ["AttributeDocumenter.add_content", "AttributeDocumenter.get_doc"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AttributeDocumenter(GenericAliasMixin, NewTypeMixin, SlotsMixin, # type: ignore\n TypeVarMixin, RuntimeInstanceAttributeMixin,\n UninitializedInstanceAttributeMixin, NonDataDescriptorMixin,\n DocstringStripSignatureMixin, ClassLevelDocumenter):\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n # Check the attribute has a docstring-comment\n comment = self.get_attribute_comment(self.parent, self.objpath[-1])\n if comment:\n return [comment]\n\n try:\n # Disable `autodoc_inherit_docstring` temporarily to avoid to obtain\n # a docstring from the value which descriptor returns unexpectedly.\n # ref: https://github.com/sphinx-doc/sphinx/issues/7805\n orig = self.config.autodoc_inherit_docstrings\n self.config.autodoc_inherit_docstrings = False # type: ignore\n return super().get_doc(ignore)\n finally:\n self.config.autodoc_inherit_docstrings = orig # type: ignore\n\n def add_content(self, more_content: Optional[StringList], no_docstring: bool = False\n ) -> None:\n # Disable analyzing attribute comment on Documenter.add_content() to control it on\n # AttributeDocumenter.add_content()\n self.analyzer = None\n\n if more_content is None:\n more_content = StringList()\n self.update_content(more_content)\n super().add_content(more_content, no_docstring)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_unmangle_unmangle.return.name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_unmangle_unmangle.return.name", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/importer.py", "file_name": "importer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 35, "end_line": 51, "span_ids": ["unmangle"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def unmangle(subject: Any, name: str) -> Optional[str]:\n \"\"\"Unmangle the given name.\"\"\"\n try:\n if isclass(subject) and not name.endswith('__'):\n prefix = \"_%s__\" % subject.__name__\n if name.startswith(prefix):\n return name.replace(prefix, \"__\", 1)\n else:\n for cls in subject.__mro__:\n prefix = \"_%s__\" % cls.__name__\n if name.startswith(prefix):\n # mangled attribute defined in parent class\n return None\n except AttributeError:\n pass\n\n return name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_import_module_import_module.try_.except_BaseException_as_e.raise_ImportError_exc_tr": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_import_module_import_module.try_.except_BaseException_as_e.raise_ImportError_exc_tr", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/importer.py", "file_name": "importer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 54, "end_line": 66, "span_ids": ["import_module"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def import_module(modname: str, warningiserror: bool = False) -> Any:\n \"\"\"\n Call importlib.import_module(modname), convert exceptions to ImportError\n \"\"\"\n try:\n with warnings.catch_warnings():\n warnings.filterwarnings(\"ignore\", category=ImportWarning)\n with logging.skip_warningiserror(not warningiserror):\n return importlib.import_module(modname)\n except BaseException as exc:\n # Importing modules may cause any side effects, including\n # SystemExit, so we need to catch all errors.\n raise ImportError(exc, traceback.format_exc()) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_html_visit_displaymath_html_visit_displaymath.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_html_visit_displaymath_html_visit_displaymath.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 342, "end_line": 370, "span_ids": ["html_visit_displaymath"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def html_visit_displaymath(self: HTMLTranslator, node: nodes.math_block) -> None:\n if node['nowrap']:\n latex = node.astext()\n else:\n latex = wrap_displaymath(node.astext(), None, False)\n try:\n fname, depth = render_math(self, latex)\n except MathExtError as exc:\n msg = str(exc)\n sm = nodes.system_message(msg, type='WARNING', level=2,\n backrefs=[], source=node.astext())\n sm.walkabout(self)\n logger.warning(__('inline latex %r: %s'), node.astext(), msg)\n raise nodes.SkipNode from exc\n self.body.append(self.starttag(node, 'div', CLASS='math'))\n self.body.append('<p>')\n if node['number']:\n number = get_node_equation_number(self, node)\n self.body.append('<span class=\"eqno\">(%s)' % number)\n self.add_permalink_ref(node, _('Permalink to this equation'))\n self.body.append('</span>')\n if fname is None:\n # something failed -- use text-only as a bad substitute\n self.body.append('<span class=\"math\">%s</span></p>\\n</div>' %\n self.encode(node.astext()).strip())\n else:\n self.body.append(('<img src=\"%s\"' % fname) + get_tooltip(self, node) +\n '/></p>\\n</div>')\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring.__init___GoogleDocstring.__str__.return._n_join_self_lines_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring.__init___GoogleDocstring.__str__.return._n_join_self_lines_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 128, "end_line": 213, "span_ids": ["GoogleDocstring.__str__", "GoogleDocstring"], "tokens": 789}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def __init__(self, docstring: Union[str, List[str]], config: SphinxConfig = None,\n app: Sphinx = None, what: str = '', name: str = '',\n obj: Any = None, options: Any = None) -> None:\n self._config = config\n self._app = app\n\n if not self._config:\n from sphinx.ext.napoleon import Config\n self._config = self._app.config if self._app else Config() # type: ignore\n\n if not what:\n if inspect.isclass(obj):\n what = 'class'\n elif inspect.ismodule(obj):\n what = 'module'\n elif callable(obj):\n what = 'function'\n else:\n what = 'object'\n\n self._what = what\n self._name = name\n self._obj = obj\n self._opt = options\n if isinstance(docstring, str):\n lines = docstring.splitlines()\n else:\n lines = docstring\n self._line_iter = modify_iter(lines, modifier=lambda s: s.rstrip())\n self._parsed_lines: List[str] = []\n self._is_in_section = False\n self._section_indent = 0\n if not hasattr(self, '_directive_sections'):\n self._directive_sections: List[str] = []\n if not hasattr(self, '_sections'):\n self._sections: Dict[str, Callable] = {\n 'args': self._parse_parameters_section,\n 'arguments': self._parse_parameters_section,\n 'attention': partial(self._parse_admonition, 'attention'),\n 'attributes': self._parse_attributes_section,\n 'caution': partial(self._parse_admonition, 'caution'),\n 'danger': partial(self._parse_admonition, 'danger'),\n 'error': partial(self._parse_admonition, 'error'),\n 'example': self._parse_examples_section,\n 'examples': self._parse_examples_section,\n 'hint': partial(self._parse_admonition, 'hint'),\n 'important': partial(self._parse_admonition, 'important'),\n 'keyword args': self._parse_keyword_arguments_section,\n 'keyword arguments': self._parse_keyword_arguments_section,\n 'methods': self._parse_methods_section,\n 'note': partial(self._parse_admonition, 'note'),\n 'notes': self._parse_notes_section,\n 'other parameters': self._parse_other_parameters_section,\n 'parameters': self._parse_parameters_section,\n 'receive': self._parse_receives_section,\n 'receives': self._parse_receives_section,\n 'return': self._parse_returns_section,\n 'returns': self._parse_returns_section,\n 'raise': self._parse_raises_section,\n 'raises': self._parse_raises_section,\n 'references': self._parse_references_section,\n 'see also': self._parse_see_also_section,\n 'tip': partial(self._parse_admonition, 'tip'),\n 'todo': partial(self._parse_admonition, 'todo'),\n 'warning': partial(self._parse_admonition, 'warning'),\n 'warnings': partial(self._parse_admonition, 'warning'),\n 'warn': self._parse_warns_section,\n 'warns': self._parse_warns_section,\n 'yield': self._parse_yields_section,\n 'yields': self._parse_yields_section,\n }\n\n self._load_custom_sections()\n\n self._parse()\n\n def __str__(self) -> str:\n \"\"\"Return the parsed docstring in reStructuredText format.\n\n Returns\n -------\n unicode\n Unicode version of the docstring.\n\n \"\"\"\n return '\\n'.join(self.lines())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring.lines_GoogleDocstring._consume_empty.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring.lines_GoogleDocstring._consume_empty.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 194, "end_line": 228, "span_ids": ["GoogleDocstring._consume_contiguous", "GoogleDocstring._consume_empty", "GoogleDocstring._consume_indented_block", "GoogleDocstring.lines"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def lines(self) -> List[str]:\n \"\"\"Return the parsed lines of the docstring in reStructuredText format.\n\n Returns\n -------\n list(str)\n The lines of the docstring in a list.\n\n \"\"\"\n return self._parsed_lines\n\n def _consume_indented_block(self, indent: int = 1) -> List[str]:\n lines = []\n line = self._line_iter.peek()\n while(not self._is_section_break() and\n (not line or self._is_indented(line, indent))):\n lines.append(next(self._line_iter))\n line = self._line_iter.peek()\n return lines\n\n def _consume_contiguous(self) -> List[str]:\n lines = []\n while (self._line_iter.has_next() and\n self._line_iter.peek() and\n not self._is_section_header()):\n lines.append(next(self._line_iter))\n return lines\n\n def _consume_empty(self) -> List[str]:\n lines = []\n line = self._line_iter.peek()\n while self._line_iter.has_next() and not line:\n lines.append(next(self._line_iter))\n line = self._line_iter.peek()\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_BuiltinTemplateLoader_BuiltinTemplateLoader.init.if_use_i18n_.self_environment_install_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py_BuiltinTemplateLoader_BuiltinTemplateLoader.init.if_use_i18n_.self_environment_install_", "embedding": null, "metadata": {"file_path": "sphinx/jinja2glue.py", "file_name": "jinja2glue.py", "file_type": "text/x-python", "category": "implementation", "start_line": 137, "end_line": 185, "span_ids": ["BuiltinTemplateLoader", "BuiltinTemplateLoader.init"], "tokens": 463}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuiltinTemplateLoader(TemplateBridge, BaseLoader):\n \"\"\"\n Interfaces the rendering environment of jinja2 for use in Sphinx.\n \"\"\"\n\n # TemplateBridge interface\n\n def init(self, builder: \"Builder\", theme: Theme = None, dirs: List[str] = None) -> None:\n # create a chain of paths to search\n if theme:\n # the theme's own dir and its bases' dirs\n pathchain = theme.get_theme_dirs()\n # the loader dirs: pathchain + the parent directories for all themes\n loaderchain = pathchain + [path.join(p, '..') for p in pathchain]\n elif dirs:\n pathchain = list(dirs)\n loaderchain = list(dirs)\n else:\n pathchain = []\n loaderchain = []\n\n # prepend explicit template paths\n self.templatepathlen = len(builder.config.templates_path)\n if builder.config.templates_path:\n cfg_templates_path = [path.join(builder.confdir, tp)\n for tp in builder.config.templates_path]\n pathchain[0:0] = cfg_templates_path\n loaderchain[0:0] = cfg_templates_path\n\n # store it for use in newest_template_mtime\n self.pathchain = pathchain\n\n # make the paths into loaders\n self.loaders = [SphinxFileSystemLoader(x) for x in loaderchain]\n\n use_i18n = builder.app.translator is not None\n extensions = ['jinja2.ext.i18n'] if use_i18n else []\n self.environment = SandboxedEnvironment(loader=self,\n extensions=extensions)\n self.environment.filters['tobool'] = _tobool\n self.environment.filters['toint'] = _toint\n self.environment.filters['todim'] = _todim\n self.environment.filters['slice_index'] = _slice_index\n self.environment.globals['debug'] = pass_context(pformat)\n self.environment.globals['warning'] = warning\n self.environment.globals['accesskey'] = pass_context(accesskey)\n self.environment.globals['idgen'] = idgen\n if use_i18n:\n self.environment.install_gettext_translations(builder.app.translator)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_Assign_VariableCommentPicker.visit_Assign.for_varname_in_varnames_.self_add_entry_varname_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_Assign_VariableCommentPicker.visit_Assign.for_varname_in_varnames_.self_add_entry_varname_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 345, "end_line": 391, "span_ids": ["VariableCommentPicker.visit_Assign"], "tokens": 425}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VariableCommentPicker(ast.NodeVisitor):\n\n def visit_Assign(self, node: ast.Assign) -> None:\n \"\"\"Handles Assign node and pick up a variable comment.\"\"\"\n try:\n targets = get_assign_targets(node)\n varnames: List[str] = sum([get_lvar_names(t, self=self.get_self()) for t in targets], []) # NOQA\n current_line = self.get_line(node.lineno)\n except TypeError:\n return # this assignment is not new definition!\n\n # record annotation\n if hasattr(node, 'annotation') and node.annotation: # type: ignore\n for varname in varnames:\n self.add_variable_annotation(varname, node.annotation) # type: ignore\n elif hasattr(node, 'type_comment') and node.type_comment:\n for varname in varnames:\n self.add_variable_annotation(varname, node.type_comment) # type: ignore\n\n # check comments after assignment\n parser = AfterCommentParser([current_line[node.col_offset:]] +\n self.buffers[node.lineno:])\n parser.parse()\n if parser.comment and comment_re.match(parser.comment):\n for varname in varnames:\n self.add_variable_comment(varname, comment_re.sub('\\\\1', parser.comment))\n self.add_entry(varname)\n return\n\n # check comments before assignment\n if indent_re.match(current_line[:node.col_offset]):\n comment_lines = []\n for i in range(node.lineno - 1):\n before_line = self.get_line(node.lineno - 1 - i)\n if comment_re.match(before_line):\n comment_lines.append(comment_re.sub('\\\\1', before_line))\n else:\n break\n\n if comment_lines:\n comment = dedent_docstring('\\n'.join(reversed(comment_lines)))\n for varname in varnames:\n self.add_variable_comment(varname, comment)\n self.add_entry(varname)\n return\n\n # not commented (record deforders only)\n for varname in varnames:\n self.add_entry(varname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_Try_VariableCommentPicker.visit_ClassDef.self_current_classes_pop_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_Try_VariableCommentPicker.visit_ClassDef.self_current_classes_pop_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 422, "end_line": 443, "span_ids": ["VariableCommentPicker.visit_Try", "VariableCommentPicker.visit_ClassDef"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VariableCommentPicker(ast.NodeVisitor):\n\n def visit_Try(self, node: ast.Try) -> None:\n \"\"\"Handles Try node and processes body and else-clause.\n\n .. note:: pycode parser ignores objects definition in except-clause.\n \"\"\"\n for subnode in node.body:\n self.visit(subnode)\n for subnode in node.orelse:\n self.visit(subnode)\n\n def visit_ClassDef(self, node: ast.ClassDef) -> None:\n \"\"\"Handles ClassDef node and set context.\"\"\"\n self.current_classes.append(node.name)\n self.add_entry(node.name)\n if self.is_final(node.decorator_list):\n self.add_final_entry(node.name)\n self.context.append(node.name)\n self.previous = node\n for child in node.body:\n self.visit(child)\n self.context.pop()\n self.current_classes.pop()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_FunctionDef_VariableCommentPicker.visit_AsyncFunctionDef._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.visit_FunctionDef_VariableCommentPicker.visit_AsyncFunctionDef._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 445, "end_line": 462, "span_ids": ["VariableCommentPicker.visit_AsyncFunctionDef", "VariableCommentPicker.visit_FunctionDef"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VariableCommentPicker(ast.NodeVisitor):\n\n def visit_FunctionDef(self, node: ast.FunctionDef) -> None:\n \"\"\"Handles FunctionDef node and set context.\"\"\"\n if self.current_function is None:\n self.add_entry(node.name) # should be called before setting self.current_function\n if self.is_final(node.decorator_list):\n self.add_final_entry(node.name)\n if self.is_overload(node.decorator_list):\n self.add_overload_entry(node)\n self.context.append(node.name)\n self.current_function = node\n for child in node.body:\n self.visit(child)\n self.context.pop()\n self.current_function = None\n\n def visit_AsyncFunctionDef(self, node: ast.AsyncFunctionDef) -> None:\n \"\"\"Handles AsyncFunctionDef node and set context.\"\"\"\n self.visit_FunctionDef(node) # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 419, "end_line": 441, "span_ids": ["setup"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_transform(ApplySourceWorkaround)\n app.add_transform(ExtraTranslatableNodes)\n app.add_transform(DefaultSubstitutions)\n app.add_transform(MoveModuleTargets)\n app.add_transform(HandleCodeBlocks)\n app.add_transform(SortIds)\n app.add_transform(DoctestTransform)\n app.add_transform(AutoNumbering)\n app.add_transform(AutoIndexUpgrader)\n app.add_transform(FilterSystemMessages)\n app.add_transform(UnreferencedFootnotesDetector)\n app.add_transform(SphinxSmartQuotes)\n app.add_transform(DoctreeReadEvent)\n app.add_transform(ManpageLink)\n app.add_transform(GlossarySorter)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_safe_getattr_safe_getattr.try_.except_Exception_as_exc_.raise_AttributeError_name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_safe_getattr_safe_getattr.try_.except_Exception_as_exc_.raise_AttributeError_name", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 322, "end_line": 341, "span_ids": ["safe_getattr"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def safe_getattr(obj: Any, name: str, *defargs: Any) -> Any:\n \"\"\"A getattr() that turns all exceptions into AttributeErrors.\"\"\"\n try:\n return getattr(obj, name, *defargs)\n except Exception as exc:\n # sometimes accessing a property raises an exception (e.g.\n # NotImplementedError), so let's try to read the attribute directly\n try:\n # In case the object does weird things with attribute access\n # such that accessing `obj.__dict__` may raise an exception\n return obj.__dict__[name]\n except Exception:\n pass\n\n # this is a catch-all for all the weird things that some modules do\n # with attribute access\n if defargs:\n return defargs[0]\n\n raise AttributeError(name) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_evaluate_signature_evaluate_signature.return.sig_replace_parameters_pa": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_evaluate_signature_evaluate_signature.return.sig_replace_parameters_pa", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 502, "end_line": 546, "span_ids": ["evaluate_signature"], "tokens": 375}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def evaluate_signature(sig: inspect.Signature, globalns: Dict = None, localns: Dict = None\n ) -> inspect.Signature:\n \"\"\"Evaluate unresolved type annotations in a signature object.\"\"\"\n def evaluate_forwardref(ref: ForwardRef, globalns: Dict, localns: Dict) -> Any:\n \"\"\"Evaluate a forward reference.\"\"\"\n if sys.version_info > (3, 9):\n return ref._evaluate(globalns, localns, frozenset())\n else:\n return ref._evaluate(globalns, localns)\n\n def evaluate(annotation: Any, globalns: Dict, localns: Dict) -> Any:\n \"\"\"Evaluate unresolved type annotation.\"\"\"\n try:\n if isinstance(annotation, str):\n ref = ForwardRef(annotation, True)\n annotation = evaluate_forwardref(ref, globalns, localns)\n\n if isinstance(annotation, ForwardRef):\n annotation = evaluate_forwardref(ref, globalns, localns)\n elif isinstance(annotation, str):\n # might be a ForwardRef'ed annotation in overloaded functions\n ref = ForwardRef(annotation, True)\n annotation = evaluate_forwardref(ref, globalns, localns)\n except (NameError, TypeError):\n # failed to evaluate type. skipped.\n pass\n\n return annotation\n\n if globalns is None:\n globalns = {}\n if localns is None:\n localns = globalns\n\n parameters = list(sig.parameters.values())\n for i, param in enumerate(parameters):\n if param.annotation:\n annotation = evaluate(param.annotation, globalns, localns)\n parameters[i] = param.replace(annotation=annotation)\n\n return_annotation = sig.return_annotation\n if return_annotation:\n return_annotation = evaluate(return_annotation, globalns, localns)\n\n return sig.replace(parameters=parameters, return_annotation=return_annotation)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_stringify_signature_signature_from_str.return.signature_from_ast_functi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_stringify_signature_signature_from_str.return.signature_from_ast_functi", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 671, "end_line": 738, "span_ids": ["signature_from_str", "stringify_signature"], "tokens": 543}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def stringify_signature(sig: inspect.Signature, show_annotation: bool = True,\n show_return_annotation: bool = True,\n unqualified_typehints: bool = False) -> str:\n \"\"\"Stringify a Signature object.\n\n :param show_annotation: If enabled, show annotations on the signature\n :param show_return_annotation: If enabled, show annotation of the return value\n :param unqualified_typehints: If enabled, show annotations as unqualified\n (ex. io.StringIO -> StringIO)\n \"\"\"\n if unqualified_typehints:\n mode = 'smart'\n else:\n mode = 'fully-qualified'\n\n args = []\n last_kind = None\n for param in sig.parameters.values():\n if param.kind != param.POSITIONAL_ONLY and last_kind == param.POSITIONAL_ONLY:\n # PEP-570: Separator for Positional Only Parameter: /\n args.append('/')\n if param.kind == param.KEYWORD_ONLY and last_kind in (param.POSITIONAL_OR_KEYWORD,\n param.POSITIONAL_ONLY,\n None):\n # PEP-3102: Separator for Keyword Only Parameter: *\n args.append('*')\n\n arg = StringIO()\n if param.kind == param.VAR_POSITIONAL:\n arg.write('*' + param.name)\n elif param.kind == param.VAR_KEYWORD:\n arg.write('**' + param.name)\n else:\n arg.write(param.name)\n\n if show_annotation and param.annotation is not param.empty:\n arg.write(': ')\n arg.write(stringify_annotation(param.annotation, mode))\n if param.default is not param.empty:\n if show_annotation and param.annotation is not param.empty:\n arg.write(' = ')\n else:\n arg.write('=')\n arg.write(object_description(param.default))\n\n args.append(arg.getvalue())\n last_kind = param.kind\n\n if last_kind == Parameter.POSITIONAL_ONLY:\n # PEP-570: Separator for Positional Only Parameter: /\n args.append('/')\n\n if (sig.return_annotation is Parameter.empty or\n show_annotation is False or\n show_return_annotation is False):\n return '(%s)' % ', '.join(args)\n else:\n annotation = stringify_annotation(sig.return_annotation, mode)\n return '(%s) -> %s' % (', '.join(args), annotation)\n\n\ndef signature_from_str(signature: str) -> inspect.Signature:\n \"\"\"Create a Signature object from string.\"\"\"\n code = 'def func' + signature + ': pass'\n module = ast.parse(code)\n function = cast(ast.FunctionDef, module.body[0]) # type: ignore\n\n return signature_from_ast(function, code)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_signature_from_ast_signature_from_ast.return.inspect_Signature_params_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_signature_from_ast_signature_from_ast.return.inspect_Signature_params_", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 741, "end_line": 798, "span_ids": ["signature_from_ast"], "tokens": 540}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def signature_from_ast(node: ast.FunctionDef, code: str = '') -> inspect.Signature:\n \"\"\"Create a Signature object from AST *node*.\"\"\"\n args = node.args\n defaults = list(args.defaults)\n params = []\n if hasattr(args, \"posonlyargs\"):\n posonlyargs = len(args.posonlyargs) # type: ignore\n positionals = posonlyargs + len(args.args)\n else:\n posonlyargs = 0\n positionals = len(args.args)\n\n for _ in range(len(defaults), positionals):\n defaults.insert(0, Parameter.empty) # type: ignore\n\n if hasattr(args, \"posonlyargs\"):\n for i, arg in enumerate(args.posonlyargs): # type: ignore\n if defaults[i] is Parameter.empty:\n default = Parameter.empty\n else:\n default = DefaultValue(ast_unparse(defaults[i], code)) # type: ignore\n\n annotation = ast_unparse(arg.annotation, code) or Parameter.empty\n params.append(Parameter(arg.arg, Parameter.POSITIONAL_ONLY,\n default=default, annotation=annotation))\n\n for i, arg in enumerate(args.args):\n if defaults[i + posonlyargs] is Parameter.empty:\n default = Parameter.empty\n else:\n default = DefaultValue(ast_unparse(defaults[i + posonlyargs], code)) # type: ignore # NOQA\n\n annotation = ast_unparse(arg.annotation, code) or Parameter.empty\n params.append(Parameter(arg.arg, Parameter.POSITIONAL_OR_KEYWORD,\n default=default, annotation=annotation))\n\n if args.vararg:\n annotation = ast_unparse(args.vararg.annotation, code) or Parameter.empty\n params.append(Parameter(args.vararg.arg, Parameter.VAR_POSITIONAL,\n annotation=annotation))\n\n for i, arg in enumerate(args.kwonlyargs):\n if args.kw_defaults[i] is None:\n default = Parameter.empty\n else:\n default = DefaultValue(ast_unparse(args.kw_defaults[i], code)) # type: ignore # NOQA\n annotation = ast_unparse(arg.annotation, code) or Parameter.empty\n params.append(Parameter(arg.arg, Parameter.KEYWORD_ONLY, default=default,\n annotation=annotation))\n\n if args.kwarg:\n annotation = ast_unparse(args.kwarg.annotation, code) or Parameter.empty\n params.append(Parameter(args.kwarg.arg, Parameter.VAR_KEYWORD,\n annotation=annotation))\n\n return_annotation = ast_unparse(node.returns, code) or Parameter.empty\n\n return inspect.Signature(params, return_annotation=return_annotation)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_inline_LaTeXTranslator.encode.return.text": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_inline_LaTeXTranslator.encode.return.text", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1915, "end_line": 1965, "span_ids": ["LaTeXTranslator.visit_generated", "LaTeXTranslator.visit_decoration", "LaTeXTranslator.visit_header", "LaTeXTranslator.visit_footer", "LaTeXTranslator.encode", "LaTeXTranslator.depart_compound", "LaTeXTranslator.depart_inline", "LaTeXTranslator.depart_generated", "LaTeXTranslator.depart_decoration", "LaTeXTranslator.visit_container", "LaTeXTranslator.visit_docinfo", "LaTeXTranslator.depart_container", "LaTeXTranslator.visit_compound"], "tokens": 367}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_inline(self, node: Element) -> None:\n self.body.append(self.context.pop())\n\n def visit_generated(self, node: Element) -> None:\n pass\n\n def depart_generated(self, node: Element) -> None:\n pass\n\n def visit_compound(self, node: Element) -> None:\n pass\n\n def depart_compound(self, node: Element) -> None:\n pass\n\n def visit_container(self, node: Element) -> None:\n classes = node.get('classes', [])\n for c in classes:\n self.body.append('\\n\\\\begin{sphinxuseclass}{%s}' % c)\n\n def depart_container(self, node: Element) -> None:\n classes = node.get('classes', [])\n for _c in classes:\n self.body.append('\\n\\\\end{sphinxuseclass}')\n\n def visit_decoration(self, node: Element) -> None:\n pass\n\n def depart_decoration(self, node: Element) -> None:\n pass\n\n # docutils-generated elements that we don't support\n\n def visit_header(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_footer(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_docinfo(self, node: Element) -> None:\n raise nodes.SkipNode\n\n # text handling\n\n def encode(self, text: str) -> str:\n text = self.escape(text)\n if self.literal_whitespace:\n # Insert a blank before the newline, to avoid\n # ! LaTeX Error: There's no line here to end.\n text = text.replace(CR, r'~\\\\' + CR).replace(' ', '~')\n return text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.encode_uri_LaTeXTranslator.encode_uri.return.self_encode_text_replace": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.encode_uri_LaTeXTranslator.encode_uri.return.self_encode_text_replace", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1967, "end_line": 1974, "span_ids": ["LaTeXTranslator.encode_uri"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def encode_uri(self, text: str) -> str:\n # TODO: it is probably wrong that this uses texescape.escape()\n # this must be checked against hyperref package exact dealings\n # mainly, %, #, {, } and \\ need escaping via a \\ escape\n # in \\href, the tilde is allowed and must be represented literally\n return self.encode(text).replace(r'\\textasciitilde{}', '~').\\\n replace(r'\\sphinxhyphen{}', '-').\\\n replace(r'\\textquotesingle{}', \"'\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_Text_LaTeXTranslator.visit_math.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_Text_LaTeXTranslator.visit_math.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1976, "end_line": 2001, "span_ids": ["LaTeXTranslator.depart_Text", "LaTeXTranslator.visit_comment", "LaTeXTranslator.visit_meta", "LaTeXTranslator.visit_Text", "LaTeXTranslator.depart_system_message", "LaTeXTranslator.visit_math", "LaTeXTranslator.visit_system_message"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_Text(self, node: Text) -> None:\n text = self.encode(node.astext())\n self.body.append(text)\n\n def depart_Text(self, node: Text) -> None:\n pass\n\n def visit_comment(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_meta(self, node: Element) -> None:\n # only valid for HTML\n raise nodes.SkipNode\n\n def visit_system_message(self, node: Element) -> None:\n pass\n\n def depart_system_message(self, node: Element) -> None:\n self.body.append(CR)\n\n def visit_math(self, node: Element) -> None:\n if self.in_title:\n self.body.append(r'\\protect\\(%s\\protect\\)' % node.astext())\n else:\n self.body.append(r'\\(%s\\)' % node.astext())\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.__str___Table.__str__.writesep.return.head_join_chain_from": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.__str___Table.__str__.writesep.return.head_join_chain_from", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 190, "end_line": 215, "span_ids": ["Table.__str__"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Table:\n\n def __str__(self) -> str:\n out = []\n self.rewrap()\n\n def writesep(char: str = \"-\", lineno: Optional[int] = None) -> str:\n \"\"\"Called on the line *before* lineno.\n Called with no *lineno* for the last sep.\n \"\"\"\n out: List[str] = []\n for colno, width in enumerate(self.measured_widths):\n if (\n lineno is not None and\n lineno > 0 and\n self[lineno, colno] is self[lineno - 1, colno]\n ):\n out.append(\" \" * (width + 2))\n else:\n out.append(char * (width + 2))\n head = \"+\" if out[0][0] == \"-\" else \"|\"\n tail = \"+\" if out[-1][0] == \"-\" else \"|\"\n glue = [\n \"+\" if left[0] == \"-\" or right[0] == \"-\" else \"|\"\n for left, right in zip(out, out[1:])\n ]\n glue.append(tail)\n return head + \"\".join(chain.from_iterable(zip(out, glue)))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/docstring_signature.py_A_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/docstring_signature.py_A_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/docstring_signature.py", "file_name": "docstring_signature.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["E", "D", "C", "C.__new__", "B", "A", "F"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class A:\n \"\"\"A(foo, bar)\"\"\"\n\n\nclass B:\n \"\"\"B(foo, bar)\"\"\"\n def __init__(self):\n \"\"\"B(foo, bar, baz)\"\"\"\n\n\nclass C:\n \"\"\"C(foo, bar)\"\"\"\n def __new__(cls):\n \"\"\"C(foo, bar, baz)\"\"\"\n\n\nclass D:\n def __init__(self):\n \"\"\"D(foo, bar, baz)\"\"\"\n\n\nclass E:\n def __init__(self):\n \"\"\"E(foo: int, bar: int, baz: int) -> None \\\\\n E(foo: str, bar: str, baz: str) -> None \\\\\n E(foo: float, bar: float, baz: float)\"\"\"\n\n\nclass F:\n def __init__(self):\n \"\"\"F(foo: int, bar: int, baz: int) -> None\n F(foo: str, bar: str, baz: str) -> None\n F(foo: float, bar: float, baz: float)\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/genericalias.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/genericalias.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/genericalias.py", "file_name": "genericalias.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["impl", "impl:6", "docstring", "imports", "Class", "impl:5"], "tokens": 65}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from typing import Callable, List\n\n#: A list of int\nT = List[int]\n\nC = Callable[[int], None] # a generic alias not having a doccomment\n\n\nclass Class:\n #: A list of int\n T = List[int]\n\n#: A list of Class\nL = List[Class]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/name_conflict/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/name_conflict/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/name_conflict/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports", "foo"], "tokens": 23}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from .foo import bar\n\n\nclass foo:\n \"\"\"docstring of target.name_conflict::foo.\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/name_conflict/foo.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/name_conflict/foo.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/name_conflict/foo.py", "file_name": "foo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["bar"], "tokens": 16}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class bar:\n \"\"\"docstring of target.name_conflict.foo::bar.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/name_mangling.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/name_mangling.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/name_mangling.py", "file_name": "name_mangling.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 12, "span_ids": ["Foo", "Bar"], "tokens": 50}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Foo:\n #: name of Foo\n __name = None\n __age = None\n\n\nclass Bar(Foo):\n __address = None\n\n #: a member having mangled-like name\n _Baz__email = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/overload.py_from_typing_import_Any_o_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/overload.py_from_typing_import_Any_o_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/overload.py", "file_name": "overload.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 89, "span_ids": ["Math.sum_2", "Meta.__call___1", "Bar", "sum_3", "Math", "Meta.__call__", "Baz", "Math.sum", "Meta.__call___2", "sum", "Meta", "imports", "Math.sum_3", "Foo.__new___2", "Foo", "Foo.__new___1", "sum_1", "Foo.__new__", "sum_2", "Math.sum_1"], "tokens": 444}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from typing import Any, overload\n\n\n@overload\ndef sum(x: int, y: int = 0) -> int:\n ...\n\n\n@overload\ndef sum(x: \"float\", y: \"float\" = 0.0) -> \"float\":\n ...\n\n\n@overload\ndef sum(x: str, y: str = ...) -> str:\n ...\n\n\ndef sum(x, y=None):\n \"\"\"docstring\"\"\"\n return x + y\n\n\nclass Math:\n \"\"\"docstring\"\"\"\n\n @overload\n def sum(self, x: int, y: int = 0) -> int:\n ...\n\n @overload\n def sum(self, x: \"float\", y: \"float\" = 0.0) -> \"float\":\n ...\n\n @overload\n def sum(self, x: str, y: str = ...) -> str:\n ...\n\n def sum(self, x, y=None):\n \"\"\"docstring\"\"\"\n return x + y\n\n\nclass Foo:\n \"\"\"docstring\"\"\"\n\n @overload\n def __new__(cls, x: int, y: int) -> \"Foo\":\n ...\n\n @overload\n def __new__(cls, x: \"str\", y: \"str\") -> \"Foo\":\n ...\n\n def __new__(cls, x, y):\n pass\n\n\nclass Bar:\n \"\"\"docstring\"\"\"\n\n @overload\n def __init__(cls, x: int, y: int) -> None:\n ...\n\n @overload\n def __init__(cls, x: \"str\", y: \"str\") -> \"None\":\n ...\n\n def __init__(cls, x, y):\n pass\n\n\nclass Meta(type):\n @overload\n def __call__(cls, x: int, y: int) -> Any:\n ...\n\n @overload\n def __call__(cls, x: \"str\", y: \"str\") -> \"Any\":\n ...\n\n def __call__(cls, x, y):\n pass\n\n\nclass Baz(metaclass=Meta):\n \"\"\"docstring\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/sort_by_all.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/sort_by_all.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/sort_by_all.py", "file_name": "sort_by_all.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 26, "span_ids": ["impl", "Quux", "foobar", "baz", "Bar", "qux", "foo"], "tokens": 51}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "__all__ = ['baz', 'foo', 'Bar']\n\n\ndef foo():\n pass\n\n\nclass Bar:\n pass\n\n\ndef baz():\n pass\n\n\ndef qux():\n pass\n\n\nclass Quux:\n pass\n\n\ndef foobar():\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_scaled_image_link_test_html_scaled_image_link.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_scaled_image_link_test_html_scaled_image_link.None_2", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1561, "end_line": 1577, "span_ids": ["test_html_scaled_image_link"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='html_scaled_image_link')\ndef test_html_scaled_image_link(app):\n app.build()\n context = (app.outdir / 'index.html').read_text()\n\n # no scaled parameters\n assert re.search('\\n<img alt=\"_images/img.png\" src=\"_images/img.png\" />', context)\n\n # scaled_image_link\n assert re.search('\\n<a class=\"reference internal image-reference\" href=\"_images/img.png\">'\n '<img alt=\"_images/img.png\" src=\"_images/img.png\" style=\"[^\"]+\" /></a>',\n context)\n\n # no-scaled-link class disables the feature\n assert re.search('\\n<img alt=\"_images/img.png\" class=\"no-scaled-link\"'\n ' src=\"_images/img.png\" style=\"[^\"]+\" />',\n context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_js_data_test_js_data.assert_node_doctree_1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_js_data_test_js_data.assert_node_doctree_1_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_js.py", "file_name": "test_domain_js.py", "file_type": "text/x-python", "category": "test", "start_line": 204, "end_line": 212, "span_ids": ["test_js_data"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_js_data(app):\n text = \".. js:data:: name\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, ([desc_sig_name, \"name\"])])],\n [desc_content, ()])]))\n assert_node(doctree[0], addnodes.index,\n entries=[(\"single\", \"name (global variable or constant)\", \"name\", \"\", None)])\n assert_node(doctree[1], addnodes.desc, domain=\"js\", objtype=\"data\", noindex=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_noindexentry_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py_test_noindexentry_", "embedding": null, "metadata": {"file_path": "tests/test_domain_js.py", "file_name": "test_domain_js.py", "file_type": "text/x-python", "category": "test", "start_line": 223, "end_line": 231, "span_ids": ["test_noindexentry"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_noindexentry(app):\n text = (\".. js:function:: f()\\n\"\n \".. js:function:: g()\\n\"\n \" :noindexentry:\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index, desc, addnodes.index, desc))\n assert_node(doctree[0], addnodes.index, entries=[('single', 'f() (built-in function)', 'f', '', None)])\n assert_node(doctree[2], addnodes.index, entries=[])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyobject_prefix_test_pyobject_prefix._not_stripped": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyobject_prefix_test_pyobject_prefix._not_stripped", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 595, "end_line": 609, "span_ids": ["test_pyobject_prefix"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pyobject_prefix(app):\n text = (\".. py:class:: Foo\\n\"\n \"\\n\"\n \" .. py:method:: Foo.say\\n\"\n \" .. py:method:: FooBar.say\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, ('class', desc_sig_space)],\n [desc_name, \"Foo\"])],\n [desc_content, (addnodes.index,\n desc,\n addnodes.index,\n desc)])]))\n assert doctree[1][1][1].astext().strip() == 'say()' # prefix is stripped\n assert doctree[1][1][3].astext().strip() == 'FooBar.say()' # not stripped", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_test_pydata.assert_domain_objects_ex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_test_pydata.assert_domain_objects_ex", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 612, "end_line": 629, "span_ids": ["test_pydata"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pydata(app):\n text = (\".. py:module:: example\\n\"\n \".. py:data:: var\\n\"\n \" :type: int\\n\")\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (nodes.target,\n addnodes.index,\n addnodes.index,\n [desc, ([desc_signature, ([desc_addname, \"example.\"],\n [desc_name, \"var\"],\n [desc_annotation, ([desc_sig_punctuation, ':'],\n desc_sig_space,\n [pending_xref, \"int\"])])],\n [desc_content, ()])]))\n assert_node(doctree[3][0][2][2], pending_xref, **{\"py:module\": \"example\"})\n assert 'example.var' in domain.objects\n assert domain.objects['example.var'] == ('index', 'example.var', 'data', False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_modindex_common_prefix_test_modindex_common_prefix.assert_index_generate_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_modindex_common_prefix_test_modindex_common_prefix.assert_index_generate_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 790, "end_line": 808, "span_ids": ["test_modindex_common_prefix"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(freshenv=True, confoverrides={'modindex_common_prefix': ['sphinx.']})\ndef test_modindex_common_prefix(app):\n text = (\".. py:module:: docutils\\n\"\n \".. py:module:: sphinx\\n\"\n \".. py:module:: sphinx.config\\n\"\n \".. py:module:: sphinx.builders\\n\"\n \".. py:module:: sphinx.builders.html\\n\"\n \".. py:module:: sphinx_intl\\n\")\n restructuredtext.parse(app, text)\n index = PythonModuleIndex(app.env.get_domain('py'))\n assert index.generate() == (\n [('b', [IndexEntry('sphinx.builders', 1, 'index', 'module-sphinx.builders', '', '', ''), # NOQA\n IndexEntry('sphinx.builders.html', 2, 'index', 'module-sphinx.builders.html', '', '', '')]), # NOQA\n ('c', [IndexEntry('sphinx.config', 0, 'index', 'module-sphinx.config', '', '', '')]),\n ('d', [IndexEntry('docutils', 0, 'index', 'module-docutils', '', '', '')]),\n ('s', [IndexEntry('sphinx', 0, 'index', 'module-sphinx', '', '', ''),\n IndexEntry('sphinx_intl', 0, 'index', 'module-sphinx_intl', '', '', '')])],\n True\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_parse_name_test_parse_name.None_10": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_parse_name_test_parse_name.None_10", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 97, "end_line": 133, "span_ids": ["test_parse_name"], "tokens": 499}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_parse_name(app):\n def verify(objtype, name, result):\n inst = app.registry.documenters[objtype](directive, name)\n assert inst.parse_name()\n assert (inst.modname, inst.objpath, inst.args, inst.retann) == result\n\n directive = make_directive_bridge(app.env)\n\n # for modules\n verify('module', 'test_ext_autodoc', ('test_ext_autodoc', [], None, None))\n verify('module', 'test.test_ext_autodoc', ('test.test_ext_autodoc', [], None, None))\n verify('module', 'test(arg)', ('test', [], 'arg', None))\n assert 'signature arguments' in app._warning.getvalue()\n\n # for functions/classes\n verify('function', 'test_ext_autodoc.raises',\n ('test_ext_autodoc', ['raises'], None, None))\n verify('function', 'test_ext_autodoc.raises(exc) -> None',\n ('test_ext_autodoc', ['raises'], 'exc', 'None'))\n directive.env.temp_data['autodoc:module'] = 'test_ext_autodoc'\n verify('function', 'raises', ('test_ext_autodoc', ['raises'], None, None))\n del directive.env.temp_data['autodoc:module']\n directive.env.ref_context['py:module'] = 'test_ext_autodoc'\n verify('function', 'raises', ('test_ext_autodoc', ['raises'], None, None))\n verify('class', 'Base', ('test_ext_autodoc', ['Base'], None, None))\n\n # for members\n directive.env.ref_context['py:module'] = 'sphinx.testing.util'\n verify('method', 'SphinxTestApp.cleanup',\n ('sphinx.testing.util', ['SphinxTestApp', 'cleanup'], None, None))\n directive.env.ref_context['py:module'] = 'sphinx.testing.util'\n directive.env.ref_context['py:class'] = 'Foo'\n directive.env.temp_data['autodoc:class'] = 'SphinxTestApp'\n verify('method', 'cleanup',\n ('sphinx.testing.util', ['SphinxTestApp', 'cleanup'], None, None))\n verify('method', 'SphinxTestApp.cleanup',\n ('sphinx.testing.util', ['SphinxTestApp', 'cleanup'], None, None))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_format_signature_test_format_signature.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_format_signature_test_format_signature.None_5", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 242, "span_ids": ["test_format_signature.FNew.__new__", "test_format_signature.GNew", "test_format_signature.ExceptionSubclass", "test_format_signature.G:2", "test_format_signature.F2", "test_format_signature.E", "test_format_signature", "test_format_signature.G2", "test_format_signature.F.__init__", "test_format_signature.SomeMeta.__call__", "test_format_signature.GNew:2", "test_format_signature.E.__init__", "test_format_signature.F", "test_format_signature.GMeta:2", "test_format_signature.FMeta:2", "test_format_signature.ListSubclass:2", "test_format_signature.ExceptionSubclass:2", "test_format_signature.SomeMeta", "test_format_signature.FNew", "test_format_signature.FMeta", "test_format_signature.G2:2", "test_format_signature.D", "test_format_signature.G", "test_format_signature.D:2", "test_format_signature.ListSubclass", "test_format_signature.F2:2", "test_format_signature.GMeta"], "tokens": 853}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_format_signature(app):\n app.connect('autodoc-process-signature', process_signature)\n app.connect('autodoc-skip-member', skip_member)\n\n directive = make_directive_bridge(app.env)\n\n def formatsig(objtype, name, obj, args, retann):\n inst = app.registry.documenters[objtype](directive, name)\n inst.fullname = name\n inst.doc_as_attr = False # for class objtype\n inst.parent = object # dummy\n inst.object = obj\n inst.objpath = [name]\n inst.args = args\n inst.retann = retann\n res = inst.format_signature()\n print(res)\n return res\n\n # no signatures for modules\n assert formatsig('module', 'test', None, None, None) == ''\n\n # test for functions\n def f(a, b, c=1, **d):\n pass\n\n def g(a='\\n'):\n pass\n assert formatsig('function', 'f', f, None, None) == '(a, b, c=1, **d)'\n assert formatsig('function', 'f', f, 'a, b, c, d', None) == '(a, b, c, d)'\n assert formatsig('function', 'g', g, None, None) == r\"(a='\\n')\"\n\n # test for classes\n class D:\n pass\n\n class E:\n def __init__(self):\n pass\n\n # an empty init and no init are the same\n for C in (D, E):\n assert formatsig('class', 'D', C, None, None) == '()'\n\n class SomeMeta(type):\n def __call__(cls, a, b=None):\n return type.__call__(cls, a, b)\n\n # these three are all equivalent\n class F:\n def __init__(self, a, b=None):\n pass\n\n class FNew:\n def __new__(cls, a, b=None):\n return super().__new__(cls)\n\n class FMeta(metaclass=SomeMeta):\n pass\n\n # and subclasses should always inherit\n class G(F):\n pass\n\n class GNew(FNew):\n pass\n\n class GMeta(FMeta):\n pass\n\n # subclasses inherit\n for C in (F, FNew, FMeta, G, GNew, GMeta):\n assert formatsig('class', 'C', C, None, None) == '(a, b=None)'\n assert formatsig('class', 'C', D, 'a, b', 'X') == '(a, b) -> X'\n\n class ListSubclass(list):\n pass\n\n # only supported if the python implementation decides to document it\n if getattr(list, '__text_signature__', None) is not None:\n assert formatsig('class', 'C', ListSubclass, None, None) == '(iterable=(), /)'\n else:\n assert formatsig('class', 'C', ListSubclass, None, None) == ''\n\n class ExceptionSubclass(Exception):\n pass\n\n # Exception has no __text_signature__ at least in Python 3.8\n if getattr(Exception, '__text_signature__', None) is None:\n assert formatsig('class', 'C', ExceptionSubclass, None, None) == ''\n\n # __init__ have signature at first line of docstring\n directive.env.config.autoclass_content = 'both'\n\n class F2:\n '''some docstring for F2.'''\n def __init__(self, *args, **kw):\n '''\n __init__(a1, a2, kw1=True, kw2=False)\n\n some docstring for __init__.\n '''\n class G2(F2):\n pass\n\n assert formatsig('class', 'F2', F2, None, None) == \\\n '(a1, a2, kw1=True, kw2=False)'\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_format_signature.None_6_test_format_signature.None_19": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_format_signature.None_6_test_format_signature.None_19", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 247, "end_line": 290, "span_ids": ["test_format_signature.G2:2", "test_format_signature.H", "test_format_signature.H.foo1"], "tokens": 580}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_format_signature(app):\n # ... other code\n assert formatsig('class', 'G2', G2, None, None) == \\\n '(a1, a2, kw1=True, kw2=False)'\n\n # test for methods\n class H:\n def foo1(self, b, *c):\n pass\n\n def foo2(b, *c):\n pass\n\n def foo3(self, d='\\n'):\n pass\n assert formatsig('method', 'H.foo', H.foo1, None, None) == '(b, *c)'\n assert formatsig('method', 'H.foo', H.foo1, 'a', None) == '(a)'\n assert formatsig('method', 'H.foo', H.foo2, None, None) == '(*c)'\n assert formatsig('method', 'H.foo', H.foo3, None, None) == r\"(d='\\n')\"\n\n # test bound methods interpreted as functions\n assert formatsig('function', 'foo', H().foo1, None, None) == '(b, *c)'\n assert formatsig('function', 'foo', H().foo2, None, None) == '(*c)'\n assert formatsig('function', 'foo', H().foo3, None, None) == r\"(d='\\n')\"\n\n # test exception handling (exception is caught and args is '')\n directive.env.config.autodoc_docstring_signature = False\n assert formatsig('function', 'int', int, None, None) == ''\n\n # test processing by event handler\n assert formatsig('method', 'bar', H.foo1, None, None) == '42'\n\n # test functions created via functools.partial\n from functools import partial\n curried1 = partial(lambda a, b, c: None, 'A')\n assert formatsig('function', 'curried1', curried1, None, None) == \\\n '(b, c)'\n curried2 = partial(lambda a, b, c=42: None, 'A')\n assert formatsig('function', 'curried2', curried2, None, None) == \\\n '(b, c=42)'\n curried3 = partial(lambda a, b, *c: None, 'A')\n assert formatsig('function', 'curried3', curried3, None, None) == \\\n '(b, *c)'\n curried4 = partial(lambda a, b, c=42, *d, **e: None, 'A')\n assert formatsig('function', 'curried4', curried4, None, None) == \\\n '(b, c=42, *d, **e)'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_module_member_order_test_autodoc_module_member_order.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_module_member_order_test_autodoc_module_member_order.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1164, "end_line": 1195, "span_ids": ["test_autodoc_module_member_order"], "tokens": 338}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_module_member_order(app):\n # case member-order='bysource'\n options = {\"members\": 'foo, Bar, baz, qux, Quux, foobar',\n 'member-order': 'bysource',\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.sort_by_all', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:module:: target.sort_by_all',\n '.. py:function:: baz()',\n '.. py:function:: foo()',\n '.. py:class:: Bar()',\n '.. py:class:: Quux()',\n '.. py:function:: foobar()',\n '.. py:function:: qux()',\n ]\n\n # case member-order='bysource' and ignore-module-all\n options = {\"members\": 'foo, Bar, baz, qux, Quux, foobar',\n 'member-order': 'bysource',\n \"undoc-members\": None,\n \"ignore-module-all\": None}\n actual = do_autodoc(app, 'module', 'target.sort_by_all', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:module:: target.sort_by_all',\n '.. py:function:: foo()',\n '.. py:class:: Bar()',\n '.. py:function:: baz()',\n '.. py:function:: qux()',\n '.. py:class:: Quux()',\n '.. py:function:: foobar()',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autoclass_instance_attributes_test_autoclass_instance_attributes.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autoclass_instance_attributes_test_autoclass_instance_attributes.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1049, "end_line": 1120, "span_ids": ["test_autoclass_instance_attributes"], "tokens": 536}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoclass_instance_attributes(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'class', 'target.InstAttCls', options)\n assert list(actual) == [\n '',\n '.. py:class:: InstAttCls()',\n ' :module: target',\n '',\n ' Class with documented class and instance attributes.',\n '',\n '',\n ' .. py:attribute:: InstAttCls.ca1',\n ' :module: target',\n \" :value: 'a'\",\n '',\n ' Doc comment for class attribute InstAttCls.ca1.',\n ' It can have multiple lines.',\n '',\n '',\n ' .. py:attribute:: InstAttCls.ca2',\n ' :module: target',\n \" :value: 'b'\",\n '',\n ' Doc comment for InstAttCls.ca2. One line only.',\n '',\n '',\n ' .. py:attribute:: InstAttCls.ca3',\n ' :module: target',\n \" :value: 'c'\",\n '',\n ' Docstring for class attribute InstAttCls.ca3.',\n '',\n '',\n ' .. py:attribute:: InstAttCls.ia1',\n ' :module: target',\n '',\n ' Doc comment for instance attribute InstAttCls.ia1',\n '',\n '',\n ' .. py:attribute:: InstAttCls.ia2',\n ' :module: target',\n '',\n ' Docstring for instance attribute InstAttCls.ia2.',\n ''\n ]\n\n # pick up arbitrary attributes\n options = {\"members\": 'ca1,ia1'}\n actual = do_autodoc(app, 'class', 'target.InstAttCls', options)\n assert list(actual) == [\n '',\n '.. py:class:: InstAttCls()',\n ' :module: target',\n '',\n ' Class with documented class and instance attributes.',\n '',\n '',\n ' .. py:attribute:: InstAttCls.ca1',\n ' :module: target',\n \" :value: 'a'\",\n '',\n ' Doc comment for class attribute InstAttCls.ca1.',\n ' It can have multiple lines.',\n '',\n '',\n ' .. py:attribute:: InstAttCls.ia1',\n ' :module: target',\n '',\n ' Doc comment for instance attribute InstAttCls.ia1',\n ''\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autoattribute_instance_attributes_test_slots.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autoattribute_instance_attributes_test_slots.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1326, "end_line": 1391, "span_ids": ["test_slots", "test_autoattribute_instance_attributes"], "tokens": 422}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_instance_attributes(app):\n actual = do_autodoc(app, 'attribute', 'target.InstAttCls.ia1')\n assert list(actual) == [\n '',\n '.. py:attribute:: InstAttCls.ia1',\n ' :module: target',\n '',\n ' Doc comment for instance attribute InstAttCls.ia1',\n ''\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_slots(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.slots', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.slots',\n '',\n '',\n '.. py:class:: Bar()',\n ' :module: target.slots',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Bar.attr1',\n ' :module: target.slots',\n ' :type: int',\n '',\n ' docstring of attr1',\n '',\n '',\n ' .. py:attribute:: Bar.attr2',\n ' :module: target.slots',\n '',\n ' docstring of instance attr2',\n '',\n '',\n ' .. py:attribute:: Bar.attr3',\n ' :module: target.slots',\n '',\n '',\n '.. py:class:: Baz()',\n ' :module: target.slots',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Baz.attr',\n ' :module: target.slots',\n '',\n '',\n '.. py:class:: Foo()',\n ' :module: target.slots',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Foo.attr',\n ' :module: target.slots',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_GenericAlias_test_autodoc_GenericAlias.if_sys_version_info_3_.else_.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_GenericAlias_test_autodoc_GenericAlias.if_sys_version_info_3_.else_.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1850, "end_line": 1918, "span_ids": ["test_autodoc_GenericAlias"], "tokens": 464}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_GenericAlias(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.genericalias', options)\n if sys.version_info < (3, 7):\n assert list(actual) == [\n '',\n '.. py:module:: target.genericalias',\n '',\n '',\n '.. py:class:: Class()',\n ' :module: target.genericalias',\n '',\n '',\n ' .. py:attribute:: Class.T',\n ' :module: target.genericalias',\n '',\n ' A list of int',\n '',\n ' alias of :py:class:`~typing.List`\\\\ [:py:class:`int`]',\n '',\n '.. py:attribute:: L',\n ' :module: target.genericalias',\n '',\n ' A list of Class',\n '',\n '',\n '.. py:attribute:: T',\n ' :module: target.genericalias',\n '',\n ' A list of int',\n '',\n ]\n else:\n assert list(actual) == [\n '',\n '.. py:module:: target.genericalias',\n '',\n '',\n '.. py:class:: Class()',\n ' :module: target.genericalias',\n '',\n '',\n ' .. py:attribute:: Class.T',\n ' :module: target.genericalias',\n '',\n ' A list of int',\n '',\n ' alias of :py:class:`~typing.List`\\\\ [:py:class:`int`]',\n '',\n '',\n '.. py:data:: L',\n ' :module: target.genericalias',\n '',\n ' A list of Class',\n '',\n ' alias of :py:class:`~typing.List`\\\\ '\n '[:py:class:`~target.genericalias.Class`]',\n '',\n '',\n '.. py:data:: T',\n ' :module: target.genericalias',\n '',\n ' A list of int',\n '',\n ' alias of :py:class:`~typing.List`\\\\ [:py:class:`int`]',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_TypeVar_test_autodoc_TypeVar.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_TypeVar_test_autodoc_TypeVar.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1921, "end_line": 1998, "span_ids": ["test_autodoc_TypeVar"], "tokens": 485}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_TypeVar(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.typevar', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.typevar',\n '',\n '',\n '.. py:class:: Class()',\n ' :module: target.typevar',\n '',\n '',\n ' .. py:attribute:: Class.T1',\n ' :module: target.typevar',\n '',\n ' T1',\n '',\n \" alias of TypeVar('T1')\",\n '',\n '',\n ' .. py:attribute:: Class.T6',\n ' :module: target.typevar',\n '',\n ' T6',\n '',\n ' alias of :py:class:`~datetime.date`',\n '',\n '',\n '.. py:data:: T1',\n ' :module: target.typevar',\n '',\n ' T1',\n '',\n \" alias of TypeVar('T1')\",\n '',\n '',\n '.. py:data:: T3',\n ' :module: target.typevar',\n '',\n ' T3',\n '',\n \" alias of TypeVar('T3', int, str)\",\n '',\n '',\n '.. py:data:: T4',\n ' :module: target.typevar',\n '',\n ' T4',\n '',\n \" alias of TypeVar('T4', covariant=True)\",\n '',\n '',\n '.. py:data:: T5',\n ' :module: target.typevar',\n '',\n ' T5',\n '',\n \" alias of TypeVar('T5', contravariant=True)\",\n '',\n '',\n '.. py:data:: T6',\n ' :module: target.typevar',\n '',\n ' T6',\n '',\n ' alias of :py:class:`~datetime.date`',\n '',\n '',\n '.. py:data:: T7',\n ' :module: target.typevar',\n '',\n ' T7',\n '',\n \" alias of TypeVar('T7', bound=\\\\ :py:class:`int`)\",\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_overload_test_overload.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_overload_test_overload.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2045, "end_line": 2096, "span_ids": ["test_overload"], "tokens": 409}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_overload(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.overload', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.overload',\n '',\n '',\n '.. py:class:: Bar(x: int, y: int)',\n ' Bar(x: str, y: str)',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n '',\n '.. py:class:: Baz(x: int, y: int)',\n ' Baz(x: str, y: str)',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n '',\n '.. py:class:: Foo(x: int, y: int)',\n ' Foo(x: str, y: str)',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n '',\n '.. py:class:: Math()',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n '',\n ' .. py:method:: Math.sum(x: int, y: int = 0) -> int',\n ' Math.sum(x: float, y: float = 0.0) -> float',\n ' Math.sum(x: str, y: str = None) -> str',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n '',\n '.. py:function:: sum(x: int, y: int = 0) -> int',\n ' sum(x: float, y: float = 0.0) -> float',\n ' sum(x: str, y: str = None) -> str',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_pymodule_for_ModuleLevelDocumenter_test_pyclass_for_ClassLevelDocumenter.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_pymodule_for_ModuleLevelDocumenter_test_pyclass_for_ClassLevelDocumenter.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1898, "end_line": 1932, "span_ids": ["test_pyclass_for_ClassLevelDocumenter", "test_pymodule_for_ModuleLevelDocumenter", "test_pymodule_for_ClassLevelDocumenter"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_pymodule_for_ModuleLevelDocumenter(app):\n app.env.ref_context['py:module'] = 'target.classes'\n actual = do_autodoc(app, 'class', 'Foo')\n assert list(actual) == [\n '',\n '.. py:class:: Foo()',\n ' :module: target.classes',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_pymodule_for_ClassLevelDocumenter(app):\n app.env.ref_context['py:module'] = 'target.methods'\n actual = do_autodoc(app, 'method', 'Base.meth')\n assert list(actual) == [\n '',\n '.. py:method:: Base.meth()',\n ' :module: target.methods',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_pyclass_for_ClassLevelDocumenter(app):\n app.env.ref_context['py:module'] = 'target.methods'\n app.env.ref_context['py:class'] = 'Base'\n actual = do_autodoc(app, 'method', 'meth')\n assert list(actual) == [\n '',\n '.. py:method:: Base.meth()',\n ' :module: target.methods',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_test_autodoc.assert_warning_getvalue_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_test_autodoc.assert_warning_getvalue_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2304, "end_line": 2321, "span_ids": ["test_autodoc"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='ext-autodoc')\ndef test_autodoc(app, status, warning):\n app.builder.build_all()\n\n content = app.env.get_doctree('index')\n assert isinstance(content[3], addnodes.desc)\n assert content[3][0].astext() == 'autodoc_dummy_module.test()'\n assert content[3][1].astext() == 'Dummy function using dummy.*'\n\n # issue sphinx-doc/sphinx#2437\n assert content[11][-1].astext() == \"\"\"Dummy class Bar with alias.\n\n\n\nmy_name\n\nalias of Foo\"\"\"\n assert warning.getvalue() == ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_name_conflict_test_name_conflict.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_name_conflict_test_name_conflict.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1955, "end_line": 1975, "span_ids": ["test_name_conflict"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_name_conflict(app):\n actual = do_autodoc(app, 'class', 'target.name_conflict.foo')\n assert list(actual) == [\n '',\n '.. py:class:: foo()',\n ' :module: target.name_conflict',\n '',\n ' docstring of target.name_conflict::foo.',\n '',\n ]\n\n actual = do_autodoc(app, 'class', 'target.name_conflict.foo.bar')\n assert list(actual) == [\n '',\n '.. py:class:: bar()',\n ' :module: target.name_conflict.foo',\n '',\n ' docstring of target.name_conflict.foo::bar.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_cfunction_test_cfunction.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_cfunction_test_cfunction.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autofunction.py", "file_name": "test_ext_autodoc_autofunction.py", "file_type": "text/x-python", "category": "test", "start_line": 123, "end_line": 135, "span_ids": ["test_cfunction"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_cfunction(app):\n actual = do_autodoc(app, 'function', 'time.asctime')\n assert list(actual) == [\n '',\n '.. py:function:: asctime([tuple]) -> string',\n ' :module: time',\n '',\n \" Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.\",\n ' When the time tuple is not present, current time as returned by localtime()',\n ' is used.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_MockObject_test_MockObject.assert_isinstance_obj2_S": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_MockObject_test_MockObject.assert_isinstance_obj2_S", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_mock.py", "file_name": "test_ext_autodoc_mock.py", "file_type": "text/x-python", "category": "test", "start_line": 36, "end_line": 64, "span_ids": ["test_MockObject.SubClass:2", "test_MockObject.SubClass", "test_MockObject.SubClass2", "test_MockObject", "test_MockObject.SubClass2:2"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_MockObject():\n mock = _MockObject()\n assert isinstance(mock.some_attr, _MockObject)\n assert isinstance(mock.some_method, _MockObject)\n assert isinstance(mock.attr1.attr2, _MockObject)\n assert isinstance(mock.attr1.attr2.meth(), _MockObject)\n\n # subclassing\n class SubClass(mock.SomeClass):\n \"\"\"docstring of SubClass\"\"\"\n\n def method(self):\n return \"string\"\n\n obj = SubClass()\n assert SubClass.__doc__ == \"docstring of SubClass\"\n assert isinstance(obj, SubClass)\n assert obj.method() == \"string\"\n assert isinstance(obj.other_method(), SubClass)\n\n # parametrized type\n T = TypeVar('T')\n\n class SubClass2(mock.SomeClass[T]):\n \"\"\"docstring of SubClass\"\"\"\n\n obj2 = SubClass2()\n assert SubClass2.__doc__ == \"docstring of SubClass\"\n assert isinstance(obj2, SubClass2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_coverage.py_test_coverage_ignore_pyobjects_test_show_missing_items.assert_c_api_Py_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_coverage.py_test_coverage_ignore_pyobjects_test_show_missing_items.assert_c_api_Py_", "embedding": null, "metadata": {"file_path": "tests/test_ext_coverage.py", "file_name": "test_ext_coverage.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 83, "span_ids": ["test_show_missing_items", "test_coverage_ignore_pyobjects"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('coverage', testroot='ext-coverage')\ndef test_coverage_ignore_pyobjects(app, status, warning):\n app.builder.build_all()\n actual = (app.outdir / 'python.txt').read_text()\n expected = '''Undocumented Python objects\n===========================\ncoverage_not_ignored\n--------------------\nClasses:\n * Documented -- missing methods:\n\n - not_ignored1\n - not_ignored2\n * NotIgnored\n\n'''\n assert actual == expected\n\n\n@pytest.mark.sphinx('coverage', confoverrides={'coverage_show_missing_items': True})\ndef test_show_missing_items(app, status, warning):\n app.builder.build_all()\n\n assert \"undocumented\" in status.getvalue()\n\n assert \"py function raises\" in status.getvalue()\n assert \"py class Base\" in status.getvalue()\n assert \"py method Class.roger\" in status.getvalue()\n\n assert \"c api Py_SphinxTest [ function]\" in status.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_coverage.py_test_show_missing_items_quiet_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_coverage.py_test_show_missing_items_quiet_", "embedding": null, "metadata": {"file_path": "tests/test_ext_coverage.py", "file_name": "test_ext_coverage.py", "file_type": "text/x-python", "category": "test", "start_line": 86, "end_line": 96, "span_ids": ["test_show_missing_items_quiet"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('coverage', confoverrides={'coverage_show_missing_items': True})\ndef test_show_missing_items_quiet(app, status, warning):\n app.quiet = True\n app.builder.build_all()\n\n assert \"undocumented python function: autodoc_target :: raises\" in warning.getvalue()\n assert \"undocumented python class: autodoc_target :: Base\" in warning.getvalue()\n assert \"undocumented python method: autodoc_target :: Class :: roger\" in warning.getvalue()\n\n assert \"undocumented c api: Py_SphinxTest [function]\" in warning.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SkipMemberTest.test_namedtuple_SkipMemberTest.test_namedtuple.if_sys_version_info_3_.else_.self_assertSkip_class_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SkipMemberTest.test_namedtuple_SkipMemberTest.test_namedtuple.if_sys_version_info_3_.else_.self_assertSkip_class_", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon.py", "file_name": "test_ext_napoleon.py", "file_type": "text/x-python", "category": "test", "start_line": 145, "end_line": 157, "span_ids": ["SkipMemberTest.test_namedtuple"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SkipMemberTest(TestCase):\n\n def test_namedtuple(self):\n if sys.version_info < (3, 7):\n self.assertSkip('class', '_asdict',\n SampleNamedTuple._asdict, False,\n 'napoleon_include_private_with_doc')\n else:\n # Since python 3.7, namedtuple._asdict() has not been documented\n # because there is no way to check the method is a member of the\n # namedtuple class. This testcase confirms only it does not\n # raise an error on building document (refs: #1455)\n self.assertSkip('class', '_asdict',\n SampleNamedTuple._asdict, True,\n 'napoleon_include_private_with_doc')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SkipMemberTest.test_class_private_doc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py_SkipMemberTest.test_class_private_doc_", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon.py", "file_name": "test_ext_napoleon.py", "file_type": "text/x-python", "category": "test", "start_line": 159, "end_line": 219, "span_ids": ["SkipMemberTest.test_class_decorated_doc", "SkipMemberTest.test_class_special_doc", "SkipMemberTest.test_module_special_doc", "SkipMemberTest.test_class_private_doc", "SkipMemberTest.test_class_private_undoc", "SkipMemberTest.test_module_private_doc", "SkipMemberTest.test_module_private_undoc", "SkipMemberTest.test_exception_private_doc", "SkipMemberTest.test_module_special_undoc", "SkipMemberTest.test_class_special_undoc", "SkipMemberTest.test_exception_special_doc", "SkipMemberTest.test_exception_special_undoc", "SkipMemberTest.test_exception_private_undoc"], "tokens": 519}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SkipMemberTest(TestCase):\n\n def test_class_private_doc(self):\n self.assertSkip('class', '_private_doc',\n SampleClass._private_doc, False,\n 'napoleon_include_private_with_doc')\n\n def test_class_private_undoc(self):\n self.assertSkip('class', '_private_undoc',\n SampleClass._private_undoc, True,\n 'napoleon_include_private_with_doc')\n\n def test_class_special_doc(self):\n self.assertSkip('class', '__special_doc__',\n SampleClass.__special_doc__, False,\n 'napoleon_include_special_with_doc')\n\n def test_class_special_undoc(self):\n self.assertSkip('class', '__special_undoc__',\n SampleClass.__special_undoc__, True,\n 'napoleon_include_special_with_doc')\n\n def test_class_decorated_doc(self):\n self.assertSkip('class', '__decorated_func__',\n SampleClass.__decorated_func__, False,\n 'napoleon_include_special_with_doc')\n\n def test_exception_private_doc(self):\n self.assertSkip('exception', '_private_doc',\n SampleError._private_doc, False,\n 'napoleon_include_private_with_doc')\n\n def test_exception_private_undoc(self):\n self.assertSkip('exception', '_private_undoc',\n SampleError._private_undoc, True,\n 'napoleon_include_private_with_doc')\n\n def test_exception_special_doc(self):\n self.assertSkip('exception', '__special_doc__',\n SampleError.__special_doc__, False,\n 'napoleon_include_special_with_doc')\n\n def test_exception_special_undoc(self):\n self.assertSkip('exception', '__special_undoc__',\n SampleError.__special_undoc__, True,\n 'napoleon_include_special_with_doc')\n\n def test_module_private_doc(self):\n self.assertSkip('module', '_private_doc', _private_doc, False,\n 'napoleon_include_private_with_doc')\n\n def test_module_private_undoc(self):\n self.assertSkip('module', '_private_undoc', _private_undoc, True,\n 'napoleon_include_private_with_doc')\n\n def test_module_special_doc(self):\n self.assertSkip('module', '__special_doc__', __special_doc__, False,\n 'napoleon_include_special_with_doc')\n\n def test_module_special_undoc(self):\n self.assertSkip('module', '__special_undoc__', __special_undoc__, True,\n 'napoleon_include_special_with_doc')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_colon_in_return_type_NumpyDocstringTest.test_colon_in_return_type.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_colon_in_return_type_NumpyDocstringTest.test_colon_in_return_type.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1374, "end_line": 1395, "span_ids": ["NumpyDocstringTest.test_colon_in_return_type"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_colon_in_return_type(self):\n docstring = \"\"\"\nSummary\n\nReturns\n-------\n:py:class:`~my_mod.my_class`\n an instance of :py:class:`~my_mod.my_class`\n\"\"\"\n\n expected = \"\"\"\nSummary\n\n:returns: an instance of :py:class:`~my_mod.my_class`\n:rtype: :py:class:`~my_mod.my_class`\n\"\"\"\n\n config = Config()\n app = mock.Mock()\n actual = str(NumpyDocstring(docstring, config, app, \"method\"))\n\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_underscore_in_attribute_NumpyDocstringTest.test_underscore_in_attribute_strip_signature_backslash.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_underscore_in_attribute_NumpyDocstringTest.test_underscore_in_attribute_strip_signature_backslash.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1397, "end_line": 1436, "span_ids": ["NumpyDocstringTest.test_underscore_in_attribute", "NumpyDocstringTest.test_underscore_in_attribute_strip_signature_backslash"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_underscore_in_attribute(self):\n docstring = \"\"\"\nAttributes\n----------\n\narg_ : type\n some description\n\"\"\"\n\n expected = \"\"\"\n:ivar arg_: some description\n:vartype arg_: type\n\"\"\"\n\n config = Config(napoleon_use_ivar=True)\n app = mock.Mock()\n actual = str(NumpyDocstring(docstring, config, app, \"class\"))\n\n self.assertEqual(expected, actual)\n\n def test_underscore_in_attribute_strip_signature_backslash(self):\n docstring = \"\"\"\nAttributes\n----------\n\narg_ : type\n some description\n\"\"\"\n\n expected = \"\"\"\n:ivar arg\\\\_: some description\n:vartype arg\\\\_: type\n\"\"\"\n\n config = Config(napoleon_use_ivar=True)\n config.strip_signature_backslash = True\n app = mock.Mock()\n actual = str(NumpyDocstring(docstring, config, app, \"class\"))\n\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_formfeed_char_test_typing_final_not_imported.assert_parser_finals_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_formfeed_char_test_typing_final_not_imported.assert_parser_finals_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 371, "end_line": 455, "span_ids": ["test_typing_final", "test_typing_final_import_as", "test_typing_final_not_imported", "test_formfeed_char", "test_typing_final_from_import", "test_typing_final_from_import_as"], "tokens": 536}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_formfeed_char():\n source = ('class Foo:\\n'\n '\\f\\n'\n ' attr = 1234 #: comment\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('Foo', 'attr'): 'comment'}\n\n\ndef test_typing_final():\n source = ('import typing\\n'\n '\\n'\n '@typing.final\\n'\n 'def func(): pass\\n'\n '\\n'\n '@typing.final\\n'\n 'class Foo:\\n'\n ' @typing.final\\n'\n ' def meth(self):\\n'\n ' pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.finals == ['func', 'Foo', 'Foo.meth']\n\n\ndef test_typing_final_from_import():\n source = ('from typing import final\\n'\n '\\n'\n '@final\\n'\n 'def func(): pass\\n'\n '\\n'\n '@final\\n'\n 'class Foo:\\n'\n ' @final\\n'\n ' def meth(self):\\n'\n ' pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.finals == ['func', 'Foo', 'Foo.meth']\n\n\ndef test_typing_final_import_as():\n source = ('import typing as foo\\n'\n '\\n'\n '@foo.final\\n'\n 'def func(): pass\\n'\n '\\n'\n '@foo.final\\n'\n 'class Foo:\\n'\n ' @typing.final\\n'\n ' def meth(self):\\n'\n ' pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.finals == ['func', 'Foo']\n\n\ndef test_typing_final_from_import_as():\n source = ('from typing import final as bar\\n'\n '\\n'\n '@bar\\n'\n 'def func(): pass\\n'\n '\\n'\n '@bar\\n'\n 'class Foo:\\n'\n ' @final\\n'\n ' def meth(self):\\n'\n ' pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.finals == ['func', 'Foo']\n\n\ndef test_typing_final_not_imported():\n source = ('@typing.final\\n'\n 'def func(): pass\\n'\n '\\n'\n '@typing.final\\n'\n 'class Foo:\\n'\n ' @final\\n'\n ' def meth(self):\\n'\n ' pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.finals == []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_test_typing_overload.assert_parser_overloads_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_test_typing_overload.assert_parser_overloads_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 458, "end_line": 471, "span_ids": ["test_typing_overload"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_typing_overload():\n source = ('import typing\\n'\n '\\n'\n '@typing.overload\\n'\n 'def func(x: int, y: int) -> int: pass\\n'\n '\\n'\n '@typing.overload\\n'\n 'def func(x: str, y: str) -> str: pass\\n'\n '\\n'\n 'def func(x, y): pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.overloads == {'func': [signature_from_str('(x: int, y: int) -> int'),\n signature_from_str('(x: str, y: str) -> str')]}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_from_import_test_typing_overload_from_import.assert_parser_overloads_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_from_import_test_typing_overload_from_import.assert_parser_overloads_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 474, "end_line": 487, "span_ids": ["test_typing_overload_from_import"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_typing_overload_from_import():\n source = ('from typing import overload\\n'\n '\\n'\n '@overload\\n'\n 'def func(x: int, y: int) -> int: pass\\n'\n '\\n'\n '@overload\\n'\n 'def func(x: str, y: str) -> str: pass\\n'\n '\\n'\n 'def func(x, y): pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.overloads == {'func': [signature_from_str('(x: int, y: int) -> int'),\n signature_from_str('(x: str, y: str) -> str')]}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_import_as_test_typing_overload_import_as.assert_parser_overloads_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_import_as_test_typing_overload_import_as.assert_parser_overloads_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 490, "end_line": 503, "span_ids": ["test_typing_overload_import_as"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_typing_overload_import_as():\n source = ('import typing as foo\\n'\n '\\n'\n '@foo.overload\\n'\n 'def func(x: int, y: int) -> int: pass\\n'\n '\\n'\n '@foo.overload\\n'\n 'def func(x: str, y: str) -> str: pass\\n'\n '\\n'\n 'def func(x, y): pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.overloads == {'func': [signature_from_str('(x: int, y: int) -> int'),\n signature_from_str('(x: str, y: str) -> str')]}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_from_import_as_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_typing_overload_from_import_as_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 506, "end_line": 533, "span_ids": ["test_typing_overload_not_imported", "test_typing_overload_from_import_as"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_typing_overload_from_import_as():\n source = ('from typing import overload as bar\\n'\n '\\n'\n '@bar\\n'\n 'def func(x: int, y: int) -> int: pass\\n'\n '\\n'\n '@bar\\n'\n 'def func(x: str, y: str) -> str: pass\\n'\n '\\n'\n 'def func(x, y): pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.overloads == {'func': [signature_from_str('(x: int, y: int) -> int'),\n signature_from_str('(x: str, y: str) -> str')]}\n\n\ndef test_typing_overload_not_imported():\n source = ('@typing.final\\n'\n 'def func(x: int, y: int) -> int: pass\\n'\n '\\n'\n '@typing.final\\n'\n 'def func(x: str, y: str) -> str: pass\\n'\n '\\n'\n 'def func(x, y): pass\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.overloads == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_complex_annotations_test_signature_from_str_kwonly_args.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_complex_annotations_test_signature_from_str_kwonly_args.None_4", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 323, "end_line": 337, "span_ids": ["test_signature_from_str_complex_annotations", "test_signature_from_str_kwonly_args"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_signature_from_str_complex_annotations():\n sig = inspect.signature_from_str('() -> Tuple[str, int, ...]')\n assert sig.return_annotation == 'Tuple[str, int, ...]'\n\n sig = inspect.signature_from_str('() -> Callable[[int, int], int]')\n assert sig.return_annotation == 'Callable[[int, int], int]'\n\n\ndef test_signature_from_str_kwonly_args():\n sig = inspect.signature_from_str('(a, *, b)')\n assert list(sig.parameters.keys()) == ['a', 'b']\n assert sig.parameters['a'].kind == Parameter.POSITIONAL_OR_KEYWORD\n assert sig.parameters['a'].default == Parameter.empty\n assert sig.parameters['b'].kind == Parameter.KEYWORD_ONLY\n assert sig.parameters['b'].default == Parameter.empty", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_positionaly_only_args_test_signature_from_str_invalid.with_pytest_raises_Syntax.inspect_signature_from_st": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_str_positionaly_only_args_test_signature_from_str_invalid.with_pytest_raises_Syntax.inspect_signature_from_st", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 340, "end_line": 355, "span_ids": ["test_signature_from_str_invalid", "test_signature_from_str_positionaly_only_args"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8),\n reason='python-3.8 or above is required')\ndef test_signature_from_str_positionaly_only_args():\n sig = inspect.signature_from_str('(a, b=0, /, c=1)')\n assert list(sig.parameters.keys()) == ['a', 'b', 'c']\n assert sig.parameters['a'].kind == Parameter.POSITIONAL_ONLY\n assert sig.parameters['a'].default == Parameter.empty\n assert sig.parameters['b'].kind == Parameter.POSITIONAL_ONLY\n assert sig.parameters['b'].default == '0'\n assert sig.parameters['c'].kind == Parameter.POSITIONAL_OR_KEYWORD\n assert sig.parameters['c'].default == '1'\n\n\ndef test_signature_from_str_invalid():\n with pytest.raises(SyntaxError):\n inspect.signature_from_str('')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_ast_test_signature_from_ast.assert_sig_return_annotat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_from_ast_test_signature_from_ast.assert_sig_return_annotat", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 358, "end_line": 387, "span_ids": ["test_signature_from_ast"], "tokens": 388}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_signature_from_ast():\n signature = 'def func(a, b, *args, c=0, d=\"blah\", **kwargs): pass'\n tree = ast.parse(signature)\n sig = inspect.signature_from_ast(tree.body[0])\n assert list(sig.parameters.keys()) == ['a', 'b', 'args', 'c', 'd', 'kwargs']\n assert sig.parameters['a'].name == 'a'\n assert sig.parameters['a'].kind == Parameter.POSITIONAL_OR_KEYWORD\n assert sig.parameters['a'].default == Parameter.empty\n assert sig.parameters['a'].annotation == Parameter.empty\n assert sig.parameters['b'].name == 'b'\n assert sig.parameters['b'].kind == Parameter.POSITIONAL_OR_KEYWORD\n assert sig.parameters['b'].default == Parameter.empty\n assert sig.parameters['b'].annotation == Parameter.empty\n assert sig.parameters['args'].name == 'args'\n assert sig.parameters['args'].kind == Parameter.VAR_POSITIONAL\n assert sig.parameters['args'].default == Parameter.empty\n assert sig.parameters['args'].annotation == Parameter.empty\n assert sig.parameters['c'].name == 'c'\n assert sig.parameters['c'].kind == Parameter.KEYWORD_ONLY\n assert sig.parameters['c'].default == '0'\n assert sig.parameters['c'].annotation == Parameter.empty\n assert sig.parameters['d'].name == 'd'\n assert sig.parameters['d'].kind == Parameter.KEYWORD_ONLY\n assert sig.parameters['d'].default == \"'blah'\"\n assert sig.parameters['d'].annotation == Parameter.empty\n assert sig.parameters['kwargs'].name == 'kwargs'\n assert sig.parameters['kwargs'].kind == Parameter.VAR_KEYWORD\n assert sig.parameters['kwargs'].default == Parameter.empty\n assert sig.parameters['kwargs'].annotation == Parameter.empty\n assert sig.return_annotation == Parameter.empty", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/typing_test_data.py_from_inspect_import_Signa_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/typing_test_data.py_from_inspect_import_Signa_", "embedding": null, "metadata": {"file_path": "tests/typing_test_data.py", "file_name": "typing_test_data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 114, "span_ids": ["Node", "impl", "f21", "f0", "f13", "CustomAnnotation", "CustomAnnotation.__repr__", "f12", "f4", "f20", "f3", "f9", "f6", "f18", "f1", "impl:7", "f19", "imports", "f10", "f8", "f14", "f16", "f7", "f15", "f5", "f17", "f2", "f11", "Node.children"], "tokens": 550}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from inspect import Signature\nfrom numbers import Integral\nfrom typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union\n\n\ndef f0(x: int, y: Integral) -> None:\n pass\n\n\ndef f1(x: List[int]) -> List[int]:\n pass\n\n\nT = TypeVar('T')\nT_co = TypeVar('T_co', covariant=True)\nT_contra = TypeVar('T_contra', contravariant=True)\n\n\ndef f2(x: List[T], y: List[T_co], z: T) -> List[T_contra]:\n pass\n\n\ndef f3(x: Union[str, Integral]) -> None:\n pass\n\n\nMyStr = str\n\n\ndef f4(x: 'MyStr', y: MyStr) -> None:\n pass\n\n\ndef f5(x: int, *, y: str, z: str) -> None:\n pass\n\n\ndef f6(x: int, *args, y: str, z: str) -> None:\n pass\n\n\ndef f7(x: int = None, y: dict = {}) -> None:\n pass\n\n\ndef f8(x: Callable[[int, str], int]) -> None:\n # See https://github.com/ambv/typehinting/issues/149 for Callable[..., int]\n pass\n\n\ndef f9(x: Callable) -> None:\n pass\n\n\ndef f10(x: Tuple[int, str], y: Tuple[int, ...]) -> None:\n pass\n\n\nclass CustomAnnotation:\n def __repr__(self):\n return 'CustomAnnotation'\n\n\ndef f11(x: CustomAnnotation(), y: 123) -> None:\n pass\n\n\ndef f12() -> Tuple[int, str, int]:\n pass\n\n\ndef f13() -> Optional[str]:\n pass\n\n\ndef f14() -> Any:\n pass\n\n\ndef f15(x: \"Unknown\", y: \"int\") -> Any: # type: ignore # NOQA\n pass\n\n\ndef f16(arg1, arg2, *, arg3=None, arg4=None):\n pass\n\n\ndef f17(*, arg3, arg4):\n pass\n\n\ndef f18(self, arg1: Union[int, Tuple] = 10) -> List[Dict]:\n pass\n\n\ndef f19(*args: int, **kwargs: str):\n pass\n\n\ndef f20() -> Optional[Union[int, str]]:\n pass\n\n\ndef f21(arg1='whatever', arg2=Signature.empty):\n pass\n\n\nclass Node:\n def __init__(self, parent: Optional['Node']) -> None:\n pass\n\n def children(self) -> List['Node']:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_theme_static_files_StandaloneHTMLBuilder.copy_theme_static_files.if_self_theme_.for_entry_in_self_theme_g.copy_asset_path_join_entr": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_theme_static_files_StandaloneHTMLBuilder.copy_theme_static_files.if_self_theme_.for_entry_in_self_theme_g.copy_asset_path_join_entr", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 753, "end_line": 763, "span_ids": ["StandaloneHTMLBuilder.copy_theme_static_files"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def copy_theme_static_files(self, context: Dict) -> None:\n def onerror(filename: str, error: Exception) -> None:\n logger.warning(__('Failed to copy a file in html_static_file: %s: %r'),\n filename, error)\n\n if self.theme:\n for entry in self.theme.get_theme_dirs()[::-1]:\n copy_asset(path.join(entry, 'static'),\n path.join(self.outdir, '_static'),\n excluded=DOTFILES, context=context,\n renderer=self.templates, onerror=onerror)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_html_static_files_StandaloneHTMLBuilder.copy_html_favicon.if_self_config_html_favic.copy_asset_path_join_self": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_html_static_files_StandaloneHTMLBuilder.copy_html_favicon.if_self_config_html_favic.copy_asset_path_join_self", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 802, "end_line": 821, "span_ids": ["StandaloneHTMLBuilder.copy_html_favicon", "StandaloneHTMLBuilder.copy_html_logo", "StandaloneHTMLBuilder.copy_html_static_files"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def copy_html_static_files(self, context: Dict) -> None:\n def onerror(filename: str, error: Exception) -> None:\n logger.warning(__('Failed to copy a file in html_static_file: %s: %r'),\n filename, error)\n\n excluded = Matcher(self.config.exclude_patterns + [\"**/.*\"])\n for entry in self.config.html_static_path:\n copy_asset(path.join(self.confdir, entry),\n path.join(self.outdir, '_static'),\n excluded, context=context, renderer=self.templates, onerror=onerror)\n\n def copy_html_logo(self) -> None:\n if self.config.html_logo and not isurl(self.config.html_logo):\n copy_asset(path.join(self.confdir, self.config.html_logo),\n path.join(self.outdir, '_static'))\n\n def copy_html_favicon(self) -> None:\n if self.config.html_favicon and not isurl(self.config.html_favicon):\n copy_asset(path.join(self.confdir, self.config.html_favicon),\n path.join(self.outdir, '_static'))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_XINDY_CYRILLIC_SCRIPTS_LaTeXBuilder.get_relative_uri.return.self_get_target_uri_to_t": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_XINDY_CYRILLIC_SCRIPTS_LaTeXBuilder.get_relative_uri.return.self_get_target_uri_to_t", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 91, "end_line": 137, "span_ids": ["LaTeXBuilder.get_relative_uri", "LaTeXBuilder.get_target_uri", "impl:3", "LaTeXBuilder.init", "LaTeXBuilder", "LaTeXBuilder.get_outdated_docs"], "tokens": 381}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "XINDY_CYRILLIC_SCRIPTS = [\n 'be', 'bg', 'mk', 'mn', 'ru', 'sr', 'sh', 'uk',\n]\n\nlogger = logging.getLogger(__name__)\n\n\nclass LaTeXBuilder(Builder):\n \"\"\"\n Builds LaTeX output to create PDF.\n \"\"\"\n name = 'latex'\n format = 'latex'\n epilog = __('The LaTeX files are in %(outdir)s.')\n if os.name == 'posix':\n epilog += __(\"\\nRun 'make' in that directory to run these through \"\n \"(pdf)latex\\n\"\n \"(use `make latexpdf' here to do that automatically).\")\n\n supported_image_types = ['application/pdf', 'image/png', 'image/jpeg']\n supported_remote_images = False\n default_translator_class = LaTeXTranslator\n\n def init(self) -> None:\n self.babel: ExtBabel = None\n self.context: Dict[str, Any] = {}\n self.docnames: Iterable[str] = {}\n self.document_data: List[Tuple[str, str, str, str, str, bool]] = []\n self.themes = ThemeFactory(self.app)\n texescape.init()\n\n self.init_context()\n self.init_babel()\n self.init_multilingual()\n\n def get_outdated_docs(self) -> Union[str, List[str]]:\n return 'all documents' # for now\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n if docname not in self.docnames:\n raise NoUri(docname, typ)\n else:\n return '%' + docname\n\n def get_relative_uri(self, from_: str, to: str, typ: str = None) -> str:\n # ignore source path\n return self.get_target_uri(to, typ)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.init_context_LaTeXBuilder.init_context.if_self_config_release_.self_context_setdefault_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.init_context_LaTeXBuilder.init_context.if_self_config_release_.self_context_setdefault_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 158, "end_line": 186, "span_ids": ["LaTeXBuilder.init_context"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n def init_context(self) -> None:\n self.context = DEFAULT_SETTINGS.copy()\n\n # Add special settings for latex_engine\n self.context.update(ADDITIONAL_SETTINGS.get(self.config.latex_engine, {}))\n\n # Add special settings for (latex_engine, language_code)\n key = (self.config.latex_engine, self.config.language[:2])\n self.context.update(ADDITIONAL_SETTINGS.get(key, {}))\n\n # Apply user settings to context\n self.context.update(self.config.latex_elements)\n self.context['release'] = self.config.release\n self.context['use_xindy'] = self.config.latex_use_xindy\n\n if self.config.today:\n self.context['date'] = self.config.today\n else:\n self.context['date'] = format_date(self.config.today_fmt or _('%b %d, %Y'),\n language=self.config.language)\n\n if self.config.latex_logo:\n self.context['logofilename'] = path.basename(self.config.latex_logo)\n\n # for compatibilities\n self.context['indexname'] = _('Index')\n if self.config.release:\n # Show the release label only if release value exists\n self.context.setdefault('releasename', _('Release'))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTParameters_ASTParameters._stringify.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTParameters_ASTParameters._stringify.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 654, "end_line": 676, "span_ids": ["ASTParameters._stringify", "ASTParameters.function_params", "ASTParameters"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTParameters(ASTBase):\n def __init__(self, args: List[ASTFunctionParameter], attrs: List[ASTAttribute]) -> None:\n self.args = args\n self.attrs = attrs\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.args\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append('(')\n first = True\n for a in self.args:\n if not first:\n res.append(', ')\n first = False\n res.append(str(a))\n res.append(')')\n for attr in self.attrs:\n res.append(' ')\n res.append(transform(attr))\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTParameters.describe_signature_ASTParameters.describe_signature.for_attr_in_self_attrs_.attr_describe_signature_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTParameters.describe_signature_ASTParameters.describe_signature.for_attr_in_self_attrs_.attr_describe_signature_s", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 713, "end_line": 737, "span_ids": ["ASTParameters.describe_signature"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTParameters(ASTBase):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n # only use the desc_parameterlist for the outer list, not for inner lists\n if mode == 'lastIsName':\n paramlist = addnodes.desc_parameterlist()\n for arg in self.args:\n param = addnodes.desc_parameter('', '', noemph=True)\n arg.describe_signature(param, 'param', env, symbol=symbol)\n paramlist += param\n signode += paramlist\n else:\n signode += addnodes.desc_sig_punctuation('(', '(')\n first = True\n for arg in self.args:\n if not first:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n first = False\n arg.describe_signature(signode, 'markType', env, symbol=symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n for attr in self.attrs:\n signode += addnodes.desc_sig_space()\n attr.describe_signature(signode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_parameters_DefinitionParser._parse_parameters.return.ASTParameters_args_attrs": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_parameters_DefinitionParser._parse_parameters.return.ASTParameters_args_attrs", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2609, "end_line": 2651, "span_ids": ["DefinitionParser._parse_parameters"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_parameters(self, paramMode: str) -> ASTParameters:\n self.skip_ws()\n if not self.skip_string('('):\n if paramMode == 'function':\n self.fail('Expecting \"(\" in parameters.')\n else:\n return None\n\n args = []\n self.skip_ws()\n if not self.skip_string(')'):\n while 1:\n self.skip_ws()\n if self.skip_string('...'):\n args.append(ASTFunctionParameter(None, True))\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail('Expected \")\" after \"...\" in parameters.')\n break\n # note: it seems that function arguments can always be named,\n # even in function pointers and similar.\n arg = self._parse_type_with_init(outer=None, named='single')\n # TODO: parse default parameters # TODO: didn't we just do that?\n args.append(ASTFunctionParameter(arg))\n\n self.skip_ws()\n if self.skip_string(','):\n continue\n elif self.skip_string(')'):\n break\n else:\n self.fail(\n 'Expecting \",\" or \")\" in parameters, '\n 'got \"%s\".' % self.current_char)\n\n attrs = []\n while True:\n attr = self._parse_attribute()\n if attr is None:\n break\n attrs.append(attr)\n\n return ASTParameters(args, attrs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_AliasTransform_AliasTransform._render_symbol.return.nodes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_AliasTransform_AliasTransform._render_symbol.return.nodes", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3503, "end_line": 3548, "span_ids": ["AliasTransform", "AliasTransform._render_symbol"], "tokens": 346}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AliasTransform(SphinxTransform):\n default_priority = ReferencesResolver.default_priority - 1\n\n def _render_symbol(self, s: Symbol, maxdepth: int, skipThis: bool,\n aliasOptions: dict, renderOptions: dict,\n document: Any) -> List[Node]:\n if maxdepth == 0:\n recurse = True\n elif maxdepth == 1:\n recurse = False\n else:\n maxdepth -= 1\n recurse = True\n\n nodes: List[Node] = []\n if not skipThis:\n signode = addnodes.desc_signature('', '')\n nodes.append(signode)\n s.declaration.describe_signature(signode, 'markName', self.env, renderOptions)\n\n if recurse:\n if skipThis:\n childContainer: Union[List[Node], addnodes.desc] = nodes\n else:\n content = addnodes.desc_content()\n desc = addnodes.desc()\n content.append(desc)\n desc.document = document\n desc['domain'] = 'c'\n # 'desctype' is a backwards compatible attribute\n desc['objtype'] = desc['desctype'] = 'alias'\n desc['noindex'] = True\n childContainer = desc\n\n for sChild in s.children:\n if sChild.declaration is None:\n continue\n childNodes = self._render_symbol(\n sChild, maxdepth=maxdepth, skipThis=False,\n aliasOptions=aliasOptions, renderOptions=renderOptions,\n document=document)\n childContainer.extend(childNodes)\n\n if not skipThis and len(desc.children) != 0:\n nodes.append(content)\n return nodes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_AliasTransform.apply_AliasTransform.apply.for_node_in_self_document.node_replace_self_nodes_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_AliasTransform.apply_AliasTransform.apply.for_node_in_self_document.node_replace_self_nodes_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3550, "end_line": 3611, "span_ids": ["AliasTransform.apply"], "tokens": 504}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AliasTransform(SphinxTransform):\n\n def apply(self, **kwargs: Any) -> None:\n for node in self.document.findall(AliasNode):\n node = cast(AliasNode, node)\n sig = node.sig\n parentKey = node.parentKey\n try:\n parser = DefinitionParser(sig, location=node,\n config=self.env.config)\n name = parser.parse_xref_object()\n except DefinitionError as e:\n logger.warning(e, location=node)\n name = None\n\n if name is None:\n # could not be parsed, so stop here\n signode = addnodes.desc_signature(sig, '')\n signode.clear()\n signode += addnodes.desc_name(sig, sig)\n node.replace_self(signode)\n continue\n\n rootSymbol: Symbol = self.env.domains['c'].data['root_symbol']\n parentSymbol: Symbol = rootSymbol.direct_lookup(parentKey)\n if not parentSymbol:\n print(\"Target: \", sig)\n print(\"ParentKey: \", parentKey)\n print(rootSymbol.dump(1))\n assert parentSymbol # should be there\n\n s = parentSymbol.find_declaration(\n name, 'any',\n matchSelf=True, recurseInAnon=True)\n if s is None:\n signode = addnodes.desc_signature(sig, '')\n node.append(signode)\n signode.clear()\n signode += addnodes.desc_name(sig, sig)\n\n logger.warning(\"Could not find C declaration for alias '%s'.\" % name,\n location=node)\n node.replace_self(signode)\n continue\n # Declarations like .. var:: int Missing::var\n # may introduce symbols without declarations.\n # But if we skip the root then it is ok to start recursion from it.\n if not node.aliasOptions['noroot'] and s.declaration is None:\n signode = addnodes.desc_signature(sig, '')\n node.append(signode)\n signode.clear()\n signode += addnodes.desc_name(sig, sig)\n\n logger.warning(\n \"Can not render C declaration for alias '%s'. No such declaration.\" % name,\n location=node)\n node.replace_self(signode)\n continue\n\n nodes = self._render_symbol(s, maxdepth=node.aliasOptions['maxdepth'],\n skipThis=node.aliasOptions['noroot'],\n aliasOptions=node.aliasOptions,\n renderOptions=dict(), document=node.document)\n node.replace_self(nodes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Cmdoption.add_target_and_index_Cmdoption.make_old_id.return.nodes_make_id_prefix_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_Cmdoption.add_target_and_index_Cmdoption.make_old_id.return.nodes_make_id_prefix_", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 206, "end_line": 245, "span_ids": ["Cmdoption.make_old_id", "Cmdoption.add_target_and_index"], "tokens": 402}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Cmdoption(ObjectDescription[str]):\n\n def add_target_and_index(self, firstname: str, sig: str, signode: desc_signature) -> None:\n currprogram = self.env.ref_context.get('std:program')\n for optname in signode.get('allnames', []):\n prefixes = ['cmdoption']\n if currprogram:\n prefixes.append(currprogram)\n if not optname.startswith(('-', '/')):\n prefixes.append('arg')\n prefix = '-'.join(prefixes)\n node_id = make_id(self.env, self.state.document, prefix, optname)\n signode['ids'].append(node_id)\n\n old_node_id = self.make_old_id(prefix, optname)\n if old_node_id not in self.state.document.ids and \\\n old_node_id not in signode['ids']:\n signode['ids'].append(old_node_id)\n\n self.state.document.note_explicit_target(signode)\n\n domain = cast(StandardDomain, self.env.get_domain('std'))\n for optname in signode.get('allnames', []):\n domain.add_program_option(currprogram, optname,\n self.env.docname, signode['ids'][0])\n\n # create an index entry\n if currprogram:\n descr = _('%s command line option') % currprogram\n else:\n descr = _('command line option')\n for option in signode.get('allnames', []):\n entry = '; '.join([descr, option])\n self.indexnode['entries'].append(('pair', entry, signode['ids'][0], '', None))\n\n def make_old_id(self, prefix: str, optname: str) -> str:\n \"\"\"Generate old styled node_id for cmdoption.\n\n .. note:: Old Styled node_id was used until Sphinx-3.0.\n This will be removed in Sphinx-5.0.\n \"\"\"\n return nodes.make_id(prefix + '-' + optname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.domain_IndexEntries.create_index._sort_the_index_entries": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.domain_IndexEntries.create_index._sort_the_index_entries", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/indexentries.py", "file_name": "indexentries.py", "file_type": "text/x-python", "category": "implementation", "start_line": 47, "end_line": 91, "span_ids": ["IndexEntries.create_index"], "tokens": 561}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexEntries:\n\n def create_index(self, builder: Builder, group_entries: bool = True,\n _fixre: Pattern = re.compile(r'(.*) ([(][^()]*[)])')\n ) -> List[Tuple[str, List[Tuple[str, Any]]]]:\n # ... other code\n\n domain = cast(IndexDomain, self.env.get_domain('index'))\n for fn, entries in domain.entries.items():\n # new entry types must be listed in directives/other.py!\n for type, value, tid, main, index_key in entries: # noqa: B007\n try:\n if type == 'single':\n try:\n entry, subentry = split_into(2, 'single', value)\n except ValueError:\n entry, = split_into(1, 'single', value)\n subentry = ''\n add_entry(entry, subentry, main, key=index_key)\n elif type == 'pair':\n first, second = split_into(2, 'pair', value)\n add_entry(first, second, main, key=index_key)\n add_entry(second, first, main, key=index_key)\n elif type == 'triple':\n first, second, third = split_into(3, 'triple', value)\n add_entry(first, second + ' ' + third, main, key=index_key)\n add_entry(second, third + ', ' + first, main, key=index_key)\n add_entry(third, first + ' ' + second, main, key=index_key)\n elif type == 'see':\n first, second = split_into(2, 'see', value)\n add_entry(first, _('see %s') % second, None,\n link=False, key=index_key)\n elif type == 'seealso':\n first, second = split_into(2, 'see', value)\n add_entry(first, _('see also %s') % second, None,\n link=False, key=index_key)\n else:\n logger.warning(__('unknown index entry type %r'), type, location=fn)\n except ValueError as err:\n logger.warning(str(err), location=fn)\n\n # sort the index entries for same keyword.\n def keyfunc0(entry: Tuple[str, str]) -> Tuple[bool, str]:\n main, uri = entry\n return (not main, uri) # show main entries at first\n\n for indexentry in new.values():\n indexentry[0].sort(key=keyfunc0)\n for subentry in indexentry[1].values():\n subentry[0].sort(key=keyfunc0) # type: ignore\n\n # sort the index entries\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.keyfunc_IndexEntries.create_index.keyfunc.return._sortkey_entry_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py_IndexEntries.create_index.keyfunc_IndexEntries.create_index.keyfunc.return._sortkey_entry_0_", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/indexentries.py", "file_name": "indexentries.py", "file_type": "text/x-python", "category": "implementation", "start_line": 92, "end_line": 109, "span_ids": ["IndexEntries.create_index"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexEntries:\n\n def create_index(self, builder: Builder, group_entries: bool = True,\n _fixre: Pattern = re.compile(r'(.*) ([(][^()]*[)])')\n ) -> List[Tuple[str, List[Tuple[str, Any]]]]:\n # ... other code\n def keyfunc(entry: Tuple[str, List]) -> Tuple[Tuple[int, str], str]:\n key, (void, void, category_key) = entry\n if category_key:\n # using specified category key to sort\n key = category_key\n lckey = unicodedata.normalize('NFD', key.lower())\n if lckey.startswith('\\N{RIGHT-TO-LEFT MARK}'):\n lckey = lckey[1:]\n\n if lckey[0:1].isalpha() or lckey.startswith('_'):\n # put non-symbol characters at the following group (1)\n sortkey = (1, lckey)\n else:\n # put symbols at the front of the index (0)\n sortkey = (0, lckey)\n # ensure a deterministic order *within* letters by also sorting on\n # the entry itself\n return (sortkey, entry[0])\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_merge_special_members_option_merge_members_option.for_key_in_private_memb.if_key_in_options_and_opt.for_member_in_options_key.if_member_not_in_members_.members_append_member_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_merge_special_members_option_merge_members_option.for_key_in_private_memb.if_key_in_options_and_opt.for_member_in_options_key.if_member_not_in_members_.members_append_member_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 155, "end_line": 181, "span_ids": ["merge_members_option", "merge_special_members_option"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def merge_special_members_option(options: Dict) -> None:\n \"\"\"Merge :special-members: option to :members: option.\"\"\"\n warnings.warn(\"merge_special_members_option() is deprecated.\",\n RemovedInSphinx50Warning, stacklevel=2)\n if 'special-members' in options and options['special-members'] is not ALL:\n if options.get('members') is ALL:\n pass\n elif options.get('members'):\n for member in options['special-members']:\n if member not in options['members']:\n options['members'].append(member)\n else:\n options['members'] = options['special-members']\n\n\ndef merge_members_option(options: Dict) -> None:\n \"\"\"Merge :*-members: option to the :members: option.\"\"\"\n if options.get('members') is ALL:\n # merging is not needed when members: ALL\n return\n\n members = options.setdefault('members', [])\n for key in {'private-members', 'special-members'}:\n if key in options and options[key] not in (ALL, None):\n for member in options[key]:\n if member not in members:\n members.append(member)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py__Some_useful_event_liste_cut_lines.return.process": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py__Some_useful_event_liste_cut_lines.return.process", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 184, "end_line": 211, "span_ids": ["cut_lines", "merge_members_option"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Some useful event listener factories for autodoc-process-docstring.\n\ndef cut_lines(pre: int, post: int = 0, what: str = None) -> Callable:\n \"\"\"Return a listener that removes the first *pre* and last *post*\n lines of every docstring. If *what* is a sequence of strings,\n only docstrings of a type in *what* will be processed.\n\n Use like this (e.g. in the ``setup()`` function of :file:`conf.py`)::\n\n from sphinx.ext.autodoc import cut_lines\n app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))\n\n This can (and should) be used in place of :confval:`automodule_skip_lines`.\n \"\"\"\n def process(app: Sphinx, what_: str, name: str, obj: Any, options: Any, lines: List[str]\n ) -> None:\n if what and what_ not in what:\n return\n del lines[:pre]\n if post:\n # remove one trailing blank line.\n if lines and not lines[-1]:\n lines.pop(-1)\n del lines[-post:]\n # make sure there is a blank line at the end\n if lines and lines[-1]:\n lines.append('')\n return process", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph._class_info_InheritanceGraph._class_info.all_classes._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_InheritanceGraph._class_info_InheritanceGraph._class_info.all_classes._", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 166, "end_line": 184, "span_ids": ["InheritanceGraph._class_info"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InheritanceGraph:\n\n def _class_info(self, classes: List[Any], show_builtins: bool, private_bases: bool,\n parts: int, aliases: Dict[str, str], top_classes: List[Any]\n ) -> List[Tuple[str, str, List[str], str]]:\n \"\"\"Return name and bases for all classes that are ancestors of\n *classes*.\n\n *parts* gives the number of dotted name parts to include in the\n displayed node names, from right to left. If given as a negative, the\n number of parts to drop from the left. A value of 0 displays the full\n dotted name. E.g. ``sphinx.ext.inheritance_diagram.InheritanceGraph``\n with ``parts=2`` or ``parts=-2`` gets displayed as\n ``inheritance_diagram.InheritanceGraph``, and as\n ``ext.inheritance_diagram.InheritanceGraph`` with ``parts=3`` or\n ``parts=-1``.\n\n *top_classes* gives the name(s) of the top most ancestor class to\n traverse to. Multiple names can be specified separated by comma.\n \"\"\"\n all_classes = {}\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_fields_GoogleDocstring._consume_fields.return.fields": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_fields_GoogleDocstring._consume_fields.return.fields", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 269, "end_line": 280, "span_ids": ["GoogleDocstring._consume_fields"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _consume_fields(self, parse_type: bool = True, prefer_type: bool = False,\n multiple: bool = False) -> List[Tuple[str, str, List[str]]]:\n self._consume_empty()\n fields = []\n while not self._is_section_break():\n _name, _type, _desc = self._consume_field(parse_type, prefer_type)\n if multiple and _name:\n for name in _name.split(\",\"):\n fields.append((name.strip(), _type, _desc))\n elif _name or _type or _desc:\n fields.append((_name, _type, _desc,))\n return fields", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_inline_attribute_GoogleDocstring._consume_inline_attribute.return._type__descs": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._consume_inline_attribute_GoogleDocstring._consume_inline_attribute.return._type__descs", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 282, "end_line": 290, "span_ids": ["GoogleDocstring._consume_inline_attribute"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _consume_inline_attribute(self) -> Tuple[str, List[str]]:\n line = next(self._line_iter)\n _type, colon, _desc = self._partition_field_on_colon(line)\n if not colon or not _desc:\n _type, _desc = _desc, _type\n _desc += colon\n _descs = [_desc] + self._dedent(self._consume_to_end())\n _descs = self.__class__(_descs, self._config).lines()\n return _type, _descs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__recombine_set_tokens__recombine_set_tokens.return.list_combine_set_token_qu": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__recombine_set_tokens__recombine_set_tokens.return.list_combine_set_token_qu", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 805, "end_line": 858, "span_ids": ["_recombine_set_tokens"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _recombine_set_tokens(tokens: List[str]) -> List[str]:\n token_queue = collections.deque(tokens)\n keywords = (\"optional\", \"default\")\n\n def takewhile_set(tokens):\n open_braces = 0\n previous_token = None\n while True:\n try:\n token = tokens.popleft()\n except IndexError:\n break\n\n if token == \", \":\n previous_token = token\n continue\n\n if not token.strip():\n continue\n\n if token in keywords:\n tokens.appendleft(token)\n if previous_token is not None:\n tokens.appendleft(previous_token)\n break\n\n if previous_token is not None:\n yield previous_token\n previous_token = None\n\n if token == \"{\":\n open_braces += 1\n elif token == \"}\":\n open_braces -= 1\n\n yield token\n\n if open_braces == 0:\n break\n\n def combine_set(tokens):\n while True:\n try:\n token = tokens.popleft()\n except IndexError:\n break\n\n if token == \"{\":\n tokens.appendleft(\"{\")\n yield \"\".join(takewhile_set(tokens))\n else:\n yield token\n\n return list(combine_set(token_queue))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__tokenize_type_spec__tokenize_type_spec.return.tokens": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__tokenize_type_spec__tokenize_type_spec.return.tokens", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 861, "end_line": 879, "span_ids": ["_tokenize_type_spec"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _tokenize_type_spec(spec: str) -> List[str]:\n def postprocess(item):\n if _default_regex.match(item):\n default = item[:7]\n # can't be separated by anything other than a single space\n # for now\n other = item[8:]\n\n return [default, \" \", other]\n else:\n return [item]\n\n tokens = list(\n item\n for raw_token in _token_regex.split(spec)\n for item in postprocess(raw_token)\n if item\n )\n return tokens", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__token_type__token_type.return.type_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__token_type__token_type.return.type_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 882, "end_line": 938, "span_ids": ["_token_type"], "tokens": 384}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _token_type(token: str, location: str = None) -> str:\n def is_numeric(token):\n try:\n # use complex to make sure every numeric value is detected as literal\n complex(token)\n except ValueError:\n return False\n else:\n return True\n\n if token.startswith(\" \") or token.endswith(\" \"):\n type_ = \"delimiter\"\n elif (\n is_numeric(token) or\n (token.startswith(\"{\") and token.endswith(\"}\")) or\n (token.startswith('\"') and token.endswith('\"')) or\n (token.startswith(\"'\") and token.endswith(\"'\"))\n ):\n type_ = \"literal\"\n elif token.startswith(\"{\"):\n logger.warning(\n __(\"invalid value set (missing closing brace): %s\"),\n token,\n location=location,\n )\n type_ = \"literal\"\n elif token.endswith(\"}\"):\n logger.warning(\n __(\"invalid value set (missing opening brace): %s\"),\n token,\n location=location,\n )\n type_ = \"literal\"\n elif token.startswith(\"'\") or token.startswith('\"'):\n logger.warning(\n __(\"malformed string literal (missing closing quote): %s\"),\n token,\n location=location,\n )\n type_ = \"literal\"\n elif token.endswith(\"'\") or token.endswith('\"'):\n logger.warning(\n __(\"malformed string literal (missing opening quote): %s\"),\n token,\n location=location,\n )\n type_ = \"literal\"\n elif token in (\"optional\", \"default\"):\n # default is not a official keyword (yet) but supported by the\n # reference implementation (numpydoc) and widely used\n type_ = \"control\"\n elif _xref_regex.match(token):\n type_ = \"reference\"\n else:\n type_ = \"obj\"\n\n return type_", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__convert_numpy_type_spec__convert_numpy_type_spec.convert_obj.return.translation": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__convert_numpy_type_spec__convert_numpy_type_spec.convert_obj.return.translation", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 941, "end_line": 955, "span_ids": ["_convert_numpy_type_spec"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _convert_numpy_type_spec(_type: str, location: str = None, translations: dict = {}) -> str:\n def convert_obj(obj, translations, default_translation):\n translation = translations.get(obj, obj)\n\n # use :class: (the default) only if obj is not a standard singleton\n if translation in _SINGLETONS and default_translation == \":class:`%s`\":\n default_translation = \":obj:`%s`\"\n elif translation == \"...\" and default_translation == \":class:`%s`\":\n # allow referencing the builtin ...\n default_translation = \":obj:`%s <Ellipsis>`\"\n\n if _xref_regex.match(translation) is None:\n translation = default_translation % translation\n\n return translation\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__convert_numpy_type_spec.tokens__convert_numpy_type_spec.return.converted": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__convert_numpy_type_spec.tokens__convert_numpy_type_spec.return.converted", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 957, "end_line": 974, "span_ids": ["_convert_numpy_type_spec"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _convert_numpy_type_spec(_type: str, location: str = None, translations: dict = {}) -> str:\n # ... other code\n\n tokens = _tokenize_type_spec(_type)\n combined_tokens = _recombine_set_tokens(tokens)\n types = [\n (token, _token_type(token, location))\n for token in combined_tokens\n ]\n\n converters = {\n \"literal\": lambda x: \"``%s``\" % x,\n \"obj\": lambda x: convert_obj(x, translations, \":class:`%s`\"),\n \"control\": lambda x: \"*%s*\" % x,\n \"delimiter\": lambda x: x,\n \"reference\": lambda x: x,\n }\n\n converted = \"\".join(converters.get(type_)(token) for token, type_ in types)\n\n return converted", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._get_location_NumpyDocstring._escape_args_and_kwargs.if_in_name_.else_.return.func_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_NumpyDocstring._get_location_NumpyDocstring._escape_args_and_kwargs.if_in_name_.else_.return.func_name_", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1076, "end_line": 1096, "span_ids": ["NumpyDocstring._escape_args_and_kwargs", "NumpyDocstring._get_location"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstring(GoogleDocstring):\n\n def _get_location(self) -> str:\n try:\n filepath = inspect.getfile(self._obj) if self._obj is not None else None\n except TypeError:\n filepath = None\n name = self._name\n\n if filepath is None and name is None:\n return None\n elif filepath is None:\n filepath = \"\"\n\n return \":\".join([filepath, \"docstring of %s\" % name])\n\n def _escape_args_and_kwargs(self, name: str) -> str:\n func = super()._escape_args_and_kwargs\n\n if \", \" in name:\n return \", \".join(func(param) for param in name.split(\", \"))\n else:\n return func(name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_desc_annotation_TexinfoTranslator.visit_desc_annotation.if_self_descs_and_txt_.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_desc_annotation_TexinfoTranslator.visit_desc_annotation.if_self_descs_and_txt_.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1459, "end_line": 1468, "span_ids": ["TexinfoTranslator.visit_desc_annotation"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_desc_annotation(self, node: Element) -> None:\n # Try to avoid duplicating info already displayed by the deffn category.\n # e.g.\n # @deffn {Class} Foo\n # -- instead of --\n # @deffn {Class} class Foo\n txt = node.astext().strip()\n if ((self.descs and txt == self.descs[-1]['objtype']) or\n (self.desc_type_name and txt in self.desc_type_name.split())):\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-circular/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-circular/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-circular/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/TYPE_CHECKING.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/TYPE_CHECKING.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/TYPE_CHECKING.py", "file_name": "TYPE_CHECKING.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["imports:2", "impl", "Foo", "imports"], "tokens": 29}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n from io import StringIO\n\n\nclass Foo:\n attr1: \"StringIO\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/cached_property.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/cached_property.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/cached_property.py", "file_name": "cached_property.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["Foo", "imports", "Foo.prop"], "tokens": 26}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from functools import cached_property\n\n\nclass Foo:\n @cached_property\n def prop(self) -> int:\n return 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/enums.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/enums.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/enums.py", "file_name": "enums.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["EnumCls.say_hello", "EnumCls", "imports", "EnumCls.say_goodbye"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import enum\n\n\nclass EnumCls(enum.Enum):\n \"\"\"\n this is enum class\n \"\"\"\n\n #: doc for val1\n val1 = 12\n val2 = 23 #: doc for val2\n val3 = 34\n \"\"\"doc for val3\"\"\"\n val4 = 34\n\n def say_hello(self):\n \"\"\"a method says hello to you.\"\"\"\n pass\n\n @classmethod\n def say_goodbye(cls):\n \"\"\"a classmethod says good-bye to you.\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/generic_class.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/generic_class.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/generic_class.py", "file_name": "generic_class.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 12, "span_ids": ["impl", "imports", "A"], "tokens": 64}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from typing import Generic, TypeVar\n\nT = TypeVar('T')\n\n\n# Test that typing.Generic's __new__ method does not mask our class'\n# __init__ signature.\nclass A(Generic[T]):\n \"\"\"docstring for A\"\"\"\n def __init__(self, a, b=None):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary/autosummary_dummy_module.py_from_os_import_path_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary/autosummary_dummy_module.py_from_os_import_path_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary/autosummary_dummy_module.py", "file_name": "autosummary_dummy_module.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 63, "span_ids": ["bar", "impl", "impl:8", "impl:7", "_Exc", "docstring", "Foo", "_quux", "Exc", "Foo.__init__", "Foo.baz", "_Baz", "imports", "Foo.__init__:2", "Foo.bar", "imports:2", "Foo.Bar"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from os import path # NOQA\nfrom typing import Union\n\n__all__ = [\n \"CONSTANT1\",\n \"Exc\",\n \"Foo\",\n \"_Baz\",\n \"bar\",\n \"qux\",\n \"path\",\n]\n\n#: module variable\nCONSTANT1 = None\nCONSTANT2 = None\n\n\nclass Foo:\n #: class variable\n CONSTANT3 = None\n CONSTANT4 = None\n\n class Bar:\n pass\n\n def __init__(self):\n #: docstring\n self.value = 1\n\n def bar(self):\n pass\n\n @property\n def baz(self):\n pass\n\n\nclass _Baz:\n pass\n\n\ndef bar(x: Union[int, str], y: int = 1) -> None:\n pass\n\n\ndef _quux():\n pass\n\n\nclass Exc(Exception):\n pass\n\n\nclass _Exc(Exception):\n pass\n\n\n#: a module-level attribute\nqux = 2\n#: a module-level attribute that has been excluded from __all__\nquuz = 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-filename-map/autosummary_dummy_module.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-filename-map/autosummary_dummy_module.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-filename-map/autosummary_dummy_module.py", "file_name": "autosummary_dummy_module.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["bar", "docstring", "Foo", "Foo.__init__", "Foo.baz", "imports", "Foo.__init__:2", "Foo.bar", "imports:2", "Foo.Bar"], "tokens": 75}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from os import path # NOQA\nfrom typing import Union\n\n\nclass Foo:\n class Bar:\n pass\n\n def __init__(self):\n pass\n\n def bar(self):\n pass\n\n @property\n def baz(self):\n pass\n\n\ndef bar(x: Union[int, str], y: int = 1) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-filename-map/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autosummary-filename-map/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autosummary-filename-map/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 12, "span_ids": ["impl", "imports"], "tokens": 68}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('.'))\n\nextensions = ['sphinx.ext.autosummary']\nautosummary_generate = True\nautosummary_filename_map = {\n \"autosummary_dummy_module\": \"module_mangled\",\n \"autosummary_dummy_module.bar\": \"bar\"\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-linkcheck-localserver/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-numbered-circular/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-numbered-circular/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-numbered-circular/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-theming/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-theming/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-theming/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl"], "tokens": 24}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "html_theme = 'test-theme'\nhtml_theme_path = ['.', 'test_theme']\nexclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-theming/setup.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-theming/setup.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-theming/setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 12, "span_ids": ["impl", "imports"], "tokens": 51}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from setuptools import find_packages, setup\n\nsetup(\n name='test-theme',\n packages=find_packages(),\n include_package_data=True,\n entry_points=\"\"\"\n [sphinx_themes]\n path = test_theme:get_path\n \"\"\",\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-theming/test_theme/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-theming/test_theme/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-theming/test_theme/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 6, "span_ids": ["get_path", "imports"], "tokens": 18}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\n\ndef get_path():\n return os.path.dirname(os.path.abspath(__file__))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_gettext_template_test_gettext_template_msgid_order_in_sphinxpot.assert_re_search_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_gettext_template_test_gettext_template_msgid_order_in_sphinxpot.assert_re_search_", "embedding": null, "metadata": {"file_path": "tests/test_build_gettext.py", "file_name": "test_build_gettext.py", "file_type": "text/x-python", "category": "test", "start_line": 154, "end_line": 176, "span_ids": ["test_gettext_template_msgid_order_in_sphinxpot", "test_gettext_template"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('gettext', testroot='intl', srcdir='gettext')\ndef test_gettext_template(app):\n app.builder.build_all()\n assert (app.outdir / 'sphinx.pot').isfile()\n\n result = (app.outdir / 'sphinx.pot').read_text()\n assert \"Welcome\" in result\n assert \"Sphinx %(version)s\" in result\n\n\n@pytest.mark.sphinx('gettext', testroot='gettext-template')\ndef test_gettext_template_msgid_order_in_sphinxpot(app):\n app.builder.build_all()\n assert (app.outdir / 'sphinx.pot').isfile()\n\n result = (app.outdir / 'sphinx.pot').read_text()\n assert re.search(\n ('msgid \"Template 1\".*'\n 'msgid \"This is Template 1\\\\.\".*'\n 'msgid \"Template 2\".*'\n 'msgid \"This is Template 2\\\\.\".*'),\n result,\n flags=re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_build_single_pot_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py_test_build_single_pot_", "embedding": null, "metadata": {"file_path": "tests/test_build_gettext.py", "file_name": "test_build_gettext.py", "file_type": "text/x-python", "category": "test", "start_line": 179, "end_line": 195, "span_ids": ["test_build_single_pot"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'gettext', srcdir='root-gettext',\n confoverrides={'gettext_compact': 'documentation'})\ndef test_build_single_pot(app):\n app.builder.build_all()\n\n assert (app.outdir / 'documentation.pot').isfile()\n\n result = (app.outdir / 'documentation.pot').read_text()\n assert re.search(\n ('msgid \"Todo\".*'\n 'msgid \"Like footnotes.\".*'\n 'msgid \"The minute.\".*'\n 'msgid \"Generated section\".*'),\n result,\n flags=re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_cached_property_test_autodoc_cached_property.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_cached_property_test_autodoc_cached_property.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1067, "end_line": 1084, "span_ids": ["test_autodoc_cached_property"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8),\n reason='cached_property is available since python3.8.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_cached_property(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'class', 'target.cached_property.Foo', options)\n assert list(actual) == [\n '',\n '.. py:class:: Foo()',\n ' :module: target.cached_property',\n '',\n '',\n ' .. py:property:: Foo.prop',\n ' :module: target.cached_property',\n ' :type: int',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_typed_inherited_instance_variables_test_autodoc_typed_inherited_instance_variables.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_typed_inherited_instance_variables_test_autodoc_typed_inherited_instance_variables.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1788, "end_line": 1847, "span_ids": ["test_autodoc_typed_inherited_instance_variables"], "tokens": 430}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_typed_inherited_instance_variables(app):\n options = {\"members\": None,\n \"undoc-members\": None,\n \"inherited-members\": None}\n actual = do_autodoc(app, 'class', 'target.typed_vars.Derived', options)\n assert list(actual) == [\n '',\n '.. py:class:: Derived()',\n ' :module: target.typed_vars',\n '',\n '',\n ' .. py:attribute:: Derived.attr1',\n ' :module: target.typed_vars',\n ' :type: int',\n ' :value: 0',\n '',\n '',\n ' .. py:attribute:: Derived.attr2',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n '',\n ' .. py:attribute:: Derived.attr3',\n ' :module: target.typed_vars',\n ' :type: int',\n ' :value: 0',\n '',\n '',\n ' .. py:attribute:: Derived.attr4',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ' attr4',\n '',\n '',\n ' .. py:attribute:: Derived.attr5',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ' attr5',\n '',\n '',\n ' .. py:attribute:: Derived.attr6',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ' attr6',\n '',\n '',\n ' .. py:attribute:: Derived.attr7',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n '',\n ' .. py:attribute:: Derived.descr4',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_TYPE_CHECKING_test_autodoc_TYPE_CHECKING.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_TYPE_CHECKING_test_autodoc_TYPE_CHECKING.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2019, "end_line": 2037, "span_ids": ["test_autodoc_TYPE_CHECKING"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_TYPE_CHECKING(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.TYPE_CHECKING', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.TYPE_CHECKING',\n '',\n '',\n '.. py:class:: Foo()',\n ' :module: target.TYPE_CHECKING',\n '',\n '',\n ' .. py:attribute:: Foo.attr1',\n ' :module: target.TYPE_CHECKING',\n ' :type: StringIO',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_private_members.py_test_private_field_and_private_members_test_private_field_and_private_members.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_private_members.py_test_private_field_and_private_members_test_private_field_and_private_members.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_private_members.py", "file_name": "test_ext_autodoc_private_members.py", "file_type": "text/x-python", "category": "test", "start_line": 43, "end_line": 83, "span_ids": ["test_private_field_and_private_members"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_private_field_and_private_members(app):\n app.config.autoclass_content = 'class'\n options = {\"members\": None,\n \"private-members\": None}\n actual = do_autodoc(app, 'module', 'target.private', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.private',\n '',\n '',\n '.. py:data:: PRIVATE_CONSTANT',\n ' :module: target.private',\n ' :value: None',\n '',\n ' :meta private:',\n '',\n '',\n '.. py:data:: _PUBLIC_CONSTANT',\n ' :module: target.private',\n ' :value: None',\n '',\n ' :meta public:',\n '',\n '',\n '.. py:function:: _public_function(name)',\n ' :module: target.private',\n '',\n ' public_function is a docstring().',\n '',\n ' :meta public:',\n '',\n '',\n '.. py:function:: private_function(name)',\n ' :module: target.private',\n '',\n ' private_function is a docstring().',\n '',\n ' :meta private:',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_private_members.py_test_private_members_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_private_members.py_test_private_members_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_private_members.py", "file_name": "test_ext_autodoc_private_members.py", "file_type": "text/x-python", "category": "test", "start_line": 86, "end_line": 112, "span_ids": ["test_private_members"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_private_members(app):\n app.config.autoclass_content = 'class'\n options = {\"members\": None,\n \"private-members\": \"_PUBLIC_CONSTANT,_public_function\"}\n actual = do_autodoc(app, 'module', 'target.private', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.private',\n '',\n '',\n '.. py:data:: _PUBLIC_CONSTANT',\n ' :module: target.private',\n ' :value: None',\n '',\n ' :meta public:',\n '',\n '',\n '.. py:function:: _public_function(name)',\n ' :module: target.private',\n '',\n ' public_function is a docstring().',\n '',\n ' :meta public:',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_test_autosummary_generate.None_14": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_test_autosummary_generate.None_14", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 306, "end_line": 376, "span_ids": ["test_autosummary_generate"], "tokens": 830}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='ext-autosummary')\ndef test_autosummary_generate(app, status, warning):\n app.builder.build_all()\n\n doctree = app.env.get_doctree('index')\n assert_node(doctree, (nodes.paragraph,\n nodes.paragraph,\n addnodes.tabular_col_spec,\n autosummary_table,\n [autosummary_toc, addnodes.toctree]))\n assert_node(doctree[3],\n [autosummary_table, nodes.table, nodes.tgroup, (nodes.colspec,\n nodes.colspec,\n [nodes.tbody, (nodes.row,\n nodes.row,\n nodes.row,\n nodes.row,\n nodes.row,\n nodes.row)])])\n assert_node(doctree[4][0], addnodes.toctree, caption=\"An autosummary\")\n\n assert len(doctree[3][0][0][2]) == 6\n assert doctree[3][0][0][2][0].astext() == 'autosummary_dummy_module\\n\\n'\n assert doctree[3][0][0][2][1].astext() == 'autosummary_dummy_module.Foo()\\n\\n'\n assert doctree[3][0][0][2][2].astext() == 'autosummary_dummy_module.Foo.Bar()\\n\\n'\n assert doctree[3][0][0][2][3].astext() == 'autosummary_dummy_module.Foo.value\\n\\ndocstring'\n assert doctree[3][0][0][2][4].astext() == 'autosummary_dummy_module.bar(x[, y])\\n\\n'\n assert doctree[3][0][0][2][5].astext() == 'autosummary_dummy_module.qux\\n\\na module-level attribute'\n\n module = (app.srcdir / 'generated' / 'autosummary_dummy_module.rst').read_text()\n\n assert (' .. autosummary::\\n'\n ' \\n'\n ' Foo\\n'\n ' \\n' in module)\n assert (' .. autosummary::\\n'\n ' \\n'\n ' CONSTANT1\\n'\n ' qux\\n'\n ' quuz\\n'\n ' \\n' in module)\n\n Foo = (app.srcdir / 'generated' / 'autosummary_dummy_module.Foo.rst').read_text()\n assert '.. automethod:: __init__' in Foo\n assert (' .. autosummary::\\n'\n ' \\n'\n ' ~Foo.__init__\\n'\n ' ~Foo.bar\\n'\n ' \\n' in Foo)\n assert (' .. autosummary::\\n'\n ' \\n'\n ' ~Foo.CONSTANT3\\n'\n ' ~Foo.CONSTANT4\\n'\n ' ~Foo.baz\\n'\n ' ~Foo.value\\n'\n ' \\n' in Foo)\n\n FooBar = (app.srcdir / 'generated' / 'autosummary_dummy_module.Foo.Bar.rst').read_text()\n assert ('.. currentmodule:: autosummary_dummy_module\\n'\n '\\n'\n '.. autoclass:: Foo.Bar\\n' in FooBar)\n\n Foo_value = (app.srcdir / 'generated' / 'autosummary_dummy_module.Foo.value.rst').read_text()\n assert ('.. currentmodule:: autosummary_dummy_module\\n'\n '\\n'\n '.. autoattribute:: Foo.value' in Foo_value)\n\n qux = (app.srcdir / 'generated' / 'autosummary_dummy_module.qux.rst').read_text()\n assert ('.. currentmodule:: autosummary_dummy_module\\n'\n '\\n'\n '.. autodata:: qux' in qux)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_filename_map_test_autosummary_latex_table_colspec.assert_r_p_0_5_linewidth_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_filename_map_test_autosummary_latex_table_colspec.assert_r_p_0_5_linewidth_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 404, "end_line": 425, "span_ids": ["test_autosummary_latex_table_colspec", "test_autosummary_filename_map"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='ext-autosummary-filename-map')\ndef test_autosummary_filename_map(app, status, warning):\n app.build()\n\n assert (app.srcdir / 'generated' / 'module_mangled.rst').exists()\n assert not (app.srcdir / 'generated' / 'autosummary_dummy_module.rst').exists()\n assert (app.srcdir / 'generated' / 'bar.rst').exists()\n assert not (app.srcdir / 'generated' / 'autosummary_dummy_module.bar.rst').exists()\n assert (app.srcdir / 'generated' / 'autosummary_dummy_module.Foo.rst').exists()\n\n html_warnings = app._warning.getvalue()\n assert html_warnings == ''\n\n\n@pytest.mark.sphinx('latex', **default_kw)\ndef test_autosummary_latex_table_colspec(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(status.getvalue())\n print(warning.getvalue())\n assert r'\\begin{longtable}[c]{\\X{1}{2}\\X{1}{2}}' in result\n assert r'p{0.5\\linewidth}' not in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_import_by_name_test_import_by_name.None_14": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_import_by_name_test_import_by_name.None_14", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 428, "end_line": 449, "span_ids": ["test_import_by_name"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_by_name():\n import sphinx\n import sphinx.ext.autosummary\n\n prefixed_name, obj, parent, modname = import_by_name('sphinx')\n assert prefixed_name == 'sphinx'\n assert obj is sphinx\n assert parent is None\n assert modname == 'sphinx'\n\n prefixed_name, obj, parent, modname = import_by_name('sphinx.ext.autosummary.__name__')\n assert prefixed_name == 'sphinx.ext.autosummary.__name__'\n assert obj is sphinx.ext.autosummary.__name__\n assert parent is sphinx.ext.autosummary\n assert modname == 'sphinx.ext.autosummary'\n\n prefixed_name, obj, parent, modname = \\\n import_by_name('sphinx.ext.autosummary.Autosummary.get_items')\n assert prefixed_name == 'sphinx.ext.autosummary.Autosummary.get_items'\n assert obj == sphinx.ext.autosummary.Autosummary.get_items\n assert parent is sphinx.ext.autosummary.Autosummary\n assert modname == 'sphinx.ext.autosummary'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_noindex_GoogleDocstringTest.test_keywords_with_types.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_noindex_GoogleDocstringTest.test_keywords_with_types.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1051, "end_line": 1093, "span_ids": ["GoogleDocstringTest.test_noindex", "GoogleDocstringTest.test_keywords_with_types"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_noindex(self):\n docstring = \"\"\"\nAttributes:\n arg\n description\n\nMethods:\n func(i, j)\n description\n\"\"\"\n\n expected = \"\"\"\n.. attribute:: arg\n :noindex:\n\n description\n\n.. method:: func(i, j)\n :noindex:\n\n \n description\n\"\"\" # NOQA\n config = Config()\n actual = str(GoogleDocstring(docstring, config=config, app=None, what='module',\n options={'noindex': True}))\n self.assertEqual(expected, actual)\n\n def test_keywords_with_types(self):\n docstring = \"\"\"\\\nDo as you please\n\nKeyword Args:\n gotham_is_yours (None): shall interfere.\n\"\"\"\n actual = str(GoogleDocstring(docstring))\n expected = \"\"\"\\\nDo as you please\n\n:keyword gotham_is_yours: shall interfere.\n:kwtype gotham_is_yours: None\n\"\"\"\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_docstrings_NumpyDocstringTest.test_type_preprocessor.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_docstrings_NumpyDocstringTest.test_type_preprocessor.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1310, "end_line": 1340, "span_ids": ["NumpyDocstringTest.test_type_preprocessor", "NumpyDocstringTest.test_docstrings"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_docstrings(self):\n config = Config(\n napoleon_use_param=False,\n napoleon_use_rtype=False,\n napoleon_use_keyword=False,\n napoleon_preprocess_types=True)\n for docstring, expected in self.docstrings:\n actual = str(NumpyDocstring(dedent(docstring), config))\n expected = dedent(expected)\n self.assertEqual(expected, actual)\n\n def test_type_preprocessor(self):\n docstring = dedent(\"\"\"\n Single line summary\n\n Parameters\n ----------\n arg1:str\n Extended\n description of arg1\n \"\"\")\n\n config = Config(napoleon_preprocess_types=False, napoleon_use_param=False)\n actual = str(NumpyDocstring(docstring, config))\n expected = dedent(\"\"\"\n Single line summary\n\n :Parameters: **arg1** (*str*) -- Extended\n description of arg1\n \"\"\")\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_parameters_with_class_reference_NumpyDocstringTest.test_parameters_with_class_reference.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_parameters_with_class_reference_NumpyDocstringTest.test_parameters_with_class_reference.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1498, "end_line": 1528, "span_ids": ["NumpyDocstringTest.test_parameters_with_class_reference"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_parameters_with_class_reference(self):\n docstring = \"\"\"\\\nParameters\n----------\nparam1 : :class:`MyClass <name.space.MyClass>` instance\n\nOther Parameters\n----------------\nparam2 : :class:`MyClass <name.space.MyClass>` instance\n\n\"\"\"\n\n config = Config(napoleon_use_param=False)\n actual = str(NumpyDocstring(docstring, config))\n expected = \"\"\"\\\n:Parameters: **param1** (:class:`MyClass <name.space.MyClass>` instance)\n\n:Other Parameters: **param2** (:class:`MyClass <name.space.MyClass>` instance)\n\"\"\"\n self.assertEqual(expected, actual)\n\n config = Config(napoleon_use_param=True)\n actual = str(NumpyDocstring(docstring, config))\n expected = \"\"\"\\\n:param param1:\n:type param1: :class:`MyClass <name.space.MyClass>` instance\n\n:param param2:\n:type param2: :class:`MyClass <name.space.MyClass>` instance\n\"\"\"\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_multiple_parameters_NumpyDocstringTest.test_multiple_parameters.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_multiple_parameters_NumpyDocstringTest.test_multiple_parameters.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1365, "end_line": 1389, "span_ids": ["NumpyDocstringTest.test_multiple_parameters"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_multiple_parameters(self):\n docstring = \"\"\"\\\nParameters\n----------\nx1, x2 : array_like\n Input arrays, description of ``x1``, ``x2``.\n\n\"\"\"\n\n config = Config(napoleon_use_param=False)\n actual = str(NumpyDocstring(docstring, config))\n expected = \"\"\"\\\n:Parameters: **x1, x2** (*array_like*) -- Input arrays, description of ``x1``, ``x2``.\n\"\"\"\n self.assertEqual(expected, actual)\n\n config = Config(napoleon_use_param=True)\n actual = str(NumpyDocstring(dedent(docstring), config))\n expected = \"\"\"\\\n:param x1: Input arrays, description of ``x1``, ``x2``.\n:type x1: array_like\n:param x2: Input arrays, description of ``x1``, ``x2``.\n:type x2: array_like\n\"\"\"\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_list_in_parameter_description.expected_4_NumpyDocstringTest.test_list_in_parameter_description.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_list_in_parameter_description.expected_4_NumpyDocstringTest.test_list_in_parameter_description.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1978, "end_line": 2068, "span_ids": ["NumpyDocstringTest.test_list_in_parameter_description"], "tokens": 531}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_list_in_parameter_description(self):\n # ... other code\n\n expected = \"\"\"One line summary.\n\n:Parameters: * **no_list** (:class:`int`)\n * **one_bullet_empty** (:class:`int`) --\n\n *\n * **one_bullet_single_line** (:class:`int`) --\n\n - first line\n * **one_bullet_two_lines** (:class:`int`) --\n\n + first line\n continued\n * **two_bullets_single_line** (:class:`int`) --\n\n - first line\n - second line\n * **two_bullets_two_lines** (:class:`int`) --\n\n * first line\n continued\n * second line\n continued\n * **one_enumeration_single_line** (:class:`int`) --\n\n 1. first line\n * **one_enumeration_two_lines** (:class:`int`) --\n\n 1) first line\n continued\n * **two_enumerations_one_line** (:class:`int`) --\n\n (iii) first line\n (iv) second line\n * **two_enumerations_two_lines** (:class:`int`) --\n\n a. first line\n continued\n b. second line\n continued\n * **one_definition_one_line** (:class:`int`) --\n\n item 1\n first line\n * **one_definition_two_lines** (:class:`int`) --\n\n item 1\n first line\n continued\n * **two_definitions_one_line** (:class:`int`) --\n\n item 1\n first line\n item 2\n second line\n * **two_definitions_two_lines** (:class:`int`) --\n\n item 1\n first line\n continued\n item 2\n second line\n continued\n * **one_definition_blank_line** (:class:`int`) --\n\n item 1\n\n first line\n\n extra first line\n * **two_definitions_blank_lines** (:class:`int`) --\n\n item 1\n\n first line\n\n extra first line\n\n item 2\n\n second line\n\n extra second line\n * **definition_after_normal_text** (:class:`int`) -- text line\n\n item 1\n first line\n\"\"\"\n config = Config(napoleon_use_param=False, napoleon_preprocess_types=True)\n actual = str(NumpyDocstring(docstring, config))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_token_type_NumpyDocstringTest.test_token_type.for_token_expected_in_to.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_token_type_NumpyDocstringTest.test_token_type.for_token_expected_in_to.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 2070, "end_line": 2093, "span_ids": ["NumpyDocstringTest.test_token_type"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_token_type(self):\n tokens = (\n (\"1\", \"literal\"),\n (\"-4.6\", \"literal\"),\n (\"2j\", \"literal\"),\n (\"'string'\", \"literal\"),\n ('\"another_string\"', \"literal\"),\n (\"{1, 2}\", \"literal\"),\n (\"{'va{ue', 'set'}\", \"literal\"),\n (\"optional\", \"control\"),\n (\"default\", \"control\"),\n (\", \", \"delimiter\"),\n (\" of \", \"delimiter\"),\n (\" or \", \"delimiter\"),\n (\": \", \"delimiter\"),\n (\"True\", \"obj\"),\n (\"None\", \"obj\"),\n (\"name\", \"obj\"),\n (\":py:class:`Enum`\", \"reference\"),\n )\n\n for token, expected in tokens:\n actual = _token_type(token)\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_tokenize_type_spec_NumpyDocstringTest.test_tokenize_type_spec.for_spec_expected_in_zip.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_tokenize_type_spec_NumpyDocstringTest.test_tokenize_type_spec.for_spec_expected_in_zip.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 2198, "end_line": 2233, "span_ids": ["NumpyDocstringTest.test_tokenize_type_spec"], "tokens": 390}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_tokenize_type_spec(self):\n specs = (\n \"str\",\n \"defaultdict\",\n \"int, float, or complex\",\n \"int or float or None, optional\",\n '{\"F\", \"C\", \"N\"}',\n \"{'F', 'C', 'N'}, default: 'F'\",\n \"{'F', 'C', 'N or C'}, default 'F'\",\n \"str, default: 'F or C'\",\n \"int, default: None\",\n \"int, default None\",\n \"int, default :obj:`None`\",\n '\"ma{icious\"',\n r\"'with \\'quotes\\''\",\n )\n\n tokens = (\n [\"str\"],\n [\"defaultdict\"],\n [\"int\", \", \", \"float\", \", or \", \"complex\"],\n [\"int\", \" or \", \"float\", \" or \", \"None\", \", \", \"optional\"],\n [\"{\", '\"F\"', \", \", '\"C\"', \", \", '\"N\"', \"}\"],\n [\"{\", \"'F'\", \", \", \"'C'\", \", \", \"'N'\", \"}\", \", \", \"default\", \": \", \"'F'\"],\n [\"{\", \"'F'\", \", \", \"'C'\", \", \", \"'N or C'\", \"}\", \", \", \"default\", \" \", \"'F'\"],\n [\"str\", \", \", \"default\", \": \", \"'F or C'\"],\n [\"int\", \", \", \"default\", \": \", \"None\"],\n [\"int\", \", \", \"default\", \" \", \"None\"],\n [\"int\", \", \", \"default\", \" \", \":obj:`None`\"],\n ['\"ma{icious\"'],\n [r\"'with \\'quotes\\''\"],\n )\n\n for spec, expected in zip(specs, tokens):\n actual = _tokenize_type_spec(spec)\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_recombine_set_tokens_NumpyDocstringTest.test_recombine_set_tokens.for_tokens__expected_in_.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_recombine_set_tokens_NumpyDocstringTest.test_recombine_set_tokens.for_tokens__expected_in_.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 2132, "end_line": 2149, "span_ids": ["NumpyDocstringTest.test_recombine_set_tokens"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_recombine_set_tokens(self):\n tokens = (\n [\"{\", \"1\", \", \", \"2\", \"}\"],\n [\"{\", '\"F\"', \", \", '\"C\"', \", \", '\"N\"', \"}\", \", \", \"optional\"],\n [\"{\", \"'F'\", \", \", \"'C'\", \", \", \"'N'\", \"}\", \", \", \"default\", \": \", \"None\"],\n [\"{\", \"'F'\", \", \", \"'C'\", \", \", \"'N'\", \"}\", \", \", \"default\", \" \", \"None\"],\n )\n\n combined_tokens = (\n [\"{1, 2}\"],\n ['{\"F\", \"C\", \"N\"}', \", \", \"optional\"],\n [\"{'F', 'C', 'N'}\", \", \", \"default\", \": \", \"None\"],\n [\"{'F', 'C', 'N'}\", \", \", \"default\", \" \", \"None\"],\n )\n\n for tokens_, expected in zip(tokens, combined_tokens):\n actual = _recombine_set_tokens(tokens_)\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_recombine_set_tokens_invalid_NumpyDocstringTest.test_recombine_set_tokens_invalid.for_tokens__expected_in_.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_recombine_set_tokens_invalid_NumpyDocstringTest.test_recombine_set_tokens_invalid.for_tokens__expected_in_.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 2151, "end_line": 2165, "span_ids": ["NumpyDocstringTest.test_recombine_set_tokens_invalid"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_recombine_set_tokens_invalid(self):\n tokens = (\n [\"{\", \"1\", \", \", \"2\"],\n ['\"F\"', \", \", '\"C\"', \", \", '\"N\"', \"}\", \", \", \"optional\"],\n [\"{\", \"1\", \", \", \"2\", \", \", \"default\", \": \", \"None\"],\n )\n combined_tokens = (\n [\"{1, 2\"],\n ['\"F\"', \", \", '\"C\"', \", \", '\"N\"', \"}\", \", \", \"optional\"],\n [\"{1, 2\", \", \", \"default\", \": \", \"None\"],\n )\n\n for tokens_, expected in zip(tokens, combined_tokens):\n actual = _recombine_set_tokens(tokens_)\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_convert_numpy_type_spec_NumpyDocstringTest.test_convert_numpy_type_spec.for_spec_expected_in_zip.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_convert_numpy_type_spec_NumpyDocstringTest.test_convert_numpy_type_spec.for_spec_expected_in_zip.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 2167, "end_line": 2198, "span_ids": ["NumpyDocstringTest.test_convert_numpy_type_spec"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_convert_numpy_type_spec(self):\n translations = {\n \"DataFrame\": \"pandas.DataFrame\",\n }\n\n specs = (\n \"\",\n \"optional\",\n \"str, optional\",\n \"int or float or None, default: None\",\n \"int, default None\",\n '{\"F\", \"C\", \"N\"}',\n \"{'F', 'C', 'N'}, default: 'N'\",\n \"{'F', 'C', 'N'}, default 'N'\",\n \"DataFrame, optional\",\n )\n\n converted = (\n \"\",\n \"*optional*\",\n \":class:`str`, *optional*\",\n \":class:`int` or :class:`float` or :obj:`None`, *default*: :obj:`None`\",\n \":class:`int`, *default* :obj:`None`\",\n '``{\"F\", \"C\", \"N\"}``',\n \"``{'F', 'C', 'N'}``, *default*: ``'N'``\",\n \"``{'F', 'C', 'N'}``, *default* ``'N'``\",\n \":class:`pandas.DataFrame`, *optional*\",\n )\n\n for spec, expected in zip(specs, converted):\n actual = _convert_numpy_type_spec(spec, translations=translations)\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_parameter_types_NumpyDocstringTest.test_parameter_types.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_parameter_types_NumpyDocstringTest.test_parameter_types.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 2200, "end_line": 2251, "span_ids": ["NumpyDocstringTest.test_parameter_types"], "tokens": 536}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_parameter_types(self):\n docstring = dedent(\"\"\"\\\n Parameters\n ----------\n param1 : DataFrame\n the data to work on\n param2 : int or float or None, optional\n a parameter with different types\n param3 : dict-like, optional\n a optional mapping\n param4 : int or float or None, optional\n a optional parameter with different types\n param5 : {\"F\", \"C\", \"N\"}, optional\n a optional parameter with fixed values\n param6 : int, default None\n different default format\n param7 : mapping of hashable to str, optional\n a optional mapping\n param8 : ... or Ellipsis\n ellipsis\n \"\"\")\n expected = dedent(\"\"\"\\\n :param param1: the data to work on\n :type param1: :class:`DataFrame`\n :param param2: a parameter with different types\n :type param2: :class:`int` or :class:`float` or :obj:`None`, *optional*\n :param param3: a optional mapping\n :type param3: :term:`dict-like <mapping>`, *optional*\n :param param4: a optional parameter with different types\n :type param4: :class:`int` or :class:`float` or :obj:`None`, *optional*\n :param param5: a optional parameter with fixed values\n :type param5: ``{\"F\", \"C\", \"N\"}``, *optional*\n :param param6: different default format\n :type param6: :class:`int`, *default* :obj:`None`\n :param param7: a optional mapping\n :type param7: :term:`mapping` of :term:`hashable` to :class:`str`, *optional*\n :param param8: ellipsis\n :type param8: :obj:`... <Ellipsis>` or :obj:`Ellipsis`\n \"\"\")\n translations = {\n \"dict-like\": \":term:`dict-like <mapping>`\",\n \"mapping\": \":term:`mapping`\",\n \"hashable\": \":term:`hashable`\",\n }\n config = Config(\n napoleon_use_param=True,\n napoleon_use_rtype=True,\n napoleon_preprocess_types=True,\n napoleon_type_aliases=translations,\n )\n actual = str(NumpyDocstring(docstring, config))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_warns_TestNumpyDocstring.test_token_type_invalid.for_token_error_in_zip_t.with_warns_warning_match._token_type_token_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_warns_TestNumpyDocstring.test_token_type_invalid.for_token_error_in_zip_t.with_warns_warning_match._token_type_token_", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 2254, "end_line": 2287, "span_ids": ["TestNumpyDocstring.test_token_type_invalid", "TestNumpyDocstring", "warns"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef warns(warning, match):\n match_re = re.compile(match)\n try:\n yield warning\n finally:\n raw_warnings = warning.getvalue()\n warnings = [w for w in raw_warnings.split(\"\\n\") if w.strip()]\n\n assert len(warnings) == 1 and all(match_re.match(w) for w in warnings)\n warning.truncate(0)\n\n\nclass TestNumpyDocstring:\n def test_token_type_invalid(self, warning):\n tokens = (\n \"{1, 2\",\n \"}\",\n \"'abc\",\n \"def'\",\n '\"ghi',\n 'jkl\"',\n )\n errors = (\n r\".+: invalid value set \\(missing closing brace\\):\",\n r\".+: invalid value set \\(missing opening brace\\):\",\n r\".+: malformed string literal \\(missing closing quote\\):\",\n r\".+: malformed string literal \\(missing opening quote\\):\",\n r\".+: malformed string literal \\(missing closing quote\\):\",\n r\".+: malformed string literal \\(missing opening quote\\):\",\n )\n for token, error in zip(tokens, errors):\n with warns(warning, match=error):\n _token_type(token)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.emit_firstresult_Sphinx.emit_firstresult.return.self_events_emit_firstres": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.emit_firstresult_Sphinx.emit_firstresult.return.self_events_emit_firstres", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 441, "end_line": 457, "span_ids": ["Sphinx.emit_firstresult"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def emit_firstresult(self, event: str, *args: Any,\n allowed_exceptions: Tuple[Type[Exception], ...] = ()) -> Any:\n \"\"\"Emit *event* and pass *arguments* to the callback functions.\n\n Return the result of the first callback that doesn't return ``None``.\n\n :param event: The name of event that will be emitted\n :param args: The arguments for the event\n :param allowed_exceptions: The list of exceptions that are allowed in the callbacks\n\n .. versionadded:: 0.5\n .. versionchanged:: 3.1\n\n Added *allowed_exceptions* to specify path-through exceptions\n \"\"\"\n return self.events.emit_firstresult(event, *args,\n allowed_exceptions=allowed_exceptions)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._registering_addon_parts_Sphinx._TODO_stephenfin_Descr": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._registering_addon_parts_Sphinx._TODO_stephenfin_Descr", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 459, "end_line": 473, "span_ids": ["Sphinx.add_builder", "Sphinx.emit_firstresult"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n # registering addon parts\n\n def add_builder(self, builder: Type[\"Builder\"], override: bool = False) -> None:\n \"\"\"Register a new builder.\n\n :param builder: A builder class\n :param override: If true, install the builder forcedly even if another builder\n is already installed as the same name\n\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n self.registry.add_builder(builder, override=override)\n\n # TODO(stephenfin): Describe 'types' parameter", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_source_suffix_Sphinx.add_source_suffix.self_registry_add_source_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_source_suffix_Sphinx.add_source_suffix.self_registry_add_source_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1162, "end_line": 1173, "span_ids": ["Sphinx.add_source_suffix"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_source_suffix(self, suffix: str, filetype: str, override: bool = False) -> None:\n \"\"\"Register a suffix of source files.\n\n Same as :confval:`source_suffix`. The users can override this\n using the config setting.\n\n If *override* is True, the given *suffix* is forcedly installed even if\n the same suffix is already installed.\n\n .. versionadded:: 1.8\n \"\"\"\n self.registry.add_source_suffix(suffix, filetype, override=override)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_source_parser_Sphinx.add_source_parser.self_registry_add_source_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_source_parser_Sphinx.add_source_parser.self_registry_add_source_", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1175, "end_line": 1188, "span_ids": ["Sphinx.add_source_parser"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_source_parser(self, parser: Type[Parser], override: bool = False) -> None:\n \"\"\"Register a parser class.\n\n If *override* is True, the given *parser* is forcedly installed even if\n a parser for the same suffix is already installed.\n\n .. versionadded:: 1.4\n .. versionchanged:: 1.8\n *suffix* argument is deprecated. It only accepts *parser* argument.\n Use :meth:`add_source_suffix` API to register suffix instead.\n .. versionchanged:: 1.8\n Add *override* keyword.\n \"\"\"\n self.registry.add_source_parser(parser, override=override)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_get_parser_get_parser.None_18": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_get_parser_get_parser.None_18", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 451, "end_line": 517, "span_ids": ["get_parser"], "tokens": 752}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_parser() -> argparse.ArgumentParser:\n description = __(\n \"\\n\"\n \"Generate required files for a Sphinx project.\\n\"\n \"\\n\"\n \"sphinx-quickstart is an interactive tool that asks some questions about your\\n\"\n \"project and then generates a complete documentation directory and sample\\n\"\n \"Makefile to be used with sphinx-build.\\n\"\n )\n parser = argparse.ArgumentParser(\n usage='%(prog)s [OPTIONS] <PROJECT_DIR>',\n epilog=__(\"For more information, visit <https://www.sphinx-doc.org/>.\"),\n description=description)\n\n parser.add_argument('-q', '--quiet', action='store_true', dest='quiet',\n default=None,\n help=__('quiet mode'))\n parser.add_argument('--version', action='version', dest='show_version',\n version='%%(prog)s %s' % __display_version__)\n\n parser.add_argument('path', metavar='PROJECT_DIR', default='.', nargs='?',\n help=__('project root'))\n\n group = parser.add_argument_group(__('Structure options'))\n group.add_argument('--sep', action='store_true', dest='sep', default=None,\n help=__('if specified, separate source and build dirs'))\n group.add_argument('--no-sep', action='store_false', dest='sep',\n help=__('if specified, create build dir under source dir'))\n group.add_argument('--dot', metavar='DOT', default='_',\n help=__('replacement for dot in _templates etc.'))\n\n group = parser.add_argument_group(__('Project basic options'))\n group.add_argument('-p', '--project', metavar='PROJECT', dest='project',\n help=__('project name'))\n group.add_argument('-a', '--author', metavar='AUTHOR', dest='author',\n help=__('author names'))\n group.add_argument('-v', metavar='VERSION', dest='version', default='',\n help=__('version of project'))\n group.add_argument('-r', '--release', metavar='RELEASE', dest='release',\n help=__('release of project'))\n group.add_argument('-l', '--language', metavar='LANGUAGE', dest='language',\n help=__('document language'))\n group.add_argument('--suffix', metavar='SUFFIX', default='.rst',\n help=__('source file suffix'))\n group.add_argument('--master', metavar='MASTER', default='index',\n help=__('master document name'))\n group.add_argument('--epub', action='store_true', default=False,\n help=__('use epub'))\n\n group = parser.add_argument_group(__('Extension options'))\n for ext in EXTENSIONS:\n group.add_argument('--ext-%s' % ext, action='append_const',\n const='sphinx.ext.%s' % ext, dest='extensions',\n help=__('enable %s extension') % ext)\n group.add_argument('--extensions', metavar='EXTENSIONS', dest='extensions',\n action='append', help=__('enable arbitrary extensions'))\n\n group = parser.add_argument_group(__('Makefile and Batchfile creation'))\n group.add_argument('--makefile', action='store_true', dest='makefile', default=True,\n help=__('create makefile'))\n group.add_argument('--no-makefile', action='store_false', dest='makefile',\n help=__('do not create makefile'))\n group.add_argument('--batchfile', action='store_true', dest='batchfile', default=True,\n help=__('create batchfile'))\n group.add_argument('--no-batchfile', action='store_false',\n dest='batchfile',\n help=__('do not create batchfile'))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_get_parser.group_add_argument_m__get_parser.return.parser": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_get_parser.group_add_argument_m__get_parser.return.parser", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 535, "end_line": 550, "span_ids": ["get_parser"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_parser() -> argparse.ArgumentParser:\n # ... other code\n group.add_argument('-m', '--use-make-mode', action='store_true',\n dest='make_mode', default=True,\n help=__('use make-mode for Makefile/make.bat'))\n group.add_argument('-M', '--no-use-make-mode', action='store_false',\n dest='make_mode',\n help=__('do not use make-mode for Makefile/make.bat'))\n\n group = parser.add_argument_group(__('Project templating'))\n group.add_argument('-t', '--templatedir', metavar='TEMPLATEDIR',\n dest='templatedir',\n help=__('template directory for template files'))\n group.add_argument('-d', metavar='NAME=VALUE', action='append',\n dest='variables',\n help=__('define a template variable'))\n\n return parser", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.resolve_xref_CDomain.resolve_any_xref.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.resolve_xref_CDomain.resolve_any_xref.return._", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3879, "end_line": 3893, "span_ids": ["CDomain.resolve_any_xref", "CDomain.resolve_xref"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CDomain(Domain):\n\n def resolve_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n typ: str, target: str, node: pending_xref,\n contnode: Element) -> Optional[Element]:\n return self._resolve_xref_inner(env, fromdocname, builder, typ,\n target, node, contnode)[0]\n\n def resolve_any_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n target: str, node: pending_xref, contnode: Element\n ) -> List[Tuple[str, Element]]:\n with logging.suppress_logging():\n retnode, objtype = self._resolve_xref_inner(env, fromdocname, builder,\n 'any', target, node, contnode)\n if retnode:\n return [('c:' + self.role_for_objtype(objtype), retnode)]\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.get_objects_CDomain.get_objects.for_symbol_in_rootSymbol_.yield_name_dispname_ob": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain.get_objects_CDomain.get_objects.for_symbol_in_rootSymbol_.yield_name_dispname_ob", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3800, "end_line": 3812, "span_ids": ["CDomain.get_objects"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CDomain(Domain):\n\n def get_objects(self) -> Iterator[Tuple[str, str, str, str, str, int]]:\n rootSymbol = self.data['root_symbol']\n for symbol in rootSymbol.get_all_symbols():\n if symbol.declaration is None:\n continue\n assert symbol.docname\n fullNestedName = symbol.get_full_nested_name()\n name = str(fullNestedName).lstrip('.')\n dispname = fullNestedName.get_display_string().lstrip('.')\n objectType = symbol.declaration.objectType\n docname = symbol.docname\n newestId = symbol.declaration.get_newest_id()\n yield (name, dispname, objectType, docname, newestId, 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DecoratorDocumenter__CLASS_NEW_BLACKLIST._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DecoratorDocumenter__CLASS_NEW_BLACKLIST._", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1406, "end_line": 1434, "span_ids": ["DecoratorDocumenter", "impl:24", "DecoratorDocumenter.format_args"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DecoratorDocumenter(FunctionDocumenter):\n \"\"\"\n Specialized Documenter subclass for decorator functions.\n \"\"\"\n objtype = 'decorator'\n\n # must be lower than FunctionDocumenter\n priority = -1\n\n def format_args(self, **kwargs: Any) -> Any:\n args = super().format_args(**kwargs)\n if ',' in args:\n return args\n else:\n return None\n\n\n# Types which have confusing metaclass signatures it would be best not to show.\n# These are listed by name, rather than storing the objects themselves, to avoid\n# needing to import the modules.\n_METACLASS_CALL_BLACKLIST = [\n 'enum.EnumMeta.__call__',\n]\n\n\n# Types whose __new__ signature is a pass-through.\n_CLASS_NEW_BLACKLIST = [\n 'typing.Generic.__new__',\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_Attribute__UnparseVisitor.visit_Set.return._join_self_visi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_Attribute__UnparseVisitor.visit_Set.return._join_self_visi", "embedding": null, "metadata": {"file_path": "sphinx/pycode/ast.py", "file_name": "ast.py", "file_type": "text/x-python", "category": "implementation", "start_line": 140, "end_line": 185, "span_ids": ["_UnparseVisitor.visit_Index", "_UnparseVisitor.visit_Set", "_UnparseVisitor.visit_Call", "_UnparseVisitor.visit_Attribute", "_UnparseVisitor.visit_Constant", "_UnparseVisitor.visit_List", "_UnparseVisitor.visit_BoolOp", "_UnparseVisitor.visit_Name", "_UnparseVisitor.visit_Dict", "_UnparseVisitor.visit_BinOp", "_UnparseVisitor.visit_Lambda"], "tokens": 506}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _UnparseVisitor(ast.NodeVisitor):\n\n def visit_Attribute(self, node: ast.Attribute) -> str:\n return \"%s.%s\" % (self.visit(node.value), node.attr)\n\n def visit_BinOp(self, node: ast.BinOp) -> str:\n return \" \".join(self.visit(e) for e in [node.left, node.op, node.right])\n\n def visit_BoolOp(self, node: ast.BoolOp) -> str:\n op = \" %s \" % self.visit(node.op)\n return op.join(self.visit(e) for e in node.values)\n\n def visit_Call(self, node: ast.Call) -> str:\n args = ([self.visit(e) for e in node.args] +\n [\"%s=%s\" % (k.arg, self.visit(k.value)) for k in node.keywords])\n return \"%s(%s)\" % (self.visit(node.func), \", \".join(args))\n\n def visit_Constant(self, node: ast.Constant) -> str: # type: ignore\n if node.value is Ellipsis:\n return \"...\"\n elif isinstance(node.value, (int, float, complex)):\n if self.code and sys.version_info > (3, 8):\n return ast.get_source_segment(self.code, node) # type: ignore\n else:\n return repr(node.value)\n else:\n return repr(node.value)\n\n def visit_Dict(self, node: ast.Dict) -> str:\n keys = (self.visit(k) for k in node.keys)\n values = (self.visit(v) for v in node.values)\n items = (k + \": \" + v for k, v in zip(keys, values))\n return \"{\" + \", \".join(items) + \"}\"\n\n def visit_Index(self, node: ast.Index) -> str:\n return self.visit(node.value)\n\n def visit_Lambda(self, node: ast.Lambda) -> str:\n return \"lambda %s: ...\" % self.visit(node.args)\n\n def visit_List(self, node: ast.List) -> str:\n return \"[\" + \", \".join(self.visit(e) for e in node.elts) + \"]\"\n\n def visit_Name(self, node: ast.Name) -> str:\n return node.id\n\n def visit_Set(self, node: ast.Set) -> str:\n return \"{\" + \", \".join(self.visit(e) for e in node.elts) + \"}\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_Subscript__UnparseVisitor.visit_Subscript.if_is_simple_tuple_node_s.else_.return._s_s_self_visit_no": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_Subscript__UnparseVisitor.visit_Subscript.if_is_simple_tuple_node_s.else_.return._s_s_self_visit_no", "embedding": null, "metadata": {"file_path": "sphinx/pycode/ast.py", "file_name": "ast.py", "file_type": "text/x-python", "category": "implementation", "start_line": 170, "end_line": 185, "span_ids": ["_UnparseVisitor.visit_Subscript"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _UnparseVisitor(ast.NodeVisitor):\n\n def visit_Subscript(self, node: ast.Subscript) -> str:\n def is_simple_tuple(value: ast.AST) -> bool:\n return (\n isinstance(value, ast.Tuple) and\n bool(value.elts) and\n not any(isinstance(elt, ast.Starred) for elt in value.elts)\n )\n\n if is_simple_tuple(node.slice):\n elts = \", \".join(self.visit(e) for e in node.slice.elts) # type: ignore\n return \"%s[%s]\" % (self.visit(node.value), elts)\n elif isinstance(node.slice, ast.Index) and is_simple_tuple(node.slice.value):\n elts = \", \".join(self.visit(e) for e in node.slice.value.elts) # type: ignore\n return \"%s[%s]\" % (self.visit(node.value), elts)\n else:\n return \"%s[%s]\" % (self.visit(node.value), self.visit(node.slice))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_UnaryOp_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__UnparseVisitor.visit_UnaryOp_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/ast.py", "file_name": "ast.py", "file_type": "text/x-python", "category": "implementation", "start_line": 204, "end_line": 234, "span_ids": ["_UnparseVisitor.generic_visit", "_UnparseVisitor:4", "_UnparseVisitor.visit_UnaryOp", "_UnparseVisitor.visit_Tuple"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _UnparseVisitor(ast.NodeVisitor):\n\n def visit_UnaryOp(self, node: ast.UnaryOp) -> str:\n return \"%s %s\" % (self.visit(node.op), self.visit(node.operand))\n\n def visit_Tuple(self, node: ast.Tuple) -> str:\n if len(node.elts) == 0:\n return \"()\"\n elif len(node.elts) == 1:\n return \"(%s,)\" % self.visit(node.elts[0])\n else:\n return \"(\" + \", \".join(self.visit(e) for e in node.elts) + \")\"\n\n if sys.version_info < (3, 8):\n # these ast nodes were deprecated in python 3.8\n def visit_Bytes(self, node: ast.Bytes) -> str:\n return repr(node.s)\n\n def visit_Ellipsis(self, node: ast.Ellipsis) -> str:\n return \"...\"\n\n def visit_NameConstant(self, node: ast.NameConstant) -> str:\n return repr(node.value)\n\n def visit_Num(self, node: ast.Num) -> str:\n return repr(node.n)\n\n def visit_Str(self, node: ast.Str) -> str:\n return repr(node.s)\n\n def generic_visit(self, node):\n raise NotImplementedError('Unable to parse %s object' % type(node).__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_SharedResult_SharedResult.restore.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py_SharedResult_SharedResult.restore.return._", "embedding": null, "metadata": {"file_path": "sphinx/testing/fixtures.py", "file_name": "fixtures.py", "file_type": "text/x-python", "category": "implementation", "start_line": 35, "end_line": 54, "span_ids": ["SharedResult", "SharedResult.restore", "SharedResult.store"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedResult:\n cache: Dict[str, Dict[str, str]] = {}\n\n def store(self, key: str, app_: SphinxTestApp) -> Any:\n if key in self.cache:\n return\n data = {\n 'status': app_._status.getvalue(),\n 'warning': app_._warning.getvalue(),\n }\n self.cache[key] = data\n\n def restore(self, key: str) -> Dict[str, StringIO]:\n if key not in self.cache:\n return {}\n data = self.cache[key]\n return {\n 'status': StringIO(data['status']),\n 'warning': StringIO(data['warning']),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter_ImageConverter.__init__.super___init___args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter_ImageConverter.__init__.super___init___args_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/images.py", "file_name": "images.py", "file_type": "text/x-python", "category": "implementation", "start_line": 145, "end_line": 187, "span_ids": ["ImageConverter"], "tokens": 428}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ImageConverter(BaseImageConverter):\n \"\"\"A base class for image converters.\n\n An image converter is kind of Docutils transform module. It is used to\n convert image files which are not supported by a builder to the\n appropriate format for that builder.\n\n For example, :py:class:`LaTeX builder <.LaTeXBuilder>` supports PDF,\n PNG and JPEG as image formats. However it does not support SVG images.\n For such case, using image converters allows to embed these\n unsupported images into the document. One of the image converters;\n :ref:`sphinx.ext.imgconverter <sphinx.ext.imgconverter>` can convert\n a SVG image to PNG format using Imagemagick internally.\n\n There are three steps to make your custom image converter:\n\n 1. Make a subclass of ``ImageConverter`` class\n 2. Override ``conversion_rules``, ``is_available()`` and ``convert()``\n 3. Register your image converter to Sphinx using\n :py:meth:`.Sphinx.add_post_transform`\n \"\"\"\n default_priority = 200\n\n #: The converter is available or not. Will be filled at the first call of\n #: the build. The result is shared in the same process.\n #:\n #: .. todo:: This should be refactored not to store the state without class\n #: variable.\n available: Optional[bool] = None\n\n #: A conversion rules the image converter supports.\n #: It is represented as a list of pair of source image format (mimetype) and\n #: destination one::\n #:\n #: conversion_rules = [\n #: ('image/svg+xml', 'image/png'),\n #: ('image/gif', 'image/png'),\n #: ('application/pdf', 'image/png'),\n #: ]\n conversion_rules: List[Tuple[str, str]] = []\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n super().__init__(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter.match_ImageConverter.match.if_not_self_available_.else_.if_rule_.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter.match_ImageConverter.match.if_not_self_available_.else_.if_rule_.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/images.py", "file_name": "images.py", "file_type": "text/x-python", "category": "implementation", "start_line": 189, "end_line": 208, "span_ids": ["ImageConverter.match"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ImageConverter(BaseImageConverter):\n\n def match(self, node: nodes.image) -> bool:\n if not self.app.builder.supported_image_types:\n return False\n elif '?' in node['candidates']:\n return False\n elif set(self.guess_mimetypes(node)) & set(self.app.builder.supported_image_types):\n # builder supports the image; no need to convert\n return False\n elif self.available is None:\n # store the value to the class variable to share it during the build\n self.__class__.available = self.is_available()\n\n if not self.available:\n return False\n else:\n rule = self.get_conversion_rule(node)\n if rule:\n return True\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter.get_conversion_rule_ImageConverter.guess_mimetypes.if_in_node_candidate.else_.return.node_candidates_keys_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py_ImageConverter.get_conversion_rule_ImageConverter.guess_mimetypes.if_in_node_candidate.else_.return.node_candidates_keys_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/images.py", "file_name": "images.py", "file_type": "text/x-python", "category": "implementation", "start_line": 218, "end_line": 237, "span_ids": ["ImageConverter.get_conversion_rule", "ImageConverter.guess_mimetypes", "ImageConverter.is_available"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ImageConverter(BaseImageConverter):\n\n def get_conversion_rule(self, node: nodes.image) -> Tuple[str, str]:\n for candidate in self.guess_mimetypes(node):\n for supported in self.app.builder.supported_image_types:\n rule = (candidate, supported)\n if rule in self.conversion_rules:\n return rule\n\n return None\n\n def is_available(self) -> bool:\n \"\"\"Return the image converter is available or not.\"\"\"\n raise NotImplementedError()\n\n def guess_mimetypes(self, node: nodes.image) -> List[str]:\n if '?' in node['candidates']:\n return []\n elif '*' in node['candidates']:\n return [guess_mimetype(node['uri'])]\n else:\n return node['candidates'].keys()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/overload2.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/overload2.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/overload2.py", "file_name": "overload2.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["Baz", "imports"], "tokens": 14}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from target.overload import Bar\n\n\nclass Baz(Bar):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_extract_role_links_extract_role_links.return.entries": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_extract_role_links_extract_role_links.return.entries", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 534, "end_line": 550, "span_ids": ["extract_role_links"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def extract_role_links(app, filename):\n t = (app.outdir / filename).read_text()\n lis = [l for l in t.split('\\n') if l.startswith(\"<li\")]\n entries = []\n for l in lis:\n li = ElementTree.fromstring(l)\n aList = list(li.iter('a'))\n assert len(aList) == 1\n a = aList[0]\n target = a.attrib['href'].lstrip('#')\n title = a.attrib['title']\n assert len(a) == 1\n code = a[0]\n assert code.tag == 'code'\n text = ''.join(code.itertext())\n entries.append((target, title, text))\n return entries", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_with_number_literals_test_pyfunction_with_number_literals.assert_node_doctree_1_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_with_number_literals_test_pyfunction_with_number_literals.assert_node_doctree_1_0_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 397, "end_line": 407, "span_ids": ["test_pyfunction_with_number_literals"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8), reason='python 3.8+ is required.')\ndef test_pyfunction_with_number_literals(app):\n text = \".. py:function:: hello(age=0x10, height=1_6_0)\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree[1][0][1],\n [desc_parameterlist, ([desc_parameter, ([desc_sig_name, \"age\"],\n [desc_sig_operator, \"=\"],\n [nodes.inline, \"0x10\"])],\n [desc_parameter, ([desc_sig_name, \"height\"],\n [desc_sig_operator, \"=\"],\n [nodes.inline, \"1_6_0\"])])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_overload2_test_overload2.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_overload2_test_overload2.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2013, "end_line": 2026, "span_ids": ["test_overload2"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_overload2(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.overload2', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.overload2',\n '',\n '',\n '.. py:class:: Baz(x: int, y: int)',\n ' Baz(x: str, y: str)',\n ' :module: target.overload2',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_image_glob_intl_using_figure_language_filename_test_image_glob_intl_using_figure_language_filename.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_image_glob_intl_using_figure_language_filename_test_image_glob_intl_using_figure_language_filename.None_7", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 1245, "end_line": 1289, "span_ids": ["test_image_glob_intl_using_figure_language_filename"], "tokens": 464}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'dummy', testroot='images',\n srcdir='test_intl_images',\n confoverrides={\n 'language': 'xx',\n 'figure_language_filename': '{root}{ext}.{language}',\n }\n)\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_image_glob_intl_using_figure_language_filename(app):\n app.build()\n\n # index.rst\n doctree = app.env.get_doctree('index')\n assert_node(doctree[0][1], nodes.image, uri='rimg.png.xx',\n candidates={'*': 'rimg.png.xx'})\n\n assert isinstance(doctree[0][2], nodes.figure)\n assert_node(doctree[0][2][0], nodes.image, uri='rimg.png.xx',\n candidates={'*': 'rimg.png.xx'})\n\n assert_node(doctree[0][3], nodes.image, uri='img.*',\n candidates={'application/pdf': 'img.pdf',\n 'image/gif': 'img.gif',\n 'image/png': 'img.png'})\n\n assert isinstance(doctree[0][4], nodes.figure)\n assert_node(doctree[0][4][0], nodes.image, uri='img.*',\n candidates={'application/pdf': 'img.pdf',\n 'image/gif': 'img.gif',\n 'image/png': 'img.png'})\n\n # subdir/index.rst\n doctree = app.env.get_doctree('subdir/index')\n assert_node(doctree[0][1], nodes.image, uri='subdir/rimg.png',\n candidates={'*': 'subdir/rimg.png'})\n\n assert_node(doctree[0][2], nodes.image, uri='subdir/svgimg.*',\n candidates={'application/pdf': 'subdir/svgimg.pdf',\n 'image/svg+xml': 'subdir/svgimg.svg'})\n\n assert isinstance(doctree[0][3], nodes.figure)\n assert_node(doctree[0][3][0], nodes.image, uri='subdir/svgimg.*',\n candidates={'application/pdf': 'subdir/svgimg.pdf',\n 'image/svg+xml': 'subdir/svgimg.svg'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol_Symbol.__init__.self__add_function_params": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol_Symbol.__init__.self__add_function_params", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1506, "end_line": 1565, "span_ids": ["Symbol.__init__", "Symbol.__setattr__", "Symbol.__deepcopy__", "Symbol.__copy__", "Symbol", "Symbol.debug_print", "Symbol._assert_invariants"], "tokens": 452}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n debug_indent = 0\n debug_indent_string = \" \"\n debug_lookup = False\n debug_show_tree = False\n\n def __copy__(self):\n assert False # shouldn't happen\n\n def __deepcopy__(self, memo):\n if self.parent:\n assert False # shouldn't happen\n else:\n # the domain base class makes a copy of the initial data, which is fine\n return Symbol(None, None, None, None, None)\n\n @staticmethod\n def debug_print(*args: Any) -> None:\n print(Symbol.debug_indent_string * Symbol.debug_indent, end=\"\")\n print(*args)\n\n def _assert_invariants(self) -> None:\n if not self.parent:\n # parent == None means global scope, so declaration means a parent\n assert not self.declaration\n assert not self.docname\n else:\n if self.declaration:\n assert self.docname\n\n def __setattr__(self, key: str, value: Any) -> None:\n if key == \"children\":\n assert False\n else:\n return super().__setattr__(key, value)\n\n def __init__(self, parent: \"Symbol\", ident: ASTIdentifier,\n declaration: ASTDeclaration, docname: str, line: int) -> None:\n self.parent = parent\n # declarations in a single directive are linked together\n self.siblingAbove: Symbol = None\n self.siblingBelow: Symbol = None\n self.ident = ident\n self.declaration = declaration\n self.docname = docname\n self.line = line\n self.isRedeclaration = False\n self._assert_invariants()\n\n # Remember to modify Symbol.remove if modifications to the parent change.\n self._children: List[Symbol] = []\n self._anonChildren: List[Symbol] = []\n # note: _children includes _anonChildren\n if self.parent:\n self.parent._children.append(self)\n if self.declaration:\n self.declaration.symbol = self\n\n # Do symbol addition after self._children has been initialised.\n self._add_function_params()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._fill_empty_Symbol._fill_empty.self__add_function_params": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._fill_empty_Symbol._fill_empty.self__add_function_params", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1522, "end_line": 1536, "span_ids": ["Symbol._fill_empty"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def _fill_empty(self, declaration: ASTDeclaration, docname: str, line: int) -> None:\n self._assert_invariants()\n assert self.declaration is None\n assert self.docname is None\n assert self.line is None\n assert declaration is not None\n assert docname is not None\n assert line is not None\n self.declaration = declaration\n self.declaration.symbol = self\n self.docname = docname\n self.line = line\n self._assert_invariants()\n # and symbol addition should be done as well\n self._add_function_params()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._add_symbols_Symbol._add_symbols._otherwise_there_should_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._add_symbols_Symbol._add_symbols._otherwise_there_should_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1767, "end_line": 1851, "span_ids": ["Symbol._add_symbols"], "tokens": 773}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def _add_symbols(self, nestedName: ASTNestedName,\n declaration: ASTDeclaration, docname: str, line: int) -> \"Symbol\":\n # TODO: further simplification from C++ to C\n # Used for adding a whole path of symbols, where the last may or may not\n # be an actual declaration.\n\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"_add_symbols:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"nn: \", nestedName)\n Symbol.debug_print(\"decl: \", declaration)\n Symbol.debug_print(\"location: {}:{}\".format(docname, line))\n\n def onMissingQualifiedSymbol(parentSymbol: \"Symbol\", ident: ASTIdentifier) -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"_add_symbols, onMissingQualifiedSymbol:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"ident: \", ident)\n Symbol.debug_indent -= 2\n return Symbol(parent=parentSymbol, ident=ident,\n declaration=None, docname=None, line=None)\n\n lookupResult = self._symbol_lookup(nestedName,\n onMissingQualifiedSymbol,\n ancestorLookupType=None,\n matchSelf=False,\n recurseInAnon=False,\n searchInSiblings=False)\n assert lookupResult is not None # we create symbols all the way, so that can't happen\n symbols = list(lookupResult.symbols)\n if len(symbols) == 0:\n if Symbol.debug_lookup:\n Symbol.debug_print(\"_add_symbols, result, no symbol:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"ident: \", lookupResult.ident)\n Symbol.debug_print(\"declaration: \", declaration)\n Symbol.debug_print(\"location: {}:{}\".format(docname, line))\n Symbol.debug_indent -= 1\n symbol = Symbol(parent=lookupResult.parentSymbol,\n ident=lookupResult.ident,\n declaration=declaration,\n docname=docname, line=line)\n if Symbol.debug_lookup:\n Symbol.debug_indent -= 2\n return symbol\n\n if Symbol.debug_lookup:\n Symbol.debug_print(\"_add_symbols, result, symbols:\")\n Symbol.debug_indent += 1\n Symbol.debug_print(\"number symbols:\", len(symbols))\n Symbol.debug_indent -= 1\n\n if not declaration:\n if Symbol.debug_lookup:\n Symbol.debug_print(\"no declaration\")\n Symbol.debug_indent -= 2\n # good, just a scope creation\n # TODO: what if we have more than one symbol?\n return symbols[0]\n\n noDecl = []\n withDecl = []\n dupDecl = []\n for s in symbols:\n if s.declaration is None:\n noDecl.append(s)\n elif s.isRedeclaration:\n dupDecl.append(s)\n else:\n withDecl.append(s)\n if Symbol.debug_lookup:\n Symbol.debug_print(\"#noDecl: \", len(noDecl))\n Symbol.debug_print(\"#withDecl:\", len(withDecl))\n Symbol.debug_print(\"#dupDecl: \", len(dupDecl))\n\n # With partial builds we may start with a large symbol tree stripped of declarations.\n # Essentially any combination of noDecl, withDecl, and dupDecls seems possible.\n # TODO: make partial builds fully work. What should happen when the primary symbol gets\n # deleted, and other duplicates exist? The full document should probably be rebuild.\n\n # First check if one of those with a declaration matches.\n # If it's a function, we need to compare IDs,\n # otherwise there should be only one symbol with a declaration.\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._add_symbols.makeCandSymbol_Symbol._add_symbols.if_len_noDecl_0_.else_.return.symbol": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_Symbol._add_symbols.makeCandSymbol_Symbol._add_symbols.if_len_noDecl_0_.else_.return.symbol", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1852, "end_line": 1925, "span_ids": ["Symbol._add_symbols"], "tokens": 696}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Symbol:\n\n def _add_symbols(self, nestedName: ASTNestedName,\n declaration: ASTDeclaration, docname: str, line: int) -> \"Symbol\":\n # ... other code\n def makeCandSymbol() -> \"Symbol\":\n if Symbol.debug_lookup:\n Symbol.debug_print(\"begin: creating candidate symbol\")\n symbol = Symbol(parent=lookupResult.parentSymbol,\n ident=lookupResult.ident,\n declaration=declaration,\n docname=docname, line=line)\n if Symbol.debug_lookup:\n Symbol.debug_print(\"end: creating candidate symbol\")\n return symbol\n\n if len(withDecl) == 0:\n candSymbol = None\n else:\n candSymbol = makeCandSymbol()\n\n def handleDuplicateDeclaration(symbol: \"Symbol\", candSymbol: \"Symbol\") -> None:\n if Symbol.debug_lookup:\n Symbol.debug_indent += 1\n Symbol.debug_print(\"redeclaration\")\n Symbol.debug_indent -= 1\n Symbol.debug_indent -= 2\n # Redeclaration of the same symbol.\n # Let the new one be there, but raise an error to the client\n # so it can use the real symbol as subscope.\n # This will probably result in a duplicate id warning.\n candSymbol.isRedeclaration = True\n raise _DuplicateSymbolError(symbol, declaration)\n\n if declaration.objectType != \"function\":\n assert len(withDecl) <= 1\n handleDuplicateDeclaration(withDecl[0], candSymbol)\n # (not reachable)\n\n # a function, so compare IDs\n candId = declaration.get_newest_id()\n if Symbol.debug_lookup:\n Symbol.debug_print(\"candId:\", candId)\n for symbol in withDecl:\n oldId = symbol.declaration.get_newest_id()\n if Symbol.debug_lookup:\n Symbol.debug_print(\"oldId: \", oldId)\n if candId == oldId:\n handleDuplicateDeclaration(symbol, candSymbol)\n # (not reachable)\n # no candidate symbol found with matching ID\n # if there is an empty symbol, fill that one\n if len(noDecl) == 0:\n if Symbol.debug_lookup:\n Symbol.debug_print(\"no match, no empty, candSybmol is not None?:\", candSymbol is not None) # NOQA\n Symbol.debug_indent -= 2\n if candSymbol is not None:\n return candSymbol\n else:\n return makeCandSymbol()\n else:\n if Symbol.debug_lookup:\n Symbol.debug_print(\n \"no match, but fill an empty declaration, candSybmol is not None?:\",\n candSymbol is not None) # NOQA\n Symbol.debug_indent -= 2\n if candSymbol is not None:\n candSymbol.remove()\n # assert len(noDecl) == 1\n # TODO: enable assertion when we at some point find out how to do cleanup\n # for now, just take the first one, it should work fine ... right?\n symbol = noDecl[0]\n # If someone first opened the scope, and then later\n # declares it, e.g,\n # .. namespace:: Test\n # .. namespace:: nullptr\n # .. class:: Test\n symbol._fill_empty(declaration, docname, line)\n return symbol", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.__init___StandardDomain.note_hyperlink_target.if_title_.self_labels_name_docn": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.__init___StandardDomain.note_hyperlink_target.if_title_.self_labels_name_docn", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 625, "end_line": 655, "span_ids": ["StandardDomain.note_hyperlink_target", "StandardDomain"], "tokens": 324}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def __init__(self, env: \"BuildEnvironment\") -> None:\n super().__init__(env)\n\n # set up enumerable nodes\n self.enumerable_nodes = copy(self.enumerable_nodes) # create a copy for this instance\n for node, settings in env.app.registry.enumerable_nodes.items():\n self.enumerable_nodes[node] = settings\n\n def note_hyperlink_target(self, name: str, docname: str, node_id: str,\n title: str = '') -> None:\n \"\"\"Add a hyperlink target for cross reference.\n\n .. warning::\n\n This is only for internal use. Please don't use this from your extension.\n ``document.note_explicit_target()`` or ``note_implicit_target()`` are recommended to\n add a hyperlink target to the document.\n\n This only adds a hyperlink target to the StandardDomain. And this does not add a\n node_id to node. Therefore, it is very fragile to calling this without\n understanding hyperlink target framework in both docutils and Sphinx.\n\n .. versionadded:: 3.0\n \"\"\"\n if name in self.anonlabels and self.anonlabels[name] != (docname, node_id):\n logger.warning(__('duplicate label %s, other instance in %s'),\n name, self.env.doc2path(self.anonlabels[name][0]))\n\n self.anonlabels[name] = (docname, node_id)\n if title:\n self.labels[name] = (docname, node_id, title)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_warn_missing_reference_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_warn_missing_reference_", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1090, "end_line": 1115, "span_ids": ["warn_missing_reference", "setup"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def warn_missing_reference(app: \"Sphinx\", domain: Domain, node: pending_xref\n ) -> Optional[bool]:\n if (domain and domain.name != 'std') or node['reftype'] != 'ref':\n return None\n else:\n target = node['reftarget']\n if target not in domain.anonlabels: # type: ignore\n msg = __('undefined label: %s')\n else:\n msg = __('Failed to create a cross reference. A title or caption not found: %s')\n\n logger.warning(msg % target, location=node, type='ref', subtype=node['reftype'])\n return True\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_domain(StandardDomain)\n app.connect('warn-missing-reference', warn_missing_reference)\n\n return {\n 'version': 'builtin',\n 'env_version': 2,\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_between_between.return.process": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_between_between.return.process", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 212, "end_line": 245, "span_ids": ["between"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def between(marker: str, what: Sequence[str] = None, keepempty: bool = False,\n exclude: bool = False) -> Callable:\n \"\"\"Return a listener that either keeps, or if *exclude* is True excludes,\n lines between lines that match the *marker* regular expression. If no line\n matches, the resulting docstring would be empty, so no change will be made\n unless *keepempty* is true.\n\n If *what* is a sequence of strings, only docstrings of a type in *what* will\n be processed.\n \"\"\"\n marker_re = re.compile(marker)\n\n def process(app: Sphinx, what_: str, name: str, obj: Any, options: Any, lines: List[str]\n ) -> None:\n if what and what_ not in what:\n return\n deleted = 0\n delete = not exclude\n orig_lines = lines[:]\n for i, line in enumerate(orig_lines):\n if delete:\n lines.pop(i - deleted)\n deleted += 1\n if marker_re.match(line):\n delete = not delete\n if delete:\n lines.pop(i - deleted)\n deleted += 1\n if not lines and not keepempty:\n lines[:] = orig_lines\n # make sure there is a blank line at the end\n if lines and lines[-1]:\n lines.append('')\n return process", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py__This_class_is_used_only_ObjectMembers.Union_List_ObjectMember_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py__This_class_is_used_only_ObjectMembers.Union_List_ObjectMember_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 251, "end_line": 291, "span_ids": ["ObjectMember", "ObjectMember.__init__", "ObjectMember.__new__", "Options.copy", "Options.__getattr__", "Options", "between", "impl:22"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# This class is used only in ``sphinx.ext.autodoc.directive``,\n# But we define this class here to keep compatibility (see #4538)\nclass Options(dict):\n \"\"\"A dict/attribute hybrid that returns None on nonexisting keys.\"\"\"\n def copy(self) -> \"Options\":\n return Options(super().copy())\n\n def __getattr__(self, name: str) -> Any:\n try:\n return self[name.replace('_', '-')]\n except KeyError:\n return None\n\n\nclass ObjectMember(tuple):\n \"\"\"A member of object.\n\n This is used for the result of `Documenter.get_object_members()` to\n represent each member of the object.\n\n .. Note::\n\n An instance of this class behaves as a tuple of (name, object)\n for compatibility to old Sphinx. The behavior will be dropped\n in the future. Therefore extensions should not use the tuple\n interface.\n \"\"\"\n\n def __new__(cls, name: str, obj: Any, **kwargs: Any) -> Any:\n return super().__new__(cls, (name, obj)) # type: ignore\n\n def __init__(self, name: str, obj: Any, docstring: Optional[str] = None,\n class_: Any = None, skipped: bool = False) -> None:\n self.__name__ = name\n self.object = obj\n self.docstring = docstring\n self.skipped = skipped\n self.class_ = class_\n\n\nObjectMembers = Union[List[ObjectMember], List[Tuple[str, Any]]]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.import_object_Documenter.import_object.with_mock_self_config_aut.try_.except_ImportError_as_exc.if_raiseerror_.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.import_object_Documenter.import_object.with_mock_self_config_aut.try_.except_ImportError_as_exc.if_raiseerror_.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 413, "end_line": 434, "span_ids": ["Documenter.import_object"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def import_object(self, raiseerror: bool = False) -> bool:\n \"\"\"Import the object given by *self.modname* and *self.objpath* and set\n it as *self.object*.\n\n Returns True if successful, False if an error occurred.\n \"\"\"\n with mock(self.config.autodoc_mock_imports):\n try:\n ret = import_object(self.modname, self.objpath, self.objtype,\n attrgetter=self.get_attr,\n warningiserror=self.config.autodoc_warningiserror)\n self.module, self.parent, self.object_name, self.object = ret\n if ismock(self.object):\n self.object = undecorate(self.object)\n return True\n except ImportError as exc:\n if raiseerror:\n raise\n else:\n logger.warning(exc.args[0], type='autodoc', subtype='import_object')\n self.env.note_reread()\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.process_doc_Documenter.process_doc.for_docstringlines_in_doc.yield_from_docstringlines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.process_doc_Documenter.process_doc.for_docstringlines_in_doc.yield_from_docstringlines", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 554, "end_line": 567, "span_ids": ["Documenter.process_doc"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def process_doc(self, docstrings: List[List[str]]) -> Iterator[str]:\n \"\"\"Let the user process the docstrings before adding them.\"\"\"\n for docstringlines in docstrings:\n if self.env.app:\n # let extensions preprocess docstrings\n self.env.app.emit('autodoc-process-docstring',\n self.objtype, self.fullname, self.object,\n self.options, docstringlines)\n\n if docstringlines and docstringlines[-1] != '':\n # append a blank line to the end of the docstring\n docstringlines.append('')\n\n yield from docstringlines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_sourcename_Documenter.get_sourcename.if_self_analyzer_.else_.return._docstring_of_s_fulln": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.get_sourcename_Documenter.get_sourcename.if_self_analyzer_.else_.return._docstring_of_s_fulln", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 582, "end_line": 594, "span_ids": ["Documenter.get_sourcename"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def get_sourcename(self) -> str:\n if (inspect.safe_getattr(self.object, '__module__', None) and\n inspect.safe_getattr(self.object, '__qualname__', None)):\n # Get the correct location of docstring from self.object\n # to support inherited methods\n fullname = '%s.%s' % (self.object.__module__, self.object.__qualname__)\n else:\n fullname = self.fullname\n\n if self.analyzer:\n return '%s:docstring of %s' % (self.analyzer.srcname, fullname)\n else:\n return 'docstring of %s' % fullname", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.filter_members.for_obj_in_members__Documenter.filter_members.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_Documenter.filter_members.for_obj_in_members__Documenter.filter_members.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 708, "end_line": 818, "span_ids": ["Documenter.filter_members"], "tokens": 907}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Documenter:\n\n def filter_members(self, members: ObjectMembers, want_all: bool\n ) -> List[Tuple[str, Any, bool]]:\n # ... other code\n for obj in members:\n try:\n membername, member = obj\n # if isattr is True, the member is documented as an attribute\n if member is INSTANCEATTR:\n isattr = True\n elif (namespace, membername) in attr_docs:\n isattr = True\n else:\n isattr = False\n\n doc = getdoc(member, self.get_attr, self.config.autodoc_inherit_docstrings,\n self.object, membername)\n if not isinstance(doc, str):\n # Ignore non-string __doc__\n doc = None\n\n # if the member __doc__ is the same as self's __doc__, it's just\n # inherited and therefore not the member's doc\n cls = self.get_attr(member, '__class__', None)\n if cls:\n cls_doc = self.get_attr(cls, '__doc__', None)\n if cls_doc == doc:\n doc = None\n\n if isinstance(obj, ObjectMember) and obj.docstring:\n # hack for ClassDocumenter to inject docstring via ObjectMember\n doc = obj.docstring\n\n doc, metadata = separate_metadata(doc)\n has_doc = bool(doc)\n\n if 'private' in metadata:\n # consider a member private if docstring has \"private\" metadata\n isprivate = True\n elif 'public' in metadata:\n # consider a member public if docstring has \"public\" metadata\n isprivate = False\n else:\n isprivate = membername.startswith('_')\n\n keep = False\n if ismock(member) and (namespace, membername) not in attr_docs:\n # mocked module or object\n pass\n elif (self.options.exclude_members and\n membername in self.options.exclude_members):\n # remove members given by exclude-members\n keep = False\n elif want_all and special_member_re.match(membername):\n # special __methods__\n if (self.options.special_members and\n membername in self.options.special_members):\n if membername == '__doc__':\n keep = False\n elif is_filtered_inherited_member(membername, obj):\n keep = False\n else:\n keep = has_doc or self.options.undoc_members\n else:\n keep = False\n elif (namespace, membername) in attr_docs:\n if want_all and isprivate:\n if self.options.private_members is None:\n keep = False\n else:\n keep = membername in self.options.private_members\n else:\n # keep documented attributes\n keep = True\n elif want_all and isprivate:\n if has_doc or self.options.undoc_members:\n if self.options.private_members is None:\n keep = False\n elif is_filtered_inherited_member(membername, obj):\n keep = False\n else:\n keep = membername in self.options.private_members\n else:\n keep = False\n else:\n if (self.options.members is ALL and\n is_filtered_inherited_member(membername, obj)):\n keep = False\n else:\n # ignore undocumented members if :undoc-members: is not given\n keep = has_doc or self.options.undoc_members\n\n if isinstance(obj, ObjectMember) and obj.skipped:\n # forcedly skipped member (ex. a module attribute not defined in __all__)\n keep = False\n\n # give the user a chance to decide whether this member\n # should be skipped\n if self.env.app:\n # let extensions preprocess docstrings\n skip_user = self.env.app.emit_firstresult(\n 'autodoc-skip-member', self.objtype, membername, member,\n not keep, self.options)\n if skip_user is not None:\n keep = not skip_user\n except Exception as exc:\n logger.warning(__('autodoc: failed to determine %s.%s (%r) to be documented, '\n 'the following exception was raised:\\n%s'),\n self.name, membername, member, exc, type='autodoc')\n keep = False\n\n if keep:\n ret.append((membername, member, isattr))\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.get_object_members_ModuleDocumenter.get_object_members.if_want_all_.else_.return.False_ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.get_object_members_ModuleDocumenter.get_object_members.if_want_all_.else_.return.False_ret", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1074, "end_line": 1098, "span_ids": ["ModuleDocumenter.get_object_members"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleDocumenter(Documenter):\n\n def get_object_members(self, want_all: bool) -> Tuple[bool, ObjectMembers]:\n members = self.get_module_members()\n if want_all:\n if self.__all__ is None:\n # for implicit module members, check __module__ to avoid\n # documenting imported objects\n return True, list(members.values())\n else:\n for member in members.values():\n if member.__name__ not in self.__all__:\n member.skipped = True\n\n return False, list(members.values())\n else:\n memberlist = self.options.members or []\n ret = []\n for name in memberlist:\n if name in members:\n ret.append(members[name])\n else:\n logger.warning(__('missing attribute mentioned in :members: option: '\n 'module %s, attribute %s') %\n (safe_getattr(self.object, '__name__', '???'), name),\n type='autodoc')\n return False, ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.format_signature_ClassDocumenter.format_signature.return._n_join_sigs_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.format_signature_ClassDocumenter.format_signature.return._n_join_sigs_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1597, "end_line": 1627, "span_ids": ["ClassDocumenter.format_signature"], "tokens": 267}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def format_signature(self, **kwargs: Any) -> str:\n if self.doc_as_attr:\n return ''\n if self.config.autodoc_class_signature == 'separated':\n # do not show signatures\n return ''\n\n if self.config.autodoc_typehints_format == \"short\":\n kwargs.setdefault('unqualified_typehints', True)\n\n sig = super().format_signature()\n sigs = []\n\n overloads = self.get_overloaded_signatures()\n if overloads and self.config.autodoc_typehints != 'none':\n # Use signatures for overloaded methods instead of the implementation method.\n method = safe_getattr(self._signature_class, self._signature_method_name, None)\n __globals__ = safe_getattr(method, '__globals__', {})\n for overload in overloads:\n overload = evaluate_signature(overload, __globals__,\n self.config.autodoc_type_aliases)\n\n parameters = list(overload.parameters.values())\n overload = overload.replace(parameters=parameters[1:],\n return_annotation=Parameter.empty)\n sig = stringify_signature(overload, **kwargs)\n sigs.append(sig)\n else:\n sigs.append(sig)\n\n return \"\\n\".join(sigs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_overloaded_signatures_ClassDocumenter.get_overloaded_signatures.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_overloaded_signatures_ClassDocumenter.get_overloaded_signatures.return._", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1629, "end_line": 1644, "span_ids": ["ClassDocumenter.get_overloaded_signatures"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def get_overloaded_signatures(self) -> List[Signature]:\n if self._signature_class and self._signature_method_name:\n for cls in self._signature_class.__mro__:\n try:\n analyzer = ModuleAnalyzer.for_module(cls.__module__)\n analyzer.analyze()\n qualname = '.'.join([cls.__qualname__, self._signature_method_name])\n if qualname in analyzer.overloads:\n return analyzer.overloads.get(qualname)\n elif qualname in analyzer.tagorder:\n # the constructor is defined in the class, but not overridden.\n return []\n except PycodeError:\n pass\n\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getslots_getslots.if___slots___is_None_.else_.raise_ValueError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getslots_getslots.if___slots___is_None_.else_.raise_ValueError", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 178, "end_line": 198, "span_ids": ["getslots"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getslots(obj: Any) -> Optional[Dict]:\n \"\"\"Get __slots__ attribute of the class as dict.\n\n Return None if gienv *obj* does not have __slots__.\n Raises TypeError if given *obj* is not a class.\n Raises ValueError if given *obj* have invalid __slots__.\n \"\"\"\n if not inspect.isclass(obj):\n raise TypeError\n\n __slots__ = safe_getattr(obj, '__slots__', None)\n if __slots__ is None:\n return None\n elif isinstance(__slots__, dict):\n return __slots__\n elif isinstance(__slots__, str):\n return {__slots__: None}\n elif isinstance(__slots__, (list, tuple)):\n return {e: None for e in __slots__}\n else:\n raise ValueError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isgenericalias_isgenericalias.if_hasattr_typing__Gen.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isgenericalias_isgenericalias.if_hasattr_typing__Gen.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 325, "end_line": 337, "span_ids": ["isgenericalias"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def isgenericalias(obj: Any) -> bool:\n \"\"\"Check if the object is GenericAlias.\"\"\"\n if (hasattr(typing, '_GenericAlias') and # only for py37+\n isinstance(obj, typing._GenericAlias)): # type: ignore\n return True\n elif (hasattr(types, 'GenericAlias') and # only for py39+\n isinstance(obj, types.GenericAlias)): # type: ignore\n return True\n elif (hasattr(typing, '_SpecialGenericAlias') and # for py39+\n isinstance(obj, typing._SpecialGenericAlias)): # type: ignore\n return True\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__restify_py36__restify_py36.if_module_typing_.else_.qualname.repr_cls_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__restify_py36__restify_py36.if_module_typing_.else_.qualname.repr_cls_", "embedding": null, "metadata": {"file_path": "sphinx/util/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 233, "end_line": 254, "span_ids": ["_restify_py36"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _restify_py36(cls: Optional[Type], mode: str = 'fully-qualified-except-typing') -> str:\n if mode == 'smart':\n modprefix = '~'\n else:\n modprefix = ''\n\n module = getattr(cls, '__module__', None)\n if module == 'typing':\n if getattr(cls, '_name', None):\n qualname = cls._name\n elif getattr(cls, '__qualname__', None):\n qualname = cls.__qualname__\n elif getattr(cls, '__forward_arg__', None):\n qualname = cls.__forward_arg__\n elif getattr(cls, '__origin__', None):\n qualname = stringify(cls.__origin__) # ex. Union\n else:\n qualname = repr(cls).replace('typing.', '')\n elif hasattr(cls, '__qualname__'):\n qualname = '%s%s.%s' % (modprefix, module, cls.__qualname__)\n else:\n qualname = repr(cls)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_attention_TextTranslator.depart_download_reference.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_attention_TextTranslator.depart_download_reference.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 929, "end_line": 1042, "span_ids": ["TextTranslator.depart_compact_paragraph", "TextTranslator.depart_block_quote", "TextTranslator.visit_toctree", "TextTranslator.depart_line_block", "TextTranslator.visit_substitution_definition", "TextTranslator.depart_versionmodified", "TextTranslator.visit_compact_paragraph", "TextTranslator.visit_line", "TextTranslator.depart_pending_xref", "TextTranslator.visit_download_reference", "TextTranslator.visit_literal_block", "TextTranslator.visit_index", "TextTranslator.visit_block_quote", "TextTranslator:8", "TextTranslator.visit_versionmodified", "TextTranslator.visit_target", "TextTranslator.visit_paragraph", "TextTranslator.depart_reference", "TextTranslator.depart_download_reference", "TextTranslator.visit_number_reference", "TextTranslator.depart_doctest_block", "TextTranslator.visit_pending_xref", "TextTranslator.visit_doctest_block", "TextTranslator.depart_line", "TextTranslator.depart_paragraph", "TextTranslator.visit_line_block", "TextTranslator.depart_literal_block", "TextTranslator.visit_reference"], "tokens": 873}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n visit_attention = _visit_admonition\n depart_attention = _depart_admonition\n visit_caution = _visit_admonition\n depart_caution = _depart_admonition\n visit_danger = _visit_admonition\n depart_danger = _depart_admonition\n visit_error = _visit_admonition\n depart_error = _depart_admonition\n visit_hint = _visit_admonition\n depart_hint = _depart_admonition\n visit_important = _visit_admonition\n depart_important = _depart_admonition\n visit_note = _visit_admonition\n depart_note = _depart_admonition\n visit_tip = _visit_admonition\n depart_tip = _depart_admonition\n visit_warning = _visit_admonition\n depart_warning = _depart_admonition\n visit_seealso = _visit_admonition\n depart_seealso = _depart_admonition\n\n def visit_versionmodified(self, node: Element) -> None:\n self.new_state(0)\n\n def depart_versionmodified(self, node: Element) -> None:\n self.end_state()\n\n def visit_literal_block(self, node: Element) -> None:\n self.new_state()\n\n def depart_literal_block(self, node: Element) -> None:\n self.end_state(wrap=False)\n\n def visit_doctest_block(self, node: Element) -> None:\n self.new_state(0)\n\n def depart_doctest_block(self, node: Element) -> None:\n self.end_state(wrap=False)\n\n def visit_line_block(self, node: Element) -> None:\n self.new_state()\n self.lineblocklevel += 1\n\n def depart_line_block(self, node: Element) -> None:\n self.lineblocklevel -= 1\n self.end_state(wrap=False, end=None)\n if not self.lineblocklevel:\n self.add_text('\\n')\n\n def visit_line(self, node: Element) -> None:\n pass\n\n def depart_line(self, node: Element) -> None:\n self.add_text('\\n')\n\n def visit_block_quote(self, node: Element) -> None:\n self.new_state()\n\n def depart_block_quote(self, node: Element) -> None:\n self.end_state()\n\n def visit_compact_paragraph(self, node: Element) -> None:\n pass\n\n def depart_compact_paragraph(self, node: Element) -> None:\n pass\n\n def visit_paragraph(self, node: Element) -> None:\n if not isinstance(node.parent, nodes.Admonition) or \\\n isinstance(node.parent, addnodes.seealso):\n self.new_state(0)\n\n def depart_paragraph(self, node: Element) -> None:\n if not isinstance(node.parent, nodes.Admonition) or \\\n isinstance(node.parent, addnodes.seealso):\n self.end_state()\n\n def visit_target(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_index(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_toctree(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_substitution_definition(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_pending_xref(self, node: Element) -> None:\n pass\n\n def depart_pending_xref(self, node: Element) -> None:\n pass\n\n def visit_reference(self, node: Element) -> None:\n if self.add_secnumbers:\n numbers = node.get(\"secnumber\")\n if numbers is not None:\n self.add_text('.'.join(map(str, numbers)) + self.secnumber_suffix)\n\n def depart_reference(self, node: Element) -> None:\n pass\n\n def visit_number_reference(self, node: Element) -> None:\n text = nodes.Text(node.get('title', '#'))\n self.visit_Text(text)\n raise nodes.SkipNode\n\n def visit_download_reference(self, node: Element) -> None:\n pass\n\n def depart_download_reference(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_emphasis_TextTranslator.visit_meta.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_TextTranslator.visit_emphasis_TextTranslator.visit_meta.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1044, "end_line": 1156, "span_ids": ["TextTranslator.depart_subscript", "TextTranslator.visit_generated", "TextTranslator.visit_manpage", "TextTranslator.visit_meta", "TextTranslator.visit_title_reference", "TextTranslator.visit_footnote_reference", "TextTranslator.depart_emphasis", "TextTranslator.depart_literal", "TextTranslator.visit_literal", "TextTranslator.depart_container", "TextTranslator.visit_comment", "TextTranslator.visit_abbreviation", "TextTranslator.depart_inline", "TextTranslator.visit_emphasis", "TextTranslator.visit_superscript", "TextTranslator.depart_literal_emphasis", "TextTranslator.visit_subscript", "TextTranslator.depart_title_reference", "TextTranslator.visit_strong", "TextTranslator.depart_abbreviation", "TextTranslator.depart_Text", "TextTranslator.visit_inline", "TextTranslator.depart_generated", "TextTranslator.visit_literal_emphasis", "TextTranslator.depart_manpage", "TextTranslator.visit_Text", "TextTranslator.depart_strong", "TextTranslator.depart_literal_strong", "TextTranslator.depart_problematic", "TextTranslator.depart_superscript", "TextTranslator.visit_problematic", "TextTranslator.visit_citation_reference", "TextTranslator.visit_container", "TextTranslator.visit_literal_strong", "TextTranslator.visit_system_message"], "tokens": 813}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TextTranslator(SphinxTranslator):\n\n def visit_emphasis(self, node: Element) -> None:\n self.add_text('*')\n\n def depart_emphasis(self, node: Element) -> None:\n self.add_text('*')\n\n def visit_literal_emphasis(self, node: Element) -> None:\n self.add_text('*')\n\n def depart_literal_emphasis(self, node: Element) -> None:\n self.add_text('*')\n\n def visit_strong(self, node: Element) -> None:\n self.add_text('**')\n\n def depart_strong(self, node: Element) -> None:\n self.add_text('**')\n\n def visit_literal_strong(self, node: Element) -> None:\n self.add_text('**')\n\n def depart_literal_strong(self, node: Element) -> None:\n self.add_text('**')\n\n def visit_abbreviation(self, node: Element) -> None:\n self.add_text('')\n\n def depart_abbreviation(self, node: Element) -> None:\n if node.hasattr('explanation'):\n self.add_text(' (%s)' % node['explanation'])\n\n def visit_manpage(self, node: Element) -> None:\n return self.visit_literal_emphasis(node)\n\n def depart_manpage(self, node: Element) -> None:\n return self.depart_literal_emphasis(node)\n\n def visit_title_reference(self, node: Element) -> None:\n self.add_text('*')\n\n def depart_title_reference(self, node: Element) -> None:\n self.add_text('*')\n\n def visit_literal(self, node: Element) -> None:\n self.add_text('\"')\n\n def depart_literal(self, node: Element) -> None:\n self.add_text('\"')\n\n def visit_subscript(self, node: Element) -> None:\n self.add_text('_')\n\n def depart_subscript(self, node: Element) -> None:\n pass\n\n def visit_superscript(self, node: Element) -> None:\n self.add_text('^')\n\n def depart_superscript(self, node: Element) -> None:\n pass\n\n def visit_footnote_reference(self, node: Element) -> None:\n self.add_text('[%s]' % node.astext())\n raise nodes.SkipNode\n\n def visit_citation_reference(self, node: Element) -> None:\n self.add_text('[%s]' % node.astext())\n raise nodes.SkipNode\n\n def visit_Text(self, node: Text) -> None:\n self.add_text(node.astext())\n\n def depart_Text(self, node: Text) -> None:\n pass\n\n def visit_generated(self, node: Element) -> None:\n pass\n\n def depart_generated(self, node: Element) -> None:\n pass\n\n def visit_inline(self, node: Element) -> None:\n if 'xref' in node['classes'] or 'term' in node['classes']:\n self.add_text('*')\n\n def depart_inline(self, node: Element) -> None:\n if 'xref' in node['classes'] or 'term' in node['classes']:\n self.add_text('*')\n\n def visit_container(self, node: Element) -> None:\n pass\n\n def depart_container(self, node: Element) -> None:\n pass\n\n def visit_problematic(self, node: Element) -> None:\n self.add_text('>>')\n\n def depart_problematic(self, node: Element) -> None:\n self.add_text('<<')\n\n def visit_system_message(self, node: Element) -> None:\n self.new_state(0)\n self.add_text('<SYSTEM MESSAGE: %s>' % node.astext())\n self.end_state()\n raise nodes.SkipNode\n\n def visit_comment(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_meta(self, node: Element) -> None:\n # only valid for HTML\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/classes.py_from_inspect_import_Param_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/classes.py_from_inspect_import_Param_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/classes.py", "file_name": "classes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 43, "span_ids": ["impl", "Corge", "Quux", "impl:2", "Foo", "Baz", "imports", "Bar", "Qux", "Baz.__new__"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from inspect import Parameter, Signature\nfrom typing import List, Union\n\n\nclass Foo:\n pass\n\n\nclass Bar:\n def __init__(self, x, y):\n pass\n\n\nclass Baz:\n def __new__(cls, x, y):\n pass\n\n\nclass Qux:\n __signature__ = Signature(parameters=[Parameter('foo', Parameter.POSITIONAL_OR_KEYWORD),\n Parameter('bar', Parameter.POSITIONAL_OR_KEYWORD)])\n\n def __init__(self, x, y):\n pass\n\n\nclass Quux(List[Union[int, float]]):\n \"\"\"A subclass of List[Union[int, float]]\"\"\"\n pass\n\n\nclass Corge(Quux):\n pass\n\n\nAlias = Foo\n\n#: docstring\nOtherAlias = Bar\n\n#: docstring\nIntAlias = int", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/decorator.py_from_functools_import_wra_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/decorator.py_from_functools_import_wra_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/decorator.py", "file_name": "decorator.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 54, "span_ids": ["deco1", "Bar.meth", "Quux", "_Metaclass", "deco2", "Qux.__new__", "Baz", "imports", "Bar", "Qux", "foo", "_Metaclass.__call__"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from functools import wraps\n\n\ndef deco1(func):\n \"\"\"docstring for deco1\"\"\"\n @wraps(func)\n def wrapper():\n return func()\n\n return wrapper\n\n\ndef deco2(condition, message):\n \"\"\"docstring for deco2\"\"\"\n def decorator(func):\n def wrapper():\n return func()\n\n return wrapper\n return decorator\n\n\n@deco1\ndef foo(name=None, age=None):\n pass\n\n\nclass Bar:\n @deco1\n def meth(self, name=None, age=None):\n pass\n\n\nclass Baz:\n @deco1\n def __init__(self, name=None, age=None):\n pass\n\n\nclass Qux:\n @deco1\n def __new__(self, name=None, age=None):\n pass\n\n\nclass _Metaclass(type):\n @deco1\n def __call__(self, name=None, age=None):\n pass\n\n\nclass Quux(metaclass=_Metaclass):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/singledispatch.py_inspect_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/singledispatch.py_inspect_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/singledispatch.py", "file_name": "singledispatch.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["_func_int", "assign_signature", "func", "imports", "_func_str"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import inspect\nfrom functools import singledispatch\n\n\ndef assign_signature(func):\n # This is intended to cover more complex signature-rewriting decorators.\n func.__signature__ = inspect.signature(func)\n return func\n\n\n@singledispatch\ndef func(arg, kwarg=None):\n \"\"\"A function for general use.\"\"\"\n pass\n\n\n@func.register(int)\n@func.register(float)\ndef _func_int(arg, kwarg=None):\n \"\"\"A function for int.\"\"\"\n pass\n\n\n@func.register(str)\n@assign_signature\ndef _func_str(arg, kwarg=None):\n \"\"\"A function for str.\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver-anchor/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver-anchor/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-linkcheck-localserver-anchor/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["impl"], "tokens": 13}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\nlinkcheck_anchors = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver-https/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver-https/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-linkcheck-localserver-https/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_raises_for_invalid_status_HeadersDumperHandler.do_GET.print_self_headers_as_str": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_raises_for_invalid_status_HeadersDumperHandler.do_GET.print_self_headers_as_str", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 125, "end_line": 148, "span_ids": ["HeadersDumperHandler.do_GET", "HeadersDumperHandler.do_HEAD", "HeadersDumperHandler", "test_raises_for_invalid_status.InternalServerErrorHandler", "test_raises_for_invalid_status.InternalServerErrorHandler.do_GET", "test_raises_for_invalid_status"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver-anchor', freshenv=True)\ndef test_raises_for_invalid_status(app):\n class InternalServerErrorHandler(http.server.BaseHTTPRequestHandler):\n def do_GET(self):\n self.send_error(500, \"Internal Server Error\")\n\n with http_server(InternalServerErrorHandler):\n app.build()\n content = (app.outdir / 'output.txt').read_text()\n assert content == (\n \"index.rst:1: [broken] http://localhost:7777/#anchor: \"\n \"500 Server Error: Internal Server Error \"\n \"for url: http://localhost:7777/\\n\"\n )\n\n\nclass HeadersDumperHandler(http.server.BaseHTTPRequestHandler):\n def do_HEAD(self):\n self.do_GET()\n\n def do_GET(self):\n self.send_response(200, \"OK\")\n self.end_headers()\n print(self.headers.as_string())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_auth_header_uses_first_match_test_auth_header_uses_first_match.assert_Authorization_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_auth_header_uses_first_match_test_auth_header_uses_first_match.assert_Authorization_s", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 151, "end_line": 163, "span_ids": ["test_auth_header_uses_first_match"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'linkcheck', testroot='linkcheck-localserver', freshenv=True,\n confoverrides={'linkcheck_auth': [\n (r'^$', ('no', 'match')),\n (r'^http://localhost:7777/$', ('user1', 'password')),\n (r'.*local.*', ('user2', 'hunter2')),\n ]})\ndef test_auth_header_uses_first_match(app, capsys):\n with http_server(HeadersDumperHandler):\n app.build()\n stdout, stderr = capsys.readouterr()\n auth = requests.auth._basic_auth_str('user1', 'password')\n assert \"Authorization: %s\\n\" % auth in stdout", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_auth_header_no_match_test_linkcheck_request_headers.assert_sesami_not_in_st": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_auth_header_no_match_test_linkcheck_request_headers.assert_sesami_not_in_st", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 166, "end_line": 193, "span_ids": ["test_linkcheck_request_headers", "test_auth_header_no_match"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'linkcheck', testroot='linkcheck-localserver', freshenv=True,\n confoverrides={'linkcheck_auth': [(r'^$', ('user1', 'password'))]})\ndef test_auth_header_no_match(app, capsys):\n with http_server(HeadersDumperHandler):\n app.build()\n stdout, stderr = capsys.readouterr()\n assert \"Authorization\" not in stdout\n\n\n@pytest.mark.sphinx(\n 'linkcheck', testroot='linkcheck-localserver', freshenv=True,\n confoverrides={'linkcheck_request_headers': {\n \"http://localhost:7777/\": {\n \"Accept\": \"text/html\",\n },\n \"*\": {\n \"X-Secret\": \"open sesami\",\n }\n }})\ndef test_linkcheck_request_headers(app, capsys):\n with http_server(HeadersDumperHandler):\n app.build()\n\n stdout, _stderr = capsys.readouterr()\n assert \"Accept: text/html\\n\" in stdout\n assert \"X-Secret\" not in stdout\n assert \"sesami\" not in stdout", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_request_headers_no_slash_test_linkcheck_request_headers_no_slash.assert_sesami_not_in_st": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_request_headers_no_slash_test_linkcheck_request_headers_no_slash.assert_sesami_not_in_st", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 196, "end_line": 209, "span_ids": ["test_linkcheck_request_headers_no_slash"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'linkcheck', testroot='linkcheck-localserver', freshenv=True,\n confoverrides={'linkcheck_request_headers': {\n \"http://localhost:7777\": {\"Accept\": \"application/json\"},\n \"*\": {\"X-Secret\": \"open sesami\"}\n }})\ndef test_linkcheck_request_headers_no_slash(app, capsys):\n with http_server(HeadersDumperHandler):\n app.build()\n\n stdout, _stderr = capsys.readouterr()\n assert \"Accept: application/json\\n\" in stdout\n assert \"X-Secret\" not in stdout\n assert \"sesami\" not in stdout", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_request_headers_default_test_linkcheck_request_headers_default.assert_X_Secret_open_se": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_request_headers_default_test_linkcheck_request_headers_default.assert_X_Secret_open_se", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 212, "end_line": 224, "span_ids": ["test_linkcheck_request_headers_default"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'linkcheck', testroot='linkcheck-localserver', freshenv=True,\n confoverrides={'linkcheck_request_headers': {\n \"http://do.not.match.org\": {\"Accept\": \"application/json\"},\n \"*\": {\"X-Secret\": \"open sesami\"}\n }})\ndef test_linkcheck_request_headers_default(app, capsys):\n with http_server(HeadersDumperHandler):\n app.build()\n\n stdout, _stderr = capsys.readouterr()\n assert \"Accepts: application/json\\n\" not in stdout\n assert \"X-Secret: open sesami\\n\" in stdout", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_make_redirect_handler_make_redirect_handler.return.RedirectOnceHandler": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_make_redirect_handler_make_redirect_handler.return.RedirectOnceHandler", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 216, "end_line": 237, "span_ids": ["make_redirect_handler", "make_redirect_handler.RedirectOnceHandler", "make_redirect_handler.RedirectOnceHandler.do_HEAD"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def make_redirect_handler(*, support_head):\n class RedirectOnceHandler(http.server.BaseHTTPRequestHandler):\n def do_HEAD(self):\n if support_head:\n self.do_GET()\n else:\n self.send_response(405, \"Method Not Allowed\")\n self.end_headers()\n\n def do_GET(self):\n if self.path == \"/?redirected=1\":\n self.send_response(204, \"No content\")\n else:\n self.send_response(302, \"Found\")\n self.send_header(\"Location\", \"http://localhost:7777/?redirected=1\")\n self.end_headers()\n\n def log_date_time_string(self):\n \"\"\"Strip date and time from logged messages for assertions.\"\"\"\n return \"\"\n\n return RedirectOnceHandler", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_OKHandler_test_invalid_ssl.assert_SSLError_in_cont": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_OKHandler_test_invalid_ssl.assert_SSLError_in_cont", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 288, "end_line": 310, "span_ids": ["OKHandler.do_GET", "OKHandler.do_HEAD", "OKHandler", "test_invalid_ssl"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class OKHandler(http.server.BaseHTTPRequestHandler):\n def do_HEAD(self):\n self.send_response(200, \"OK\")\n self.end_headers()\n\n def do_GET(self):\n self.do_HEAD()\n self.wfile.write(b\"ok\\n\")\n\n\n@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver-https', freshenv=True)\ndef test_invalid_ssl(app):\n # Link indicates SSL should be used (https) but the server does not handle it.\n with http_server(OKHandler):\n app.build()\n\n with open(app.outdir / 'output.json') as fp:\n content = json.load(fp)\n assert content[\"status\"] == \"broken\"\n assert content[\"filename\"] == \"index.rst\"\n assert content[\"lineno\"] == 1\n assert content[\"uri\"] == \"https://localhost:7777/\"\n assert \"SSLError\" in content[\"info\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_fails_test_connect_to_selfsigned_fails.assert_SSL_CERTIFICATE": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_fails_test_connect_to_selfsigned_fails.assert_SSL_CERTIFICATE", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 313, "end_line": 324, "span_ids": ["test_connect_to_selfsigned_fails"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver-https', freshenv=True)\ndef test_connect_to_selfsigned_fails(app):\n with https_server(OKHandler):\n app.build()\n\n with open(app.outdir / 'output.json') as fp:\n content = json.load(fp)\n assert content[\"status\"] == \"broken\"\n assert content[\"filename\"] == \"index.rst\"\n assert content[\"lineno\"] == 1\n assert content[\"uri\"] == \"https://localhost:7777/\"\n assert \"[SSL: CERTIFICATE_VERIFY_FAILED]\" in content[\"info\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_with_tls_verify_false_test_connect_to_selfsigned_with_tls_verify_false.assert_content_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_with_tls_verify_false_test_connect_to_selfsigned_with_tls_verify_false.assert_content_", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 327, "end_line": 342, "span_ids": ["test_connect_to_selfsigned_with_tls_verify_false"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver-https', freshenv=True)\ndef test_connect_to_selfsigned_with_tls_verify_false(app):\n app.config.tls_verify = False\n with https_server(OKHandler):\n app.build()\n\n with open(app.outdir / 'output.json') as fp:\n content = json.load(fp)\n assert content == {\n \"code\": 0,\n \"status\": \"working\",\n \"filename\": \"index.rst\",\n \"lineno\": 1,\n \"uri\": \"https://localhost:7777/\",\n \"info\": \"\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_with_tls_cacerts_test_connect_to_selfsigned_with_tls_cacerts.assert_content_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_with_tls_cacerts_test_connect_to_selfsigned_with_tls_cacerts.assert_content_", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 345, "end_line": 360, "span_ids": ["test_connect_to_selfsigned_with_tls_cacerts"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver-https', freshenv=True)\ndef test_connect_to_selfsigned_with_tls_cacerts(app):\n app.config.tls_cacerts = CERT_FILE\n with https_server(OKHandler):\n app.build()\n\n with open(app.outdir / 'output.json') as fp:\n content = json.load(fp)\n assert content == {\n \"code\": 0,\n \"status\": \"working\",\n \"filename\": \"index.rst\",\n \"lineno\": 1,\n \"uri\": \"https://localhost:7777/\",\n \"info\": \"\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_with_requests_env_var_test_connect_to_selfsigned_with_requests_env_var.assert_content_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_with_requests_env_var_test_connect_to_selfsigned_with_requests_env_var.assert_content_", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 363, "end_line": 378, "span_ids": ["test_connect_to_selfsigned_with_requests_env_var"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver-https', freshenv=True)\ndef test_connect_to_selfsigned_with_requests_env_var(monkeypatch, app):\n monkeypatch.setenv(\"REQUESTS_CA_BUNDLE\", CERT_FILE)\n with https_server(OKHandler):\n app.build()\n\n with open(app.outdir / 'output.json') as fp:\n content = json.load(fp)\n assert content == {\n \"code\": 0,\n \"status\": \"working\",\n \"filename\": \"index.rst\",\n \"lineno\": 1,\n \"uri\": \"https://localhost:7777/\",\n \"info\": \"\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_decorators_test_decorators.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_decorators_test_decorators.None_2", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 76, "span_ids": ["test_decorators"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_decorators(app):\n actual = do_autodoc(app, 'class', 'target.decorator.Baz')\n assert list(actual) == [\n '',\n '.. py:class:: Baz(name=None, age=None)',\n ' :module: target.decorator',\n '',\n ]\n\n actual = do_autodoc(app, 'class', 'target.decorator.Qux')\n assert list(actual) == [\n '',\n '.. py:class:: Qux(name=None, age=None)',\n ' :module: target.decorator',\n '',\n ]\n\n actual = do_autodoc(app, 'class', 'target.decorator.Quux')\n assert list(actual) == [\n '',\n '.. py:class:: Quux(name=None, age=None)',\n ' :module: target.decorator',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_none_for_overload_test_autodoc_typehints_none_for_overload.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_none_for_overload_test_autodoc_typehints_none_for_overload.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 616, "end_line": 661, "span_ids": ["test_autodoc_typehints_none_for_overload"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints': 'none'})\ndef test_autodoc_typehints_none_for_overload(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.overload', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.overload',\n '',\n '',\n '.. py:class:: Bar(x, y)',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n '',\n '.. py:class:: Baz(x, y)',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n '',\n '.. py:class:: Foo(x, y)',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n '',\n '.. py:class:: Math()',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n '',\n ' .. py:method:: Math.sum(x, y=None)',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n '',\n '.. py:function:: sum(x, y=None)',\n ' :module: target.overload',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_between_exclude_test_between_exclude.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_between_exclude_test_between_exclude.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_events.py", "file_name": "test_ext_autodoc_events.py", "file_type": "text/x-python", "category": "test", "start_line": 68, "end_line": 82, "span_ids": ["test_between_exclude"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_between_exclude(app):\n app.connect('autodoc-process-docstring',\n between('---', ['function'], exclude=True))\n\n actual = do_autodoc(app, 'function', 'target.process_docstring.func')\n assert list(actual) == [\n '',\n '.. py:function:: func()',\n ' :module: target.process_docstring',\n '',\n ' first line',\n ' third line',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_skip_module_member_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_skip_module_member_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_events.py", "file_name": "test_ext_autodoc_events.py", "file_type": "text/x-python", "category": "test", "start_line": 85, "end_line": 108, "span_ids": ["test_skip_module_member"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_skip_module_member(app):\n def autodoc_skip_member(app, what, name, obj, skip, options):\n if name == \"Class\":\n return True # Skip \"Class\" class in __all__\n elif name == \"raises\":\n return False # Show \"raises()\" function (not in __all__)\n\n app.connect('autodoc-skip-member', autodoc_skip_member)\n\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target', options)\n assert list(actual) == [\n '',\n '.. py:module:: target',\n '',\n '',\n '.. py:function:: raises(exc, func, *args, **kwds)',\n ' :module: target',\n '',\n ' Raise AssertionError if ``func(*args, **kwds)`` does not raise *exc*.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_see_also_refs_NumpyDocstringTest.test_see_also_refs.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_see_also_refs_NumpyDocstringTest.test_see_also_refs.None_2", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1410, "end_line": 1488, "span_ids": ["NumpyDocstringTest.test_see_also_refs"], "tokens": 424}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_see_also_refs(self):\n docstring = \"\"\"\\\nnumpy.multivariate_normal(mean, cov, shape=None, spam=None)\n\nSee Also\n--------\nsome, other, funcs\notherfunc : relationship\n\n\"\"\"\n\n actual = str(NumpyDocstring(docstring))\n\n expected = \"\"\"\\\nnumpy.multivariate_normal(mean, cov, shape=None, spam=None)\n\n.. seealso::\n\n :obj:`some`, :obj:`other`, :obj:`funcs`\n \\n\\\n :obj:`otherfunc`\n relationship\n\"\"\"\n self.assertEqual(expected, actual)\n\n docstring = \"\"\"\\\nnumpy.multivariate_normal(mean, cov, shape=None, spam=None)\n\nSee Also\n--------\nsome, other, funcs\notherfunc : relationship\n\n\"\"\"\n\n config = Config()\n app = mock.Mock()\n actual = str(NumpyDocstring(docstring, config, app, \"method\"))\n\n expected = \"\"\"\\\nnumpy.multivariate_normal(mean, cov, shape=None, spam=None)\n\n.. seealso::\n\n :obj:`some`, :obj:`other`, :obj:`funcs`\n \\n\\\n :obj:`otherfunc`\n relationship\n\"\"\"\n self.assertEqual(expected, actual)\n\n docstring = \"\"\"\\\nnumpy.multivariate_normal(mean, cov, shape=None, spam=None)\n\nSee Also\n--------\nsome, other, :func:`funcs`\notherfunc : relationship\n\n\"\"\"\n translations = {\n \"other\": \"MyClass.other\",\n \"otherfunc\": \":func:`~my_package.otherfunc`\",\n }\n config = Config(napoleon_type_aliases=translations)\n app = mock.Mock()\n actual = str(NumpyDocstring(docstring, config, app, \"method\"))\n\n expected = \"\"\"\\\nnumpy.multivariate_normal(mean, cov, shape=None, spam=None)\n\n.. seealso::\n\n :obj:`some`, :obj:`MyClass.other`, :func:`funcs`\n \\n\\\n :func:`~my_package.otherfunc`\n relationship\n\"\"\"\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_return_types_NumpyDocstringTest.test_return_types.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_return_types_NumpyDocstringTest.test_return_types.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1554, "end_line": 1575, "span_ids": ["NumpyDocstringTest.test_return_types"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_return_types(self):\n docstring = dedent(\"\"\"\n Returns\n -------\n DataFrame\n a dataframe\n \"\"\")\n expected = dedent(\"\"\"\n :returns: a dataframe\n :rtype: :class:`~pandas.DataFrame`\n \"\"\")\n translations = {\n \"DataFrame\": \"~pandas.DataFrame\",\n }\n config = Config(\n napoleon_use_param=True,\n napoleon_use_rtype=True,\n napoleon_preprocess_types=True,\n napoleon_type_aliases=translations,\n )\n actual = str(NumpyDocstring(docstring, config))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_yield_types_NumpyDocstringTest.test_yield_types.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NumpyDocstringTest.test_yield_types_NumpyDocstringTest.test_yield_types.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1577, "end_line": 1598, "span_ids": ["NumpyDocstringTest.test_yield_types"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocstringTest(BaseDocstringTest):\n\n def test_yield_types(self):\n docstring = dedent(\"\"\"\n Example Function\n\n Yields\n ------\n scalar or array-like\n The result of the computation\n \"\"\")\n expected = dedent(\"\"\"\n Example Function\n\n :Yields: :term:`scalar` or :class:`array-like <numpy.ndarray>` -- The result of the computation\n \"\"\")\n translations = {\n \"scalar\": \":term:`scalar`\",\n \"array-like\": \":class:`array-like <numpy.ndarray>`\",\n }\n config = Config(napoleon_type_aliases=translations, napoleon_preprocess_types=True)\n app = mock.Mock()\n actual = str(NumpyDocstring(docstring, config, app, \"method\"))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_getslots_test_getslots.with_pytest_raises_TypeEr.inspect_getslots_Bar_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_getslots_test_getslots.with_pytest_raises_TypeEr.inspect_getslots_Bar_", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 496, "end_line": 515, "span_ids": ["test_getslots.Foo:2", "test_getslots.Baz", "test_getslots.Foo", "test_getslots", "test_getslots.Baz:2", "test_getslots.Qux:2", "test_getslots.Qux", "test_getslots.Bar:2", "test_getslots.Bar"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_getslots():\n class Foo:\n pass\n\n class Bar:\n __slots__ = ['attr']\n\n class Baz:\n __slots__ = {'attr': 'docstring'}\n\n class Qux:\n __slots__ = 'attr'\n\n assert inspect.getslots(Foo) is None\n assert inspect.getslots(Bar) == {'attr': None}\n assert inspect.getslots(Baz) == {'attr': 'docstring'}\n assert inspect.getslots(Qux) == {'attr': None}\n\n with pytest.raises(TypeError):\n inspect.getslots(Bar())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isclassmethod_test_isstaticmethod.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isclassmethod_test_isstaticmethod.None_3", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 518, "end_line": 535, "span_ids": ["test_isclassmethod", "test_isstaticmethod"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autodoc')\ndef test_isclassmethod(app):\n from target.methods import Base, Inherited\n\n assert inspect.isclassmethod(Base.classmeth) is True\n assert inspect.isclassmethod(Base.meth) is False\n assert inspect.isclassmethod(Inherited.classmeth) is True\n assert inspect.isclassmethod(Inherited.meth) is False\n\n\n@pytest.mark.sphinx(testroot='ext-autodoc')\ndef test_isstaticmethod(app):\n from target.methods import Base, Inherited\n\n assert inspect.isstaticmethod(Base.staticmeth, Base, 'staticmeth') is True\n assert inspect.isstaticmethod(Base.meth, Base, 'meth') is False\n assert inspect.isstaticmethod(Inherited.staticmeth, Inherited, 'staticmeth') is True\n assert inspect.isstaticmethod(Inherited.meth, Inherited, 'meth') is False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_iscoroutinefunction_test_iscoroutinefunction.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_iscoroutinefunction_test_iscoroutinefunction.None_5", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 538, "end_line": 551, "span_ids": ["test_iscoroutinefunction"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autodoc')\ndef test_iscoroutinefunction(app):\n from target.functions import coroutinefunc, func, partial_coroutinefunc\n from target.methods import Base\n\n assert inspect.iscoroutinefunction(func) is False # function\n assert inspect.iscoroutinefunction(coroutinefunc) is True # coroutine\n assert inspect.iscoroutinefunction(partial_coroutinefunc) is True # partial-ed coroutine\n assert inspect.iscoroutinefunction(Base.meth) is False # method\n assert inspect.iscoroutinefunction(Base.coroutinemeth) is True # coroutine-method\n\n # partial-ed coroutine-method\n partial_coroutinemeth = Base.__dict__['partial_coroutinemeth']\n assert inspect.iscoroutinefunction(partial_coroutinemeth) is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_containers_test_restify_type_hints_containers.assert_restify_Generator_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_containers_test_restify_type_hints_containers.assert_restify_Generator_", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 62, "end_line": 87, "span_ids": ["test_restify_type_hints_containers"], "tokens": 413}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_restify_type_hints_containers():\n assert restify(List) == \":py:class:`~typing.List`\"\n assert restify(Dict) == \":py:class:`~typing.Dict`\"\n assert restify(List[int]) == \":py:class:`~typing.List`\\\\ [:py:class:`int`]\"\n assert restify(List[str]) == \":py:class:`~typing.List`\\\\ [:py:class:`str`]\"\n assert restify(Dict[str, float]) == (\":py:class:`~typing.Dict`\\\\ \"\n \"[:py:class:`str`, :py:class:`float`]\")\n assert restify(Tuple[str, str, str]) == (\":py:class:`~typing.Tuple`\\\\ \"\n \"[:py:class:`str`, :py:class:`str`, \"\n \":py:class:`str`]\")\n assert restify(Tuple[str, ...]) == \":py:class:`~typing.Tuple`\\\\ [:py:class:`str`, ...]\"\n\n if sys.version_info < (3, 11):\n assert restify(Tuple[()]) == \":py:class:`~typing.Tuple`\\\\ [()]\"\n else:\n assert restify(Tuple[()]) == \":py:class:`~typing.Tuple`\"\n\n assert restify(List[Dict[str, Tuple]]) == (\":py:class:`~typing.List`\\\\ \"\n \"[:py:class:`~typing.Dict`\\\\ \"\n \"[:py:class:`str`, :py:class:`~typing.Tuple`]]\")\n assert restify(MyList[Tuple[int, int]]) == (\":py:class:`tests.test_util_typing.MyList`\\\\ \"\n \"[:py:class:`~typing.Tuple`\\\\ \"\n \"[:py:class:`int`, :py:class:`int`]]\")\n assert restify(Generator[None, None, None]) == (\":py:class:`~typing.Generator`\\\\ \"\n \"[:py:obj:`None`, :py:obj:`None`, \"\n \":py:obj:`None`]\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_Callable_test_restify_type_hints_Callable.if_sys_version_info_3.else_.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_Callable_test_restify_type_hints_Callable.if_sys_version_info_3.else_.None_1", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 90, "end_line": 102, "span_ids": ["test_restify_type_hints_Callable"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_restify_type_hints_Callable():\n assert restify(Callable) == \":py:class:`~typing.Callable`\"\n\n if sys.version_info >= (3, 7):\n assert restify(Callable[[str], int]) == (\":py:class:`~typing.Callable`\\\\ \"\n \"[[:py:class:`str`], :py:class:`int`]\")\n assert restify(Callable[..., int]) == (\":py:class:`~typing.Callable`\\\\ \"\n \"[[...], :py:class:`int`]\")\n else:\n assert restify(Callable[[str], int]) == (\":py:class:`~typing.Callable`\\\\ \"\n \"[:py:class:`str`, :py:class:`int`]\")\n assert restify(Callable[..., int]) == (\":py:class:`~typing.Callable`\\\\ \"\n \"[..., :py:class:`int`]\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/utils.py_contextlib_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/utils.py_contextlib_", "embedding": null, "metadata": {"file_path": "tests/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 48, "span_ids": ["impl", "HttpServerThread.run", "imports", "HttpServerThread", "HttpServerThread.terminate", "create_server", "impl:3", "HttpsServerThread"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import contextlib\nimport http.server\nimport pathlib\nimport threading\nfrom ssl import PROTOCOL_TLS_SERVER, SSLContext\n\n# Generated with:\n# $ openssl req -new -x509 -days 3650 -nodes -out cert.pem \\\n# -keyout cert.pem -addext \"subjectAltName = DNS:localhost\"\nCERT_FILE = str(pathlib.Path(__file__).parent / \"certs\" / \"cert.pem\")\n\n\nclass HttpServerThread(threading.Thread):\n def __init__(self, handler, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self.server = http.server.HTTPServer((\"localhost\", 7777), handler)\n\n def run(self):\n self.server.serve_forever(poll_interval=0.01)\n\n def terminate(self):\n self.server.shutdown()\n self.server.server_close()\n self.join()\n\n\nclass HttpsServerThread(HttpServerThread):\n def __init__(self, handler, *args, **kwargs):\n super().__init__(handler, *args, **kwargs)\n sslcontext = SSLContext(PROTOCOL_TLS_SERVER)\n sslcontext.load_cert_chain(CERT_FILE)\n self.server.socket = sslcontext.wrap_socket(self.server.socket, server_side=True)\n\n\ndef create_server(thread_class):\n def server(handler):\n server_thread = thread_class(handler, daemon=True)\n server_thread.start()\n try:\n yield server_thread\n finally:\n server_thread.terminate()\n return contextlib.contextmanager(server)\n\n\nhttp_server = create_server(HttpServerThread)\nhttps_server = create_server(HttpsServerThread)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DataDocumenter.add_directive_header_DataDocumenter.add_directive_header.if_self_options_annotatio.else_.try_.except_ValueError_.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DataDocumenter.add_directive_header_DataDocumenter.add_directive_header.if_self_options_annotatio.else_.try_.except_ValueError_.pass", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2040, "end_line": 2065, "span_ids": ["DataDocumenter.add_directive_header"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DataDocumenter(GenericAliasMixin, NewTypeMixin, TypeVarMixin,\n UninitializedGlobalVariableMixin, ModuleLevelDocumenter):\n\n def add_directive_header(self, sig: str) -> None:\n super().add_directive_header(sig)\n sourcename = self.get_sourcename()\n if self.options.annotation is SUPPRESS or self.should_suppress_directive_header():\n pass\n elif self.options.annotation:\n self.add_line(' :annotation: %s' % self.options.annotation,\n sourcename)\n else:\n if self.config.autodoc_typehints != 'none':\n # obtain annotation for this data\n annotations = get_type_hints(self.parent, None,\n self.config.autodoc_type_aliases)\n if self.objpath[-1] in annotations:\n objrepr = stringify_typehint(annotations.get(self.objpath[-1]))\n self.add_line(' :type: ' + objrepr, sourcename)\n\n try:\n if (self.options.no_value or self.should_suppress_value_header() or\n ismock(self.object)):\n pass\n else:\n objrepr = object_description(self.object)\n self.add_line(' :value: ' + objrepr, sourcename)\n except ValueError:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NewTypeDataDocumenter_NewTypeDataDocumenter.can_document_member.return.inspect_isNewType_member_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NewTypeDataDocumenter_NewTypeDataDocumenter.can_document_member.return.inspect_isNewType_member_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1829, "end_line": 1844, "span_ids": ["NewTypeDataDocumenter.can_document_member", "NewTypeDataDocumenter"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NewTypeDataDocumenter(DataDocumenter):\n \"\"\"\n Specialized Documenter subclass for NewTypes.\n\n Note: This must be invoked before FunctionDocumenter because NewType is a kind of\n function object.\n \"\"\"\n\n objtype = 'newtypedata'\n directivetype = 'data'\n priority = FunctionDocumenter.priority + 1\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n return inspect.isNewType(member) and isattr", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter_AttributeDocumenter.document_members.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter_AttributeDocumenter.document_members.pass", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2559, "end_line": 2593, "span_ids": ["AttributeDocumenter", "AttributeDocumenter.is_function_or_method", "AttributeDocumenter.document_members", "AttributeDocumenter.can_document_member"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AttributeDocumenter(GenericAliasMixin, NewTypeMixin, SlotsMixin, # type: ignore\n TypeVarMixin, RuntimeInstanceAttributeMixin,\n UninitializedInstanceAttributeMixin, NonDataDescriptorMixin,\n DocstringStripSignatureMixin, ClassLevelDocumenter):\n \"\"\"\n Specialized Documenter subclass for attributes.\n \"\"\"\n objtype = 'attribute'\n member_order = 60\n option_spec: OptionSpec = dict(ModuleLevelDocumenter.option_spec)\n option_spec[\"annotation\"] = annotation_option\n option_spec[\"no-value\"] = bool_option\n\n # must be higher than the MethodDocumenter, else it will recognize\n # some non-data descriptors as methods\n priority = 10\n\n @staticmethod\n def is_function_or_method(obj: Any) -> bool:\n return inspect.isfunction(obj) or inspect.isbuiltin(obj) or inspect.ismethod(obj)\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n if isinstance(parent, ModuleDocumenter):\n return False\n elif inspect.isattributedescriptor(member):\n return True\n elif not inspect.isroutine(member) and not isinstance(member, type):\n return True\n else:\n return False\n\n def document_members(self, all_members: bool = False) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.isinstanceattribute_AttributeDocumenter.isinstanceattribute.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.isinstanceattribute_AttributeDocumenter.isinstanceattribute.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2359, "end_line": 2378, "span_ids": ["AttributeDocumenter.isinstanceattribute"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AttributeDocumenter(GenericAliasMixin, NewTypeMixin, SlotsMixin, # type: ignore\n TypeVarMixin, RuntimeInstanceAttributeMixin,\n UninitializedInstanceAttributeMixin, NonDataDescriptorMixin,\n DocstringStripSignatureMixin, ClassLevelDocumenter):\n\n def isinstanceattribute(self) -> bool:\n \"\"\"Check the subject is an instance attribute.\"\"\"\n warnings.warn('AttributeDocumenter.isinstanceattribute() is deprecated.',\n RemovedInSphinx50Warning)\n # uninitialized instance variable (PEP-526)\n with mock(self.config.autodoc_mock_imports):\n try:\n ret = import_object(self.modname, self.objpath[:-1], 'class',\n attrgetter=self.get_attr,\n warningiserror=self.config.autodoc_warningiserror)\n self.parent = ret[3]\n annotations = get_type_hints(self.parent, None,\n self.config.autodoc_type_aliases)\n if self.objpath[-1] in annotations:\n self.object = UNINITIALIZED_ATTR\n return True\n except ImportError:\n pass\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NewTypeAttributeDocumenter_NewTypeAttributeDocumenter.can_document_member.return.not_isinstance_parent_Mo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NewTypeAttributeDocumenter_NewTypeAttributeDocumenter.can_document_member.return.not_isinstance_parent_Mo", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2335, "end_line": 2350, "span_ids": ["NewTypeAttributeDocumenter", "NewTypeAttributeDocumenter.can_document_member"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NewTypeAttributeDocumenter(AttributeDocumenter):\n \"\"\"\n Specialized Documenter subclass for NewTypes.\n\n Note: This must be invoked before MethodDocumenter because NewType is a kind of\n function object.\n \"\"\"\n\n objtype = 'newvarattribute'\n directivetype = 'attribute'\n priority = MethodDocumenter.priority + 1\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n return not isinstance(parent, ModuleDocumenter) and inspect.isNewType(member)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.__init___ModuleAnalyzer.parse.self_analyze_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.__init___ModuleAnalyzer.parse.self_analyze_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 129, "end_line": 142, "span_ids": ["ModuleAnalyzer.parse", "ModuleAnalyzer.__init__"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleAnalyzer:\n\n def __init__(self, source: IO, modname: str, srcname: str) -> None:\n self.modname = modname # name of the module\n self.srcname = srcname # name of the source file\n\n # cache the source code as well\n self.code = source.read()\n\n self._analyzed = False\n\n def parse(self) -> None:\n \"\"\"Parse the source code.\"\"\"\n warnings.warn('ModuleAnalyzer.parse() is deprecated.',\n RemovedInSphinx50Warning, stacklevel=2)\n self.analyze()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_typed_variable_test_autoattribute_typed_variable.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_typed_variable_test_autoattribute_typed_variable.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoattribute.py", "file_name": "test_ext_autodoc_autoattribute.py", "file_type": "text/x-python", "category": "test", "start_line": 47, "end_line": 57, "span_ids": ["test_autoattribute_typed_variable"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_typed_variable(app):\n actual = do_autodoc(app, 'attribute', 'target.typed_vars.Class.attr2')\n assert list(actual) == [\n '',\n '.. py:attribute:: Class.attr2',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_typed_variable_test_autodata_typed_variable.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_typed_variable_test_autodata_typed_variable.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autodata.py", "file_name": "test_ext_autodoc_autodata.py", "file_type": "text/x-python", "category": "test", "start_line": 47, "end_line": 59, "span_ids": ["test_autodata_typed_variable"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodata_typed_variable(app):\n actual = do_autodoc(app, 'data', 'target.typed_vars.attr2')\n assert list(actual) == [\n '',\n '.. py:data:: attr2',\n ' :module: target.typed_vars',\n ' :type: str',\n '',\n ' attr2',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_toctree_test_gettext_toctree.None_1.assert_expect_msg_id_in_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_toctree_test_gettext_toctree.None_1.assert_expect_msg_id_in_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 425, "end_line": 439, "span_ids": ["test_gettext_toctree"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('gettext')\n@pytest.mark.test_params(shared_result='test_intl_gettext')\ndef test_gettext_toctree(app):\n app.build()\n # --- toctree (index.rst)\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'index.po')\n actual = read_po(app.outdir / 'index.pot')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.id in [m.id for m in actual if m.id]\n # --- toctree (toctree.rst)\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'toctree.po')\n actual = read_po(app.outdir / 'toctree.pot')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.id in [m.id for m in actual if m.id]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_toctree_test_text_toctree.for_expect_msg_in_m_for_.assert_expect_msg_string_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_text_toctree_test_text_toctree.for_expect_msg_in_m_for_.assert_expect_msg_string_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 466, "end_line": 480, "span_ids": ["test_text_toctree"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_toctree(app):\n app.build()\n # --- toctree (index.rst)\n # Note: index.rst contains contents that is not shown in text.\n result = (app.outdir / 'index.txt').read_text()\n assert 'CONTENTS' in result\n assert 'TABLE OF CONTENTS' in result\n # --- toctree (toctree.rst)\n result = (app.outdir / 'toctree.txt').read_text()\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'toctree.po')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.string in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_topic_test_text_topic.for_expect_msg_in_m_for_.assert_expect_msg_string_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_topic_test_text_topic.for_expect_msg_in_m_for_.assert_expect_msg_string_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 483, "end_line": 504, "span_ids": ["test_text_topic", "test_gettext_topic"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('gettext')\n@pytest.mark.test_params(shared_result='test_intl_gettext')\ndef test_gettext_topic(app):\n app.build()\n # --- topic\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'topic.po')\n actual = read_po(app.outdir / 'topic.pot')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.id in [m.id for m in actual if m.id]\n\n\n@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_text_topic(app):\n app.build()\n # --- topic\n result = (app.outdir / 'topic.txt').read_text()\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'topic.po')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.string in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_definition_terms_test_gettext_definition_terms.for_expect_msg_in_m_for_.assert_expect_msg_id_in_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_definition_terms_test_gettext_definition_terms.for_expect_msg_in_m_for_.assert_expect_msg_id_in_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 507, "end_line": 516, "span_ids": ["test_gettext_definition_terms"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('gettext')\n@pytest.mark.test_params(shared_result='test_intl_gettext')\ndef test_gettext_definition_terms(app):\n app.build()\n # --- definition terms: regression test for #2198, #2205\n expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'definition_terms.po')\n actual = read_po(app.outdir / 'definition_terms.pot')\n for expect_msg in [m for m in expect if m.id]:\n assert expect_msg.id in [m.id for m in actual if m.id]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleClass.__special_without_docstring___ExampleClass._private_without_docstring.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExampleClass.__special_without_docstring___ExampleClass._private_without_docstring.pass", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_google.py", "file_name": "example_google.py", "file_type": "text/x-python", "category": "implementation", "start_line": 277, "end_line": 296, "span_ids": ["ExampleClass._private", "ExampleClass.__special_without_docstring__", "ExampleClass._private_without_docstring"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleClass:\n\n def __special_without_docstring__(self):\n pass\n\n def _private(self):\n \"\"\"By default private members are not included.\n\n Private members are any methods or attributes that start with an\n underscore and are *not* special. By default they are not included\n in the output.\n\n This behavior can be changed such that private members *are* included\n by changing the following setting in Sphinx's conf.py::\n\n napoleon_include_private_with_doc = True\n\n \"\"\"\n pass\n\n def _private_without_docstring(self):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NewTypeMixin_NewTypeMixin.update_content.super_update_content_mo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NewTypeMixin_NewTypeMixin.update_content.super_update_content_mo", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1881, "end_line": 1901, "span_ids": ["NewTypeMixin.update_content", "NewTypeMixin.should_suppress_directive_header", "NewTypeMixin"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NewTypeMixin(DataDocumenterMixinBase):\n \"\"\"\n Mixin for DataDocumenter and AttributeDocumenter to provide the feature for\n supporting NewTypes.\n \"\"\"\n\n def should_suppress_directive_header(self) -> bool:\n return (inspect.isNewType(self.object) or\n super().should_suppress_directive_header())\n\n def update_content(self, more_content: StringList) -> None:\n if inspect.isNewType(self.object):\n if self.config.autodoc_typehints_format == \"short\":\n supertype = restify(self.object.__supertype__, \"smart\")\n else:\n supertype = restify(self.object.__supertype__)\n\n more_content.append(_('alias of %s') % supertype, '')\n more_content.append('', '')\n\n super().update_content(more_content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_TypeVarMixin_TypeVarMixin.get_doc.if_isinstance_self_object.else_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_TypeVarMixin_TypeVarMixin.get_doc.if_isinstance_self_object.else_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1904, "end_line": 1926, "span_ids": ["TypeVarMixin.get_doc", "TypeVarMixin", "TypeVarMixin.should_suppress_directive_header"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TypeVarMixin(DataDocumenterMixinBase):\n \"\"\"\n Mixin for DataDocumenter and AttributeDocumenter to provide the feature for\n supporting TypeVars.\n \"\"\"\n\n def should_suppress_directive_header(self) -> bool:\n return (isinstance(self.object, TypeVar) or\n super().should_suppress_directive_header())\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n if ignore is not None:\n warnings.warn(\"The 'ignore' argument to autodoc.%s.get_doc() is deprecated.\"\n % self.__class__.__name__,\n RemovedInSphinx50Warning, stacklevel=2)\n\n if isinstance(self.object, TypeVar):\n if self.object.__doc__ != TypeVar.__doc__:\n return super().get_doc() # type: ignore\n else:\n return []\n else:\n return super().get_doc() # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_TypeVarMixin.update_content_TypeVarMixin.update_content.super_update_content_mo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_TypeVarMixin.update_content_TypeVarMixin.update_content.super_update_content_mo", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1928, "end_line": 1947, "span_ids": ["TypeVarMixin.update_content"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TypeVarMixin(DataDocumenterMixinBase):\n\n def update_content(self, more_content: StringList) -> None:\n if isinstance(self.object, TypeVar):\n attrs = [repr(self.object.__name__)]\n for constraint in self.object.__constraints__:\n attrs.append(stringify_typehint(constraint))\n if self.object.__bound__:\n if self.config.autodoc_typehints_format == \"short\":\n bound = restify(self.object.__bound__, \"smart\")\n else:\n bound = restify(self.object.__bound__)\n attrs.append(r\"bound=\\ \" + bound)\n if self.object.__covariant__:\n attrs.append(\"covariant=True\")\n if self.object.__contravariant__:\n attrs.append(\"contravariant=True\")\n\n more_content.append(_('alias of TypeVar(%s)') % \", \".join(attrs), '')\n more_content.append('', '')\n\n super().update_content(more_content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._lookup_annotation_GoogleDocstring._lookup_annotation.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._lookup_annotation_GoogleDocstring._lookup_annotation.return._", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 811, "end_line": 824, "span_ids": ["GoogleDocstring._lookup_annotation"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _lookup_annotation(self, _name: str) -> str:\n if self._config.napoleon_attr_annotations:\n if self._what in (\"module\", \"class\", \"exception\") and self._obj:\n # cache the class annotations\n if not hasattr(self, \"_annotations\"):\n localns = getattr(self._config, \"autodoc_type_aliases\", {})\n localns.update(getattr(\n self._config, \"napoleon_type_aliases\", {}\n ) or {})\n self._annotations = get_type_hints(self._obj, None, localns)\n if _name in self._annotations:\n return stringify_annotation(self._annotations[_name])\n # No annotation found\n return \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_FileAvoidWrite.close_FileAvoidWrite.close.with_open_self__path_w_.f_write_buf_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_FileAvoidWrite.close_FileAvoidWrite.close.with_open_self__path_w_.f_write_buf_", "embedding": null, "metadata": {"file_path": "sphinx/util/osutil.py", "file_name": "osutil.py", "file_type": "text/x-python", "category": "implementation", "start_line": 216, "end_line": 233, "span_ids": ["FileAvoidWrite.close"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FileAvoidWrite:\n\n def close(self) -> None:\n \"\"\"Stop accepting writes and write file, if needed.\"\"\"\n if not self._io:\n raise Exception('FileAvoidWrite does not support empty files.')\n\n buf = self.getvalue()\n self._io.close()\n\n try:\n with open(self._path, encoding='utf-8') as old_f:\n old_content = old_f.read()\n if old_content == buf:\n return\n except OSError:\n pass\n\n with open(self._path, 'w', encoding='utf-8') as f:\n f.write(buf)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_FileAvoidWrite.__enter___": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_FileAvoidWrite.__enter___", "embedding": null, "metadata": {"file_path": "sphinx/util/osutil.py", "file_name": "osutil.py", "file_type": "text/x-python", "category": "implementation", "start_line": 190, "end_line": 211, "span_ids": ["FileAvoidWrite.__exit__", "FileAvoidWrite.__getattr__", "rmtree", "FileAvoidWrite.__enter__"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FileAvoidWrite:\n\n def __enter__(self) -> \"FileAvoidWrite\":\n return self\n\n def __exit__(self, exc_type: Type[Exception], exc_value: Exception, traceback: Any) -> bool: # NOQA\n self.close()\n return True\n\n def __getattr__(self, name: str) -> Any:\n # Proxy to _io instance.\n if not self._io:\n raise Exception('Must write to FileAvoidWrite before other '\n 'methods can be used')\n\n return getattr(self._io, name)\n\n\ndef rmtree(path: str) -> None:\n if os.path.isdir(path):\n shutil.rmtree(path)\n else:\n os.remove(path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/ext_napoleon_pep526_data_google.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/ext_napoleon_pep526_data_google.py__", "embedding": null, "metadata": {"file_path": "tests/ext_napoleon_pep526_data_google.py", "file_name": "ext_napoleon_pep526_data_google.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["impl", "docstring", "PEP526GoogleClass"], "tokens": 87}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test module for napoleon PEP 526 compatibility with google style\"\"\"\n\nmodule_level_var: int = 99\n\"\"\"This is an example module level variable\"\"\"\n\n\nclass PEP526GoogleClass:\n \"\"\"Sample class with PEP 526 annotations and google docstring\n\n Attributes:\n attr1: Attr1 description.\n attr2: Attr2 description.\n \"\"\"\n\n attr1: int\n attr2: str", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/ext_napoleon_pep526_data_numpy.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/ext_napoleon_pep526_data_numpy.py__", "embedding": null, "metadata": {"file_path": "tests/ext_napoleon_pep526_data_numpy.py", "file_name": "ext_napoleon_pep526_data_numpy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["impl", "PEP526NumpyClass", "docstring"], "tokens": 93}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test module for napoleon PEP 526 compatibility with numpy style\"\"\"\n\nmodule_level_var: int = 99\n\"\"\"This is an example module level variable\"\"\"\n\n\nclass PEP526NumpyClass:\n \"\"\"\n Sample class with PEP 526 annotations and numpy docstring\n\n Attributes\n ----------\n attr1:\n Attr1 description\n\n attr2:\n Attr2 description\n \"\"\"\n attr1: int\n attr2: str", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_nonexistent_cert_file_test_connect_to_selfsigned_nonexistent_cert_file.assert_content_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_connect_to_selfsigned_nonexistent_cert_file_test_connect_to_selfsigned_nonexistent_cert_file.assert_content_", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 381, "end_line": 396, "span_ids": ["test_connect_to_selfsigned_nonexistent_cert_file"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver-https', freshenv=True)\ndef test_connect_to_selfsigned_nonexistent_cert_file(app):\n app.config.tls_cacerts = \"does/not/exist\"\n with https_server(OKHandler):\n app.build()\n\n with open(app.outdir / 'output.json') as fp:\n content = json.load(fp)\n assert content == {\n \"code\": 0,\n \"status\": \"broken\",\n \"filename\": \"index.rst\",\n \"lineno\": 1,\n \"uri\": \"https://localhost:7777/\",\n \"info\": \"Could not find a suitable TLS CA certificate bundle, invalid path: does/not/exist\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_TooManyRedirects_on_HEAD_make_retry_after_handler.return.RetryAfterHandler": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_TooManyRedirects_on_HEAD_make_retry_after_handler.return.RetryAfterHandler", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 399, "end_line": 440, "span_ids": ["test_TooManyRedirects_on_HEAD.InfiniteRedirectOnHeadHandler", "make_retry_after_handler", "test_TooManyRedirects_on_HEAD", "test_TooManyRedirects_on_HEAD.InfiniteRedirectOnHeadHandler.do_HEAD", "make_retry_after_handler.RetryAfterHandler.do_HEAD", "make_retry_after_handler.RetryAfterHandler"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)\ndef test_TooManyRedirects_on_HEAD(app):\n class InfiniteRedirectOnHeadHandler(http.server.BaseHTTPRequestHandler):\n def do_HEAD(self):\n self.send_response(302, \"Found\")\n self.send_header(\"Location\", \"http://localhost:7777/\")\n self.end_headers()\n\n def do_GET(self):\n self.send_response(200, \"OK\")\n self.end_headers()\n self.wfile.write(b\"ok\\n\")\n\n with http_server(InfiniteRedirectOnHeadHandler):\n app.build()\n\n with open(app.outdir / 'output.json') as fp:\n content = json.load(fp)\n assert content == {\n \"code\": 0,\n \"status\": \"working\",\n \"filename\": \"index.rst\",\n \"lineno\": 1,\n \"uri\": \"http://localhost:7777/\",\n \"info\": \"\",\n }\n\n\ndef make_retry_after_handler(responses):\n class RetryAfterHandler(http.server.BaseHTTPRequestHandler):\n def do_HEAD(self):\n status, retry_after = responses.pop(0)\n self.send_response(status)\n if retry_after:\n self.send_header('Retry-After', retry_after)\n self.end_headers()\n\n def log_date_time_string(self):\n \"\"\"Strip date and time from logged messages for assertions.\"\"\"\n return \"\"\n\n return RetryAfterHandler", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_retry_after_int_delay_test_too_many_requests_retry_after_int_delay.assert_stderr_textwrap": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_retry_after_int_delay_test_too_many_requests_retry_after_int_delay.assert_stderr_textwrap", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 443, "end_line": 466, "span_ids": ["test_too_many_requests_retry_after_int_delay"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)\ndef test_too_many_requests_retry_after_int_delay(app, capsys, status):\n with http_server(make_retry_after_handler([(429, \"0\"), (200, None)])), \\\n mock.patch(\"sphinx.builders.linkcheck.DEFAULT_DELAY\", 0), \\\n mock.patch(\"sphinx.builders.linkcheck.QUEUE_POLL_SECS\", 0.01):\n app.build()\n content = (app.outdir / 'output.json').read_text()\n assert json.loads(content) == {\n \"filename\": \"index.rst\",\n \"lineno\": 1,\n \"status\": \"working\",\n \"code\": 0,\n \"uri\": \"http://localhost:7777/\",\n \"info\": \"\",\n }\n rate_limit_log = \"-rate limited- http://localhost:7777/ | sleeping...\\n\"\n assert rate_limit_log in strip_colors(status.getvalue())\n _stdout, stderr = capsys.readouterr()\n assert stderr == textwrap.dedent(\n \"\"\"\\\n 127.0.0.1 - - [] \"HEAD / HTTP/1.1\" 429 -\n 127.0.0.1 - - [] \"HEAD / HTTP/1.1\" 200 -\n \"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_retry_after_HTTP_date_test_too_many_requests_retry_after_HTTP_date.assert_stderr_textwrap": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_retry_after_HTTP_date_test_too_many_requests_retry_after_HTTP_date.assert_stderr_textwrap", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 469, "end_line": 490, "span_ids": ["test_too_many_requests_retry_after_HTTP_date"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)\ndef test_too_many_requests_retry_after_HTTP_date(app, capsys):\n now = datetime.now().timetuple()\n retry_after = wsgiref.handlers.format_date_time(time.mktime(now))\n with http_server(make_retry_after_handler([(429, retry_after), (200, None)])):\n app.build()\n content = (app.outdir / 'output.json').read_text()\n assert json.loads(content) == {\n \"filename\": \"index.rst\",\n \"lineno\": 1,\n \"status\": \"working\",\n \"code\": 0,\n \"uri\": \"http://localhost:7777/\",\n \"info\": \"\",\n }\n _stdout, stderr = capsys.readouterr()\n assert stderr == textwrap.dedent(\n \"\"\"\\\n 127.0.0.1 - - [] \"HEAD / HTTP/1.1\" 429 -\n 127.0.0.1 - - [] \"HEAD / HTTP/1.1\" 200 -\n \"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_retry_after_without_header_test_too_many_requests_retry_after_without_header.assert_stderr_textwrap": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_retry_after_without_header_test_too_many_requests_retry_after_without_header.assert_stderr_textwrap", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 493, "end_line": 513, "span_ids": ["test_too_many_requests_retry_after_without_header"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)\ndef test_too_many_requests_retry_after_without_header(app, capsys):\n with http_server(make_retry_after_handler([(429, None), (200, None)])),\\\n mock.patch(\"sphinx.builders.linkcheck.DEFAULT_DELAY\", 0):\n app.build()\n content = (app.outdir / 'output.json').read_text()\n assert json.loads(content) == {\n \"filename\": \"index.rst\",\n \"lineno\": 1,\n \"status\": \"working\",\n \"code\": 0,\n \"uri\": \"http://localhost:7777/\",\n \"info\": \"\",\n }\n _stdout, stderr = capsys.readouterr()\n assert stderr == textwrap.dedent(\n \"\"\"\\\n 127.0.0.1 - - [] \"HEAD / HTTP/1.1\" 429 -\n 127.0.0.1 - - [] \"HEAD / HTTP/1.1\" 200 -\n \"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_user_timeout_test_too_many_requests_user_timeout.assert_json_loads_content": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_too_many_requests_user_timeout_test_too_many_requests_user_timeout.assert_json_loads_content", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 516, "end_line": 529, "span_ids": ["test_too_many_requests_user_timeout"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)\ndef test_too_many_requests_user_timeout(app, capsys):\n app.config.linkcheck_rate_limit_timeout = 0.0\n with http_server(make_retry_after_handler([(429, None)])):\n app.build()\n content = (app.outdir / 'output.json').read_text()\n assert json.loads(content) == {\n \"filename\": \"index.rst\",\n \"lineno\": 1,\n \"status\": \"broken\",\n \"code\": 0,\n \"uri\": \"http://localhost:7777/\",\n \"info\": \"429 Client Error: Too Many Requests for url: http://localhost:7777/\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_instance_variable_test_autoattribute_instance_variable.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_instance_variable_test_autoattribute_instance_variable.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoattribute.py", "file_name": "test_ext_autodoc_autoattribute.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 72, "span_ids": ["test_autoattribute_instance_variable"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_instance_variable(app):\n actual = do_autodoc(app, 'attribute', 'target.typed_vars.Class.attr4')\n assert list(actual) == [\n '',\n '.. py:attribute:: Class.attr4',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ' attr4',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_type_comment_test_autodata_type_comment.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_type_comment_test_autodata_type_comment.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autodata.py", "file_name": "test_ext_autodoc_autodata.py", "file_type": "text/x-python", "category": "test", "start_line": 62, "end_line": 75, "span_ids": ["test_autodata_type_comment"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodata_type_comment(app):\n actual = do_autodoc(app, 'data', 'target.typed_vars.attr3')\n assert list(actual) == [\n '',\n '.. py:data:: attr3',\n ' :module: target.typed_vars',\n ' :type: str',\n \" :value: ''\",\n '',\n ' attr3',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NamedtupleSubclass_BaseDocstringTest.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NamedtupleSubclass_BaseDocstringTest.pass", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 32, "end_line": 54, "span_ids": ["NamedtupleSubclass.__new__", "BaseDocstringTest", "NamedtupleSubclass"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NamedtupleSubclass(namedtuple('NamedtupleSubclass', ('attr1', 'attr2'))):\n \"\"\"Sample namedtuple subclass\n\n Attributes\n ----------\n attr1 : Arbitrary type\n Quick description of attr1\n attr2 : Another arbitrary type\n Quick description of attr2\n attr3 : Type\n\n Adds a newline after the type\n\n \"\"\"\n # To avoid creating a dict, as a namedtuple doesn't have it:\n __slots__ = ()\n\n def __new__(cls, attr1, attr2=None):\n return super().__new__(cls, attr1, attr2)\n\n\nclass BaseDocstringTest(TestCase):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NamedtupleSubclassTest_NamedtupleSubclassTest.test_attributes_docstring.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_NamedtupleSubclassTest_NamedtupleSubclassTest.test_attributes_docstring.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 57, "end_line": 85, "span_ids": ["NamedtupleSubclassTest", "NamedtupleSubclassTest.test_attributes_docstring"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NamedtupleSubclassTest(BaseDocstringTest):\n def test_attributes_docstring(self):\n config = Config()\n actual = str(NumpyDocstring(cleandoc(NamedtupleSubclass.__doc__),\n config=config, app=None, what='class',\n name='NamedtupleSubclass', obj=NamedtupleSubclass))\n expected = \"\"\"\\\nSample namedtuple subclass\n\n.. attribute:: attr1\n\n Quick description of attr1\n\n :type: Arbitrary type\n\n.. attribute:: attr2\n\n Quick description of attr2\n\n :type: Another arbitrary type\n\n.. attribute:: attr3\n\n Adds a newline after the type\n\n :type: Type\n\"\"\"\n\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_pep526_annotations_GoogleDocstringTest.test_pep526_annotations.if_sys_version_info_3.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_pep526_annotations_GoogleDocstringTest.test_pep526_annotations.if_sys_version_info_3.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1100, "end_line": 1123, "span_ids": ["GoogleDocstringTest.test_pep526_annotations"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_pep526_annotations(self):\n if sys.version_info >= (3, 6):\n # Test class attributes annotations\n config = Config(\n napoleon_attr_annotations=True\n )\n actual = str(GoogleDocstring(cleandoc(PEP526GoogleClass.__doc__), config, app=None, what=\"class\",\n obj=PEP526GoogleClass))\n expected = \"\"\"\\\nSample class with PEP 526 annotations and google docstring\n\n.. attribute:: attr1\n\n Attr1 description.\n\n :type: int\n\n.. attribute:: attr2\n\n Attr2 description.\n\n :type: str\n\"\"\"\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_TestNumpyDocstring.test_escape_args_and_kwargs_TestNumpyDocstring.test_escape_args_and_kwargs.assert_actual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_TestNumpyDocstring.test_escape_args_and_kwargs_TestNumpyDocstring.test_escape_args_and_kwargs.assert_actual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 2422, "end_line": 2434, "span_ids": ["TestNumpyDocstring.test_escape_args_and_kwargs"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestNumpyDocstring:\n\n @pytest.mark.parametrize(\n (\"name\", \"expected\"),\n (\n (\"x, y, z\", \"x, y, z\"),\n (\"*args, **kwargs\", r\"\\*args, \\*\\*kwargs\"),\n (\"*x, **y\", r\"\\*x, \\*\\*y\"),\n ),\n )\n def test_escape_args_and_kwargs(self, name, expected):\n numpy_docstring = NumpyDocstring(\"\")\n actual = numpy_docstring._escape_args_and_kwargs(name)\n\n assert actual == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_TestNumpyDocstring.test_pep526_annotations_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_TestNumpyDocstring.test_pep526_annotations_", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 2436, "end_line": 2461, "span_ids": ["TestNumpyDocstring.test_pep526_annotations"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestNumpyDocstring:\n\n def test_pep526_annotations(self):\n if sys.version_info >= (3, 6):\n # test class attributes annotations\n config = Config(\n napoleon_attr_annotations=True\n )\n actual = str(NumpyDocstring(cleandoc(PEP526NumpyClass.__doc__), config, app=None, what=\"class\",\n obj=PEP526NumpyClass))\n expected = \"\"\"\\\nSample class with PEP 526 annotations and numpy docstring\n\n.. attribute:: attr1\n\n Attr1 description\n\n :type: int\n\n.. attribute:: attr2\n\n Attr2 description\n\n :type: str\n\"\"\"\n print(actual)\n assert expected == actual", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_AliasNode_AliasNode.copy.return.self___class___self_sig_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_AliasNode_AliasNode.copy.return.self___class___self_sig_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3480, "end_line": 3500, "span_ids": ["AliasNode.copy", "AliasNode"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AliasNode(nodes.Element):\n def __init__(self, sig: str, aliasOptions: dict,\n document: Any, env: \"BuildEnvironment\" = None,\n parentKey: LookupKey = None) -> None:\n super().__init__()\n self.sig = sig\n self.aliasOptions = aliasOptions\n self.document = document\n if env is not None:\n if 'c:parent_symbol' not in env.temp_data:\n root = env.domaindata['c']['root_symbol']\n env.temp_data['c:parent_symbol'] = root\n env.ref_context['c:parent_key'] = root.get_lookup_key()\n self.parentKey = env.ref_context['c:parent_key']\n else:\n assert parentKey is not None\n self.parentKey = parentKey\n\n def copy(self) -> 'AliasNode':\n return self.__class__(self.sig, self.aliasOptions, self.document,\n env=None, parentKey=self.parentKey)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.get_module_members_ModuleDocumenter.get_module_members.return.members": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ModuleDocumenter.get_module_members_ModuleDocumenter.get_module_members.return.members", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1056, "end_line": 1081, "span_ids": ["ModuleDocumenter.get_module_members"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleDocumenter(Documenter):\n\n def get_module_members(self) -> Dict[str, ObjectMember]:\n \"\"\"Get members of target module.\"\"\"\n if self.analyzer:\n attr_docs = self.analyzer.attr_docs\n else:\n attr_docs = {}\n\n members: Dict[str, ObjectMember] = {}\n for name in dir(self.object):\n try:\n value = safe_getattr(self.object, name, None)\n if ismock(value):\n value = undecorate(value)\n docstring = attr_docs.get(('', name), [])\n members[name] = ObjectMember(name, value, docstring=\"\\n\".join(docstring))\n except AttributeError:\n continue\n\n # annotation only member (ex. attr: int)\n for name in inspect.getannotations(self.object):\n if name not in members:\n docstring = attr_docs.get(('', name), [])\n members[name] = ObjectMember(name, INSTANCEATTR,\n docstring=\"\\n\".join(docstring))\n\n return members", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_GenericAliasMixin_GenericAliasMixin.update_content.super_update_content_mo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_GenericAliasMixin_GenericAliasMixin.update_content.super_update_content_mo", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1858, "end_line": 1878, "span_ids": ["GenericAliasMixin.update_content", "GenericAliasMixin.should_suppress_directive_header", "GenericAliasMixin"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GenericAliasMixin(DataDocumenterMixinBase):\n \"\"\"\n Mixin for DataDocumenter and AttributeDocumenter to provide the feature for\n supporting GenericAliases.\n \"\"\"\n\n def should_suppress_directive_header(self) -> bool:\n return (inspect.isgenericalias(self.object) or\n super().should_suppress_directive_header())\n\n def update_content(self, more_content: StringList) -> None:\n if inspect.isgenericalias(self.object):\n if self.config.autodoc_typehints_format == \"short\":\n alias = restify(self.object, \"smart\")\n else:\n alias = restify(self.object)\n\n more_content.append(_('alias of %s') % alias, '')\n more_content.append('', '')\n\n super().update_content(more_content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_UninitializedGlobalVariableMixin_UninitializedGlobalVariableMixin.get_doc.if_self_object_is_UNINITI.else_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_UninitializedGlobalVariableMixin_UninitializedGlobalVariableMixin.get_doc.if_self_object_is_UNINITI.else_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1950, "end_line": 1988, "span_ids": ["UninitializedGlobalVariableMixin.import_object", "UninitializedGlobalVariableMixin.should_suppress_value_header", "UninitializedGlobalVariableMixin.get_doc", "UninitializedGlobalVariableMixin"], "tokens": 307}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class UninitializedGlobalVariableMixin(DataDocumenterMixinBase):\n \"\"\"\n Mixin for DataDocumenter to provide the feature for supporting uninitialized\n (type annotation only) global variables.\n \"\"\"\n\n def import_object(self, raiseerror: bool = False) -> bool:\n try:\n return super().import_object(raiseerror=True) # type: ignore\n except ImportError as exc:\n # annotation only instance variable (PEP-526)\n try:\n with mock(self.config.autodoc_mock_imports):\n parent = import_module(self.modname, self.config.autodoc_warningiserror)\n annotations = get_type_hints(parent, None,\n self.config.autodoc_type_aliases)\n if self.objpath[-1] in annotations:\n self.object = UNINITIALIZED_ATTR\n self.parent = parent\n return True\n except ImportError:\n pass\n\n if raiseerror:\n raise\n else:\n logger.warning(exc.args[0], type='autodoc', subtype='import_object')\n self.env.note_reread()\n return False\n\n def should_suppress_value_header(self) -> bool:\n return (self.object is UNINITIALIZED_ATTR or\n super().should_suppress_value_header())\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n if self.object is UNINITIALIZED_ATTR:\n return []\n else:\n return super().get_doc(ignore) # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DataDocumenter_DataDocumenter.should_suppress_value_header.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DataDocumenter_DataDocumenter.should_suppress_value_header.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1991, "end_line": 2038, "span_ids": ["DataDocumenter.should_suppress_value_header", "DataDocumenter.update_annotations", "DataDocumenter.import_object", "DataDocumenter.can_document_member", "DataDocumenter"], "tokens": 365}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DataDocumenter(GenericAliasMixin, NewTypeMixin, TypeVarMixin,\n UninitializedGlobalVariableMixin, ModuleLevelDocumenter):\n \"\"\"\n Specialized Documenter subclass for data items.\n \"\"\"\n objtype = 'data'\n member_order = 40\n priority = -10\n option_spec: OptionSpec = dict(ModuleLevelDocumenter.option_spec)\n option_spec[\"annotation\"] = annotation_option\n option_spec[\"no-value\"] = bool_option\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n return isinstance(parent, ModuleDocumenter) and isattr\n\n def update_annotations(self, parent: Any) -> None:\n \"\"\"Update __annotations__ to support type_comment and so on.\"\"\"\n annotations = dict(inspect.getannotations(parent))\n parent.__annotations__ = annotations\n\n try:\n analyzer = ModuleAnalyzer.for_module(self.modname)\n analyzer.analyze()\n for (classname, attrname), annotation in analyzer.annotations.items():\n if classname == '' and attrname not in annotations:\n annotations[attrname] = annotation\n except PycodeError:\n pass\n\n def import_object(self, raiseerror: bool = False) -> bool:\n ret = super().import_object(raiseerror)\n if self.parent:\n self.update_annotations(self.parent)\n\n return ret\n\n def should_suppress_value_header(self) -> bool:\n if super().should_suppress_value_header():\n return True\n else:\n doc = self.get_doc()\n docstring, metadata = separate_metadata('\\n'.join(sum(doc, [])))\n if 'hide-value' in metadata:\n return True\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DataDocumenter.document_members_DataDocumenter.add_content.super_add_content_more_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DataDocumenter.document_members_DataDocumenter.add_content.super_add_content_more_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2067, "end_line": 2104, "span_ids": ["DataDocumenter.get_doc", "DataDocumenter.get_module_comment", "DataDocumenter.get_real_modname", "DataDocumenter.document_members", "DataDocumenter.add_content"], "tokens": 320}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DataDocumenter(GenericAliasMixin, NewTypeMixin, TypeVarMixin,\n UninitializedGlobalVariableMixin, ModuleLevelDocumenter):\n\n def document_members(self, all_members: bool = False) -> None:\n pass\n\n def get_real_modname(self) -> str:\n real_modname = self.get_attr(self.parent or self.object, '__module__', None)\n return real_modname or self.modname\n\n def get_module_comment(self, attrname: str) -> Optional[List[str]]:\n try:\n analyzer = ModuleAnalyzer.for_module(self.modname)\n analyzer.analyze()\n key = ('', attrname)\n if key in analyzer.attr_docs:\n return list(analyzer.attr_docs[key])\n except PycodeError:\n pass\n\n return None\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n # Check the variable has a docstring-comment\n comment = self.get_module_comment(self.objpath[-1])\n if comment:\n return [comment]\n else:\n return super().get_doc(ignore)\n\n def add_content(self, more_content: Optional[StringList], no_docstring: bool = False\n ) -> None:\n # Disable analyzing variable comment on Documenter.add_content() to control it on\n # DataDocumenter.add_content()\n self.analyzer = None\n\n if not more_content:\n more_content = StringList()\n\n self.update_content(more_content)\n super().add_content(more_content, no_docstring=no_docstring)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_RuntimeInstanceAttributeMixin_RuntimeInstanceAttributeMixin.is_runtime_instance_attribute.if_self_get_attribute_com.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_RuntimeInstanceAttributeMixin_RuntimeInstanceAttributeMixin.is_runtime_instance_attribute.if_self_get_attribute_com.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2424, "end_line": 2446, "span_ids": ["RuntimeInstanceAttributeMixin", "RuntimeInstanceAttributeMixin.is_runtime_instance_attribute"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RuntimeInstanceAttributeMixin(DataDocumenterMixinBase):\n \"\"\"\n Mixin for AttributeDocumenter to provide the feature for supporting runtime\n instance attributes (that are defined in __init__() methods with doc-comments).\n\n Example:\n\n class Foo:\n def __init__(self):\n self.attr = None #: This is a target of this mix-in.\n \"\"\"\n\n RUNTIME_INSTANCE_ATTRIBUTE = object()\n\n def is_runtime_instance_attribute(self, parent: Any) -> bool:\n \"\"\"Check the subject is an attribute defined in __init__().\"\"\"\n # An instance variable defined in __init__().\n if self.get_attribute_comment(parent, self.objpath[-1]): # type: ignore\n return True\n elif self.is_runtime_instance_attribute_not_commented(parent):\n return True\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_UninitializedInstanceAttributeMixin_UninitializedInstanceAttributeMixin.is_uninitialized_instance_attribute.if_self_objpath_1_in_an.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_UninitializedInstanceAttributeMixin_UninitializedInstanceAttributeMixin.is_uninitialized_instance_attribute.if_self_objpath_1_in_an.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2278, "end_line": 2295, "span_ids": ["UninitializedInstanceAttributeMixin", "UninitializedInstanceAttributeMixin.is_uninitialized_instance_attribute"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class UninitializedInstanceAttributeMixin(DataDocumenterMixinBase):\n \"\"\"\n Mixin for AttributeDocumenter to provide the feature for supporting uninitialized\n instance attributes (PEP-526 styled, annotation only attributes).\n\n Example:\n\n class Foo:\n attr: int #: This is a target of this mix-in.\n \"\"\"\n\n def is_uninitialized_instance_attribute(self, parent: Any) -> bool:\n \"\"\"Check the subject is an annotation only attribute.\"\"\"\n annotations = get_type_hints(parent, None, self.config.autodoc_type_aliases)\n if self.objpath[-1] in annotations:\n return True\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.import_object_AttributeDocumenter.should_suppress_value_header.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.import_object_AttributeDocumenter.should_suppress_value_header.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2638, "end_line": 2661, "span_ids": ["AttributeDocumenter.should_suppress_value_header", "AttributeDocumenter.import_object", "AttributeDocumenter.get_real_modname"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AttributeDocumenter(GenericAliasMixin, NewTypeMixin, SlotsMixin, # type: ignore\n TypeVarMixin, RuntimeInstanceAttributeMixin,\n UninitializedInstanceAttributeMixin, NonDataDescriptorMixin,\n DocstringStripSignatureMixin, ClassLevelDocumenter):\n\n def import_object(self, raiseerror: bool = False) -> bool:\n ret = super().import_object(raiseerror)\n if inspect.isenumattribute(self.object):\n self.object = self.object.value\n if self.parent:\n self.update_annotations(self.parent)\n\n return ret\n\n def get_real_modname(self) -> str:\n real_modname = self.get_attr(self.parent or self.object, '__module__', None)\n return real_modname or self.modname\n\n def should_suppress_value_header(self) -> bool:\n if super().should_suppress_value_header():\n return True\n else:\n doc = self.get_doc()\n if doc:\n docstring, metadata = separate_metadata('\\n'.join(sum(doc, [])))\n if 'hide-value' in metadata:\n return True\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.add_directive_header_AttributeDocumenter.add_directive_header.if_self_options_annotatio.else_.try_.except_ValueError_.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.add_directive_header_AttributeDocumenter.add_directive_header.if_self_options_annotatio.else_.try_.except_ValueError_.pass", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2663, "end_line": 2687, "span_ids": ["AttributeDocumenter.add_directive_header"], "tokens": 295}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AttributeDocumenter(GenericAliasMixin, NewTypeMixin, SlotsMixin, # type: ignore\n TypeVarMixin, RuntimeInstanceAttributeMixin,\n UninitializedInstanceAttributeMixin, NonDataDescriptorMixin,\n DocstringStripSignatureMixin, ClassLevelDocumenter):\n\n def add_directive_header(self, sig: str) -> None:\n super().add_directive_header(sig)\n sourcename = self.get_sourcename()\n if self.options.annotation is SUPPRESS or self.should_suppress_directive_header():\n pass\n elif self.options.annotation:\n self.add_line(' :annotation: %s' % self.options.annotation, sourcename)\n else:\n if self.config.autodoc_typehints != 'none':\n # obtain type annotation for this attribute\n annotations = get_type_hints(self.parent, None,\n self.config.autodoc_type_aliases)\n if self.objpath[-1] in annotations:\n objrepr = stringify_typehint(annotations.get(self.objpath[-1]))\n self.add_line(' :type: ' + objrepr, sourcename)\n\n try:\n if (self.options.no_value or self.should_suppress_value_header() or\n ismock(self.object)):\n pass\n else:\n objrepr = object_description(self.object)\n self.add_line(' :value: ' + objrepr, sourcename)\n except ValueError:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.get_attribute_comment_AttributeDocumenter.get_attribute_comment.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.get_attribute_comment_AttributeDocumenter.get_attribute_comment.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2498, "end_line": 2513, "span_ids": ["AttributeDocumenter.get_attribute_comment"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AttributeDocumenter(GenericAliasMixin, NewTypeMixin, SlotsMixin, # type: ignore\n TypeVarMixin, RuntimeInstanceAttributeMixin,\n UninitializedInstanceAttributeMixin, NonDataDescriptorMixin,\n DocstringStripSignatureMixin, ClassLevelDocumenter):\n\n def get_attribute_comment(self, parent: Any, attrname: str) -> Optional[List[str]]:\n for cls in inspect.getmro(parent):\n try:\n module = safe_getattr(cls, '__module__')\n qualname = safe_getattr(cls, '__qualname__')\n\n analyzer = ModuleAnalyzer.for_module(module)\n analyzer.analyze()\n if qualname and self.objpath:\n key = (qualname, attrname)\n if key in analyzer.attr_docs:\n return list(analyzer.attr_docs[key])\n except (AttributeError, PycodeError):\n pass\n\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_get_documenters_None_26": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_get_documenters_None_26", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2829, "end_line": 2859, "span_ids": ["impl:28", "migrate_autodoc_member_order", "autodoc_attrgetter", "get_documenters"], "tokens": 363}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_documenters(app: Sphinx) -> Dict[str, Type[Documenter]]:\n \"\"\"Returns registered Documenter classes\"\"\"\n warnings.warn(\"get_documenters() is deprecated.\", RemovedInSphinx50Warning, stacklevel=2)\n return app.registry.documenters\n\n\ndef autodoc_attrgetter(app: Sphinx, obj: Any, name: str, *defargs: Any) -> Any:\n \"\"\"Alternative getattr() for types\"\"\"\n for typ, func in app.registry.autodoc_attrgettrs.items():\n if isinstance(obj, typ):\n return func(obj, name, *defargs)\n\n return safe_getattr(obj, name, *defargs)\n\n\ndef migrate_autodoc_member_order(app: Sphinx, config: Config) -> None:\n if config.autodoc_member_order == 'alphabetic':\n # RemovedInSphinx50Warning\n logger.warning(__('autodoc_member_order now accepts \"alphabetical\" '\n 'instead of \"alphabetic\". Please update your setting.'))\n config.autodoc_member_order = 'alphabetical' # type: ignore\n\n\n# for compatibility\nfrom sphinx.ext.autodoc.deprecated import DataDeclarationDocumenter # NOQA\nfrom sphinx.ext.autodoc.deprecated import GenericAliasDocumenter # NOQA\nfrom sphinx.ext.autodoc.deprecated import InstanceAttributeDocumenter # NOQA\nfrom sphinx.ext.autodoc.deprecated import SingledispatchFunctionDocumenter # NOQA\nfrom sphinx.ext.autodoc.deprecated import SingledispatchMethodDocumenter # NOQA\nfrom sphinx.ext.autodoc.deprecated import SlotsAttributeDocumenter # NOQA\nfrom sphinx.ext.autodoc.deprecated import TypeVarDocumenter", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_None_18_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_None_18_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2859, "end_line": 2904, "span_ids": ["impl:28", "setup"], "tokens": 558}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": " # NOQA\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_autodocumenter(ModuleDocumenter)\n app.add_autodocumenter(ClassDocumenter)\n app.add_autodocumenter(ExceptionDocumenter)\n app.add_autodocumenter(DataDocumenter)\n app.add_autodocumenter(NewTypeDataDocumenter)\n app.add_autodocumenter(FunctionDocumenter)\n app.add_autodocumenter(DecoratorDocumenter)\n app.add_autodocumenter(MethodDocumenter)\n app.add_autodocumenter(AttributeDocumenter)\n app.add_autodocumenter(PropertyDocumenter)\n app.add_autodocumenter(NewTypeAttributeDocumenter)\n\n app.add_config_value('autoclass_content', 'class', True, ENUM('both', 'class', 'init'))\n app.add_config_value('autodoc_member_order', 'alphabetical', True,\n ENUM('alphabetic', 'alphabetical', 'bysource', 'groupwise'))\n app.add_config_value('autodoc_class_signature', 'mixed', True, ENUM('mixed', 'separated'))\n app.add_config_value('autodoc_default_options', {}, True)\n app.add_config_value('autodoc_docstring_signature', True, True)\n app.add_config_value('autodoc_mock_imports', [], True)\n app.add_config_value('autodoc_typehints', \"signature\", True,\n ENUM(\"signature\", \"description\", \"none\", \"both\"))\n app.add_config_value('autodoc_typehints_description_target', 'all', True,\n ENUM('all', 'documented'))\n app.add_config_value('autodoc_type_aliases', {}, True)\n app.add_config_value('autodoc_typehints_format', \"short\", 'env',\n ENUM(\"fully-qualified\", \"short\"))\n app.add_config_value('autodoc_warningiserror', True, True)\n app.add_config_value('autodoc_inherit_docstrings', True, True)\n app.add_event('autodoc-before-process-signature')\n app.add_event('autodoc-process-docstring')\n app.add_event('autodoc-process-signature')\n app.add_event('autodoc-skip-member')\n app.add_event('autodoc-process-bases')\n\n app.connect('config-inited', migrate_autodoc_member_order, priority=800)\n\n app.setup_extension('sphinx.ext.autodoc.preserve_defaults')\n app.setup_extension('sphinx.ext.autodoc.type_comment')\n app.setup_extension('sphinx.ext.autodoc.typehints')\n\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_DataDeclarationDocumenter_DataDeclarationDocumenter.__init__.super___init___args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_DataDeclarationDocumenter_DataDeclarationDocumenter.__init__.super___init___args_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/deprecated.py", "file_name": "deprecated.py", "file_type": "text/x-python", "category": "implementation", "start_line": 32, "end_line": 47, "span_ids": ["DataDeclarationDocumenter"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DataDeclarationDocumenter(DataDocumenter):\n \"\"\"\n Specialized Documenter subclass for data that cannot be imported\n because they are declared without initial value (refs: PEP-526).\n \"\"\"\n objtype = 'datadecl'\n directivetype = 'data'\n member_order = 60\n\n # must be higher than AttributeDocumenter\n priority = 11\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n warnings.warn(\"%s is deprecated.\" % self.__class__.__name__,\n RemovedInSphinx50Warning, stacklevel=2)\n super().__init__(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_TypeVarDocumenter_TypeVarDocumenter.__init__.super___init___args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_TypeVarDocumenter_TypeVarDocumenter.__init__.super___init___args_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/deprecated.py", "file_name": "deprecated.py", "file_type": "text/x-python", "category": "implementation", "start_line": 50, "end_line": 62, "span_ids": ["TypeVarDocumenter"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TypeVarDocumenter(DataDocumenter):\n \"\"\"\n Specialized Documenter subclass for TypeVars.\n \"\"\"\n\n objtype = 'typevar'\n directivetype = 'data'\n priority = DataDocumenter.priority + 1 # type: ignore\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n warnings.warn(\"%s is deprecated.\" % self.__class__.__name__,\n RemovedInSphinx50Warning, stacklevel=2)\n super().__init__(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_SingledispatchMethodDocumenter_SingledispatchMethodDocumenter.__init__.super___init___args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_SingledispatchMethodDocumenter_SingledispatchMethodDocumenter.__init__.super___init___args_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/deprecated.py", "file_name": "deprecated.py", "file_type": "text/x-python", "category": "implementation", "start_line": 65, "end_line": 75, "span_ids": ["SingledispatchMethodDocumenter"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingledispatchMethodDocumenter(MethodDocumenter):\n \"\"\"\n Used to be a specialized Documenter subclass for singledispatch'ed methods.\n\n Retained for backwards compatibility, now does the same as the MethodDocumenter\n \"\"\"\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n warnings.warn(\"%s is deprecated.\" % self.__class__.__name__,\n RemovedInSphinx50Warning, stacklevel=2)\n super().__init__(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_InstanceAttributeDocumenter_InstanceAttributeDocumenter.__init__.super___init___args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_InstanceAttributeDocumenter_InstanceAttributeDocumenter.__init__.super___init___args_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/deprecated.py", "file_name": "deprecated.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 93, "span_ids": ["InstanceAttributeDocumenter"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class InstanceAttributeDocumenter(AttributeDocumenter):\n \"\"\"\n Specialized Documenter subclass for attributes that cannot be imported\n because they are instance attributes (e.g. assigned in __init__).\n \"\"\"\n objtype = 'instanceattribute'\n directivetype = 'attribute'\n member_order = 60\n\n # must be higher than AttributeDocumenter\n priority = 11\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n warnings.warn(\"%s is deprecated.\" % self.__class__.__name__,\n RemovedInSphinx50Warning, stacklevel=2)\n super().__init__(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_SlotsAttributeDocumenter_SlotsAttributeDocumenter.__init__.super___init___args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_SlotsAttributeDocumenter_SlotsAttributeDocumenter.__init__.super___init___args_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/deprecated.py", "file_name": "deprecated.py", "file_type": "text/x-python", "category": "implementation", "start_line": 96, "end_line": 111, "span_ids": ["SlotsAttributeDocumenter"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SlotsAttributeDocumenter(AttributeDocumenter):\n \"\"\"\n Specialized Documenter subclass for attributes that cannot be imported\n because they are attributes in __slots__.\n \"\"\"\n objtype = 'slotsattribute'\n directivetype = 'attribute'\n member_order = 60\n\n # must be higher than AttributeDocumenter\n priority = 11\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n warnings.warn(\"%s is deprecated.\" % self.__class__.__name__,\n RemovedInSphinx50Warning, stacklevel=2)\n super().__init__(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_GenericAliasDocumenter_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py_GenericAliasDocumenter_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/deprecated.py", "file_name": "deprecated.py", "file_type": "text/x-python", "category": "implementation", "start_line": 114, "end_line": 127, "span_ids": ["GenericAliasDocumenter"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GenericAliasDocumenter(DataDocumenter):\n \"\"\"\n Specialized Documenter subclass for GenericAliases.\n \"\"\"\n\n objtype = 'genericalias'\n directivetype = 'data'\n priority = DataDocumenter.priority + 1 # type: ignore\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n warnings.warn(\"%s is deprecated.\" % self.__class__.__name__,\n RemovedInSphinx50Warning, stacklevel=2)\n super().__init__(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_raises_section_GoogleDocstring._parse_raises_section.return.lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_raises_section_GoogleDocstring._parse_raises_section.return.lines", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 729, "end_line": 745, "span_ids": ["GoogleDocstring._parse_raises_section"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _parse_raises_section(self, section: str) -> List[str]:\n fields = self._consume_fields(parse_type=False, prefer_type=True)\n lines: List[str] = []\n for _name, _type, _desc in fields:\n m = self._name_rgx.match(_type)\n if m and m.group('name'):\n _type = m.group('name')\n elif _xref_regex.match(_type):\n pos = _type.find('`')\n _type = _type[pos + 1:-1]\n _type = ' ' + _type if _type else ''\n _desc = self._strip_empty(_desc)\n _descs = ' ' + '\\n '.join(_desc) if any(_desc) else ''\n lines.append(':raises%s:%s' % (_type, _descs))\n if lines:\n lines.append('')\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_receives_section_GoogleDocstring._parse_references_section.return.self__parse_generic_secti": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_receives_section_GoogleDocstring._parse_references_section.return.self__parse_generic_secti", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 719, "end_line": 730, "span_ids": ["GoogleDocstring._parse_receives_section", "GoogleDocstring._parse_references_section"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _parse_receives_section(self, section: str) -> List[str]:\n if self._config.napoleon_use_param:\n # Allow to declare multiple parameters at once (ex: x, y: int)\n fields = self._consume_fields(multiple=True)\n return self._format_docutils_params(fields)\n else:\n fields = self._consume_fields()\n return self._format_fields(_('Receives'), fields)\n\n def _parse_references_section(self, section: str) -> List[str]:\n use_admonition = self._config.napoleon_use_admonition_for_references\n return self._parse_generic_section(_('References'), use_admonition)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_BuildDoc.initialize_options_BuildDoc._guess_source_dir.return.os_curdir": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/setup_command.py_BuildDoc.initialize_options_BuildDoc._guess_source_dir.return.os_curdir", "embedding": null, "metadata": {"file_path": "sphinx/setup_command.py", "file_name": "setup_command.py", "file_type": "text/x-python", "category": "implementation", "start_line": 85, "end_line": 112, "span_ids": ["BuildDoc._guess_source_dir", "BuildDoc.initialize_options"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildDoc(Command):\n\n def initialize_options(self) -> None:\n self.fresh_env = self.all_files = False\n self.pdb = False\n self.source_dir: str = None\n self.build_dir: str = None\n self.builder = 'html'\n self.warning_is_error = False\n self.project = ''\n self.version = ''\n self.release = ''\n self.today = ''\n self.config_dir: str = None\n self.link_index = False\n self.copyright = ''\n # Link verbosity to distutils' (which uses 1 by default).\n self.verbosity = self.distribution.verbose - 1 # type: ignore\n self.traceback = False\n self.nitpicky = False\n self.keep_going = False\n\n def _guess_source_dir(self) -> str:\n for guess in ('doc', 'docs'):\n if not os.path.isdir(guess):\n continue\n for root, _dirnames, filenames in os.walk(guess):\n if 'conf.py' in filenames:\n return root\n return os.curdir", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getall_getall.if___all___is_None_.else_.if_isinstance___all___.else_.raise_ValueError___all___": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getall_getall.if___all___is_None_.else_.if_isinstance___all___.else_.raise_ValueError___all___", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 144, "end_line": 157, "span_ids": ["getall"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getall(obj: Any) -> Optional[Sequence[str]]:\n \"\"\"Get __all__ attribute of the module as dict.\n\n Return None if given *obj* does not have __all__.\n Raises ValueError if given *obj* have invalid __all__.\n \"\"\"\n __all__ = safe_getattr(obj, '__all__', None)\n if __all__ is None:\n return None\n else:\n if (isinstance(__all__, (list, tuple)) and all(isinstance(e, str) for e in __all__)):\n return __all__\n else:\n raise ValueError(__all__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getannotations_getmro.if_isinstance___mro___tu.else_.return.tuple_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getannotations_getmro.if_isinstance___mro___tu.else_.return.tuple_", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 89, "end_line": 113, "span_ids": ["getmro", "getannotations", "getglobals"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getannotations(obj: Any) -> Mapping[str, Any]:\n \"\"\"Get __annotations__ from given *obj* safely.\"\"\"\n __annotations__ = safe_getattr(obj, '__annotations__', None)\n if isinstance(__annotations__, Mapping):\n return __annotations__\n else:\n return {}\n\n\ndef getglobals(obj: Any) -> Mapping[str, Any]:\n \"\"\"Get __globals__ from given *obj* safely.\"\"\"\n __globals__ = safe_getattr(obj, '__globals__', None)\n if isinstance(__globals__, Mapping):\n return __globals__\n else:\n return {}\n\n\ndef getmro(obj: Any) -> Tuple[Type, ...]:\n \"\"\"Get __mro__ from given *obj* safely.\"\"\"\n __mro__ = safe_getattr(obj, '__mro__', None)\n if isinstance(__mro__, tuple):\n return __mro__\n else:\n return tuple()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/hide_value.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/hide_value.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/hide_value.py", "file_name": "hide_value.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["impl", "docstring", "Foo"], "tokens": 78}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "#: docstring\n#:\n#: :meta hide-value:\nSENTINEL1 = object()\n\n#: :meta hide-value:\nSENTINEL2 = object()\n\n\nclass Foo:\n \"\"\"docstring\"\"\"\n\n #: docstring\n #:\n #: :meta hide-value:\n SENTINEL1 = object()\n\n #: :meta hide-value:\n SENTINEL2 = object()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/instance_variable.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/instance_variable.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/instance_variable.py", "file_name": "instance_variable.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 12, "span_ids": ["Foo", "Bar"], "tokens": 76}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Foo:\n def __init__(self):\n self.attr1 = None #: docstring foo\n self.attr2 = None #: docstring foo\n\n\nclass Bar(Foo):\n def __init__(self):\n self.attr2 = None #: docstring bar\n self.attr3 = None #: docstring bar\n self.attr4 = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmd_option_with_optional_value_test_cmd_option_with_optional_value.assert_j_j_cmdo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmd_option_with_optional_value_test_cmd_option_with_optional_value.assert_j_j_cmdo", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 85, "end_line": 96, "span_ids": ["test_cmd_option_with_optional_value"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cmd_option_with_optional_value(app):\n text = \".. option:: -j[=N]\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (index,\n [desc, ([desc_signature, ([desc_name, '-j'],\n [desc_addname, '[=N]'])],\n [desc_content, ()])]))\n assert_node(doctree[0], addnodes.index,\n entries=[('pair', 'command line option; -j', 'cmdoption-j', '', None)])\n\n objects = list(app.env.get_domain(\"std\").get_objects())\n assert ('-j', '-j', 'cmdoption', 'index', 'cmdoption-j', 1) in objects", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmd_option_starting_with_bracket_test_cmd_option_starting_with_bracket.assert_enable_enab": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmd_option_starting_with_bracket_test_cmd_option_starting_with_bracket.assert_enable_enab", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 105, "end_line": 113, "span_ids": ["test_cmd_option_starting_with_bracket"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cmd_option_starting_with_bracket(app):\n text = \".. option:: [enable=]PATTERN\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (index,\n [desc, ([desc_signature, ([desc_name, '[enable'],\n [desc_addname, '=]PATTERN'])],\n [desc_content, ()])]))\n objects = list(app.env.get_domain(\"std\").get_objects())\n assert ('[enable', '[enable', 'cmdoption', 'index', 'cmdoption-arg-enable', 1) in objects", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_get_doc_test_get_doc.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_get_doc_test_get_doc.None_4", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 325, "end_line": 376, "span_ids": ["test_get_doc.J", "test_get_doc.J:2", "test_get_doc"], "tokens": 382}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_doc(app):\n directive = make_directive_bridge(app.env)\n\n def getdocl(objtype, obj):\n inst = app.registry.documenters[objtype](directive, 'tmp')\n inst.parent = object # dummy\n inst.object = obj\n inst.objpath = [obj.__name__]\n inst.doc_as_attr = False\n inst.format_signature() # handle docstring signatures!\n ds = inst.get_doc()\n # for testing purposes, concat them and strip the empty line at the end\n res = sum(ds, [])[:-1]\n print(res)\n return res\n\n # objects without docstring\n def f():\n pass\n assert getdocl('function', f) == []\n\n # standard function, diverse docstring styles...\n def f():\n \"\"\"Docstring\"\"\"\n def g():\n \"\"\"\n Docstring\n \"\"\"\n for func in (f, g):\n assert getdocl('function', func) == ['Docstring']\n\n # first line vs. other lines indentation\n def f():\n \"\"\"First line\n\n Other\n lines\n \"\"\"\n assert getdocl('function', f) == ['First line', '', 'Other', ' lines']\n\n # charset guessing (this module is encoded in utf-8)\n def f():\n \"\"\"D\u00f6cstring\"\"\"\n assert getdocl('function', f) == ['D\u00f6cstring']\n\n # verify that method docstrings get extracted in both normal case\n # and in case of bound method posing as a function\n class J: # NOQA\n def foo(self):\n \"\"\"Method docstring\"\"\"\n assert getdocl('method', J.foo) == ['Method docstring']\n assert getdocl('function', J().foo) == ['Method docstring']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_name_mangling_test_name_mangling.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_name_mangling_test_name_mangling.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2195, "end_line": 2237, "span_ids": ["test_name_mangling"], "tokens": 300}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_name_mangling(app):\n options = {\"members\": None,\n \"undoc-members\": None,\n \"private-members\": None}\n actual = do_autodoc(app, 'module', 'target.name_mangling', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.name_mangling',\n '',\n '',\n '.. py:class:: Bar()',\n ' :module: target.name_mangling',\n '',\n '',\n ' .. py:attribute:: Bar._Baz__email',\n ' :module: target.name_mangling',\n ' :value: None',\n '',\n ' a member having mangled-like name',\n '',\n '',\n ' .. py:attribute:: Bar.__address',\n ' :module: target.name_mangling',\n ' :value: None',\n '',\n '',\n '.. py:class:: Foo()',\n ' :module: target.name_mangling',\n '',\n '',\n ' .. py:attribute:: Foo.__age',\n ' :module: target.name_mangling',\n ' :value: None',\n '',\n '',\n ' .. py:attribute:: Foo.__name',\n ' :module: target.name_mangling',\n ' :value: None',\n '',\n ' name of Foo',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_typed_variable_in_alias_test_autoattribute_typed_variable_in_alias.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_typed_variable_in_alias_test_autoattribute_typed_variable_in_alias.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoattribute.py", "file_name": "test_ext_autodoc_autoattribute.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 70, "span_ids": ["test_autoattribute_typed_variable_in_alias"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_typed_variable_in_alias(app):\n actual = do_autodoc(app, 'attribute', 'target.typed_vars.Alias.attr2')\n assert list(actual) == [\n '',\n '.. py:attribute:: Alias.attr2',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_instance_variable_in_alias_test_autoattribute_instance_variable_in_alias.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_instance_variable_in_alias_test_autoattribute_instance_variable_in_alias.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoattribute.py", "file_name": "test_ext_autodoc_autoattribute.py", "file_type": "text/x-python", "category": "test", "start_line": 88, "end_line": 100, "span_ids": ["test_autoattribute_instance_variable_in_alias"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_instance_variable_in_alias(app):\n actual = do_autodoc(app, 'attribute', 'target.typed_vars.Alias.attr4')\n assert list(actual) == [\n '',\n '.. py:attribute:: Alias.attr4',\n ' :module: target.typed_vars',\n ' :type: int',\n '',\n ' attr4',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_GenericAlias_test_autoattribute_GenericAlias.if_sys_version_info_3_.else_.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_GenericAlias_test_autoattribute_GenericAlias.if_sys_version_info_3_.else_.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoattribute.py", "file_name": "test_ext_autodoc_autoattribute.py", "file_type": "text/x-python", "category": "test", "start_line": 145, "end_line": 168, "span_ids": ["test_autoattribute_GenericAlias"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_GenericAlias(app):\n actual = do_autodoc(app, 'attribute', 'target.genericalias.Class.T')\n if sys.version_info < (3, 7):\n assert list(actual) == [\n '',\n '.. py:attribute:: Class.T',\n ' :module: target.genericalias',\n ' :value: typing.List[int]',\n '',\n ' A list of int',\n '',\n ]\n else:\n assert list(actual) == [\n '',\n '.. py:attribute:: Class.T',\n ' :module: target.genericalias',\n '',\n ' A list of int',\n '',\n ' alias of :py:class:`~typing.List`\\\\ [:py:class:`int`]',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_NewType_test_autoattribute_TypeVar.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_NewType_test_autoattribute_TypeVar.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoattribute.py", "file_name": "test_ext_autodoc_autoattribute.py", "file_type": "text/x-python", "category": "test", "start_line": 171, "end_line": 198, "span_ids": ["test_autoattribute_TypeVar", "test_autoattribute_NewType"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_NewType(app):\n actual = do_autodoc(app, 'attribute', 'target.typevar.Class.T6')\n assert list(actual) == [\n '',\n '.. py:attribute:: Class.T6',\n ' :module: target.typevar',\n '',\n ' T6',\n '',\n ' alias of :py:class:`~datetime.date`',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_TypeVar(app):\n actual = do_autodoc(app, 'attribute', 'target.typevar.Class.T1')\n assert list(actual) == [\n '',\n '.. py:attribute:: Class.T1',\n ' :module: target.typevar',\n '',\n ' T1',\n '',\n \" alias of TypeVar('T1')\",\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_hide_value_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_hide_value_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoattribute.py", "file_name": "test_ext_autodoc_autoattribute.py", "file_type": "text/x-python", "category": "test", "start_line": 194, "end_line": 218, "span_ids": ["test_autoattribute_hide_value"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_hide_value(app):\n actual = do_autodoc(app, 'attribute', 'target.hide_value.Foo.SENTINEL1')\n assert list(actual) == [\n '',\n '.. py:attribute:: Foo.SENTINEL1',\n ' :module: target.hide_value',\n '',\n ' docstring',\n '',\n ' :meta hide-value:',\n '',\n ]\n\n actual = do_autodoc(app, 'attribute', 'target.hide_value.Foo.SENTINEL2')\n assert list(actual) == [\n '',\n '.. py:attribute:: Foo.SENTINEL2',\n ' :module: target.hide_value',\n '',\n ' :meta hide-value:',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_instance_variable_test_instance_variable.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_instance_variable_test_instance_variable.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 50, "end_line": 71, "span_ids": ["test_instance_variable"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_instance_variable(app):\n options = {'members': None}\n actual = do_autodoc(app, 'class', 'target.instance_variable.Bar', options)\n assert list(actual) == [\n '',\n '.. py:class:: Bar()',\n ' :module: target.instance_variable',\n '',\n '',\n ' .. py:attribute:: Bar.attr2',\n ' :module: target.instance_variable',\n '',\n ' docstring bar',\n '',\n '',\n ' .. py:attribute:: Bar.attr3',\n ' :module: target.instance_variable',\n '',\n ' docstring bar',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_inherited_instance_variable_test_inherited_instance_variable.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_inherited_instance_variable_test_inherited_instance_variable.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 74, "end_line": 102, "span_ids": ["test_inherited_instance_variable"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_inherited_instance_variable(app):\n options = {'members': None,\n 'inherited-members': None}\n actual = do_autodoc(app, 'class', 'target.instance_variable.Bar', options)\n assert list(actual) == [\n '',\n '.. py:class:: Bar()',\n ' :module: target.instance_variable',\n '',\n '',\n ' .. py:attribute:: Bar.attr1',\n ' :module: target.instance_variable',\n '',\n ' docstring foo',\n '',\n '',\n ' .. py:attribute:: Bar.attr2',\n ' :module: target.instance_variable',\n '',\n ' docstring bar',\n '',\n '',\n ' .. py:attribute:: Bar.attr3',\n ' :module: target.instance_variable',\n '',\n ' docstring bar',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_slots_attribute_test_slots_attribute.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_slots_attribute_test_slots_attribute.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 227, "end_line": 251, "span_ids": ["test_slots_attribute"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_slots_attribute(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'class', 'target.slots.Bar', options)\n assert list(actual) == [\n '',\n '.. py:class:: Bar()',\n ' :module: target.slots',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Bar.attr1',\n ' :module: target.slots',\n ' :type: int',\n '',\n ' docstring of attr1',\n '',\n '',\n ' .. py:attribute:: Bar.attr2',\n ' :module: target.slots',\n '',\n ' docstring of instance attr2',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_show_inheritance_for_subclass_of_generic_type_test_show_inheritance_for_subclass_of_generic_type.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_show_inheritance_for_subclass_of_generic_type_test_show_inheritance_for_subclass_of_generic_type.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 254, "end_line": 269, "span_ids": ["test_show_inheritance_for_subclass_of_generic_type"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_show_inheritance_for_subclass_of_generic_type(app):\n options = {'show-inheritance': None}\n actual = do_autodoc(app, 'class', 'target.classes.Quux', options)\n assert list(actual) == [\n '',\n '.. py:class:: Quux(iterable=(), /)',\n ' :module: target.classes',\n '',\n ' Bases: :py:class:`~typing.List`\\\\ '\n '[:py:obj:`~typing.Union`\\\\ [:py:class:`int`, :py:class:`float`]]',\n '',\n ' A subclass of List[Union[int, float]]',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_GenericAlias_test_autodata_GenericAlias.if_sys_version_info_3_.else_.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_GenericAlias_test_autodata_GenericAlias.if_sys_version_info_3_.else_.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autodata.py", "file_name": "test_ext_autodoc_autodata.py", "file_type": "text/x-python", "category": "test", "start_line": 73, "end_line": 96, "span_ids": ["test_autodata_GenericAlias"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodata_GenericAlias(app):\n actual = do_autodoc(app, 'data', 'target.genericalias.T')\n if sys.version_info < (3, 7):\n assert list(actual) == [\n '',\n '.. py:data:: T',\n ' :module: target.genericalias',\n ' :value: typing.List[int]',\n '',\n ' A list of int',\n '',\n ]\n else:\n assert list(actual) == [\n '',\n '.. py:data:: T',\n ' :module: target.genericalias',\n '',\n ' A list of int',\n '',\n ' alias of :py:class:`~typing.List`\\\\ [:py:class:`int`]',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_NewType_test_autodata_TypeVar.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_NewType_test_autodata_TypeVar.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autodata.py", "file_name": "test_ext_autodoc_autodata.py", "file_type": "text/x-python", "category": "test", "start_line": 99, "end_line": 126, "span_ids": ["test_autodata_NewType", "test_autodata_TypeVar"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodata_NewType(app):\n actual = do_autodoc(app, 'data', 'target.typevar.T6')\n assert list(actual) == [\n '',\n '.. py:data:: T6',\n ' :module: target.typevar',\n '',\n ' T6',\n '',\n ' alias of :py:class:`~datetime.date`',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodata_TypeVar(app):\n actual = do_autodoc(app, 'data', 'target.typevar.T1')\n assert list(actual) == [\n '',\n '.. py:data:: T1',\n ' :module: target.typevar',\n '',\n ' T1',\n '',\n \" alias of TypeVar('T1')\",\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_hide_value_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py_test_autodata_hide_value_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autodata.py", "file_name": "test_ext_autodoc_autodata.py", "file_type": "text/x-python", "category": "test", "start_line": 134, "end_line": 158, "span_ids": ["test_autodata_hide_value"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodata_hide_value(app):\n actual = do_autodoc(app, 'data', 'target.hide_value.SENTINEL1')\n assert list(actual) == [\n '',\n '.. py:data:: SENTINEL1',\n ' :module: target.hide_value',\n '',\n ' docstring',\n '',\n ' :meta hide-value:',\n '',\n ]\n\n actual = do_autodoc(app, 'data', 'target.hide_value.SENTINEL2')\n assert list(actual) == [\n '',\n '.. py:data:: SENTINEL2',\n ' :module: target.hide_value',\n '',\n ' :meta hide-value:',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_object_members_ClassDocumenter.get_object_members.if_not_want_all_.else_.return.False_m_for_m_in_member": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_object_members_ClassDocumenter.get_object_members.if_not_want_all_.else_.return.False_m_for_m_in_member", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1621, "end_line": 1638, "span_ids": ["ClassDocumenter.get_object_members"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def get_object_members(self, want_all: bool) -> Tuple[bool, ObjectMembers]:\n members = get_class_members(self.object, self.objpath, self.get_attr)\n if not want_all:\n if not self.options.members:\n return False, [] # type: ignore\n # specific members given\n selected = []\n for name in self.options.members: # type: str\n if name in members:\n selected.append(members[name])\n else:\n logger.warning(__('missing attribute %s in object %s') %\n (name, self.fullname), type='autodoc')\n return False, selected\n elif self.options.inherited_members:\n return False, list(members.values())\n else:\n return False, [m for m in members.values() if m.class_ == self.object]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_get_object_members_get_object_members.return.members": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_get_object_members_get_object_members.return.members", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/importer.py", "file_name": "importer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 171, "end_line": 229, "span_ids": ["get_object_members"], "tokens": 456}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_object_members(subject: Any, objpath: List[str], attrgetter: Callable,\n analyzer: ModuleAnalyzer = None) -> Dict[str, Attribute]:\n \"\"\"Get members and attributes of target object.\"\"\"\n from sphinx.ext.autodoc import INSTANCEATTR\n\n # the members directly defined in the class\n obj_dict = attrgetter(subject, '__dict__', {})\n\n members: Dict[str, Attribute] = {}\n\n # enum members\n if isenumclass(subject):\n for name, value in subject.__members__.items():\n if name not in members:\n members[name] = Attribute(name, True, value)\n\n superclass = subject.__mro__[1]\n for name in obj_dict:\n if name not in superclass.__dict__:\n value = safe_getattr(subject, name)\n members[name] = Attribute(name, True, value)\n\n # members in __slots__\n try:\n __slots__ = getslots(subject)\n if __slots__:\n from sphinx.ext.autodoc import SLOTSATTR\n\n for name in __slots__:\n members[name] = Attribute(name, True, SLOTSATTR)\n except (TypeError, ValueError):\n pass\n\n # other members\n for name in dir(subject):\n try:\n value = attrgetter(subject, name)\n directly_defined = name in obj_dict\n name = unmangle(subject, name)\n if name and name not in members:\n members[name] = Attribute(name, directly_defined, value)\n except AttributeError:\n continue\n\n # annotation only member (ex. attr: int)\n for i, cls in enumerate(getmro(subject)):\n for name in getannotations(cls):\n name = unmangle(cls, name)\n if name and name not in members:\n members[name] = Attribute(name, i == 0, INSTANCEATTR)\n\n if analyzer:\n # append instance attributes (cf. self.attr1) if analyzer knows\n namespace = '.'.join(objpath)\n for (ns, name) in analyzer.find_attr_docs():\n if namespace == ns and name not in members:\n members[name] = Attribute(name, True, INSTANCEATTR)\n\n return members", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/empty_all.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/empty_all.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/empty_all.py", "file_name": "empty_all.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["bar", "impl", "docstring", "baz", "foo"], "tokens": 39}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\ndocsting of empty_all module.\n\"\"\"\n__all__ = []\n\n\ndef foo():\n \"\"\"docstring\"\"\"\n\n\ndef bar():\n \"\"\"docstring\"\"\"\n\n\ndef baz():\n \"\"\"docstring\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_Stylesheet_Stylesheet.__new__.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_Stylesheet_Stylesheet.__new__.return.self", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 82, "end_line": 105, "span_ids": ["Stylesheet.__new__", "Stylesheet"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stylesheet(str):\n \"\"\"A metadata of stylesheet.\n\n To keep compatibility with old themes, an instance of stylesheet behaves as\n its filename (str).\n \"\"\"\n\n attributes: Dict[str, str] = None\n filename: str = None\n priority: int = None\n\n def __new__(cls, filename: str, *args: str, priority: int = 500, **attributes: Any\n ) -> \"Stylesheet\":\n self = str.__new__(cls, filename)\n self.filename = filename\n self.priority = priority\n self.attributes = attributes\n self.attributes.setdefault('rel', 'stylesheet')\n self.attributes.setdefault('type', 'text/css')\n if args: # old style arguments (rel, title)\n self.attributes['rel'] = args[0]\n self.attributes['title'] = args[1]\n\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_JavaScript_JavaScript.__new__.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_JavaScript_JavaScript.__new__.return.self", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 108, "end_line": 125, "span_ids": ["JavaScript", "JavaScript.__new__"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JavaScript(str):\n \"\"\"A metadata of javascript file.\n\n To keep compatibility with old themes, an instance of javascript behaves as\n its filename (str).\n \"\"\"\n\n attributes: Dict[str, str] = None\n filename: str = None\n priority: int = None\n\n def __new__(cls, filename: str, priority: int = 500, **attributes: str) -> \"JavaScript\":\n self = str.__new__(cls, filename)\n self.filename = filename\n self.priority = priority\n self.attributes = attributes\n\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.handle_page_StandaloneHTMLBuilder.handle_page.ensuredir_path_dirname_ou": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.handle_page_StandaloneHTMLBuilder.handle_page.ensuredir_path_dirname_ou", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 989, "end_line": 1072, "span_ids": ["StandaloneHTMLBuilder.handle_page"], "tokens": 819}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def handle_page(self, pagename: str, addctx: Dict, templatename: str = 'page.html',\n outfilename: str = None, event_arg: Any = None) -> None:\n ctx = self.globalcontext.copy()\n # current_page_name is backwards compatibility\n ctx['pagename'] = ctx['current_page_name'] = pagename\n ctx['encoding'] = self.config.html_output_encoding\n default_baseuri = self.get_target_uri(pagename)\n # in the singlehtml builder, default_baseuri still contains an #anchor\n # part, which relative_uri doesn't really like...\n default_baseuri = default_baseuri.rsplit('#', 1)[0]\n\n if self.config.html_baseurl:\n ctx['pageurl'] = posixpath.join(self.config.html_baseurl,\n pagename + self.out_suffix)\n else:\n ctx['pageurl'] = None\n\n def pathto(otheruri: str, resource: bool = False, baseuri: str = default_baseuri) -> str: # NOQA\n if resource and '://' in otheruri:\n # allow non-local resources given by scheme\n return otheruri\n elif not resource:\n otheruri = self.get_target_uri(otheruri)\n uri = relative_uri(baseuri, otheruri) or '#'\n if uri == '#' and not self.allow_sharp_as_current_path:\n uri = baseuri\n return uri\n ctx['pathto'] = pathto\n\n def hasdoc(name: str) -> bool:\n if name in self.env.all_docs:\n return True\n elif name == 'search' and self.search:\n return True\n elif name == 'genindex' and self.get_builder_config('use_index', 'html'):\n return True\n return False\n ctx['hasdoc'] = hasdoc\n\n ctx['toctree'] = lambda **kwargs: self._get_local_toctree(pagename, **kwargs)\n self.add_sidebars(pagename, ctx)\n ctx.update(addctx)\n\n # revert script_files and css_files\n self.script_files[:] = self._script_files\n self.css_files[:] = self._css_files\n\n self.update_page_context(pagename, templatename, ctx, event_arg)\n newtmpl = self.app.emit_firstresult('html-page-context', pagename,\n templatename, ctx, event_arg)\n if newtmpl:\n templatename = newtmpl\n\n # sort JS/CSS before rendering HTML\n try:\n # Convert script_files to list to support non-list script_files (refs: #8889)\n ctx['script_files'] = sorted(list(ctx['script_files']), key=lambda js: js.priority)\n except AttributeError:\n # Skip sorting if users modifies script_files directly (maybe via `html_context`).\n # refs: #8885\n #\n # Note: priority sorting feature will not work in this case.\n pass\n\n try:\n ctx['css_files'] = sorted(list(ctx['css_files']), key=lambda css: css.priority)\n except AttributeError:\n pass\n\n try:\n output = self.templates.render(templatename, ctx)\n except UnicodeError:\n logger.warning(__(\"a Unicode error occurred when rendering the page %s. \"\n \"Please make sure all config values that contain \"\n \"non-ASCII content are Unicode strings.\"), pagename)\n return\n except Exception as exc:\n raise ThemeError(__(\"An error happened in rendering the page %s.\\nReason: %r\") %\n (pagename, exc)) from exc\n\n if not outfilename:\n outfilename = self.get_outfilename(pagename)\n # outfilename's path is in general different from self.outdir\n ensuredir(path.dirname(outfilename))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.dump_search_index_StandaloneHTMLBuilder.dump_search_index.with_progress_message____.os_replace_searchindexfn_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.dump_search_index_StandaloneHTMLBuilder.dump_search_index.with_progress_message____.os_replace_searchindexfn_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1076, "end_line": 1088, "span_ids": ["StandaloneHTMLBuilder.dump_search_index"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def dump_search_index(self) -> None:\n with progress_message(__('dumping search index in %s') % self.indexer.label()):\n self.indexer.prune(self.env.all_docs)\n searchindexfn = path.join(self.outdir, self.searchindex_filename)\n # first write to a temporary file, so that if dumping fails,\n # the existing index won't be overwritten\n if self.indexer_dumps_unicode:\n with open(searchindexfn + '.tmp', 'w', encoding='utf-8') as ft:\n self.indexer.dump(ft, self.indexer_format)\n else:\n with open(searchindexfn + '.tmp', 'wb') as fb:\n self.indexer.dump(fb, self.indexer_format)\n os.replace(searchindexfn + '.tmp', searchindexfn)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPDomain_CPPDomain._resolve_xref_inner.checkType.assert_False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPDomain_CPPDomain._resolve_xref_inner.checkType.assert_False", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 7690, "end_line": 7902, "span_ids": ["CPPDomain._resolve_xref_inner", "CPPDomain.process_doc", "CPPDomain", "CPPDomain.clear_doc", "CPPDomain.merge_domaindata", "CPPDomain.process_field_xref"], "tokens": 1957}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CPPDomain(Domain):\n \"\"\"C++ language domain.\n\n There are two 'object type' attributes being used::\n\n - Each object created from directives gets an assigned .objtype from ObjectDescription.run.\n This is simply the directive name.\n - Each declaration (see the distinction in the directives dict below) has a nested .ast of\n type ASTDeclaration. That object has .objectType which corresponds to the keys in the\n object_types dict below. They are the core different types of declarations in C++ that\n one can document.\n \"\"\"\n name = 'cpp'\n label = 'C++'\n object_types = {\n 'class': ObjType(_('class'), 'class', 'struct', 'identifier', 'type'),\n 'union': ObjType(_('union'), 'union', 'identifier', 'type'),\n 'function': ObjType(_('function'), 'func', 'identifier', 'type'),\n 'member': ObjType(_('member'), 'member', 'var', 'identifier'),\n 'type': ObjType(_('type'), 'identifier', 'type'),\n 'concept': ObjType(_('concept'), 'concept', 'identifier'),\n 'enum': ObjType(_('enum'), 'enum', 'identifier', 'type'),\n 'enumerator': ObjType(_('enumerator'), 'enumerator', 'identifier'),\n # generated object types\n 'functionParam': ObjType(_('function parameter'), 'identifier', 'member', 'var'), # noqa\n 'templateParam': ObjType(_('template parameter'),\n 'identifier', 'class', 'struct', 'union', 'member', 'var', 'type'), # noqa\n }\n\n directives = {\n # declarations\n 'class': CPPClassObject,\n 'struct': CPPClassObject,\n 'union': CPPUnionObject,\n 'function': CPPFunctionObject,\n 'member': CPPMemberObject,\n 'var': CPPMemberObject,\n 'type': CPPTypeObject,\n 'concept': CPPConceptObject,\n 'enum': CPPEnumObject,\n 'enum-struct': CPPEnumObject,\n 'enum-class': CPPEnumObject,\n 'enumerator': CPPEnumeratorObject,\n # scope control\n 'namespace': CPPNamespaceObject,\n 'namespace-push': CPPNamespacePushObject,\n 'namespace-pop': CPPNamespacePopObject,\n # other\n 'alias': CPPAliasObject\n }\n roles = {\n 'any': CPPXRefRole(),\n 'class': CPPXRefRole(),\n 'struct': CPPXRefRole(),\n 'union': CPPXRefRole(),\n 'func': CPPXRefRole(fix_parens=True),\n 'member': CPPXRefRole(),\n 'var': CPPXRefRole(),\n 'type': CPPXRefRole(),\n 'concept': CPPXRefRole(),\n 'enum': CPPXRefRole(),\n 'enumerator': CPPXRefRole(),\n 'expr': CPPExprRole(asCode=True),\n 'texpr': CPPExprRole(asCode=False)\n }\n initial_data = {\n 'root_symbol': Symbol(None, None, None, None, None, None, None),\n 'names': {} # full name for indexing -> docname\n }\n\n def clear_doc(self, docname: str) -> None:\n if Symbol.debug_show_tree:\n print(\"clear_doc:\", docname)\n print(\"\\tbefore:\")\n print(self.data['root_symbol'].dump(1))\n print(\"\\tbefore end\")\n\n rootSymbol = self.data['root_symbol']\n rootSymbol.clear_doc(docname)\n\n if Symbol.debug_show_tree:\n print(\"\\tafter:\")\n print(self.data['root_symbol'].dump(1))\n print(\"\\tafter end\")\n print(\"clear_doc end:\", docname)\n for name, nDocname in list(self.data['names'].items()):\n if nDocname == docname:\n del self.data['names'][name]\n\n def process_doc(self, env: BuildEnvironment, docname: str,\n document: nodes.document) -> None:\n if Symbol.debug_show_tree:\n print(\"process_doc:\", docname)\n print(self.data['root_symbol'].dump(0))\n print(\"process_doc end:\", docname)\n\n def process_field_xref(self, pnode: pending_xref) -> None:\n pnode.attributes.update(self.env.ref_context)\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:\n if Symbol.debug_show_tree:\n print(\"merge_domaindata:\")\n print(\"\\tself:\")\n print(self.data['root_symbol'].dump(1))\n print(\"\\tself end\")\n print(\"\\tother:\")\n print(otherdata['root_symbol'].dump(1))\n print(\"\\tother end\")\n\n self.data['root_symbol'].merge_with(otherdata['root_symbol'],\n docnames, self.env)\n ourNames = self.data['names']\n for name, docname in otherdata['names'].items():\n if docname in docnames:\n if name not in ourNames:\n ourNames[name] = docname\n # no need to warn on duplicates, the symbol merge already does that\n if Symbol.debug_show_tree:\n print(\"\\tresult:\")\n print(self.data['root_symbol'].dump(1))\n print(\"\\tresult end\")\n print(\"merge_domaindata end\")\n\n def _resolve_xref_inner(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n typ: str, target: str, node: pending_xref,\n contnode: Element) -> Tuple[Optional[Element], Optional[str]]:\n # add parens again for those that could be functions\n if typ in ('any', 'func'):\n target += '()'\n parser = DefinitionParser(target, location=node, config=env.config)\n try:\n ast, isShorthand = parser.parse_xref_object()\n except DefinitionError as e:\n # as arg to stop flake8 from complaining\n def findWarning(e: Exception) -> Tuple[str, Exception]:\n if typ != 'any' and typ != 'func':\n return target, e\n # hax on top of the paren hax to try to get correct errors\n parser2 = DefinitionParser(target[:-2],\n location=node,\n config=env.config)\n try:\n parser2.parse_xref_object()\n except DefinitionError as e2:\n return target[:-2], e2\n # strange, that we don't get the error now, use the original\n return target, e\n t, ex = findWarning(e)\n logger.warning('Unparseable C++ cross-reference: %r\\n%s', t, ex,\n location=node)\n return None, None\n parentKey: LookupKey = node.get(\"cpp:parent_key\", None)\n rootSymbol = self.data['root_symbol']\n if parentKey:\n parentSymbol: Symbol = rootSymbol.direct_lookup(parentKey)\n if not parentSymbol:\n print(\"Target: \", target)\n print(\"ParentKey: \", parentKey.data)\n print(rootSymbol.dump(1))\n assert parentSymbol # should be there\n else:\n parentSymbol = rootSymbol\n\n if isShorthand:\n assert isinstance(ast, ASTNamespace)\n ns = ast\n name = ns.nestedName\n if ns.templatePrefix:\n templateDecls = ns.templatePrefix.templates\n else:\n templateDecls = []\n # let's be conservative with the sibling lookup for now\n searchInSiblings = (not name.rooted) and len(name.names) == 1\n symbols, failReason = parentSymbol.find_name(\n name, templateDecls, typ,\n templateShorthand=True,\n matchSelf=True, recurseInAnon=True,\n searchInSiblings=searchInSiblings)\n if symbols is None:\n if typ == 'identifier':\n if failReason == 'templateParamInQualified':\n # this is an xref we created as part of a signature,\n # so don't warn for names nested in template parameters\n raise NoUri(str(name), typ)\n s = None\n else:\n # just refer to the arbitrarily first symbol\n s = symbols[0]\n else:\n assert isinstance(ast, ASTDeclaration)\n decl = ast\n name = decl.name\n s = parentSymbol.find_declaration(decl, typ,\n templateShorthand=True,\n matchSelf=True, recurseInAnon=True)\n if s is None or s.declaration is None:\n txtName = str(name)\n if txtName.startswith('std::') or txtName == 'std':\n raise NoUri(txtName, typ)\n return None, None\n\n if typ.startswith('cpp:'):\n typ = typ[4:]\n declTyp = s.declaration.objectType\n\n def checkType() -> bool:\n if typ == 'any':\n return True\n objtypes = self.objtypes_for_role(typ)\n if objtypes:\n return declTyp in objtypes\n print(\"Type is %s, declaration type is %s\" % (typ, declTyp))\n assert False\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPDomain._resolve_xref_inner.if_not_checkType__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPDomain._resolve_xref_inner.if_not_checkType__", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 7903, "end_line": 8032, "span_ids": ["CPPDomain._resolve_xref_inner", "setup", "CPPDomain.resolve_any_xref", "CPPDomain.get_objects", "CPPDomain.get_full_qualified_name", "CPPDomain.resolve_xref"], "tokens": 1306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CPPDomain(Domain):\n\n def _resolve_xref_inner(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n typ: str, target: str, node: pending_xref,\n contnode: Element) -> Tuple[Optional[Element], Optional[str]]:\n # ... other code\n if not checkType():\n logger.warning(\"cpp:%s targets a %s (%s).\",\n typ, s.declaration.objectType,\n s.get_full_nested_name(),\n location=node)\n\n declaration = s.declaration\n if isShorthand:\n fullNestedName = s.get_full_nested_name()\n displayName = fullNestedName.get_display_string().lstrip(':')\n else:\n displayName = decl.get_display_string()\n docname = s.docname\n assert docname\n\n # the non-identifier refs are cross-references, which should be processed:\n # - fix parenthesis due to operator() and add_function_parentheses\n if typ != \"identifier\":\n title = contnode.pop(0).astext()\n # If it's operator(), we need to add '()' if explicit function parens\n # are requested. Then the Sphinx machinery will add another pair.\n # Also, if it's an 'any' ref that resolves to a function, we need to add\n # parens as well.\n # However, if it's a non-shorthand function ref, for a function that\n # takes no arguments, then we may need to add parens again as well.\n addParen = 0\n if not node.get('refexplicit', False) and declaration.objectType == 'function':\n if isShorthand:\n # this is just the normal haxing for 'any' roles\n if env.config.add_function_parentheses and typ == 'any':\n addParen += 1\n # and now this stuff for operator()\n if (env.config.add_function_parentheses and typ == 'func' and\n title.endswith('operator()')):\n addParen += 1\n if (typ in ('any', 'func') and\n title.endswith('operator') and\n displayName.endswith('operator()')):\n addParen += 1\n else:\n # our job here is to essentially nullify add_function_parentheses\n if env.config.add_function_parentheses:\n if typ == 'any' and displayName.endswith('()'):\n addParen += 1\n elif typ == 'func':\n if title.endswith('()') and not displayName.endswith('()'):\n title = title[:-2]\n else:\n if displayName.endswith('()'):\n addParen += 1\n if addParen > 0:\n title += '()' * addParen\n # and reconstruct the title again\n contnode += nodes.Text(title)\n res = make_refnode(builder, fromdocname, docname,\n declaration.get_newest_id(), contnode, displayName\n ), declaration.objectType\n return res\n\n def resolve_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n typ: str, target: str, node: pending_xref, contnode: Element\n ) -> Optional[Element]:\n return self._resolve_xref_inner(env, fromdocname, builder, typ,\n target, node, contnode)[0]\n\n def resolve_any_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder,\n target: str, node: pending_xref, contnode: Element\n ) -> List[Tuple[str, Element]]:\n with logging.suppress_logging():\n retnode, objtype = self._resolve_xref_inner(env, fromdocname, builder,\n 'any', target, node, contnode)\n if retnode:\n if objtype == 'templateParam':\n return [('cpp:templateParam', retnode)]\n else:\n return [('cpp:' + self.role_for_objtype(objtype), retnode)]\n return []\n\n def get_objects(self) -> Iterator[Tuple[str, str, str, str, str, int]]:\n rootSymbol = self.data['root_symbol']\n for symbol in rootSymbol.get_all_symbols():\n if symbol.declaration is None:\n continue\n assert symbol.docname\n fullNestedName = symbol.get_full_nested_name()\n name = str(fullNestedName).lstrip(':')\n dispname = fullNestedName.get_display_string().lstrip(':')\n objectType = symbol.declaration.objectType\n docname = symbol.docname\n newestId = symbol.declaration.get_newest_id()\n yield (name, dispname, objectType, docname, newestId, 1)\n\n def get_full_qualified_name(self, node: Element) -> str:\n target = node.get('reftarget', None)\n if target is None:\n return None\n parentKey: LookupKey = node.get(\"cpp:parent_key\", None)\n if parentKey is None or len(parentKey.data) <= 0:\n return None\n\n rootSymbol = self.data['root_symbol']\n parentSymbol = rootSymbol.direct_lookup(parentKey)\n parentName = parentSymbol.get_full_nested_name()\n return '::'.join([str(parentName), target])\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_domain(CPPDomain)\n app.add_config_value(\"cpp_index_common_prefix\", [], 'env')\n app.add_config_value(\"cpp_id_attributes\", [], 'env')\n app.add_config_value(\"cpp_paren_attributes\", [], 'env')\n app.add_post_transform(AliasTransform)\n\n # debug stuff\n app.add_config_value(\"cpp_debug_lookup\", False, '')\n app.add_config_value(\"cpp_debug_show_tree\", False, '')\n\n def initStuff(app):\n Symbol.debug_lookup = app.config.cpp_debug_lookup\n Symbol.debug_show_tree = app.config.cpp_debug_show_tree\n app.config.cpp_index_common_prefix.sort(reverse=True)\n app.connect(\"builder-inited\", initStuff)\n\n return {\n 'version': 'builtin',\n 'env_version': 5,\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NonDataDescriptorMixin_NonDataDescriptorMixin.get_doc.if_getattr_self_non_dat.else_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_NonDataDescriptorMixin_NonDataDescriptorMixin.get_doc.if_getattr_self_non_dat.else_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2338, "end_line": 2366, "span_ids": ["NonDataDescriptorMixin", "NonDataDescriptorMixin.get_doc", "NonDataDescriptorMixin.import_object", "NonDataDescriptorMixin.should_suppress_value_header"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NonDataDescriptorMixin(DataDocumenterMixinBase):\n \"\"\"\n Mixin for AttributeDocumenter to provide the feature for supporting non\n data-descriptors.\n\n .. note:: This mix-in must be inherited after other mix-ins. Otherwise, docstring\n and :value: header will be suppressed unexpectedly.\n \"\"\"\n\n def import_object(self, raiseerror: bool = False) -> bool:\n ret = super().import_object(raiseerror) # type: ignore\n if ret and not inspect.isattributedescriptor(self.object):\n self.non_data_descriptor = True\n else:\n self.non_data_descriptor = False\n\n return ret\n\n def should_suppress_value_header(self) -> bool:\n return (not getattr(self, 'non_data_descriptor', False) or\n super().should_suppress_directive_header())\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n if getattr(self, 'non_data_descriptor', False):\n # the docstring of non datadescriptor is very probably the wrong thing\n # to display\n return None\n else:\n return super().get_doc(ignore) # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_UninitializedInstanceAttributeMixin.import_object_UninitializedInstanceAttributeMixin.get_doc.if_self_object_is_UNINITI.else_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_UninitializedInstanceAttributeMixin.import_object_UninitializedInstanceAttributeMixin.get_doc.if_self_object_is_UNINITI.else_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2523, "end_line": 2556, "span_ids": ["UninitializedInstanceAttributeMixin.should_suppress_value_header", "UninitializedInstanceAttributeMixin.import_object", "UninitializedInstanceAttributeMixin.get_doc"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class UninitializedInstanceAttributeMixin(DataDocumenterMixinBase):\n\n def import_object(self, raiseerror: bool = False) -> bool:\n \"\"\"Check the exisitence of uninitialized instance attribute when failed to import\n the attribute.\"\"\"\n try:\n return super().import_object(raiseerror=True) # type: ignore\n except ImportError as exc:\n try:\n ret = import_object(self.modname, self.objpath[:-1], 'class',\n attrgetter=self.get_attr, # type: ignore\n warningiserror=self.config.autodoc_warningiserror)\n parent = ret[3]\n if self.is_uninitialized_instance_attribute(parent):\n self.object = UNINITIALIZED_ATTR\n self.parent = parent\n return True\n except ImportError:\n pass\n\n if raiseerror:\n raise\n else:\n logger.warning(exc.args[0], type='autodoc', subtype='import_object')\n self.env.note_reread()\n return False\n\n def should_suppress_value_header(self) -> bool:\n return (self.object is UNINITIALIZED_ATTR or\n super().should_suppress_value_header())\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n if self.object is UNINITIALIZED_ATTR:\n return None\n else:\n return super().get_doc(ignore) # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_DocumenterBridge_DocumenterBridge.reporter.return.self__reporter": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/directive.py_DocumenterBridge_DocumenterBridge.reporter.return.self__reporter", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/directive.py", "file_name": "directive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 42, "end_line": 71, "span_ids": ["DocumenterBridge.filename_set", "DocumenterBridge", "DocumenterBridge.warn", "DocumenterBridge.reporter"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocumenterBridge:\n \"\"\"A parameters container for Documenters.\"\"\"\n\n def __init__(self, env: BuildEnvironment, reporter: Reporter, options: Options,\n lineno: int, state: Any) -> None:\n self.env = env\n self._reporter = reporter\n self.genopt = options\n self.lineno = lineno\n self.record_dependencies: Set[str] = set()\n self.result = StringList()\n self.state = state\n\n def warn(self, msg: str) -> None:\n warnings.warn('DocumenterBridge.warn is deprecated. Please use sphinx.util.logging '\n 'module instead.',\n RemovedInSphinx60Warning, stacklevel=2)\n logger.warning(msg, location=(self.env.docname, self.lineno))\n\n @property\n def filename_set(self) -> Set:\n warnings.warn('DocumenterBridge.filename_set is deprecated.',\n RemovedInSphinx60Warning, stacklevel=2)\n return self.record_dependencies\n\n @property\n def reporter(self) -> Reporter:\n warnings.warn('DocumenterBridge.reporter is deprecated.',\n RemovedInSphinx50Warning, stacklevel=2)\n return self._reporter", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-c-intersphinx/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-c-intersphinx/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-domain-c-intersphinx/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl"], "tokens": 19}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\nextensions = [\n\t'sphinx.ext.intersphinx',\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-cpp-intersphinx/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-cpp-intersphinx/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-domain-cpp-intersphinx/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl"], "tokens": 19}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\nextensions = [\n\t'sphinx.ext.intersphinx',\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-highlight_options/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-highlight_options/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-highlight_options/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl"], "tokens": 25}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "highlight_options = {\n 'default': {'default_option': True},\n 'python': {'python_option': True}\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_assets_order_test_assets_order.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_assets_order_test_assets_order.None_1", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1206, "end_line": 1232, "span_ids": ["test_assets_order"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='html_assets')\ndef test_assets_order(app):\n app.add_css_file('normal.css')\n app.add_css_file('early.css', priority=100)\n app.add_css_file('late.css', priority=750)\n app.add_css_file('lazy.css', priority=900)\n app.add_js_file('normal.js')\n app.add_js_file('early.js', priority=100)\n app.add_js_file('late.js', priority=750)\n app.add_js_file('lazy.js', priority=900)\n\n app.builder.build_all()\n content = (app.outdir / 'index.html').read_text()\n\n # css_files\n expected = ['_static/early.css', '_static/pygments.css', '_static/alabaster.css',\n 'https://example.com/custom.css', '_static/normal.css', '_static/late.css',\n '_static/css/style.css', '_static/lazy.css']\n pattern = '.*'.join('href=\"%s\"' % f for f in expected)\n assert re.search(pattern, content, re.S)\n\n # js_files\n expected = ['_static/early.js', '_static/jquery.js', '_static/underscore.js',\n '_static/doctools.js', 'https://example.com/script.js', '_static/normal.js',\n '_static/late.js', '_static/js/custom.js', '_static/lazy.js']\n pattern = '.*'.join('src=\"%s\"' % f for f in expected)\n assert re.search(pattern, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_highlight_options_test_highlight_options.with_patch_object_subject.assert_call_args_2_ca": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_highlight_options_test_highlight_options.with_patch_object_subject.assert_call_args_2_ca", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1613, "end_line": 1626, "span_ids": ["test_highlight_options"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='highlight_options')\ndef test_highlight_options(app):\n subject = app.builder.highlighter\n with patch.object(subject, 'highlight_block', wraps=subject.highlight_block) as highlight:\n app.build()\n\n call_args = highlight.call_args_list\n assert len(call_args) == 3\n assert call_args[0] == call(ANY, 'default', force=False, linenos=False,\n location=ANY, opts={'default_option': True})\n assert call_args[1] == call(ANY, 'python', force=False, linenos=False,\n location=ANY, opts={'python_option': True})\n assert call_args[2] == call(ANY, 'java', force=False, linenos=False,\n location=ANY, opts={})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_dedent_test_LiteralIncludeReader_dedent.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_dedent_test_LiteralIncludeReader_dedent.None_7", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 227, "end_line": 259, "span_ids": ["test_LiteralIncludeReader_dedent"], "tokens": 318}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_dedent(literal_inc_path):\n # dedent: 2\n options = {'lines': '9-11', 'dedent': 2}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\" def baz():\\n\"\n \" pass\\n\"\n \"\\n\")\n\n # dedent: 4\n options = {'lines': '9-11', 'dedent': 4}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"def baz():\\n\"\n \" pass\\n\"\n \"\\n\")\n\n # dedent: 6\n options = {'lines': '9-11', 'dedent': 6}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"f baz():\\n\"\n \" pass\\n\"\n \"\\n\")\n\n # dedent: None\n options = {'lines': '9-11', 'dedent': None}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"def baz():\\n\"\n \" pass\\n\"\n \"\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_xrefs_abbreviations_test_domain_py_xrefs_abbreviations.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_xrefs_abbreviations_test_domain_py_xrefs_abbreviations.None_4", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 156, "span_ids": ["test_domain_py_xrefs_abbreviations"], "tokens": 324}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='domain-py')\ndef test_domain_py_xrefs_abbreviations(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'abbr.html').read_text()\n assert re.search(r'normal: <a .* href=\"module.html#module_a.submodule.ModTopLevel.'\n r'mod_child_1\" .*><.*>module_a.submodule.ModTopLevel.mod_child_1\\(\\)'\n r'<.*></a>',\n content)\n assert re.search(r'relative: <a .* href=\"module.html#module_a.submodule.ModTopLevel.'\n r'mod_child_1\" .*><.*>ModTopLevel.mod_child_1\\(\\)<.*></a>',\n content)\n assert re.search(r'short name: <a .* href=\"module.html#module_a.submodule.ModTopLevel.'\n r'mod_child_1\" .*><.*>mod_child_1\\(\\)<.*></a>',\n content)\n assert re.search(r'relative \\+ short name: <a .* href=\"module.html#module_a.submodule.'\n r'ModTopLevel.mod_child_1\" .*><.*>mod_child_1\\(\\)<.*></a>',\n content)\n assert re.search(r'short name \\+ relative: <a .* href=\"module.html#module_a.submodule.'\n r'ModTopLevel.mod_child_1\" .*><.*>mod_child_1\\(\\)<.*></a>',\n content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_productionlist_test_productionlist.assert_A_strong_B": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_productionlist_test_productionlist.assert_A_strong_B", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 361, "end_line": 412, "span_ids": ["test_productionlist"], "tokens": 688}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='productionlist')\ndef test_productionlist(app, status, warning):\n app.builder.build_all()\n\n warnings = warning.getvalue().split(\"\\n\")\n assert len(warnings) == 2\n assert warnings[-1] == ''\n assert \"Dup2.rst:4: WARNING: duplicate token description of Dup, other instance in Dup1\" in warnings[0]\n\n with (app.outdir / 'index.html').open('rb') as f:\n etree = HTMLParser(namespaceHTMLElements=False).parse(f)\n ul = list(etree.iter('ul'))[1]\n cases = []\n for li in list(ul):\n assert len(list(li)) == 1\n p = list(li)[0]\n assert p.tag == 'p'\n text = str(p.text).strip(' :')\n assert len(list(p)) == 1\n a = list(p)[0]\n assert a.tag == 'a'\n link = a.get('href')\n assert len(list(a)) == 1\n code = list(a)[0]\n assert code.tag == 'code'\n assert len(list(code)) == 1\n span = list(code)[0]\n assert span.tag == 'span'\n linkText = span.text.strip()\n cases.append((text, link, linkText))\n assert cases == [\n ('A', 'Bare.html#grammar-token-A', 'A'),\n ('B', 'Bare.html#grammar-token-B', 'B'),\n ('P1:A', 'P1.html#grammar-token-P1-A', 'P1:A'),\n ('P1:B', 'P1.html#grammar-token-P1-B', 'P1:B'),\n ('P2:A', 'P1.html#grammar-token-P1-A', 'P1:A'),\n ('P2:B', 'P2.html#grammar-token-P2-B', 'P2:B'),\n ('Explicit title A, plain', 'Bare.html#grammar-token-A', 'MyTitle'),\n ('Explicit title A, colon', 'Bare.html#grammar-token-A', 'My:Title'),\n ('Explicit title P1:A, plain', 'P1.html#grammar-token-P1-A', 'MyTitle'),\n ('Explicit title P1:A, colon', 'P1.html#grammar-token-P1-A', 'My:Title'),\n ('Tilde A', 'Bare.html#grammar-token-A', 'A'),\n ('Tilde P1:A', 'P1.html#grammar-token-P1-A', 'A'),\n ('Tilde explicit title P1:A', 'P1.html#grammar-token-P1-A', '~MyTitle'),\n ('Tilde, explicit title P1:A', 'P1.html#grammar-token-P1-A', 'MyTitle'),\n ('Dup', 'Dup2.html#grammar-token-Dup', 'Dup'),\n ('FirstLine', 'firstLineRule.html#grammar-token-FirstLine', 'FirstLine'),\n ('SecondLine', 'firstLineRule.html#grammar-token-SecondLine', 'SecondLine'),\n ]\n\n text = (app.outdir / 'LineContinuation.html').read_text()\n assert \"A</strong> ::= B C D E F G\" in text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_disabled_docref_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_disabled_docref_", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 405, "end_line": 422, "span_ids": ["test_disabled_docref", "test_labeled_rubric"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_disabled_docref(app):\n text = (\":doc:`index`\\n\"\n \":doc:`!index`\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, ([nodes.paragraph, ([pending_xref, nodes.inline, \"index\"],\n \"\\n\",\n [nodes.inline, \"index\"])],))\n\n\ndef test_labeled_rubric(app):\n text = (\".. _label:\\n\"\n \".. rubric:: blah *blah* blah\\n\")\n restructuredtext.parse(app, text)\n\n domain = app.env.get_domain(\"std\")\n assert 'label' in domain.labels\n assert domain.labels['label'] == ('index', 'label', 'blah blah blah')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_process_docstring_for_nondatadescriptor_test_process_docstring_for_nondatadescriptor.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py_test_process_docstring_for_nondatadescriptor_test_process_docstring_for_nondatadescriptor.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_events.py", "file_name": "test_ext_autodoc_events.py", "file_type": "text/x-python", "category": "test", "start_line": 37, "end_line": 51, "span_ids": ["test_process_docstring_for_nondatadescriptor"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_process_docstring_for_nondatadescriptor(app):\n def on_process_docstring(app, what, name, obj, options, lines):\n raise\n\n app.connect('autodoc-process-docstring', on_process_docstring)\n\n actual = do_autodoc(app, 'attribute', 'target.AttCls.a1')\n assert list(actual) == [\n '',\n '.. py:attribute:: AttCls.a1',\n ' :module: target',\n ' :value: hello world',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_recursive_test_autosummary_recursive.assert_package_package_m": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_recursive_test_autosummary_recursive.assert_package_package_m", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 380, "end_line": 405, "span_ids": ["test_autosummary_recursive"], "tokens": 318}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='ext-autosummary-recursive')\n@pytest.mark.usefixtures(\"rollback_sysmodules\")\ndef test_autosummary_recursive(app, status, warning):\n sys.modules.pop('package', None) # unload target module to clear the module cache\n\n app.build()\n\n # autosummary having :recursive: option\n assert (app.srcdir / 'generated' / 'package.rst').exists()\n assert (app.srcdir / 'generated' / 'package.module.rst').exists()\n assert (app.srcdir / 'generated' / 'package.module_importfail.rst').exists() is False\n assert (app.srcdir / 'generated' / 'package.package.rst').exists()\n assert (app.srcdir / 'generated' / 'package.package.module.rst').exists()\n\n # autosummary not having :recursive: option\n assert (app.srcdir / 'generated' / 'package2.rst').exists()\n assert (app.srcdir / 'generated' / 'package2.module.rst').exists() is False\n\n # Check content of recursively generated stub-files\n content = (app.srcdir / 'generated' / 'package.rst').read_text()\n assert 'package.module' in content\n assert 'package.package' in content\n assert 'package.module_importfail' in content\n\n content = (app.srcdir / 'generated' / 'package.package.rst').read_text()\n assert 'package.package.module' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_recursive_skips_mocked_modules_test_autosummary_recursive_skips_mocked_modules.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_recursive_skips_mocked_modules_test_autosummary_recursive_skips_mocked_modules.None_3", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 408, "end_line": 419, "span_ids": ["test_autosummary_recursive_skips_mocked_modules"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='ext-autosummary-recursive',\n srcdir='test_autosummary_recursive_skips_mocked_modules',\n confoverrides={'autosummary_mock_imports': ['package.package']})\n@pytest.mark.usefixtures(\"rollback_sysmodules\")\ndef test_autosummary_recursive_skips_mocked_modules(app, status, warning):\n sys.modules.pop('package', None) # unload target module to clear the module cache\n app.build()\n\n assert (app.srcdir / 'generated' / 'package.rst').exists()\n assert (app.srcdir / 'generated' / 'package.module.rst').exists()\n assert (app.srcdir / 'generated' / 'package.package.rst').exists() is False\n assert (app.srcdir / 'generated' / 'package.package.module.rst').exists() is False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_format_date_test_format_date.None_15": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_format_date_test_format_date.None_15", "embedding": null, "metadata": {"file_path": "tests/test_util_i18n.py", "file_name": "test_util_i18n.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 94, "span_ids": ["test_format_date"], "tokens": 569}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_format_date():\n date = datetime.date(2016, 2, 7)\n\n # strftime format\n format = '%B %d, %Y'\n assert i18n.format_date(format, date=date) == 'February 07, 2016'\n assert i18n.format_date(format, date=date, language='') == 'February 07, 2016'\n assert i18n.format_date(format, date=date, language='unknown') == 'February 07, 2016'\n assert i18n.format_date(format, date=date, language='en') == 'February 07, 2016'\n assert i18n.format_date(format, date=date, language='ja') == '2\u6708 07, 2016'\n assert i18n.format_date(format, date=date, language='de') == 'Februar 07, 2016'\n\n # raw string\n format = 'Mon Mar 28 12:37:08 2016, commit 4367aef'\n assert i18n.format_date(format, date=date) == format\n\n format = '%B %d, %Y, %H:%M:%S %I %p'\n datet = datetime.datetime(2016, 2, 7, 5, 11, 17, 0)\n assert i18n.format_date(format, date=datet) == 'February 07, 2016, 05:11:17 05 AM'\n\n format = '%B %-d, %Y, %-H:%-M:%-S %-I %p'\n assert i18n.format_date(format, date=datet) == 'February 7, 2016, 5:11:17 5 AM'\n format = '%x'\n assert i18n.format_date(format, date=datet) == 'Feb 7, 2016'\n format = '%X'\n assert i18n.format_date(format, date=datet) == '5:11:17 AM'\n assert i18n.format_date(format, date=date) == 'Feb 7, 2016'\n format = '%c'\n assert i18n.format_date(format, date=datet) == 'Feb 7, 2016, 5:11:17 AM'\n assert i18n.format_date(format, date=date) == 'Feb 7, 2016'\n\n # timezone\n format = '%Z'\n assert i18n.format_date(format, date=datet) == 'UTC'\n format = '%z'\n assert i18n.format_date(format, date=datet) == '+0000'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_stylesheet_Sphinx.add_stylesheet.self_add_css_file_filenam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_stylesheet_Sphinx.add_stylesheet.self_add_css_file_filenam", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1052, "end_line": 1070, "span_ids": ["Sphinx.add_stylesheet"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_stylesheet(self, filename: str, alternate: bool = False, title: str = None\n ) -> None:\n \"\"\"An alias of :meth:`add_css_file`.\n\n .. deprecated:: 1.8\n \"\"\"\n logger.warning('The app.add_stylesheet() is deprecated. '\n 'Please use app.add_css_file() instead.')\n\n attributes = {} # type: Dict[str, Any]\n if alternate:\n attributes['rel'] = 'alternate stylesheet'\n else:\n attributes['rel'] = 'stylesheet'\n\n if title:\n attributes['title'] = title\n\n self.add_css_file(filename, **attributes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkCollector_HyperlinkCollector.run.for_imgnode_in_self_docum.if_uri_and_in_uri_.if_uri_not_in_hyperlinks_.hyperlinks_uri_uri_inf": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkCollector_HyperlinkCollector.run.for_imgnode_in_self_docum.if_uri_and_in_uri_.if_uri_not_in_hyperlinks_.hyperlinks_uri_uri_inf", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 494, "end_line": 527, "span_ids": ["HyperlinkCollector", "HyperlinkCollector.run"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HyperlinkCollector(SphinxPostTransform):\n builders = ('linkcheck',)\n default_priority = 800\n\n def run(self, **kwargs: Any) -> None:\n builder = cast(CheckExternalLinksBuilder, self.app.builder)\n hyperlinks = builder.hyperlinks\n\n # reference nodes\n for refnode in self.document.findall(nodes.reference):\n if 'refuri' not in refnode:\n continue\n uri = refnode['refuri']\n newuri = self.app.emit_firstresult('linkcheck-process-uri', uri)\n if newuri:\n uri = newuri\n\n lineno = get_node_line(refnode)\n uri_info = Hyperlink(uri, self.env.docname, lineno)\n if uri not in hyperlinks:\n hyperlinks[uri] = uri_info\n\n # image nodes\n for imgnode in self.document.findall(nodes.image):\n uri = imgnode['candidates'].get('?')\n if uri and '://' in uri:\n newuri = self.app.emit_firstresult('linkcheck-process-uri', uri)\n if newuri:\n uri = newuri\n\n lineno = get_node_line(imgnode)\n uri_info = Hyperlink(uri, self.env.docname, lineno)\n if uri not in hyperlinks:\n hyperlinks[uri] = uri_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_boolean_ok.return.x": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_boolean_ok.return.x", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 134, "span_ids": ["ok", "boolean", "suffix"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def boolean(x: str) -> bool:\n if x.upper() not in ('Y', 'YES', 'N', 'NO'):\n raise ValidationError(__(\"Please enter either 'y' or 'n'.\"))\n return x.upper() in ('Y', 'YES')\n\n\ndef suffix(x: str) -> str:\n if not (x[0:1] == '.' and len(x) > 1):\n raise ValidationError(__(\"Please enter a file suffix, e.g. '.rst' or '.txt'.\"))\n return x\n\n\ndef ok(x: str) -> str:\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_do_prompt_do_prompt.return.x": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_do_prompt_do_prompt.return.x", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 162, "end_line": 187, "span_ids": ["do_prompt"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def do_prompt(text: str, default: str = None, validator: Callable[[str], Any] = nonempty) -> Union[str, bool]: # NOQA\n while True:\n if default is not None:\n prompt = PROMPT_PREFIX + '%s [%s]: ' % (text, default)\n else:\n prompt = PROMPT_PREFIX + text + ': '\n if USE_LIBEDIT:\n # Note: libedit has a problem for combination of ``input()`` and escape\n # sequence (see #5335). To avoid the problem, all prompts are not colored\n # on libedit.\n pass\n elif readline:\n # pass input_mode=True if readline available\n prompt = colorize(COLOR_QUESTION, prompt, input_mode=True)\n else:\n prompt = colorize(COLOR_QUESTION, prompt, input_mode=False)\n x = term_input(prompt).strip()\n if default and not x:\n x = default\n try:\n x = validator(x)\n except ValidationError as err:\n print(red('* ' + str(err)))\n continue\n break\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/directives/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 326, "end_line": 341, "span_ids": ["setup"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_config_value(\"strip_signature_backslash\", False, 'env')\n directives.register_directive('default-role', DefaultRole)\n directives.register_directive('default-domain', DefaultDomain)\n directives.register_directive('describe', ObjectDescription)\n # new, more consistent, name\n directives.register_directive('object', ObjectDescription)\n\n app.add_event('object-description-transform')\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._load_custom_sections_GoogleDocstring._load_custom_sections.if_self__config_napoleon_.for_entry_in_self__config.if_isinstance_entry_str_.else_.if_entry_1_params_st.else_.self__sections_entry_0_l": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._load_custom_sections_GoogleDocstring._load_custom_sections.if_self__config_napoleon_.for_entry_in_self__config.if_isinstance_entry_str_.else_.if_entry_1_params_st.else_.self__sections_entry_0_l", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 543, "end_line": 563, "span_ids": ["GoogleDocstring._load_custom_sections"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _load_custom_sections(self) -> None:\n if self._config.napoleon_custom_sections is not None:\n for entry in self._config.napoleon_custom_sections:\n if isinstance(entry, str):\n # if entry is just a label, add to sections list,\n # using generic section logic.\n self._sections[entry.lower()] = self._parse_custom_generic_section\n else:\n # otherwise, assume entry is container;\n if entry[1] == \"params_style\":\n self._sections[entry[0].lower()] = \\\n self._parse_custom_params_style_section\n elif entry[1] == \"returns_style\":\n self._sections[entry[0].lower()] = \\\n self._parse_custom_returns_style_section\n else:\n # [0] is new section, [1] is the section to alias.\n # in the case of key mismatch, just handle as generic section.\n self._sections[entry[0].lower()] = \\\n self._sections.get(entry[1].lower(),\n self._parse_custom_generic_section)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_should_generate_module_page_should_generate_module_page.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_should_generate_module_page_should_generate_module_page.return.True", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 160, "end_line": 178, "span_ids": ["should_generate_module_page"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def should_generate_module_page(app: Sphinx, modname: str) -> bool:\n \"\"\"Check generation of module page is needed.\"\"\"\n module_filename = get_module_filename(app, modname)\n if module_filename is None:\n # Always (re-)generate module page when module filename is not found.\n return True\n\n builder = cast(StandaloneHTMLBuilder, app.builder)\n basename = modname.replace('.', '/') + builder.out_suffix\n page_filename = path.join(app.outdir, '_modules/', basename)\n\n try:\n if path.getmtime(module_filename) <= path.getmtime(page_filename):\n # generation is not needed if the HTML page is newer than module file.\n return False\n except IOError:\n pass\n\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_collect_pages_collect_pages.stack._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_collect_pages_collect_pages.stack._", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 232, "end_line": 307, "span_ids": ["collect_pages"], "tokens": 750}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def collect_pages(app: Sphinx) -> Generator[Tuple[str, Dict[str, Any], str], None, None]:\n env = app.builder.env\n if not hasattr(env, '_viewcode_modules'):\n return\n if not is_supported_builder(app.builder):\n return\n highlighter = app.builder.highlighter # type: ignore\n urito = app.builder.get_relative_uri\n\n modnames = set(env._viewcode_modules) # type: ignore\n\n for modname, entry in status_iterator(\n sorted(env._viewcode_modules.items()), # type: ignore\n __('highlighting module code... '), \"blue\",\n len(env._viewcode_modules), # type: ignore\n app.verbosity, lambda x: x[0]):\n if not entry:\n continue\n if not should_generate_module_page(app, modname):\n continue\n\n code, tags, used, refname = entry\n # construct a page name for the highlighted source\n pagename = posixpath.join(OUTPUT_DIRNAME, modname.replace('.', '/'))\n # highlight the source using the builder's highlighter\n if env.config.highlight_language in ('python3', 'default', 'none'):\n lexer = env.config.highlight_language\n else:\n lexer = 'python'\n highlighted = highlighter.highlight_block(code, lexer, linenos=False)\n # split the code into lines\n lines = highlighted.splitlines()\n # split off wrap markup from the first line of the actual code\n before, after = lines[0].split('<pre>')\n lines[0:1] = [before + '<pre>', after]\n # nothing to do for the last line; it always starts with </pre> anyway\n # now that we have code lines (starting at index 1), insert anchors for\n # the collected tags (HACK: this only works if the tag boundaries are\n # properly nested!)\n maxindex = len(lines) - 1\n for name, docname in used.items():\n type, start, end = tags[name]\n backlink = urito(pagename, docname) + '#' + refname + '.' + name\n lines[start] = (\n '<div class=\"viewcode-block\" id=\"%s\"><a class=\"viewcode-back\" '\n 'href=\"%s\">%s</a>' % (name, backlink, _('[docs]')) +\n lines[start])\n lines[min(end, maxindex)] += '</div>'\n # try to find parents (for submodules)\n parents = []\n parent = modname\n while '.' in parent:\n parent = parent.rsplit('.', 1)[0]\n if parent in modnames:\n parents.append({\n 'link': urito(pagename,\n posixpath.join(OUTPUT_DIRNAME, parent.replace('.', '/'))),\n 'title': parent})\n parents.append({'link': urito(pagename, posixpath.join(OUTPUT_DIRNAME, 'index')),\n 'title': _('Module code')})\n parents.reverse()\n # putting it all together\n context = {\n 'parents': parents,\n 'title': modname,\n 'body': (_('<h1>Source code for %s</h1>') % modname +\n '\\n'.join(lines)),\n }\n yield (pagename, context, 'page.html')\n\n if not modnames:\n return\n\n html = ['\\n']\n # the stack logic is needed for using nested lists for submodules\n stack = ['']\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_collect_pages.for_modname_in_sorted_mod_collect_pages.yield_posixpath_join_OUT": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_collect_pages.for_modname_in_sorted_mod_collect_pages.yield_posixpath_join_OUT", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 255, "end_line": 276, "span_ids": ["collect_pages"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def collect_pages(app: Sphinx) -> Generator[Tuple[str, Dict[str, Any], str], None, None]:\n # ... other code\n for modname in sorted(modnames):\n if modname.startswith(stack[-1]):\n stack.append(modname + '.')\n html.append('<ul>')\n else:\n stack.pop()\n while not modname.startswith(stack[-1]):\n stack.pop()\n html.append('</ul>')\n stack.append(modname + '.')\n html.append('<li><a href=\"%s\">%s</a></li>\\n' % (\n urito(posixpath.join(OUTPUT_DIRNAME, 'index'),\n posixpath.join(OUTPUT_DIRNAME, modname.replace('.', '/'))),\n modname))\n html.append('</ul>' * (len(stack) - 1))\n context = {\n 'title': _('Overview: module code'),\n 'body': (_('<h1>All modules for which code is available</h1>') +\n ''.join(html)),\n }\n\n yield (posixpath.join(OUTPUT_DIRNAME, 'index'), context, 'page.html')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_ASTBaseBase_ASTBaseBase.__repr__.return._s_self___class____": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_ASTBaseBase_ASTBaseBase.__repr__.return._s_self___class____", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 83, "end_line": 110, "span_ids": ["ASTBaseBase.__repr__", "ASTBaseBase.__str__", "ASTBaseBase.get_display_string", "ASTBaseBase.__eq__", "ASTBaseBase", "ASTBaseBase.clone", "ASTBaseBase._stringify", "ASTBaseBase:2"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTBaseBase:\n def __eq__(self, other: Any) -> bool:\n if type(self) is not type(other):\n return False\n try:\n for key, value in self.__dict__.items():\n if value != getattr(other, key):\n return False\n except AttributeError:\n return False\n return True\n\n __hash__: Callable[[], int] = None\n\n def clone(self) -> Any:\n return deepcopy(self)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n raise NotImplementedError(repr(self))\n\n def __str__(self) -> str:\n return self._stringify(lambda ast: str(ast))\n\n def get_display_string(self) -> str:\n return self._stringify(lambda ast: ast.get_display_string())\n\n def __repr__(self) -> str:\n return '<%s>' % self.__class__.__name__", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_is_builtin_class_method_is_builtin_class_method.return.getattr_builtins_name_N": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_is_builtin_class_method_is_builtin_class_method.return.getattr_builtins_name_N", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 466, "end_line": 486, "span_ids": ["is_builtin_class_method"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def is_builtin_class_method(obj: Any, attr_name: str) -> bool:\n \"\"\"If attr_name is implemented at builtin class, return True.\n\n >>> is_builtin_class_method(int, '__init__')\n True\n\n Why this function needed? CPython implements int.__init__ by Descriptor\n but PyPy implements it by pure Python code.\n \"\"\"\n try:\n mro = getmro(obj)\n cls = next(c for c in mro if attr_name in safe_getattr(c, '__dict__', {}))\n except StopIteration:\n return False\n\n try:\n name = safe_getattr(cls, '__name__')\n except AttributeError:\n return False\n\n return getattr(builtins, name, None) is cls", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_process_doc_handle_figure_caption_test_process_doc_handle_figure_caption.assert_domain_data_label": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_process_doc_handle_figure_caption_test_process_doc_handle_figure_caption.assert_domain_data_label", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 18, "end_line": 39, "span_ids": ["test_process_doc_handle_figure_caption"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_process_doc_handle_figure_caption():\n env = mock.Mock(domaindata={})\n env.app.registry.enumerable_nodes = {}\n figure_node = nodes.figure(\n '',\n nodes.caption('caption text', 'caption text'),\n )\n document = mock.Mock(\n nametypes={'testname': True},\n nameids={'testname': 'testid'},\n ids={'testid': figure_node},\n citation_refs={},\n )\n document.findall.return_value = []\n\n domain = StandardDomain(env)\n if 'testname' in domain.data['labels']:\n del domain.data['labels']['testname']\n domain.process_doc(env, 'testdoc', document)\n assert 'testname' in domain.data['labels']\n assert domain.data['labels']['testname'] == (\n 'testdoc', 'testid', 'caption text')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._general_extensibil_Sphinx._event_interface": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._general_extensibil_Sphinx._event_interface", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 392, "end_line": 417, "span_ids": ["Sphinx.require_sphinx", "Sphinx.build", "Sphinx.setup_extension"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n # ---- general extensibility interface -------------------------------------\n\n def setup_extension(self, extname: str) -> None:\n \"\"\"Import and setup a Sphinx extension module.\n\n Load the extension given by the module *name*. Use this if your\n extension needs the features provided by another extension. No-op if\n called twice.\n \"\"\"\n logger.debug('[app] setting up extension: %r', extname)\n self.registry.load_extension(self, extname)\n\n def require_sphinx(self, version: str) -> None:\n \"\"\"Check the Sphinx version if requested.\n\n Compare *version* with the version of the running Sphinx, and abort the\n build when it is too old.\n\n :param version: The required version in the form of ``major.minor``.\n\n .. versionadded:: 1.0\n \"\"\"\n if version > sphinx.__display_version__[:3]:\n raise VersionRequirementError(version)\n\n # event interface", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.connect_Sphinx.connect.return.listener_id": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.connect_Sphinx.connect.return.listener_id", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 395, "end_line": 414, "span_ids": ["Sphinx.connect"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n def connect(self, event: str, callback: Callable, priority: int = 500) -> int:\n \"\"\"Register *callback* to be called when *event* is emitted.\n\n For details on available core events and the arguments of callback\n functions, please see :ref:`events`.\n\n :param event: The name of target event\n :param callback: Callback function for the event\n :param priority: The priority of the callback. The callbacks will be invoked\n in order of *priority* (ascending).\n :return: A listener ID. It can be used for :meth:`disconnect`.\n\n .. versionchanged:: 3.0\n\n Support *priority*\n \"\"\"\n listener_id = self.events.connect(event, callback, priority)\n logger.debug('[app] connecting event %r (%d): %r [id=%s]',\n event, priority, callback, listener_id)\n return listener_id", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_migrate_html_add_permalinks_sphinx.builders.singlehtml": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_migrate_html_add_permalinks_sphinx.builders.singlehtml", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1288, "end_line": 1309, "span_ids": ["migrate_html_add_permalinks", "impl:15"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def migrate_html_add_permalinks(app: Sphinx, config: Config) -> None:\n \"\"\"Migrate html_add_permalinks to html_permalinks*.\"\"\"\n html_add_permalinks = config.html_add_permalinks\n if html_add_permalinks is UNSET:\n return\n\n # RemovedInSphinx60Warning\n logger.warning(__('html_add_permalinks has been deprecated since v3.5.0. '\n 'Please use html_permalinks and html_permalinks_icon instead.'))\n if not html_add_permalinks:\n config.html_permalinks = False # type: ignore[attr-defined]\n return\n\n config.html_permalinks_icon = html.escape( # type: ignore[attr-defined]\n html_add_permalinks\n )\n\n# for compatibility\nimport sphinxcontrib.serializinghtml # NOQA\n\nimport sphinx.builders.dirhtml # NOQA\nimport sphinx.builders.singlehtml", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/transforms.py_KeyboardTransform.run_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/transforms.py_KeyboardTransform.run_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 84, "span_ids": ["setup", "KeyboardTransform.is_multiwords_key", "KeyboardTransform.run"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class KeyboardTransform(SphinxPostTransform):\n\n def run(self, **kwargs: Any) -> None:\n matcher = NodeMatcher(nodes.literal, classes=[\"kbd\"])\n for node in self.document.findall(matcher): # type: nodes.literal\n parts = self.pattern.split(node[-1].astext())\n if len(parts) == 1 or self.is_multiwords_key(parts):\n continue\n\n node['classes'].append('compound')\n node.pop()\n while parts:\n if self.is_multiwords_key(parts):\n key = ''.join(parts[:3])\n parts[:3] = []\n else:\n key = parts.pop(0)\n node += nodes.literal('', key, classes=[\"kbd\"])\n\n try:\n # key separator (ex. -, +, ^)\n sep = parts.pop(0)\n node += nodes.Text(sep)\n except IndexError:\n pass\n\n def is_multiwords_key(self, parts: List[str]) -> bool:\n if len(parts) >= 3 and parts[1].strip() == '':\n name = parts[0].lower(), parts[2].lower()\n if name in self.multiwords_keys:\n return True\n else:\n return False\n else:\n return False\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_post_transform(KeyboardTransform)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.clear_doc_StandardDomain.clear_doc.None_4.if_fn_docname_.del_self_anonlabels_key_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.clear_doc_StandardDomain.clear_doc.None_4.if_fn_docname_.del_self_anonlabels_key_", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 686, "end_line": 702, "span_ids": ["StandardDomain.clear_doc"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def clear_doc(self, docname: str) -> None:\n key: Any = None\n for key, (fn, _l) in list(self.progoptions.items()):\n if fn == docname:\n del self.progoptions[key]\n for key, (fn, _l) in list(self.objects.items()):\n if fn == docname:\n del self.objects[key]\n for key, (fn, _l) in list(self._terms.items()):\n if fn == docname:\n del self._terms[key]\n for key, (fn, _l, _l) in list(self.labels.items()):\n if fn == docname:\n del self.labels[key]\n for key, (fn, _l) in list(self.anonlabels.items()):\n if fn == docname:\n del self.anonlabels[key]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.merge_domaindata_StandardDomain.merge_domaindata.None_4.if_data_0_in_docnames_.self_anonlabels_key_da": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.merge_domaindata_StandardDomain.merge_domaindata.None_4.if_data_0_in_docnames_.self_anonlabels_key_da", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 741, "end_line": 757, "span_ids": ["StandardDomain.merge_domaindata"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:\n # XXX duplicates?\n for key, data in otherdata['progoptions'].items():\n if data[0] in docnames:\n self.progoptions[key] = data\n for key, data in otherdata['objects'].items():\n if data[0] in docnames:\n self.objects[key] = data\n for key, data in otherdata['terms'].items():\n if data[0] in docnames:\n self._terms[key] = data\n for key, data in otherdata['labels'].items():\n if data[0] in docnames:\n self.labels[key] = data\n for key, data in otherdata['anonlabels'].items():\n if data[0] in docnames:\n self.anonlabels[key] = data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_term_xref_StandardDomain._resolve_term_xref.if_result_.else_.if_target_lower_in_self.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._resolve_term_xref_StandardDomain._resolve_term_xref.if_result_.else_.if_target_lower_in_self.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 982, "end_line": 995, "span_ids": ["StandardDomain._resolve_term_xref"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def _resolve_term_xref(self, env: \"BuildEnvironment\", fromdocname: str,\n builder: \"Builder\", typ: str, target: str,\n node: pending_xref, contnode: Element) -> Element:\n result = self._resolve_obj_xref(env, fromdocname, builder, typ,\n target, node, contnode)\n if result:\n return result\n else:\n # fallback to case insentive match\n if target.lower() in self._terms:\n docname, labelid = self._terms[target.lower()]\n return make_refnode(builder, fromdocname, docname, labelid, contnode)\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_walk_has_child_module.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/apidoc.py_walk_has_child_module.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/apidoc.py", "file_name": "apidoc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 198, "end_line": 229, "span_ids": ["walk", "has_child_module"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def walk(rootpath: str, excludes: List[str], opts: Any\n ) -> Generator[Tuple[str, List[str], List[str]], None, None]:\n \"\"\"Walk through the directory and list files and subdirectories up.\"\"\"\n followlinks = getattr(opts, 'followlinks', False)\n includeprivate = getattr(opts, 'includeprivate', False)\n\n for root, subs, files in os.walk(rootpath, followlinks=followlinks):\n # document only Python module files (that aren't excluded)\n files = sorted(f for f in files\n if f.endswith(PY_SUFFIXES) and\n not is_excluded(path.join(root, f), excludes))\n\n # remove hidden ('.') and private ('_') directories, as well as\n # excluded dirs\n if includeprivate:\n exclude_prefixes: Tuple[str, ...] = ('.',)\n else:\n exclude_prefixes = ('.', '_')\n\n subs[:] = sorted(sub for sub in subs if not sub.startswith(exclude_prefixes) and\n not is_excluded(path.join(root, sub), excludes))\n\n yield root, subs, files\n\n\ndef has_child_module(rootpath: str, excludes: List[str], opts: Any) -> bool:\n \"\"\"Check the given directory contains child module/s (at least one).\"\"\"\n for _root, _subs, files in walk(rootpath, excludes, opts):\n if files:\n return True\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_ismock_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_ismock_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/mock.py", "file_name": "mock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 154, "end_line": 194, "span_ids": ["ismock", "undecorate"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def ismock(subject: Any) -> bool:\n \"\"\"Check if the object is mocked.\"\"\"\n # check the object has '__sphinx_mock__' attribute\n try:\n if safe_getattr(subject, '__sphinx_mock__', None) is None:\n return False\n except AttributeError:\n return False\n\n # check the object is mocked module\n if isinstance(subject, _MockModule):\n return True\n\n # check the object is bound method\n if isinstance(subject, MethodType) and isboundmethod(subject):\n tmp_subject = subject.__func__\n else:\n tmp_subject = subject\n\n try:\n # check the object is mocked object\n __mro__ = safe_getattr(type(tmp_subject), '__mro__', [])\n if len(__mro__) > 2 and __mro__[-2] is _MockObject:\n # A mocked object has a MRO that ends with (..., _MockObject, object).\n return True\n except AttributeError:\n pass\n\n return False\n\n\ndef undecorate(subject: _MockObject) -> Any:\n \"\"\"Unwrap mock if *subject* is decorated by mocked object.\n\n If not decorated, returns given *subject* itself.\n \"\"\"\n if ismock(subject) and subject.__sphinx_decorator_args__:\n return subject.__sphinx_decorator_args__[0]\n else:\n return subject", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py__get_full_modname_is_supported_builder.if_builder_format_htm.else_.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py__get_full_modname_is_supported_builder.if_builder_format_htm.else_.return.True", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 74, "span_ids": ["is_supported_builder", "_get_full_modname"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_full_modname(app: Sphinx, modname: str, attribute: str) -> Optional[str]:\n try:\n return get_full_modname(modname, attribute)\n except AttributeError:\n # sphinx.ext.viewcode can't follow class instance attribute\n # then AttributeError logging output only verbose mode.\n logger.verbose('Didn\\'t find %s in %s', attribute, modname)\n return None\n except Exception as e:\n # sphinx.ext.viewcode follow python domain directives.\n # because of that, if there are no real modules exists that specified\n # by py:function or other directives, viewcode emits a lot of warnings.\n # It should be displayed only verbose mode.\n logger.verbose(traceback.format_exc().rstrip())\n logger.verbose('viewcode can\\'t import %s, failed with error \"%s\"', modname, e)\n return None\n\n\ndef is_supported_builder(builder: Builder) -> bool:\n if builder.format != 'html':\n return False\n elif builder.name == 'singlehtml':\n return False\n elif builder.name.startswith('epub') and not builder.config.viewcode_enable_epub:\n return False\n else:\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_missing_reference_get_module_filename.if_source_info_.else_.try_.except_Exception_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_missing_reference_get_module_filename.if_source_info_.else_.try_.except_Exception_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 186, "end_line": 208, "span_ids": ["get_module_filename", "missing_reference"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def missing_reference(app: Sphinx, env: BuildEnvironment, node: Element, contnode: Node\n ) -> Optional[Node]:\n # resolve our \"viewcode\" reference nodes -- they need special treatment\n if node['reftype'] == 'viewcode':\n warnings.warn('viewcode extension is no longer use pending_xref node. '\n 'Please update your extension.', RemovedInSphinx50Warning)\n return make_refnode(app.builder, node['refdoc'], node['reftarget'],\n node['refid'], contnode)\n\n return None\n\n\ndef get_module_filename(app: Sphinx, modname: str) -> Optional[str]:\n \"\"\"Get module filename for *modname*.\"\"\"\n source_info = app.emit_firstresult('viewcode-find-source', modname)\n if source_info:\n return None\n else:\n try:\n filename, source = ModuleAnalyzer.get_module_source(modname)\n return filename\n except Exception:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.for_node_msg_in_extract__Locale.apply._phase2_translation": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.for_node_msg_in_extract__Locale.apply._phase2_translation", "embedding": null, "metadata": {"file_path": "sphinx/transforms/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 235, "span_ids": ["Locale.apply"], "tokens": 1056}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Locale(SphinxTransform):\n\n def apply(self, **kwargs: Any) -> None:\n # ... other code\n for node, msg in extract_messages(self.document):\n msgstr = catalog.gettext(msg)\n\n # There is no point in having #noqa on literal blocks because\n # they cannot contain references. Recognizing it would just\n # completely prevent escaping the #noqa. Outside of literal\n # blocks, one can always write \\#noqa.\n if not isinstance(node, LITERAL_TYPE_NODES):\n msgstr, _ = parse_noqa(msgstr)\n\n # XXX add marker to untranslated parts\n if not msgstr or msgstr == msg or not msgstr.strip():\n # as-of-yet untranslated\n continue\n\n # Avoid \"Literal block expected; none found.\" warnings.\n # If msgstr ends with '::' then it cause warning message at\n # parser.parse() processing.\n # literal-block-warning is only appear in avobe case.\n if msgstr.strip().endswith('::'):\n msgstr += '\\n\\n dummy literal'\n # dummy literal node will discard by 'patch = patch[0]'\n\n # literalblock need literal block notation to avoid it become\n # paragraph.\n if isinstance(node, LITERAL_TYPE_NODES):\n msgstr = '::\\n\\n' + indent(msgstr, ' ' * 3)\n\n patch = publish_msgstr(self.app, msgstr, source,\n node.line, self.config, settings)\n # FIXME: no warnings about inconsistent references in this part\n # XXX doctest and other block markup\n if not isinstance(patch, nodes.paragraph):\n continue # skip for now\n\n processed = False # skip flag\n\n # update title(section) target name-id mapping\n if isinstance(node, nodes.title) and isinstance(node.parent, nodes.section):\n section_node = node.parent\n new_name = nodes.fully_normalize_name(patch.astext())\n old_name = nodes.fully_normalize_name(node.astext())\n\n if old_name != new_name:\n # if name would be changed, replace node names and\n # document nameids mapping with new name.\n names = section_node.setdefault('names', [])\n names.append(new_name)\n # Original section name (reference target name) should be kept to refer\n # from other nodes which is still not translated or uses explicit target\n # name like \"`text to display <explicit target name_>`_\"..\n # So, `old_name` is still exist in `names`.\n\n _id = self.document.nameids.get(old_name, None)\n explicit = self.document.nametypes.get(old_name, None)\n\n # * if explicit: _id is label. title node need another id.\n # * if not explicit:\n #\n # * if _id is None:\n #\n # _id is None means:\n #\n # 1. _id was not provided yet.\n #\n # 2. _id was duplicated.\n #\n # old_name entry still exists in nameids and\n # nametypes for another duplicated entry.\n #\n # * if _id is provided: below process\n if _id:\n if not explicit:\n # _id was not duplicated.\n # remove old_name entry from document ids database\n # to reuse original _id.\n self.document.nameids.pop(old_name, None)\n self.document.nametypes.pop(old_name, None)\n self.document.ids.pop(_id, None)\n\n # re-entry with new named section node.\n #\n # Note: msgnode that is a second parameter of the\n # `note_implicit_target` is not necessary here because\n # section_node has been noted previously on rst parsing by\n # `docutils.parsers.rst.states.RSTState.new_subsection()`\n # and already has `system_message` if needed.\n self.document.note_implicit_target(section_node)\n\n # replace target's refname to new target name\n matcher = NodeMatcher(nodes.target, refname=old_name)\n for old_target in self.document.findall(matcher): # type: nodes.target\n old_target['refname'] = new_name\n\n processed = True\n\n # glossary terms update refid\n if isinstance(node, nodes.term):\n for _id in node['ids']:\n parts = split_term_classifiers(msgstr)\n patch = publish_msgstr(self.app, parts[0], source,\n node.line, self.config, settings)\n patch = make_glossary_term(self.env, patch, parts[1],\n source, node.line, _id,\n self.document)\n processed = True\n\n # update leaves with processed nodes\n if processed:\n for child in patch.children:\n child.parent = node\n node.children = patch.children\n node['translated'] = True # to avoid double translation\n\n # phase2: translation\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_paragraph_LaTeXTranslator.visit_hlist.if_self_table_.self.table.has_problematic.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_paragraph_LaTeXTranslator.visit_hlist.if_self_table_.self.table.has_problematic.True", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1153, "end_line": 1173, "span_ids": ["LaTeXTranslator.depart_centered", "LaTeXTranslator.visit_hlist", "LaTeXTranslator.depart_paragraph", "LaTeXTranslator.visit_centered"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_paragraph(self, node: Element) -> None:\n self.body.append(CR)\n\n def visit_centered(self, node: Element) -> None:\n self.body.append(CR + r'\\begin{center}')\n if self.table:\n self.table.has_problematic = True\n\n def depart_centered(self, node: Element) -> None:\n self.body.append(CR + r'\\end{center}')\n\n def visit_hlist(self, node: Element) -> None:\n self.compact_list += 1\n ncolumns = node['ncolumns']\n if self.compact_list > 1:\n self.body.append(r'\\setlength{\\multicolsep}{0pt}' + CR)\n self.body.append(r'\\begin{multicols}{' + ncolumns + r'}\\raggedright' + CR)\n self.body.append(r'\\begin{itemize}\\setlength{\\itemsep}{0pt}'\n r'\\setlength{\\parskip}{0pt}' + CR)\n if self.table:\n self.table.has_problematic = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_hlist_LaTeXTranslator.is_inline.return.isinstance_node_parent_n": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_hlist_LaTeXTranslator.is_inline.return.isinstance_node_parent_n", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1175, "end_line": 1199, "span_ids": ["LaTeXTranslator.depart_hlist", "LaTeXTranslator.depart_hlistcol", "LaTeXTranslator.latex_image_length", "LaTeXTranslator.visit_hlistcol", "LaTeXTranslator.is_inline"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_hlist(self, node: Element) -> None:\n self.compact_list -= 1\n self.body.append(r'\\end{itemize}\\raggedcolumns\\end{multicols}' + CR)\n\n def visit_hlistcol(self, node: Element) -> None:\n pass\n\n def depart_hlistcol(self, node: Element) -> None:\n # \\columnbreak would guarantee same columns as in html output. But\n # some testing with long items showed that columns may be too uneven.\n # And in case only of short items, the automatic column breaks should\n # match the ones pre-computed by the hlist() directive.\n # self.body.append(r'\\columnbreak\\n')\n pass\n\n def latex_image_length(self, width_str: str, scale: int = 100) -> str:\n try:\n return rstdim_to_latexdim(width_str, scale)\n except ValueError:\n logger.warning(__('dimension unit %s is invalid. Ignored.'), width_str)\n return None\n\n def is_inline(self, node: Element) -> bool:\n \"\"\"Check whether a node represents an inline element.\"\"\"\n return isinstance(node.parent, nodes.TextElement)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_productionlist2_test_productionlist2.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_productionlist2_test_productionlist2.None_7", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 415, "end_line": 428, "span_ids": ["test_productionlist2"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_productionlist2(app):\n text = (\".. productionlist:: P2\\n\"\n \" A: `:A` `A`\\n\"\n \" B: `P1:B` `~P1:B`\\n\")\n doctree = restructuredtext.parse(app, text)\n refnodes = list(doctree.findall(pending_xref))\n assert_node(refnodes[0], pending_xref, reftarget=\"A\")\n assert_node(refnodes[1], pending_xref, reftarget=\"P2:A\")\n assert_node(refnodes[2], pending_xref, reftarget=\"P1:B\")\n assert_node(refnodes[3], pending_xref, reftarget=\"P1:B\")\n assert_node(refnodes[0], [pending_xref, nodes.literal, \"A\"])\n assert_node(refnodes[1], [pending_xref, nodes.literal, \"A\"])\n assert_node(refnodes[2], [pending_xref, nodes.literal, \"P1:B\"])\n assert_node(refnodes[3], [pending_xref, nodes.literal, \"B\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_mock_does_not_follow_upper_modules_test_abc_MockObject.assert_isinstance_obj_som": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_mock_does_not_follow_upper_modules_test_abc_MockObject.assert_isinstance_obj_som", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_mock.py", "file_name": "test_ext_autodoc_mock.py", "file_type": "text/x-python", "category": "test", "start_line": 89, "end_line": 110, "span_ids": ["test_abc_MockObject.Base", "test_abc_MockObject.Base.__init__", "test_abc_MockObject.Derived:2", "test_abc_MockObject", "test_abc_MockObject.Derived", "test_mock_does_not_follow_upper_modules"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_mock_does_not_follow_upper_modules():\n with mock(['sphinx.unknown.module']):\n with pytest.raises(ImportError):\n import_module('sphinx.unknown')\n\n\n@pytest.mark.skipif(sys.version_info < (3, 7), reason='Only for py37 or above')\ndef test_abc_MockObject():\n mock = _MockObject()\n\n class Base:\n @abc.abstractmethod\n def __init__(self):\n pass\n\n class Derived(Base, mock.SubClass):\n pass\n\n obj = Derived()\n assert isinstance(obj, Base)\n assert isinstance(obj, _MockObject)\n assert isinstance(obj.some_method(), Derived)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_mock_decorator_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py_test_mock_decorator_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_mock.py", "file_name": "test_ext_autodoc_mock.py", "file_type": "text/x-python", "category": "test", "start_line": 105, "end_line": 152, "span_ids": ["test_mock_decorator", "test_ismock.with_mock_sphinx_unknow.Inherited:2", "test_mock_decorator.Bar", "test_mock_decorator.Bar:2", "test_ismock", "test_mock_decorator.Baz:2", "test_ismock.with_mock_sphinx_unknow.Inherited", "test_mock_decorator.Foo", "test_mock_decorator.Baz", "test_mock_decorator.Foo.meth"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_mock_decorator():\n mock = _MockObject()\n\n @mock.function_deco\n def func():\n pass\n\n class Foo:\n @mock.method_deco\n def meth(self):\n pass\n\n @classmethod\n @mock.method_deco\n def class_meth(cls):\n pass\n\n @mock.class_deco\n class Bar:\n pass\n\n @mock.funcion_deco(Foo)\n class Baz:\n pass\n\n assert undecorate(func).__name__ == \"func\"\n assert undecorate(Foo.meth).__name__ == \"meth\"\n assert undecorate(Foo.class_meth).__name__ == \"class_meth\"\n assert undecorate(Bar).__name__ == \"Bar\"\n assert undecorate(Baz).__name__ == \"Baz\"\n\n\ndef test_ismock():\n with mock(['sphinx.unknown']):\n mod1 = import_module('sphinx.unknown')\n mod2 = import_module('sphinx.application')\n\n class Inherited(mod1.Class):\n pass\n\n assert ismock(mod1) is True\n assert ismock(mod1.Class) is True\n assert ismock(mod1.submod.Class) is True\n assert ismock(Inherited) is False\n\n assert ismock(mod2) is False\n assert ismock(mod2.Sphinx) is False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_preprocess_types_GoogleDocstringTest.test_preprocess_types.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_preprocess_types_GoogleDocstringTest.test_preprocess_types.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1170, "end_line": 1192, "span_ids": ["GoogleDocstringTest.test_preprocess_types"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_preprocess_types(self):\n docstring = \"\"\"\\\nDo as you please\n\nYield:\n str:Extended\n\"\"\"\n actual = str(GoogleDocstring(docstring))\n expected = \"\"\"\\\nDo as you please\n\n:Yields: *str* -- Extended\n\"\"\"\n self.assertEqual(expected, actual)\n\n config = Config(napoleon_preprocess_types=True)\n actual = str(GoogleDocstring(docstring, config))\n expected = \"\"\"\\\nDo as you please\n\n:Yields: :class:`str` -- Extended\n\"\"\"\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py_test_viewcode_epub_default_test_linkcode.assert_http_foobar_cpp": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py_test_viewcode_epub_default_test_linkcode.assert_http_foobar_cpp", "embedding": null, "metadata": {"file_path": "tests/test_ext_viewcode.py", "file_name": "test_ext_viewcode.py", "file_type": "text/x-python", "category": "test", "start_line": 52, "end_line": 82, "span_ids": ["test_viewcode_epub_default", "test_linkcode", "test_viewcode_epub_enabled"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('epub', testroot='ext-viewcode')\ndef test_viewcode_epub_default(app, status, warning):\n app.builder.build_all()\n\n assert not (app.outdir / '_modules/spam/mod1.xhtml').exists()\n\n result = (app.outdir / 'index.xhtml').read_text()\n assert result.count('href=\"_modules/spam/mod1.xhtml#func1\"') == 0\n\n\n@pytest.mark.sphinx('epub', testroot='ext-viewcode',\n confoverrides={'viewcode_enable_epub': True})\ndef test_viewcode_epub_enabled(app, status, warning):\n app.builder.build_all()\n\n assert (app.outdir / '_modules/spam/mod1.xhtml').exists()\n\n result = (app.outdir / 'index.xhtml').read_text()\n assert result.count('href=\"_modules/spam/mod1.xhtml#func1\"') == 2\n\n\n@pytest.mark.sphinx(testroot='ext-viewcode', tags=['test_linkcode'])\ndef test_linkcode(app, status, warning):\n app.builder.build(['objects'])\n\n stuff = (app.outdir / 'objects.html').read_text()\n\n assert 'http://foobar/source/foolib.py' in stuff\n assert 'http://foobar/js/' in stuff\n assert 'http://foobar/c/' in stuff\n assert 'http://foobar/cpp/' in stuff", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py_test_local_source_files_test_local_source_files.find_source.return._source_tags_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py_test_local_source_files_test_local_source_files.find_source.return._source_tags_", "embedding": null, "metadata": {"file_path": "tests/test_ext_viewcode.py", "file_name": "test_ext_viewcode.py", "file_type": "text/x-python", "category": "test", "start_line": 85, "end_line": 105, "span_ids": ["test_local_source_files"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-viewcode-find')\ndef test_local_source_files(app, status, warning):\n def find_source(app, modname):\n if modname == 'not_a_package':\n source = (app.srcdir / 'not_a_package/__init__.py').read_text()\n tags = {\n 'func1': ('def', 1, 1),\n 'Class1': ('class', 1, 1),\n 'not_a_package.submodule.func1': ('def', 1, 1),\n 'not_a_package.submodule.Class1': ('class', 1, 1),\n }\n else:\n source = (app.srcdir / 'not_a_package/submodule.py').read_text()\n tags = {\n 'not_a_package.submodule.func1': ('def', 11, 15),\n 'Class1': ('class', 19, 22),\n 'not_a_package.submodule.Class1': ('class', 19, 22),\n 'Class3': ('class', 25, 30),\n 'not_a_package.submodule.Class3.class_attr': ('other', 29, 29),\n }\n return (source, tags)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py__Sphinx_documentation_bu_todo_include_todos.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py__Sphinx_documentation_bu_todo_include_todos.True", "embedding": null, "metadata": {"file_path": "doc/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 83, "span_ids": ["impl", "docstring", "imports", "impl:79"], "tokens": 735}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Sphinx documentation build configuration file\n\nimport os\nimport re\n\nimport sphinx\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo',\n 'sphinx.ext.autosummary', 'sphinx.ext.extlinks',\n 'sphinx.ext.intersphinx',\n 'sphinx.ext.viewcode', 'sphinx.ext.inheritance_diagram']\n\nroot_doc = 'contents'\ntemplates_path = ['_templates']\nexclude_patterns = ['_build']\n\nproject = 'Sphinx'\ncopyright = '2007-2022, Georg Brandl and the Sphinx team'\nversion = sphinx.__display_version__\nrelease = version\nshow_authors = True\n\nhtml_theme = 'sphinx13'\nhtml_theme_path = ['_themes']\nmodindex_common_prefix = ['sphinx.']\nhtml_static_path = ['_static']\nhtml_sidebars = {'index': ['indexsidebar.html', 'searchbox.html']}\nhtml_title = 'Sphinx documentation'\nhtml_additional_pages = {'index': 'index.html'}\nhtml_use_opensearch = 'https://www.sphinx-doc.org/en/master'\nhtml_baseurl = 'https://www.sphinx-doc.org/en/master/'\nhtml_favicon = '_static/favicon.svg'\n\nhtmlhelp_basename = 'Sphinxdoc'\n\nepub_theme = 'epub'\nepub_basename = 'sphinx'\nepub_author = 'Georg Brandl'\nepub_publisher = 'https://www.sphinx-doc.org/'\nepub_uid = 'web-site'\nepub_scheme = 'url'\nepub_identifier = epub_publisher\nepub_pre_files = [('index.xhtml', 'Welcome')]\nepub_post_files = [('usage/installation.xhtml', 'Installing Sphinx'),\n ('develop.xhtml', 'Sphinx development')]\nepub_exclude_files = ['_static/opensearch.xml', '_static/doctools.js',\n '_static/jquery.js', '_static/searchtools.js',\n '_static/underscore.js', '_static/basic.css',\n '_static/language_data.js',\n 'search.html', '_static/websupport.js']\nepub_fix_images = False\nepub_max_image_width = 0\nepub_show_urls = 'inline'\nepub_use_index = False\nepub_guide = (('toc', 'contents.xhtml', 'Table of Contents'),)\nepub_description = 'Sphinx documentation generator system manual'\n\nlatex_documents = [('contents', 'sphinx.tex', 'Sphinx Documentation',\n 'Georg Brandl', 'manual', 1)]\nlatex_logo = '_static/sphinx.png'\nlatex_elements = {\n 'fontenc': r'\\usepackage[LGR,X2,T1]{fontenc}',\n 'passoptionstopackages': r'''\n\\PassOptionsToPackage{svgnames}{xcolor}\n''',\n 'preamble': r'''\n\\DeclareUnicodeCharacter{229E}{\\ensuremath{\\boxplus}}\n\\setcounter{tocdepth}{3}% depth of what main TOC shows (3=subsubsection)\n\\setcounter{secnumdepth}{1}% depth of section numbering\n''',\n # fix missing index entry due to RTD doing only once pdflatex after makeindex\n 'printindex': r'''\n\\IfFileExists{\\jobname.ind}\n {\\footnotesize\\raggedright\\printindex}\n {\\begin{sphinxtheindex}\\end{sphinxtheindex}}\n''',\n}\nlatex_show_urls = 'footnote'\nlatex_use_xindy = True\n\nautodoc_member_order = 'groupwise'\nautosummary_generate = False\ntodo_include_todos = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py_extlinks_parse_event.return.name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py_extlinks_parse_event.return.name", "embedding": null, "metadata": {"file_path": "doc/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 84, "end_line": 140, "span_ids": ["parse_event", "impl:79", "imports:4", "docstring:2", "impl:101"], "tokens": 502}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extlinks = {'duref': ('https://docutils.sourceforge.io/docs/ref/rst/'\n 'restructuredtext.html#%s', '%s'),\n 'durole': ('https://docutils.sourceforge.io/docs/ref/rst/'\n 'roles.html#%s', '%s'),\n 'dudir': ('https://docutils.sourceforge.io/docs/ref/rst/'\n 'directives.html#%s', '%s')}\n\nman_pages = [\n ('contents', 'sphinx-all', 'Sphinx documentation generator system manual',\n 'Georg Brandl', 1),\n ('man/sphinx-build', 'sphinx-build', 'Sphinx documentation generator tool',\n '', 1),\n ('man/sphinx-quickstart', 'sphinx-quickstart', 'Sphinx documentation '\n 'template generator', '', 1),\n ('man/sphinx-apidoc', 'sphinx-apidoc', 'Sphinx API doc generator tool',\n '', 1),\n ('man/sphinx-autogen', 'sphinx-autogen', 'Generate autodoc stub pages',\n '', 1),\n]\n\ntexinfo_documents = [\n ('contents', 'sphinx', 'Sphinx Documentation', 'Georg Brandl',\n 'Sphinx', 'The Sphinx documentation builder.', 'Documentation tools',\n 1),\n]\n\nintersphinx_mapping = {\n 'python': ('https://docs.python.org/3/', None),\n 'requests': ('https://docs.python-requests.org/en/latest/', None),\n 'readthedocs': ('https://docs.readthedocs.io/en/stable', None),\n}\n\n# Sphinx document translation with sphinx gettext feature uses these settings:\nlocale_dirs = ['locale/']\ngettext_compact = False\n\n\n# -- Extension interface -------------------------------------------------------\n\nfrom sphinx import addnodes # noqa\n\nevent_sig_re = re.compile(r'([a-zA-Z-]+)\\s*\\((.*)\\)')\n\n\ndef parse_event(env, sig, signode):\n m = event_sig_re.match(sig)\n if not m:\n signode += addnodes.desc_name(sig, sig)\n return sig\n name, args = m.groups()\n signode += addnodes.desc_name(name, name)\n plist = addnodes.desc_parameterlist()\n for arg in args.split(','):\n arg = arg.strip()\n plist += addnodes.desc_parameter(arg, arg)\n signode += plist\n return name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py_linkify_issues_in_changelog_linkify_issues_in_changelog.if_docname_changes_.source_0_source_0_rep": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py_linkify_issues_in_changelog_linkify_issues_in_changelog.if_docname_changes_.source_0_source_0_rep", "embedding": null, "metadata": {"file_path": "doc/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 143, "end_line": 162, "span_ids": ["linkify_issues_in_changelog"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def linkify_issues_in_changelog(app, docname, source):\n \"\"\" Linkify issue references like #123 in changelog to GitHub. \"\"\"\n\n if docname == 'changes':\n changelog_path = os.path.join(os.path.dirname(__file__), \"../CHANGES\")\n # this path trickery is needed because this script can\n # be invoked with different working directories:\n # * running make in docs/\n # * running python setup.py build_sphinx in the repo root dir\n\n with open(changelog_path) as f:\n changelog = f.read()\n\n def linkify(match):\n url = 'https://github.com/sphinx-doc/sphinx/issues/' + match[1]\n return '`{} <{}>`_'.format(match[0], url)\n\n linkified_changelog = re.sub(r'(?:PR)?#([0-9]+)\\b', linkify, changelog)\n\n source[0] = source[0].replace('.. include:: ../CHANGES', linkified_changelog)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/conf.py_setup_", "embedding": null, "metadata": {"file_path": "doc/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 165, "end_line": 187, "span_ids": ["setup"], "tokens": 269}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app):\n from sphinx.ext.autodoc import cut_lines\n from sphinx.util.docfields import GroupedField\n app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))\n app.connect('source-read', linkify_issues_in_changelog)\n app.add_object_type('confval', 'confval',\n objname='configuration value',\n indextemplate='pair: %s; configuration value')\n app.add_object_type('setuptools-confval', 'setuptools-confval',\n objname='setuptools configuration value',\n indextemplate='pair: %s; setuptools configuration value')\n fdesc = GroupedField('parameter', label='Parameters',\n names=['param'], can_collapse=True)\n app.add_object_type('event', 'event', 'pair: %s; event', parse_event,\n doc_field_types=[fdesc])\n\n # workaround for RTD\n from sphinx.util import logging\n logger = logging.getLogger(__name__)\n app.info = lambda *args, **kwargs: logger.info(*args, **kwargs)\n app.warn = lambda *args, **kwargs: logger.warning(*args, **kwargs)\n app.debug = lambda *args, **kwargs: logger.debug(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/autodoc_intenum.py_from_enum_import_IntEnum_IntEnumDocumenter.add_directive_header.self_add_line_final_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/autodoc_intenum.py_from_enum_import_IntEnum_IntEnumDocumenter.add_directive_header.self_add_line_final_", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/autodoc_intenum.py", "file_name": "autodoc_intenum.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["IntEnumDocumenter.add_directive_header", "imports", "IntEnumDocumenter", "IntEnumDocumenter.can_document_member"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from enum import IntEnum\nfrom typing import Any, Optional\n\nfrom docutils.statemachine import StringList\n\nfrom sphinx.application import Sphinx\nfrom sphinx.ext.autodoc import ClassDocumenter, bool_option\n\n\nclass IntEnumDocumenter(ClassDocumenter):\n objtype = 'intenum'\n directivetype = ClassDocumenter.objtype\n priority = 10 + ClassDocumenter.priority\n option_spec = dict(ClassDocumenter.option_spec)\n option_spec['hex'] = bool_option\n\n @classmethod\n def can_document_member(cls,\n member: Any, membername: str,\n isattr: bool, parent: Any) -> bool:\n try:\n return issubclass(member, IntEnum)\n except TypeError:\n return False\n\n def add_directive_header(self, sig: str) -> None:\n super().add_directive_header(sig)\n self.add_line(' :final:', self.get_sourcename())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/autodoc_intenum.py_IntEnumDocumenter.add_content_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/autodoc_intenum.py_IntEnumDocumenter.add_content_", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/autodoc_intenum.py", "file_name": "autodoc_intenum.py", "file_type": "text/x-python", "category": "implementation", "start_line": 30, "end_line": 55, "span_ids": ["IntEnumDocumenter.add_content", "setup"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IntEnumDocumenter(ClassDocumenter):\n\n def add_content(self,\n more_content: Optional[StringList],\n no_docstring: bool = False\n ) -> None:\n\n super().add_content(more_content, no_docstring)\n\n source_name = self.get_sourcename()\n enum_object: IntEnum = self.object\n use_hex = self.options.hex\n self.add_line('', source_name)\n\n for the_member_name, enum_member in enum_object.__members__.items():\n the_member_value = enum_member.value\n if use_hex:\n the_member_value = hex(the_member_value)\n\n self.add_line(\n f\"**{the_member_name}**: {the_member_value}\", source_name)\n self.add_line('', source_name)\n\n\ndef setup(app: Sphinx) -> None:\n app.setup_extension('sphinx.ext.autodoc') # Require autodoc extension\n app.add_autodocumenter(IntEnumDocumenter)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_from_collections_import_d_RecipeDirective.add_target_and_index.if_contains_in_self_opt.recipes_add_recipe_sig_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/development/tutorials/examples/recipe.py_from_collections_import_d_RecipeDirective.add_target_and_index.if_contains_in_self_opt.recipes_add_recipe_sig_i", "embedding": null, "metadata": {"file_path": "doc/development/tutorials/examples/recipe.py", "file_name": "recipe.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["RecipeDirective.add_target_and_index", "RecipeDirective", "imports", "RecipeDirective.handle_signature"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections import defaultdict\n\nfrom docutils.parsers.rst import directives\n\nfrom sphinx import addnodes\nfrom sphinx.directives import ObjectDescription\nfrom sphinx.domains import Domain, Index\nfrom sphinx.roles import XRefRole\nfrom sphinx.util.nodes import make_refnode\n\n\nclass RecipeDirective(ObjectDescription):\n \"\"\"A custom directive that describes a recipe.\"\"\"\n\n has_content = True\n required_arguments = 1\n option_spec = {\n 'contains': directives.unchanged_required,\n }\n\n def handle_signature(self, sig, signode):\n signode += addnodes.desc_name(text=sig)\n return sig\n\n def add_target_and_index(self, name_cls, sig, signode):\n signode['ids'].append('recipe' + '-' + sig)\n if 'contains' in self.options:\n ingredients = [\n x.strip() for x in self.options.get('contains').split(',')]\n\n recipes = self.env.get_domain('recipe')\n recipes.add_recipe(sig, ingredients)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExamplePEP526Class_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/doc/usage/extensions/example_google.py_ExamplePEP526Class_", "embedding": null, "metadata": {"file_path": "doc/usage/extensions/example_google.py", "file_name": "example_google.py", "file_type": "text/x-python", "category": "implementation", "start_line": 294, "end_line": 311, "span_ids": ["ExamplePEP526Class"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExamplePEP526Class:\n \"\"\"The summary line for a class docstring should fit on one line.\n\n If the class has public attributes, they may be documented here\n in an ``Attributes`` section and follow the same formatting as a\n function's ``Args`` section. If ``napoleon_attr_annotations``\n is True, types can be specified in the class body using ``PEP 526``\n annotations.\n\n Attributes:\n attr1: Description of `attr1`.\n attr2: Description of `attr2`.\n\n \"\"\"\n\n attr1: str\n attr2: int", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/__init__.py__The_Sphinx_documentati_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/__init__.py__The_Sphinx_documentati_", "embedding": null, "metadata": {"file_path": "sphinx/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 52, "span_ids": ["impl", "docstring", "imports"], "tokens": 510}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The Sphinx documentation toolchain.\"\"\"\n\n# Keep this file executable as-is in Python 3!\n# (Otherwise getting the version out of it from setup.py is impossible.)\n\nimport os\nimport subprocess\nimport warnings\nfrom os import path\nfrom subprocess import PIPE\n\nfrom .deprecation import RemovedInNextVersionWarning\n\n# by default, all DeprecationWarning under sphinx package will be emit.\n# Users can avoid this by using environment variable: PYTHONWARNINGS=\nif 'PYTHONWARNINGS' not in os.environ:\n warnings.filterwarnings('default', category=RemovedInNextVersionWarning)\n# docutils.io using mode='rU' for open\nwarnings.filterwarnings('ignore', \"'U' mode is deprecated\",\n DeprecationWarning, module='docutils.io')\n\n__version__ = '5.0.0+'\n__released__ = '5.0.0' # used when Sphinx builds its own docs\n\n#: Version info for better programmatic use.\n#:\n#: A tuple of five elements; for Sphinx version 1.2.1 beta 3 this would be\n#: ``(1, 2, 1, 'beta', 3)``. The fourth element can be one of: ``alpha``,\n#: ``beta``, ``rc``, ``final``. ``final`` always has 0 as the last element.\n#:\n#: .. versionadded:: 1.2\n#: Before version 1.2, check the string ``sphinx.__version__``.\nversion_info = (5, 0, 0, 'final', 0)\n\npackage_dir = path.abspath(path.dirname(__file__))\n\n__display_version__ = __version__ # used for command line version\nif __version__.endswith('+'):\n # try to find out the commit hash if checked out from git, and append\n # it to __version__ (since we use this value from setup.py, it gets\n # automatically propagated to an installed copy as well)\n __display_version__ = __version__\n __version__ = __version__[:-1] # remove '+' for PEP-440 version spec.\n try:\n ret = subprocess.run(['git', 'show', '-s', '--pretty=format:%h'],\n cwd=package_dir,\n stdout=PIPE, stderr=PIPE, encoding='ascii')\n if ret.stdout:\n __display_version__ += '/' + ret.stdout.strip()\n except Exception:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py__Additional_docutils_no_document.set_id.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py__Additional_docutils_no_document.set_id.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 43, "span_ids": ["document", "impl", "imports:5", "imports:6", "document.set_id", "impl:2", "docstring", "imports:4", "imports", "docstring:2", "impl:3", "impl:4"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Additional docutils nodes.\"\"\"\n\nfrom typing import TYPE_CHECKING, Any, Dict, List, Sequence\n\nfrom docutils import nodes\nfrom docutils.nodes import Element\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\ntry:\n from docutils.nodes import meta as docutils_meta # type: ignore\nexcept ImportError:\n # docutils-0.17 or older\n from docutils.parsers.rst.directives.html import MetaBody\n docutils_meta = MetaBody.meta\n\n\nclass document(nodes.document):\n \"\"\"The document root element patched by Sphinx.\n\n This fixes that document.set_id() does not support a node having multiple node Ids.\n see https://sourceforge.net/p/docutils/patches/167/\n\n .. important:: This is only for Sphinx internal use. Please don't use this\n in your extensions. It will be removed without deprecation period.\n \"\"\"\n\n def set_id(self, node: Element, msgnode: Element = None,\n suggested_prefix: str = '') -> str:\n from sphinx.util import docutils\n if docutils.__version_info__ >= (0, 16):\n ret = super().set_id(node, msgnode, suggested_prefix) # type: ignore\n else:\n ret = super().set_id(node, msgnode)\n\n if docutils.__version_info__ < (0, 17):\n # register other node IDs forcedly\n for node_id in node['ids']:\n if node_id not in self.ids:\n self.ids[node_id] = node\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py___desc._that_forces_the_specif": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py___desc._that_forces_the_specif", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 150, "span_ids": ["_desc_classes_injector", "desc", "toctree.extract_original_messages"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "#############################################################\n# Domain-specific object descriptions (class, function etc.)\n#############################################################\n\nclass _desc_classes_injector(nodes.Element, not_smartquotable):\n \"\"\"Helper base class for injecting a fixes list of classes.\n\n Use as the first base class.\n \"\"\"\n\n classes: List[str] = []\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n super().__init__(*args, **kwargs)\n self['classes'].extend(self.classes)\n\n\n# Top-level nodes\n#################\n\nclass desc(nodes.Admonition, nodes.Element):\n \"\"\"Node for a list of object signatures and a common description of them.\n\n Contains one or more :py:class:`desc_signature` nodes\n and then a single :py:class:`desc_content` node.\n\n This node always has two classes:\n\n - The name of the domain it belongs to, e.g., ``py`` or ``cpp``.\n - The name of the object type in the domain, e.g., ``function``.\n \"\"\"\n\n # TODO: can we introduce a constructor\n # that forces the specification of the domain and objtyp?", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_signature_desc_signature.child_text_separator.if_self_get_is_multiline.else_.return.super_child_text_separa": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_signature_desc_signature.child_text_separator.if_self_get_is_multiline.else_.return.super_child_text_separa", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 153, "end_line": 170, "span_ids": ["desc_signature", "desc_signature.child_text_separator"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class desc_signature(_desc_classes_injector, nodes.Part, nodes.Inline, nodes.TextElement):\n \"\"\"Node for a single object signature.\n\n As default the signature is a single-line signature.\n Set ``is_multiline = True`` to describe a multi-line signature.\n In that case all child nodes must be :py:class:`desc_signature_line` nodes.\n\n This node always has the classes ``sig``, ``sig-object``, and the domain it belongs to.\n \"\"\"\n # Note: the domain name is being added through a post-transform DescSigAddDomainAsClass\n classes = ['sig', 'sig-object']\n\n @property\n def child_text_separator(self):\n if self.get('is_multiline'):\n return ' '\n else:\n return super().child_text_separator", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_signature_line_desc_content._Node_for_object_descri": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_signature_line_desc_content._Node_for_object_descri", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 173, "end_line": 187, "span_ids": ["desc_signature_line", "desc_content"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class desc_signature_line(nodes.Part, nodes.Inline, nodes.FixedTextElement):\n \"\"\"Node for a line in a multi-line object signature.\n\n It should only be used as a child of a :py:class:`desc_signature`\n with ``is_multiline`` set to ``True``.\n Set ``add_permalink = True`` for the line that should get the permalink.\n \"\"\"\n sphinx_line_type = ''\n\n\nclass desc_content(nodes.General, nodes.Element):\n \"\"\"Node for object description content.\n\n Must be the last child node in a :py:class:`desc` node.\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_inline_desc_inline.__init__.self_classes_append_do": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_inline_desc_inline.__init__.self_classes_append_do", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 190, "end_line": 202, "span_ids": ["desc_inline"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class desc_inline(_desc_classes_injector, nodes.Inline, nodes.TextElement):\n \"\"\"Node for a signature fragment in inline text.\n\n This is for example used for roles like :rst:role:`cpp:expr`.\n\n This node always has the classes ``sig``, ``sig-inline``,\n and the name of the domain it belongs to.\n \"\"\"\n classes = ['sig', 'sig-inline']\n\n def __init__(self, domain: str, *args: Any, **kwargs: Any) -> None:\n super().__init__(*args, **kwargs)\n self['classes'].append(domain)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py__Nodes_for_high_level_st_desc_name._descname_is_for_backw": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py__Nodes_for_high_level_st_desc_name._descname_is_for_backw", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 205, "end_line": 218, "span_ids": ["desc_inline", "desc_name"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Nodes for high-level structure in signatures\n##############################################\n\n# nodes to use within a desc_signature or desc_signature_line\n\nclass desc_name(_desc_classes_injector, nodes.Part, nodes.Inline, nodes.FixedTextElement):\n \"\"\"Node for the main object name.\n\n For example, in the declaration of a Python class ``MyModule.MyClass``,\n the main name is ``MyClass``.\n\n This node always has the class ``sig-name``.\n \"\"\"\n classes = ['sig-name', 'descname'] # 'descname' is for backwards compatibility", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_addname_desc_addname.classes._sig_prename_descclas": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_desc_addname_desc_addname.classes._sig_prename_descclas", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 221, "end_line": 230, "span_ids": ["desc_addname"], "tokens": 106}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class desc_addname(_desc_classes_injector, nodes.Part, nodes.Inline, nodes.FixedTextElement):\n \"\"\"Node for additional name parts for an object.\n\n For example, in the declaration of a Python class ``MyModule.MyClass``,\n the additional name part is ``MyModule.``.\n\n This node always has the class ``sig-prename``.\n \"\"\"\n # 'descclassname' is for backwards compatibility\n classes = ['sig-prename', 'descclassname']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py__compatibility_alias_versionmodified._Node_for_version_chang": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py__compatibility_alias_versionmodified._Node_for_version_chang", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 233, "end_line": 357, "span_ids": ["desc_annotation", "impl:8", "desc_sig_literal_number", "desc_sig_punctuation", "desc_sig_space", "impl:9", "desc_sig_name", "desc_sig_element", "desc_sig_operator", "versionmodified", "desc_addname", "desc_returns", "desc_parameter", "desc_parameterlist", "desc_sig_literal_char", "desc_sig_literal_string", "impl:7", "desc_returns.astext", "desc_parameterlist.astext", "desc_optional", "impl:6", "desc_sig_keyword_type", "desc_sig_keyword", "desc_type", "desc_optional.astext"], "tokens": 790}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# compatibility alias\ndesc_classname = desc_addname\n\n\nclass desc_type(nodes.Part, nodes.Inline, nodes.FixedTextElement):\n \"\"\"Node for return types or object type names.\"\"\"\n\n\nclass desc_returns(desc_type):\n \"\"\"Node for a \"returns\" annotation (a la -> in Python).\"\"\"\n\n def astext(self) -> str:\n return ' -> ' + super().astext()\n\n\nclass desc_parameterlist(nodes.Part, nodes.Inline, nodes.FixedTextElement):\n \"\"\"Node for a general parameter list.\"\"\"\n child_text_separator = ', '\n\n def astext(self):\n return '({})'.format(super().astext())\n\n\nclass desc_parameter(nodes.Part, nodes.Inline, nodes.FixedTextElement):\n \"\"\"Node for a single parameter.\"\"\"\n\n\nclass desc_optional(nodes.Part, nodes.Inline, nodes.FixedTextElement):\n \"\"\"Node for marking optional parts of the parameter list.\"\"\"\n child_text_separator = ', '\n\n def astext(self) -> str:\n return '[' + super().astext() + ']'\n\n\nclass desc_annotation(nodes.Part, nodes.Inline, nodes.FixedTextElement):\n \"\"\"Node for signature annotations (not Python 3-style annotations).\"\"\"\n\n\n# Leaf nodes for markup of text fragments\n#########################################\n\n# Signature text elements, generally translated to node.inline\n# in SigElementFallbackTransform.\n# When adding a new one, add it to SIG_ELEMENTS.\n\nclass desc_sig_element(nodes.inline, _desc_classes_injector):\n \"\"\"Common parent class of nodes for inline text of a signature.\"\"\"\n classes: List[str] = []\n\n def __init__(self, rawsource: str = '', text: str = '',\n *children: Element, **attributes: Any) -> None:\n super().__init__(rawsource, text, *children, **attributes)\n self['classes'].extend(self.classes)\n\n\n# to not reinvent the wheel, the classes in the following desc_sig classes\n# are based on those used in Pygments\n\nclass desc_sig_space(desc_sig_element):\n \"\"\"Node for a space in a signature.\"\"\"\n classes = [\"w\"]\n\n def __init__(self, rawsource: str = '', text: str = ' ',\n *children: Element, **attributes: Any) -> None:\n super().__init__(rawsource, text, *children, **attributes)\n\n\nclass desc_sig_name(desc_sig_element):\n \"\"\"Node for an identifier in a signature.\"\"\"\n classes = [\"n\"]\n\n\nclass desc_sig_operator(desc_sig_element):\n \"\"\"Node for an operator in a signature.\"\"\"\n classes = [\"o\"]\n\n\nclass desc_sig_punctuation(desc_sig_element):\n \"\"\"Node for punctuation in a signature.\"\"\"\n classes = [\"p\"]\n\n\nclass desc_sig_keyword(desc_sig_element):\n \"\"\"Node for a general keyword in a signature.\"\"\"\n classes = [\"k\"]\n\n\nclass desc_sig_keyword_type(desc_sig_element):\n \"\"\"Node for a keyword which is a built-in type in a signature.\"\"\"\n classes = [\"kt\"]\n\n\nclass desc_sig_literal_number(desc_sig_element):\n \"\"\"Node for a numeric literal in a signature.\"\"\"\n classes = [\"m\"]\n\n\nclass desc_sig_literal_string(desc_sig_element):\n \"\"\"Node for a string literal in a signature.\"\"\"\n classes = [\"s\"]\n\n\nclass desc_sig_literal_char(desc_sig_element):\n \"\"\"Node for a character literal in a signature.\"\"\"\n classes = [\"sc\"]\n\n\nSIG_ELEMENTS = [desc_sig_space,\n desc_sig_name,\n desc_sig_operator,\n desc_sig_punctuation,\n desc_sig_keyword, desc_sig_keyword_type,\n desc_sig_literal_number, desc_sig_literal_string, desc_sig_literal_char]\n\n\n###############################################################\n# new admonition-like constructs\n\nclass versionmodified(nodes.Admonition, nodes.TextElement):\n \"\"\"Node for version change entries.\n\n Currently used for \"versionadded\", \"versionchanged\" and \"deprecated\"\n directives.\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_seealso_index._Node_for_index_entries": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_seealso_index._Node_for_index_entries", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 360, "end_line": 389, "span_ids": ["index", "productionlist", "seealso", "production"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class seealso(nodes.Admonition, nodes.Element):\n \"\"\"Custom \"see also\" admonition.\"\"\"\n\n\nclass productionlist(nodes.Admonition, nodes.Element):\n \"\"\"Node for grammar production lists.\n\n Contains ``production`` nodes.\n \"\"\"\n\n\nclass production(nodes.Part, nodes.Inline, nodes.FixedTextElement):\n \"\"\"Node for a single grammar production rule.\"\"\"\n\n\n# other directive-level nodes\n\nclass index(nodes.Invisible, nodes.Inline, nodes.TextElement):\n \"\"\"Node for index entries.\n\n This node is created by the ``index`` directive and has one attribute,\n ``entries``. Its value is a list of 5-tuples of ``(entrytype, entryname,\n target, ignored, key)``.\n\n *entrytype* is one of \"single\", \"pair\", \"double\", \"triple\".\n\n *key* is categorization characters (usually a single character) for\n general index page. For the details of this, please see also:\n :rst:dir:`glossary` and issue #2320.\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_centered_pending_xref.child_text_separator._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_centered_pending_xref.child_text_separator._", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 392, "end_line": 454, "span_ids": ["pending_xref", "tabular_col_spec", "hlistcol", "start_of_file", "glossary", "only", "acks", "compact_paragraph", "hlist", "centered", "meta", "highlightlang"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class centered(nodes.Part, nodes.TextElement):\n \"\"\"Deprecated.\"\"\"\n\n\nclass acks(nodes.Element):\n \"\"\"Special node for \"acks\" lists.\"\"\"\n\n\nclass hlist(nodes.Element):\n \"\"\"Node for \"horizontal lists\", i.e. lists that should be compressed to\n take up less vertical space.\n \"\"\"\n\n\nclass hlistcol(nodes.Element):\n \"\"\"Node for one column in a horizontal list.\"\"\"\n\n\nclass compact_paragraph(nodes.paragraph):\n \"\"\"Node for a compact paragraph (which never makes a <p> node).\"\"\"\n\n\nclass glossary(nodes.Element):\n \"\"\"Node to insert a glossary.\"\"\"\n\n\nclass only(nodes.Element):\n \"\"\"Node for \"only\" directives (conditional inclusion based on tags).\"\"\"\n\n\n# meta-information nodes\n\nclass start_of_file(nodes.Element):\n \"\"\"Node to mark start of a new file, used in the LaTeX builder only.\"\"\"\n\n\nclass highlightlang(nodes.Element):\n \"\"\"Inserted to set the highlight language and line number options for\n subsequent code blocks.\n \"\"\"\n\n\nclass tabular_col_spec(nodes.Element):\n \"\"\"Node for specifying tabular columns, used for LaTeX output.\"\"\"\n\n\nclass meta(nodes.Special, nodes.PreBibliographic, nodes.Element):\n \"\"\"Node for meta directive -- same as docutils' standard meta node,\n but pickleable.\n \"\"\"\n rawcontent = None\n\n\n# inline nodes\n\nclass pending_xref(nodes.Inline, nodes.Element):\n \"\"\"Node for cross-references that cannot be resolved without complete\n information about all documents.\n\n These nodes are resolved before writing output, in\n BuildEnvironment.resolve_references.\n \"\"\"\n child_text_separator = ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_pending_xref_condition_pending_xref_condition._Node_for_cross_referen": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_pending_xref_condition_pending_xref_condition._Node_for_cross_referen", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 457, "end_line": 502, "span_ids": ["pending_xref_condition"], "tokens": 397}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class pending_xref_condition(nodes.Inline, nodes.TextElement):\n \"\"\"Node for cross-references that are used to choose appropriate\n content of the reference by conditions on the resolving phase.\n\n When the :py:class:`pending_xref` node contains one or more\n **pending_xref_condition** nodes, the cross-reference resolver\n should choose the content of the reference using defined conditions\n in ``condition`` attribute of each pending_xref_condition nodes::\n\n <pending_xref refdomain=\"py\" reftarget=\"io.StringIO ...>\n <pending_xref_condition condition=\"resolved\">\n <literal>\n StringIO\n <pending_xref_condition condition=\"*\">\n <literal>\n io.StringIO\n\n After the processing of cross-reference resolver, one of the content node\n under pending_xref_condition node is chosen by its condition and to be\n removed all of pending_xref_condition nodes::\n\n # When resolved the cross-reference successfully\n <reference>\n <literal>\n StringIO\n\n # When resolution is failed\n <reference>\n <literal>\n io.StringIO\n\n .. note:: This node is only allowed to be placed under pending_xref node.\n It is not allows to place it under other nodes. In addition,\n pending_xref node must contain only pending_xref_condition\n nodes if it contains one or more pending_xref_condition nodes.\n\n The pending_xref_condition node should have **condition** attribute.\n Domains can be store their individual conditions into the attribute to\n filter contents on resolving phase. As a reserved condition name,\n ``condition=\"*\"`` is used for the fallback of resolution failure.\n Additionally, as a recommended condition name, ``condition=\"resolved\"``\n is used for the representation of resolstion success in the intersphinx\n module.\n\n .. versionadded:: 4.0\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_number_reference_manpage._Node_for_references_to": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/addnodes.py_number_reference_manpage._Node_for_references_to", "embedding": null, "metadata": {"file_path": "sphinx/addnodes.py", "file_name": "addnodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 505, "end_line": 526, "span_ids": ["manpage", "literal_emphasis", "number_reference", "literal_strong", "download_reference"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class number_reference(nodes.reference):\n \"\"\"Node for number references, similar to pending_xref.\"\"\"\n\n\nclass download_reference(nodes.reference):\n \"\"\"Node for download references, similar to pending_xref.\"\"\"\n\n\nclass literal_emphasis(nodes.emphasis, not_smartquotable):\n \"\"\"Node that behaves like `emphasis`, but further text processors are not\n applied (e.g. smartypants for HTML output).\n \"\"\"\n\n\nclass literal_strong(nodes.strong, not_smartquotable):\n \"\"\"Node that behaves like `strong`, but further text processors are not\n applied (e.g. smartypants for HTML output).\n \"\"\"\n\n\nclass manpage(nodes.Inline, nodes.FixedTextElement):\n \"\"\"Node for references to manpages.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py__Sphinx_application_cla_if_TYPE_CHECKING_.from_sphinx_builders_impo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py__Sphinx_application_cla_if_TYPE_CHECKING_.from_sphinx_builders_impo", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 50, "span_ids": ["impl", "docstring", "imports:39", "imports:40", "docstring:2", "imports"], "tokens": 382}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Sphinx application class and extensibility interface.\n\nGracefully adapted from the TextPress system by Armin.\n\"\"\"\n\nimport os\nimport pickle\nimport sys\nimport warnings\nfrom collections import deque\nfrom io import StringIO\nfrom os import path\nfrom typing import IO, TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Type, Union\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, TextElement\nfrom docutils.parsers import Parser\nfrom docutils.parsers.rst import Directive, roles\nfrom docutils.transforms import Transform\nfrom pygments.lexer import Lexer\n\nimport sphinx\nfrom sphinx import locale, package_dir\nfrom sphinx.config import Config\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.domains import Domain, Index\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.environment.collectors import EnvironmentCollector\nfrom sphinx.errors import ApplicationError, ConfigError, VersionRequirementError\nfrom sphinx.events import EventManager\nfrom sphinx.extension import Extension\nfrom sphinx.highlighting import lexer_classes\nfrom sphinx.locale import __\nfrom sphinx.project import Project\nfrom sphinx.registry import SphinxComponentRegistry\nfrom sphinx.roles import XRefRole\nfrom sphinx.theming import Theme\nfrom sphinx.util import docutils, logging, progress_message\nfrom sphinx.util.build_phase import BuildPhase\nfrom sphinx.util.console import bold # type: ignore\nfrom sphinx.util.i18n import CatalogRepository\nfrom sphinx.util.logging import prefixed_warnings\nfrom sphinx.util.osutil import abspath, ensuredir, relpath\nfrom sphinx.util.tags import Tags\nfrom sphinx.util.typing import RoleFunction, TitleGetter\n\nif TYPE_CHECKING:\n from docutils.nodes import Node # NOQA\n\n from sphinx.builders import Builder", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._init_i18n_Sphinx._init_i18n.if_self_config_language_.else_.if_has_translation_.else_.logger_info____not_avail": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx._init_i18n_Sphinx._init_i18n.if_self_config_language_.else_.if_has_translation_.else_.logger_info____not_avail", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 258, "end_line": 284, "span_ids": ["Sphinx._init_i18n"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def _init_i18n(self) -> None:\n \"\"\"Load translated strings from the configured localedirs if enabled in\n the configuration.\n \"\"\"\n if self.config.language == 'en':\n self.translator, has_translation = locale.init([], None)\n else:\n logger.info(bold(__('loading translations [%s]... ') % self.config.language),\n nonl=True)\n\n # compile mo files if sphinx.po file in user locale directories are updated\n repo = CatalogRepository(self.srcdir, self.config.locale_dirs,\n self.config.language, self.config.source_encoding)\n for catalog in repo.catalogs:\n if catalog.domain == 'sphinx' and catalog.is_outdated():\n catalog.write_mo(self.config.language,\n self.config.gettext_allow_fuzzy_translations)\n\n locale_dirs: List[Optional[str]] = list(repo.locale_dirs)\n locale_dirs += [None]\n locale_dirs += [path.join(package_dir, 'locale')]\n\n self.translator, has_translation = locale.init(locale_dirs, self.config.language)\n if has_translation:\n logger.info(__('done'))\n else:\n logger.info(__('not available for built-in messages'))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_transform_Sphinx.add_post_transform.self_registry_add_post_tr": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_transform_Sphinx.add_post_transform.self_registry_add_post_tr", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 879, "end_line": 923, "span_ids": ["Sphinx.add_post_transform", "Sphinx.add_transform"], "tokens": 348}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_transform(self, transform: Type[Transform]) -> None:\n \"\"\"Register a Docutils transform to be applied after parsing.\n\n Add the standard docutils :class:`Transform` subclass *transform* to\n the list of transforms that are applied after Sphinx parses a reST\n document.\n\n :param transform: A transform class\n\n .. list-table:: priority range categories for Sphinx transforms\n :widths: 20,80\n\n * - Priority\n - Main purpose in Sphinx\n * - 0-99\n - Fix invalid nodes by docutils. Translate a doctree.\n * - 100-299\n - Preparation\n * - 300-399\n - early\n * - 400-699\n - main\n * - 700-799\n - Post processing. Deadline to modify text and referencing.\n * - 800-899\n - Collect referencing and referenced nodes. Domain processing.\n * - 900-999\n - Finalize and clean up.\n\n refs: `Transform Priority Range Categories`__\n\n __ https://docutils.sourceforge.io/docs/ref/transforms.html#transform-priority-range-categories\n \"\"\" # NOQA\n self.registry.add_transform(transform)\n\n def add_post_transform(self, transform: Type[Transform]) -> None:\n \"\"\"Register a Docutils transform to be applied before writing.\n\n Add the standard docutils :class:`Transform` subclass *transform* to\n the list of transforms that are applied before Sphinx writes a\n document.\n\n :param transform: A transform class\n \"\"\"\n self.registry.add_post_transform(transform)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_lexer_Sphinx.add_lexer.lexer_classes_alias_le": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_lexer_Sphinx.add_lexer.lexer_classes_alias_le", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1095, "end_line": 1106, "span_ids": ["Sphinx.add_lexer"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_lexer(self, alias: str, lexer: Type[Lexer]) -> None:\n \"\"\"Register a new lexer for source code.\n\n Use *lexer* to highlight code blocks with the given language *alias*.\n\n .. versionadded:: 0.6\n .. versionchanged:: 2.1\n Take a lexer class as an argument. An instance of lexers are\n still supported until Sphinx-3.x.\n \"\"\"\n logger.debug('[app] adding lexer: %r', (alias, lexer))\n lexer_classes[alias] = lexer", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_env_collector_Sphinx.add_html_theme.self_registry_add_html_th": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.add_env_collector_Sphinx.add_html_theme.self_registry_add_html_th", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1190, "end_line": 1209, "span_ids": ["Sphinx.add_env_collector", "Sphinx.add_html_theme"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def add_env_collector(self, collector: Type[EnvironmentCollector]) -> None:\n \"\"\"Register an environment collector class.\n\n Refer to :ref:`collector-api`.\n\n .. versionadded:: 1.6\n \"\"\"\n logger.debug('[app] adding environment collector: %r', collector)\n collector().enable(self)\n\n def add_html_theme(self, name: str, theme_path: str) -> None:\n \"\"\"Register a HTML Theme.\n\n The *name* is a name of theme, and *theme_path* is a full path to the\n theme (refs: :ref:`distribute-your-theme`).\n\n .. versionadded:: 1.6\n \"\"\"\n logger.debug('[app] adding HTML theme: %r, %r', name, theme_path)\n self.registry.add_html_theme(name, theme_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.set_html_assets_policy_Sphinx.html_themes.return.self_registry_html_themes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/application.py_Sphinx.set_html_assets_policy_Sphinx.html_themes.return.self_registry_html_themes", "embedding": null, "metadata": {"file_path": "sphinx/application.py", "file_name": "application.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1276, "end_line": 1292, "span_ids": ["Sphinx.html_themes", "Sphinx.set_html_assets_policy"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Sphinx:\n\n def set_html_assets_policy(self, policy):\n \"\"\"Set the policy to include assets in HTML pages.\n\n - always: include the assets in all the pages\n - per_page: include the assets only in pages where they are used\n\n .. versionadded: 4.1\n \"\"\"\n if policy not in ('always', 'per_page'):\n raise ValueError('policy %s is not supported' % policy)\n self.registry.html_assets_policy = policy\n\n @property\n def html_themes(self) -> Dict[str, str]:\n warnings.warn('app.html_themes is deprecated.',\n RemovedInSphinx60Warning)\n return self.registry.html_themes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py__Builder_superclass_for_logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py__Builder_superclass_for_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 40, "span_ids": ["impl", "imports:25", "impl:2", "impl:6", "docstring", "imports:24", "imports"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Builder superclass for all builders.\"\"\"\n\nimport pickle\nimport time\nfrom os import path\nfrom typing import (TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Sequence, Set, Tuple,\n Type, Union)\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\n\nfrom sphinx.config import Config\nfrom sphinx.environment import CONFIG_CHANGED_REASON, CONFIG_OK, BuildEnvironment\nfrom sphinx.environment.adapters.asset import ImageAdapter\nfrom sphinx.errors import SphinxError\nfrom sphinx.events import EventManager\nfrom sphinx.io import read_doc\nfrom sphinx.locale import __\nfrom sphinx.util import import_object, logging, progress_message, rst, status_iterator\nfrom sphinx.util.build_phase import BuildPhase\nfrom sphinx.util.console import bold # type: ignore\nfrom sphinx.util.docutils import sphinx_domains\nfrom sphinx.util.i18n import CatalogInfo, CatalogRepository, docname_to_domain\nfrom sphinx.util.osutil import SEP, ensuredir, relative_uri, relpath\nfrom sphinx.util.parallel import ParallelTasks, SerialTasks, make_chunks, parallel_available\nfrom sphinx.util.tags import Tags\n\n# side effect: registers roles and directives\nfrom sphinx import directives # NOQA isort:skip\nfrom sphinx import roles # NOQA isort:skip\ntry:\n import multiprocessing\nexcept ImportError:\n multiprocessing = None\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.post_process_images_Builder.post_process_images.for_node_in_doctree_finda.self_images_candidate_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/__init__.py_Builder.post_process_images_Builder.post_process_images.for_node_in_doctree_finda.self_images_candidate_", "embedding": null, "metadata": {"file_path": "sphinx/builders/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 168, "end_line": 197, "span_ids": ["Builder.post_process_images"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Builder:\n\n def post_process_images(self, doctree: Node) -> None:\n \"\"\"Pick the best candidate for all image URIs.\"\"\"\n images = ImageAdapter(self.env)\n for node in doctree.findall(nodes.image):\n if '?' in node['candidates']:\n # don't rewrite nonlocal image URIs\n continue\n if '*' not in node['candidates']:\n for imgtype in self.supported_image_types:\n candidate = node['candidates'].get(imgtype, None)\n if candidate:\n break\n else:\n mimetypes = sorted(node['candidates'])\n image_uri = images.get_original_image_uri(node['uri'])\n if mimetypes:\n logger.warning(__('a suitable image for %s builder not found: '\n '%s (%s)'),\n self.name, mimetypes, image_uri, location=node)\n else:\n logger.warning(__('a suitable image for %s builder not found: %s'),\n self.name, image_uri, location=node)\n continue\n node['uri'] = candidate\n else:\n candidate = node['uri']\n if candidate not in self.env.images:\n # non-existing URI; let it alone\n continue\n self.images[candidate] = self.env.images[candidate][1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py__Base_class_of_epub2_ep_ssp.sphinx_smarty_pants": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py__Base_class_of_epub2_ep_ssp.sphinx_smarty_pants", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 110, "span_ids": ["sphinx_smarty_pants", "impl", "impl:2", "Spine", "NavPoint", "docstring", "Guide", "imports", "impl:27", "imports:17", "ManifestItem"], "tokens": 699}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Base class of epub2/epub3 builders.\"\"\"\n\nimport html\nimport os\nimport re\nfrom os import path\nfrom typing import Any, Dict, List, NamedTuple, Set, Tuple\nfrom zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\nfrom docutils.utils import smartquotes\n\nfrom sphinx import addnodes\nfrom sphinx.builders.html import BuildInfo, StandaloneHTMLBuilder\nfrom sphinx.locale import __\nfrom sphinx.util import logging, status_iterator\nfrom sphinx.util.fileutil import copy_asset_file\nfrom sphinx.util.i18n import format_date\nfrom sphinx.util.osutil import copyfile, ensuredir\n\ntry:\n from PIL import Image\nexcept ImportError:\n Image = None\n\n\nlogger = logging.getLogger(__name__)\n\n\n# (Fragment) templates from which the metainfo files content.opf and\n# toc.ncx are created.\n# This template section also defines strings that are embedded in the html\n# output but that may be customized by (re-)setting module attributes,\n# e.g. from conf.py.\n\nCOVERPAGE_NAME = 'epub-cover.xhtml'\n\nTOCTREE_TEMPLATE = 'toctree-l%d'\n\nLINK_TARGET_TEMPLATE = ' [%(uri)s]'\n\nFOOTNOTE_LABEL_TEMPLATE = '#%d'\n\nFOOTNOTES_RUBRIC_NAME = 'Footnotes'\n\nCSS_LINK_TARGET_CLASS = 'link-target'\n\n# XXX These strings should be localized according to epub_language\nGUIDE_TITLES = {\n 'toc': 'Table of Contents',\n 'cover': 'Cover'\n}\n\nMEDIA_TYPES = {\n '.xhtml': 'application/xhtml+xml',\n '.css': 'text/css',\n '.png': 'image/png',\n '.gif': 'image/gif',\n '.svg': 'image/svg+xml',\n '.jpg': 'image/jpeg',\n '.jpeg': 'image/jpeg',\n '.otf': 'application/x-font-otf',\n '.ttf': 'application/x-font-ttf',\n '.woff': 'application/font-woff',\n}\n\nVECTOR_GRAPHICS_EXTENSIONS = ('.svg',)\n\n# Regular expression to match colons only in local fragment identifiers.\n# If the URI contains a colon before the #,\n# it is an external link that should not change.\nREFURI_RE = re.compile(\"([^#:]*#)(.*)\")\n\n\nclass ManifestItem(NamedTuple):\n href: str\n id: str\n media_type: str\n\n\nclass Spine(NamedTuple):\n idref: str\n linear: bool\n\n\nclass Guide(NamedTuple):\n type: str\n title: str\n uri: str\n\n\nclass NavPoint(NamedTuple):\n navpoint: str\n playorder: int\n text: str\n refuri: str\n children: List[Any] # mypy does not support recursive types\n # https://github.com/python/mypy/issues/7069\n\n\ndef sphinx_smarty_pants(t: str, language: str = 'en') -> str:\n t = t.replace('"', '\"')\n t = smartquotes.educateDashesOldSchool(t)\n t = smartquotes.educateQuotes(t, language)\n t = t.replace('\"', '"')\n return t\n\n\nssp = sphinx_smarty_pants", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.add_visible_links.if_show_urls_no__EpubBuilder.add_visible_links.for_node_in_list_tree_fin.if_uri_startswith_http_.if_show_urls_inline_.elif_show_urls_footno.fn_idx_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.add_visible_links.if_show_urls_no__EpubBuilder.add_visible_links.for_node_in_list_tree_fin.if_uri_startswith_http_.if_show_urls_inline_.elif_show_urls_footno.fn_idx_1", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 331, "end_line": 356, "span_ids": ["EpubBuilder.add_visible_links"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def add_visible_links(self, tree: nodes.document, show_urls: str = 'inline') -> None:\n # ... other code\n\n if show_urls == 'no':\n return\n if show_urls == 'footnote':\n doc = next(tree.findall(nodes.document))\n fn_spot, fn_idx = footnote_spot(tree)\n nr = 1\n for node in list(tree.findall(nodes.reference)):\n uri = node.get('refuri', '')\n if (uri.startswith('http:') or uri.startswith('https:') or\n uri.startswith('ftp:')) and uri not in node.astext():\n idx = node.parent.index(node) + 1\n if show_urls == 'inline':\n uri = self.link_target_template % {'uri': uri}\n link = nodes.inline(uri, uri)\n link['classes'].append(self.css_link_target_class)\n node.parent.insert(idx, link)\n elif show_urls == 'footnote':\n label = FOOTNOTE_LABEL_TEMPLATE % nr\n nr += 1\n footnote_ref = make_footnote_ref(doc, label)\n node.parent.insert(idx, footnote_ref)\n footnote = make_footnote(doc, label, uri)\n fn_spot.insert(fn_idx, footnote)\n footnote_ref['refid'] = footnote['ids'][0]\n footnote.add_backref(footnote_ref['ids'][0])\n fn_idx += 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_mimetype_EpubBuilder.build_container.copy_asset_file_path_join": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/_epub_base.py_EpubBuilder.build_mimetype_EpubBuilder.build_container.copy_asset_file_path_join", "embedding": null, "metadata": {"file_path": "sphinx/builders/_epub_base.py", "file_name": "_epub_base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 461, "end_line": 471, "span_ids": ["EpubBuilder.build_container", "EpubBuilder.build_mimetype"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EpubBuilder(StandaloneHTMLBuilder):\n\n def build_mimetype(self) -> None:\n \"\"\"Write the metainfo file mimetype.\"\"\"\n logger.info(__('writing mimetype file...'))\n copy_asset_file(path.join(self.template_dir, 'mimetype'), self.outdir)\n\n def build_container(self, outname: str = 'META-INF/container.xml') -> None: # NOQA\n \"\"\"Write the metainfo file META-INF/container.xml.\"\"\"\n logger.info(__('writing META-INF/container.xml file...'))\n outdir = path.join(self.outdir, 'META-INF')\n ensuredir(outdir)\n copy_asset_file(path.join(self.template_dir, 'container.xml'), outdir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py__Changelog_builder__logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/changes.py__Changelog_builder__logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/builders/changes.py", "file_name": "changes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["impl", "docstring", "imports"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Changelog builder.\"\"\"\n\nimport html\nfrom os import path\nfrom typing import Any, Dict, List, Tuple, cast\n\nfrom sphinx import package_dir\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.domains.changeset import ChangeSetDomain\nfrom sphinx.locale import _, __\nfrom sphinx.theming import HTMLThemeFactory\nfrom sphinx.util import logging\nfrom sphinx.util.console import bold # type: ignore\nfrom sphinx.util.fileutil import copy_asset_file\nfrom sphinx.util.osutil import ensuredir, os_path\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/dirhtml.py__Directory_HTML_builder_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/dirhtml.py__Directory_HTML_builder_", "embedding": null, "metadata": {"file_path": "sphinx/builders/dirhtml.py", "file_name": "dirhtml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 50, "span_ids": ["impl", "setup", "docstring", "DirectoryHTMLBuilder", "DirectoryHTMLBuilder.get_outfilename", "imports", "DirectoryHTMLBuilder.get_target_uri"], "tokens": 335}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Directory HTML builders.\"\"\"\n\nfrom os import path\nfrom typing import Any, Dict\n\nfrom sphinx.application import Sphinx\nfrom sphinx.builders.html import StandaloneHTMLBuilder\nfrom sphinx.util import logging\nfrom sphinx.util.osutil import SEP, os_path\n\nlogger = logging.getLogger(__name__)\n\n\nclass DirectoryHTMLBuilder(StandaloneHTMLBuilder):\n \"\"\"\n A StandaloneHTMLBuilder that creates all HTML pages as \"index.html\" in\n a directory given by their pagename, so that generated URLs don't have\n ``.html`` in them.\n \"\"\"\n name = 'dirhtml'\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n if docname == 'index':\n return ''\n if docname.endswith(SEP + 'index'):\n return docname[:-5] # up to sep\n return docname + SEP\n\n def get_outfilename(self, pagename: str) -> str:\n if pagename == 'index' or pagename.endswith(SEP + 'index'):\n outfilename = path.join(self.outdir, os_path(pagename) +\n self.out_suffix)\n else:\n outfilename = path.join(self.outdir, os_path(pagename),\n 'index' + self.out_suffix)\n\n return outfilename\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.setup_extension('sphinx.builders.html')\n\n app.add_builder(DirectoryHTMLBuilder)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/dummy.py__Do_syntax_checks_but__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/dummy.py__Do_syntax_checks_but__", "embedding": null, "metadata": {"file_path": "sphinx/builders/dummy.py", "file_name": "dummy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["DummyBuilder", "setup", "DummyBuilder.prepare_writing", "docstring", "DummyBuilder.finish", "DummyBuilder.get_outdated_docs", "DummyBuilder.write_doc", "DummyBuilder.init", "imports", "DummyBuilder.get_target_uri"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Do syntax checks, but no writing.\"\"\"\n\nfrom typing import Any, Dict, Set\n\nfrom docutils.nodes import Node\n\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.locale import __\n\n\nclass DummyBuilder(Builder):\n name = 'dummy'\n epilog = __('The dummy builder generates no files.')\n\n allow_parallel = True\n\n def init(self) -> None:\n pass\n\n def get_outdated_docs(self) -> Set[str]:\n return self.env.found_docs\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n return ''\n\n def prepare_writing(self, docnames: Set[str]) -> None:\n pass\n\n def write_doc(self, docname: str, doctree: Node) -> None:\n pass\n\n def finish(self) -> None:\n pass\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_builder(DummyBuilder)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py__Build_epub3_files__HTML_TAG._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py__Build_epub3_files__HTML_TAG._", "embedding": null, "metadata": {"file_path": "sphinx/builders/epub3.py", "file_name": "epub3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 49, "span_ids": ["impl", "NavPoint", "docstring", "impl:3", "imports", "impl:4"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Build epub3 files.\n\nOriginally derived from epub.py.\n\"\"\"\n\nimport html\nfrom os import path\nfrom typing import Any, Dict, List, NamedTuple, Set, Tuple\n\nfrom sphinx import package_dir\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import _epub_base\nfrom sphinx.config import ENUM, Config\nfrom sphinx.locale import __\nfrom sphinx.util import logging, xmlname_checker\nfrom sphinx.util.fileutil import copy_asset_file\nfrom sphinx.util.i18n import format_date\nfrom sphinx.util.osutil import make_filename\n\nlogger = logging.getLogger(__name__)\n\n\nclass NavPoint(NamedTuple):\n text: str\n refuri: str\n children: List[Any] # mypy does not support recursive types\n # https://github.com/python/mypy/issues/7069\n\n\n# writing modes\nPAGE_PROGRESSION_DIRECTIONS = {\n 'horizontal': 'ltr',\n 'vertical': 'rtl',\n}\nIBOOK_SCROLL_AXIS = {\n 'horizontal': 'vertical',\n 'vertical': 'horizontal',\n}\nTHEME_WRITING_MODES = {\n 'vertical': 'vertical-rl',\n 'horizontal': 'horizontal-tb',\n}\n\nDOCTYPE = '''<!DOCTYPE html>'''\n\nHTML_TAG = (\n '<html xmlns=\"http://www.w3.org/1999/xhtml\" '\n 'xmlns:epub=\"http://www.idpf.org/2007/ops\">'\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder_Epub3Builder.handle_finish.self_build_epub_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder_Epub3Builder.handle_finish.self_build_epub_", "embedding": null, "metadata": {"file_path": "sphinx/builders/epub3.py", "file_name": "epub3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 52, "end_line": 78, "span_ids": ["Epub3Builder", "Epub3Builder.handle_finish"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Epub3Builder(_epub_base.EpubBuilder):\n \"\"\"\n Builder that outputs epub3 files.\n\n It creates the metainfo files content.opf, nav.xhtml, toc.ncx, mimetype,\n and META-INF/container.xml. Afterwards, all necessary files are zipped to\n an epub file.\n \"\"\"\n name = 'epub'\n epilog = __('The ePub file is in %(outdir)s.')\n\n supported_remote_images = False\n template_dir = path.join(package_dir, 'templates', 'epub3')\n doctype = DOCTYPE\n html_tag = HTML_TAG\n use_meta_charset = True\n\n # Finish by building the epub file\n def handle_finish(self) -> None:\n \"\"\"Create the metainfo files and finally the epub.\"\"\"\n self.get_toc()\n self.build_mimetype()\n self.build_container()\n self.build_content()\n self.build_navigation_doc()\n self.build_toc()\n self.build_epub()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder.navigation_doc_metadata_Epub3Builder.build_navigation_doc.if_nav_xhtml_not_in_sel.self_files_append_nav_xh": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/epub3.py_Epub3Builder.navigation_doc_metadata_Epub3Builder.build_navigation_doc.if_nav_xhtml_not_in_sel.self_files_append_nav_xh", "embedding": null, "metadata": {"file_path": "sphinx/builders/epub3.py", "file_name": "epub3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 147, "end_line": 176, "span_ids": ["Epub3Builder.build_navigation_doc", "Epub3Builder.navigation_doc_metadata"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Epub3Builder(_epub_base.EpubBuilder):\n\n def navigation_doc_metadata(self, navlist: List[NavPoint]) -> Dict:\n \"\"\"Create a dictionary with all metadata for the nav.xhtml file\n properly escaped.\n \"\"\"\n metadata: Dict = {}\n metadata['lang'] = html.escape(self.config.epub_language)\n metadata['toc_locale'] = html.escape(self.guide_titles['toc'])\n metadata['navlist'] = navlist\n return metadata\n\n def build_navigation_doc(self) -> None:\n \"\"\"Write the metainfo file nav.xhtml.\"\"\"\n logger.info(__('writing nav.xhtml file...'))\n\n if self.config.epub_tocscope == 'default':\n doctree = self.env.get_and_resolve_doctree(\n self.config.root_doc, self,\n prune_toctrees=False, includehidden=False)\n refnodes = self.get_refnodes(doctree, [])\n self.toc_add_files(refnodes)\n else:\n # 'includehidden'\n refnodes = self.refnodes\n navlist = self.build_navlist(refnodes)\n copy_asset_file(path.join(self.template_dir, 'nav.xhtml_t'), self.outdir,\n self.navigation_doc_metadata(navlist))\n\n # Add nav.xhtml to epub file\n if 'nav.xhtml' not in self.files:\n self.files.append('nav.xhtml')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py__The_MessageCatalogBuil_Message.__init__.self.uuids.uuids": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py__The_MessageCatalogBuil_Message.__init__.self.uuids.uuids", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["impl", "docstring", "imports", "Message"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The MessageCatalogBuilder class.\"\"\"\n\nfrom codecs import open\nfrom collections import OrderedDict, defaultdict\nfrom datetime import datetime, timedelta, tzinfo\nfrom os import getenv, path, walk\nfrom time import time\nfrom typing import Any, DefaultDict, Dict, Generator, Iterable, List, Set, Tuple, Union\nfrom uuid import uuid4\n\nfrom docutils import nodes\nfrom docutils.nodes import Element\n\nfrom sphinx import addnodes, package_dir\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.domains.python import pairindextypes\nfrom sphinx.errors import ThemeError\nfrom sphinx.locale import __\nfrom sphinx.util import logging, split_index_msg, status_iterator\nfrom sphinx.util.console import bold # type: ignore\nfrom sphinx.util.i18n import CatalogInfo, docname_to_domain\nfrom sphinx.util.nodes import extract_messages, traverse_translatable_index\nfrom sphinx.util.osutil import canon_path, ensuredir, relpath\nfrom sphinx.util.tags import Tags\nfrom sphinx.util.template import SphinxRenderer\n\nlogger = logging.getLogger(__name__)\n\n\nclass Message:\n \"\"\"An entry of translatable message.\"\"\"\n def __init__(self, text: str, locations: List[Tuple[str, int]], uuids: List[str]):\n self.text = text\n self.locations = locations\n self.uuids = uuids", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_I18nBuilder.write_doc_I18nBuilder.write_doc.if_index_in_self_env_co.for_node_entries_in_trav.for_typ_msg__tid__main.for_m_in_split_index_msg_.catalog_add_m_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/gettext.py_I18nBuilder.write_doc_I18nBuilder.write_doc.if_index_in_self_env_co.for_node_entries_in_trav.for_typ_msg__tid__main.for_m_in_split_index_msg_.catalog_add_m_node_", "embedding": null, "metadata": {"file_path": "sphinx/builders/gettext.py", "file_name": "gettext.py", "file_type": "text/x-python", "category": "implementation", "start_line": 138, "end_line": 158, "span_ids": ["I18nBuilder.write_doc"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class I18nBuilder(Builder):\n\n def write_doc(self, docname: str, doctree: nodes.document) -> None:\n catalog = self.catalogs[docname_to_domain(docname, self.config.gettext_compact)]\n\n for toctree in self.env.tocs[docname].findall(addnodes.toctree):\n for node, msg in extract_messages(toctree):\n node.uid = '' # type: ignore # Hack UUID model\n catalog.add(msg, node)\n\n for node, msg in extract_messages(doctree):\n catalog.add(msg, node)\n\n if 'index' in self.env.config.gettext_additional_targets:\n # Extract translatable messages from index entries.\n for node, entries in traverse_translatable_index(doctree):\n for typ, msg, _tid, _main, _key in entries:\n for m in split_index_msg(typ, msg):\n if typ == 'pair' and m in pairindextypes.values():\n # avoid built-in translated message was incorporated\n # in 'sphinx.util.nodes.process_index_entry'\n continue\n catalog.add(m, node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py__Several_HTML_builders__return_codes_re.re_compile_r_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py__Several_HTML_builders__return_codes_re.re_compile_r_n_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 55, "span_ids": ["impl", "impl:2", "docstring", "imports:39", "imports"], "tokens": 450}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Several HTML builders.\"\"\"\n\nimport html\nimport os\nimport posixpath\nimport re\nimport sys\nfrom datetime import datetime\nfrom os import path\nfrom typing import IO, Any, Dict, Iterable, Iterator, List, Optional, Set, Tuple, Type\nfrom urllib.parse import quote\n\nfrom docutils import nodes\nfrom docutils.core import publish_parts\nfrom docutils.frontend import OptionParser\nfrom docutils.io import DocTreeInput, StringOutput\nfrom docutils.nodes import Node\nfrom docutils.utils import relative_path\n\nfrom sphinx import __display_version__, package_dir\nfrom sphinx import version_info as sphinx_version\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.config import ENUM, Config\nfrom sphinx.domains import Domain, Index, IndexEntry\nfrom sphinx.environment.adapters.asset import ImageAdapter\nfrom sphinx.environment.adapters.indexentries import IndexEntries\nfrom sphinx.environment.adapters.toctree import TocTree\nfrom sphinx.errors import ConfigError, ThemeError\nfrom sphinx.highlighting import PygmentsBridge\nfrom sphinx.locale import _, __\nfrom sphinx.search import js_index\nfrom sphinx.theming import HTMLThemeFactory\nfrom sphinx.util import isurl, logging, md5, progress_message, status_iterator\nfrom sphinx.util.docutils import is_html5_writer_available, new_document\nfrom sphinx.util.fileutil import copy_asset\nfrom sphinx.util.i18n import format_date\nfrom sphinx.util.inventory import InventoryFile\nfrom sphinx.util.matching import DOTFILES, Matcher, patmatch\nfrom sphinx.util.osutil import copyfile, ensuredir, os_path, relative_uri\nfrom sphinx.util.tags import Tags\nfrom sphinx.writers.html import HTMLTranslator, HTMLWriter\n\n# HTML5 Writer is available or not\nif is_html5_writer_available():\n from sphinx.writers.html5 import HTML5Translator\n html5_ready = True\nelse:\n html5_ready = False\n\n#: the filename for the inventory of objects\nINVENTORY_FILENAME = 'objects.inv'\n\nlogger = logging.getLogger(__name__)\nreturn_codes_re = re.compile('[\\r\\n]+')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_get_stable_hash_convert_locale_to_language_tag.if_locale_.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_get_stable_hash_convert_locale_to_language_tag.if_locale_.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 58, "end_line": 79, "span_ids": ["get_stable_hash", "convert_locale_to_language_tag"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_stable_hash(obj: Any) -> str:\n \"\"\"\n Return a stable hash for a Python data structure. We can't just use\n the md5 of str(obj) since for example dictionary items are enumerated\n in unpredictable order due to hash randomization in newer Pythons.\n \"\"\"\n if isinstance(obj, dict):\n return get_stable_hash(list(obj.items()))\n elif isinstance(obj, (list, tuple)):\n obj = sorted(get_stable_hash(o) for o in obj)\n return md5(str(obj).encode()).hexdigest()\n\n\ndef convert_locale_to_language_tag(locale: Optional[str]) -> Optional[str]:\n \"\"\"Convert a locale string to a language tag (ex. en_US -> en-US).\n\n refs: BCP 47 (:rfc:`5646`)\n \"\"\"\n if locale:\n return locale.replace('_', '-')\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder_StandaloneHTMLBuilder.__init__.self.script_files._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder_StandaloneHTMLBuilder.__init__.self.script_files._", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 174, "end_line": 212, "span_ids": ["StandaloneHTMLBuilder"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n \"\"\"\n Builds standalone HTML docs.\n \"\"\"\n name = 'html'\n format = 'html'\n epilog = __('The HTML pages are in %(outdir)s.')\n\n copysource = True\n allow_parallel = True\n out_suffix = '.html'\n link_suffix = '.html' # defaults to matching out_suffix\n indexer_format: Any = js_index\n indexer_dumps_unicode = True\n # create links to original images from images [True/False]\n html_scaled_image_link = True\n supported_image_types = ['image/svg+xml', 'image/png',\n 'image/gif', 'image/jpeg']\n supported_remote_images = True\n supported_data_uri_images = True\n searchindex_filename = 'searchindex.js'\n add_permalinks = True\n allow_sharp_as_current_path = True\n embedded = False # for things like HTML help or Qt help: suppresses sidebar\n search = True # for things like HTML help and Apple help: suppress search\n use_index = False\n download_support = True # enable download role\n\n imgpath: str = None\n domain_indices: List[Tuple[str, Type[Index], List[Tuple[str, List[IndexEntry]]], bool]] = [] # NOQA\n\n def __init__(self, app: Sphinx) -> None:\n super().__init__(app)\n\n # CSS files\n self.css_files: List[Stylesheet] = []\n\n # JS files\n self.script_files: List[JavaScript] = []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.create_build_info_StandaloneHTMLBuilder._get_translations_js.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.create_build_info_StandaloneHTMLBuilder._get_translations_js.return.None", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 240, "end_line": 255, "span_ids": ["StandaloneHTMLBuilder._get_translations_js", "StandaloneHTMLBuilder.create_build_info"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def create_build_info(self) -> BuildInfo:\n return BuildInfo(self.config, self.tags, ['html'])\n\n def _get_translations_js(self) -> str:\n candidates = [path.join(dir, self.config.language,\n 'LC_MESSAGES', 'sphinx.js')\n for dir in self.config.locale_dirs] + \\\n [path.join(package_dir, 'locale', self.config.language,\n 'LC_MESSAGES', 'sphinx.js'),\n path.join(sys.prefix, 'share/sphinx/locale',\n self.config.language, 'sphinx.js')]\n\n for jsfile in candidates:\n if path.isfile(jsfile):\n return jsfile\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder._get_style_filename_StandaloneHTMLBuilder.init_templates.self_templates_init_self_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder._get_style_filename_StandaloneHTMLBuilder.init_templates.self_templates_init_self_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 257, "end_line": 274, "span_ids": ["StandaloneHTMLBuilder.get_theme_config", "StandaloneHTMLBuilder._get_style_filename", "StandaloneHTMLBuilder.init_templates"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def _get_style_filename(self) -> str:\n if self.config.html_style is not None:\n return self.config.html_style\n elif self.theme:\n return self.theme.get_config('theme', 'stylesheet')\n else:\n return 'default.css'\n\n def get_theme_config(self) -> Tuple[str, Dict]:\n return self.config.html_theme, self.config.html_theme_options\n\n def init_templates(self) -> None:\n theme_factory = HTMLThemeFactory(self.app)\n themename, themeoptions = self.get_theme_config()\n self.theme = theme_factory.create(themename)\n self.theme_options = themeoptions.copy()\n self.create_template_bridge()\n self.templates.init(self, self.theme)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_css_files_StandaloneHTMLBuilder.add_css_file.self_css_files_append_Sty": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_css_files_StandaloneHTMLBuilder.add_css_file.self_css_files_append_Sty", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 299, "end_line": 315, "span_ids": ["StandaloneHTMLBuilder.add_css_file", "StandaloneHTMLBuilder.init_css_files"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def init_css_files(self) -> None:\n self.css_files = []\n self.add_css_file('pygments.css', priority=200)\n self.add_css_file(self._get_style_filename(), priority=200)\n\n for filename, attrs in self.app.registry.css_files:\n self.add_css_file(filename, **attrs)\n\n for filename, attrs in self.get_builder_config('css_files', 'html'):\n attrs.setdefault('priority', 800) # User's CSSs are loaded after extensions'\n self.add_css_file(filename, **attrs)\n\n def add_css_file(self, filename: str, **kwargs: Any) -> None:\n if '://' not in filename:\n filename = posixpath.join('_static', filename)\n\n self.css_files.append(Stylesheet(filename, **kwargs))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_js_files_StandaloneHTMLBuilder.init_js_files.if_self__get_translations.self_add_js_file_transla": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.init_js_files_StandaloneHTMLBuilder.init_js_files.if_self__get_translations.self_add_js_file_transla", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 317, "end_line": 336, "span_ids": ["StandaloneHTMLBuilder.init_js_files"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def init_js_files(self) -> None:\n self.script_files = []\n self.add_js_file('documentation_options.js', id=\"documentation_options\",\n data_url_root='', priority=200)\n # Remove frameworks and compatability module below in Sphinx 6.0\n # xref RemovedInSphinx60Warning\n self.add_js_file('jquery.js', priority=200)\n self.add_js_file('underscore.js', priority=200)\n self.add_js_file('_sphinx_javascript_frameworks_compat.js', priority=200)\n self.add_js_file('doctools.js', priority=200)\n\n for filename, attrs in self.app.registry.js_files:\n self.add_js_file(filename, **attrs)\n\n for filename, attrs in self.get_builder_config('js_files', 'html'):\n attrs.setdefault('priority', 800) # User's JSs are loaded after extensions'\n self.add_js_file(filename, **attrs)\n\n if self._get_translations_js():\n self.add_js_file('translations.js')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.add_js_file_StandaloneHTMLBuilder.math_renderer_name.if_name_is_not_None_.else_.if_len_renderers_1_.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.add_js_file_StandaloneHTMLBuilder.math_renderer_name.if_name_is_not_None_.else_.if_len_renderers_1_.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 338, "end_line": 369, "span_ids": ["StandaloneHTMLBuilder.add_js_file", "StandaloneHTMLBuilder.math_renderer_name", "StandaloneHTMLBuilder.default_translator_class"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def add_js_file(self, filename: str, **kwargs: Any) -> None:\n if filename and '://' not in filename:\n filename = posixpath.join('_static', filename)\n\n self.script_files.append(JavaScript(filename, **kwargs))\n\n @property\n def default_translator_class(self) -> Type[nodes.NodeVisitor]: # type: ignore\n if not html5_ready or self.config.html4_writer:\n return HTMLTranslator\n else:\n return HTML5Translator\n\n @property\n def math_renderer_name(self) -> str:\n name = self.get_builder_config('math_renderer', 'html')\n if name is not None:\n # use given name\n return name\n else:\n # not given: choose a math_renderer from registered ones as possible\n renderers = list(self.app.registry.html_inline_math_renderers)\n if len(renderers) == 1:\n # only default math_renderer (mathjax) is registered\n return renderers[0]\n elif len(renderers) == 2:\n # default and another math_renderer are registered; prior the another\n renderers.remove('mathjax')\n return renderers[0]\n else:\n # many math_renderers are registered. can't choose automatically!\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.prepare_writing_StandaloneHTMLBuilder.prepare_writing.self._css_files.list_self_css_files_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.prepare_writing_StandaloneHTMLBuilder.prepare_writing.self._css_files.list_self_css_files_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 434, "end_line": 501, "span_ids": ["StandaloneHTMLBuilder.prepare_writing"], "tokens": 635}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def prepare_writing(self, docnames: Set[str]) -> None:\n # create the search indexer\n self.indexer = None\n if self.search:\n from sphinx.search import IndexBuilder\n lang = self.config.html_search_language or self.config.language\n self.indexer = IndexBuilder(self.env, lang,\n self.config.html_search_options,\n self.config.html_search_scorer)\n self.load_indexer(docnames)\n\n self.docwriter = HTMLWriter(self)\n self.docsettings: Any = OptionParser(\n defaults=self.env.settings,\n components=(self.docwriter,),\n read_config_files=True).get_default_values()\n self.docsettings.compact_lists = bool(self.config.html_compact_lists)\n\n # determine the additional indices to include\n self.domain_indices = []\n # html_domain_indices can be False/True or a list of index names\n indices_config = self.config.html_domain_indices\n if indices_config:\n for domain_name in sorted(self.env.domains):\n domain: Domain = self.env.domains[domain_name]\n for indexcls in domain.indices:\n indexname = '%s-%s' % (domain.name, indexcls.name)\n if isinstance(indices_config, list):\n if indexname not in indices_config:\n continue\n content, collapse = indexcls(domain).generate()\n if content:\n self.domain_indices.append(\n (indexname, indexcls, content, collapse))\n\n # format the \"last updated on\" string, only once is enough since it\n # typically doesn't include the time of day\n lufmt = self.config.html_last_updated_fmt\n if lufmt is not None:\n self.last_updated = format_date(lufmt or _('%b %d, %Y'),\n language=self.config.language)\n else:\n self.last_updated = None\n\n # If the logo or favicon are urls, keep them as-is, otherwise\n # strip the relative path as the files will be copied into _static.\n logo = self.config.html_logo or ''\n favicon = self.config.html_favicon or ''\n\n if not isurl(logo):\n logo = path.basename(logo)\n if not isurl(favicon):\n favicon = path.basename(favicon)\n\n self.relations = self.env.collect_relations()\n\n rellinks: List[Tuple[str, str, str, str]] = []\n if self.use_index:\n rellinks.append(('genindex', _('General Index'), 'I', _('index')))\n for indexname, indexcls, _content, _collapse in self.domain_indices:\n # if it has a short name\n if indexcls.shortname:\n rellinks.append((indexname, indexcls.localname,\n '', indexcls.shortname))\n\n # back up script_files and css_files to allow adding JS/CSS files to a specific page.\n self._script_files = list(self.script_files)\n self._css_files = list(self.css_files)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.create_pygments_style_file_StandaloneHTMLBuilder.copy_translation_js.if_jsfile_.copyfile_jsfile_path_joi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.create_pygments_style_file_StandaloneHTMLBuilder.copy_translation_js.if_jsfile_.copyfile_jsfile_path_joi", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 764, "end_line": 777, "span_ids": ["StandaloneHTMLBuilder.create_pygments_style_file", "StandaloneHTMLBuilder.copy_translation_js"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def create_pygments_style_file(self) -> None:\n \"\"\"create a style file for pygments.\"\"\"\n with open(path.join(self.outdir, '_static', 'pygments.css'), 'w') as f:\n f.write(self.highlighter.get_stylesheet())\n\n if self.dark_highlighter:\n with open(path.join(self.outdir, '_static', 'pygments_dark.css'), 'w') as f:\n f.write(self.dark_highlighter.get_stylesheet())\n\n def copy_translation_js(self) -> None:\n \"\"\"Copy a JavaScript file for translations.\"\"\"\n jsfile = self._get_translations_js()\n if jsfile:\n copyfile(jsfile, path.join(self.outdir, '_static', 'translations.js'))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_stemmer_js_StandaloneHTMLBuilder.copy_stemmer_js.if_self_indexer_is_not_No.if_hasattr_self_indexer_.else_.if_jsfile_.copyfile_jsfile_path_joi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.copy_stemmer_js_StandaloneHTMLBuilder.copy_stemmer_js.if_self_indexer_is_not_No.if_hasattr_self_indexer_.else_.if_jsfile_.copyfile_jsfile_path_joi", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 779, "end_line": 788, "span_ids": ["StandaloneHTMLBuilder.copy_stemmer_js"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def copy_stemmer_js(self) -> None:\n \"\"\"Copy a JavaScript file for stemmer.\"\"\"\n if self.indexer is not None:\n if hasattr(self.indexer, 'get_js_stemmer_rawcodes'):\n for jsfile in self.indexer.get_js_stemmer_rawcodes():\n copyfile(jsfile, path.join(self.outdir, '_static', path.basename(jsfile)))\n else:\n jsfile = self.indexer.get_js_stemmer_rawcode()\n if jsfile:\n copyfile(jsfile, path.join(self.outdir, '_static', '_stemmer.js'))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.post_process_images_StandaloneHTMLBuilder.post_process_images.if_self_config_html_scale.for_node_in_doctree_finda.reference_append_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.post_process_images_StandaloneHTMLBuilder.post_process_images.if_self_config_html_scale.for_node_in_doctree_finda.reference_append_node_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 866, "end_line": 893, "span_ids": ["StandaloneHTMLBuilder.post_process_images"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def post_process_images(self, doctree: Node) -> None:\n \"\"\"Pick the best candidate for an image and link down-scaled images to\n their high res version.\n \"\"\"\n Builder.post_process_images(self, doctree)\n\n if self.config.html_scaled_image_link and self.html_scaled_image_link:\n for node in doctree.findall(nodes.image):\n if not any((key in node) for key in ['scale', 'width', 'height']):\n # resizing options are not given. scaled image link is available\n # only for resized images.\n continue\n elif isinstance(node.parent, nodes.reference):\n # A image having hyperlink target\n continue\n elif 'no-scaled-link' in node['classes']:\n # scaled image link is disabled for this node\n continue\n\n uri = node['uri']\n reference = nodes.reference('', '', internal=True)\n if uri in self.images:\n reference['refuri'] = posixpath.join(self.imgpath,\n self.images[uri])\n else:\n reference['refuri'] = uri\n node.replace_self(reference)\n reference.append(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.index_page_StandaloneHTMLBuilder.index_page.if_self_indexer_is_not_No.if_nosearch_in_metadata.else_.self_indexer_feed_pagenam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.index_page_StandaloneHTMLBuilder.index_page.if_self_indexer_is_not_No.if_nosearch_in_metadata.else_.self_indexer_feed_pagenam", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 913, "end_line": 921, "span_ids": ["StandaloneHTMLBuilder.index_page"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def index_page(self, pagename: str, doctree: nodes.document, title: str) -> None:\n # only index pages with title\n if self.indexer is not None and title:\n filename = self.env.doc2path(pagename, base=None)\n metadata = self.env.metadata.get(pagename, {})\n if 'nosearch' in metadata:\n self.indexer.feed(pagename, filename, '', new_document(''))\n else:\n self.indexer.feed(pagename, filename, title, doctree)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.handle_page.None_3_StandaloneHTMLBuilder.dump_inventory.InventoryFile_dump_path_j": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_StandaloneHTMLBuilder.handle_page.None_3_StandaloneHTMLBuilder.dump_inventory.InventoryFile_dump_path_j", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1073, "end_line": 1097, "span_ids": ["StandaloneHTMLBuilder.handle_page", "StandaloneHTMLBuilder.dump_inventory", "StandaloneHTMLBuilder.handle_finish", "StandaloneHTMLBuilder.update_page_context"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandaloneHTMLBuilder(Builder):\n\n def handle_page(self, pagename: str, addctx: Dict, templatename: str = 'page.html',\n outfilename: str = None, event_arg: Any = None) -> None:\n # ... other code\n try:\n with open(outfilename, 'w', encoding=ctx['encoding'],\n errors='xmlcharrefreplace') as f:\n f.write(output)\n except OSError as err:\n logger.warning(__(\"error writing file %s: %s\"), outfilename, err)\n if self.copysource and ctx.get('sourcename'):\n # copy the source file for the \"show source\" link\n source_name = path.join(self.outdir, '_sources',\n os_path(ctx['sourcename']))\n ensuredir(path.dirname(source_name))\n copyfile(self.env.doc2path(pagename), source_name)\n\n def update_page_context(self, pagename: str, templatename: str,\n ctx: Dict, event_arg: Any) -> None:\n pass\n\n def handle_finish(self) -> None:\n if self.indexer:\n self.finish_tasks.add_task(self.dump_search_index)\n self.finish_tasks.add_task(self.dump_inventory)\n\n @progress_message(__('dumping object inventory'))\n def dump_inventory(self) -> None:\n InventoryFile.dump(path.join(self.outdir, INVENTORY_FILENAME), self.env, self)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup_css_tag_helper_setup_css_tag_helper.context_css_tag_css_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup_css_tag_helper_setup_css_tag_helper.context_css_tag_css_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1148, "end_line": 1165, "span_ids": ["setup_css_tag_helper"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup_css_tag_helper(app: Sphinx, pagename: str, templatename: str,\n context: Dict, doctree: Node) -> None:\n \"\"\"Set up css_tag() template helper.\n\n .. note:: This set up function is added to keep compatibility with webhelper.\n \"\"\"\n pathto = context.get('pathto')\n\n def css_tag(css: Stylesheet) -> str:\n attrs = []\n for key in sorted(css.attributes):\n value = css.attributes[key]\n if value is not None:\n attrs.append('%s=\"%s\"' % (key, html.escape(value, True)))\n attrs.append('href=\"%s\"' % pathto(css.filename, resource=True))\n return '<link %s />' % ' '.join(attrs)\n\n context['css_tag'] = css_tag", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup_resource_paths_setup_resource_paths.if_logo_and_not_isurl_log.else_.context_logo_url_log": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup_resource_paths_setup_resource_paths.if_logo_and_not_isurl_log.else_.context_logo_url_log", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1203, "end_line": 1220, "span_ids": ["setup_resource_paths"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup_resource_paths(app: Sphinx, pagename: str, templatename: str,\n context: Dict, doctree: Node) -> None:\n \"\"\"Set up relative resource paths.\"\"\"\n pathto = context.get('pathto')\n\n # favicon_url\n favicon = context.get('favicon')\n if favicon and not isurl(favicon):\n context['favicon_url'] = pathto('_static/' + favicon, resource=True)\n else:\n context['favicon_url'] = favicon\n\n # logo_url\n logo = context.get('logo')\n if logo and not isurl(logo):\n context['logo_url'] = pathto('_static/' + logo, resource=True)\n else:\n context['logo_url'] = logo", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_validate_html_logo_UNSET._stable_repr_object_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_validate_html_logo_UNSET._stable_repr_object_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1261, "end_line": 1285, "span_ids": ["_stable_repr_object.__repr__", "_stable_repr_object", "validate_html_logo", "validate_html_favicon", "impl:13"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def validate_html_logo(app: Sphinx, config: Config) -> None:\n \"\"\"Check html_logo setting.\"\"\"\n if (config.html_logo and\n not path.isfile(path.join(app.confdir, config.html_logo)) and\n not isurl(config.html_logo)):\n logger.warning(__('logo file %r does not exist'), config.html_logo)\n config.html_logo = None # type: ignore\n\n\ndef validate_html_favicon(app: Sphinx, config: Config) -> None:\n \"\"\"Check html_favicon setting.\"\"\"\n if (config.html_favicon and\n not path.isfile(path.join(app.confdir, config.html_favicon)) and\n not isurl(config.html_favicon)):\n logger.warning(__('favicon file %r does not exist'), config.html_favicon)\n config.html_favicon = None # type: ignore\n\n\nclass _stable_repr_object():\n\n def __repr__(self):\n return '<object>'\n\n\nUNSET = _stable_repr_object()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_None_6_setup.app_connect_config_inite": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_None_6_setup.app_connect_config_inite", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1309, "end_line": 1368, "span_ids": ["impl:15", "setup"], "tokens": 804}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": " # NOQA\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n # builders\n app.add_builder(StandaloneHTMLBuilder)\n\n # config values\n app.add_config_value('html_theme', 'alabaster', 'html')\n app.add_config_value('html_theme_path', [], 'html')\n app.add_config_value('html_theme_options', {}, 'html')\n app.add_config_value('html_title',\n lambda self: _('%s %s documentation') % (self.project, self.release),\n 'html', [str])\n app.add_config_value('html_short_title', lambda self: self.html_title, 'html')\n app.add_config_value('html_style', None, 'html', [str])\n app.add_config_value('html_logo', None, 'html', [str])\n app.add_config_value('html_favicon', None, 'html', [str])\n app.add_config_value('html_css_files', [], 'html')\n app.add_config_value('html_js_files', [], 'html')\n app.add_config_value('html_static_path', [], 'html')\n app.add_config_value('html_extra_path', [], 'html')\n app.add_config_value('html_last_updated_fmt', None, 'html', [str])\n app.add_config_value('html_sidebars', {}, 'html')\n app.add_config_value('html_additional_pages', {}, 'html')\n app.add_config_value('html_domain_indices', True, 'html', [list])\n app.add_config_value('html_add_permalinks', UNSET, 'html')\n app.add_config_value('html_permalinks', True, 'html')\n app.add_config_value('html_permalinks_icon', '\u00b6', 'html')\n app.add_config_value('html_use_index', True, 'html')\n app.add_config_value('html_split_index', False, 'html')\n app.add_config_value('html_copy_source', True, 'html')\n app.add_config_value('html_show_sourcelink', True, 'html')\n app.add_config_value('html_sourcelink_suffix', '.txt', 'html')\n app.add_config_value('html_use_opensearch', '', 'html')\n app.add_config_value('html_file_suffix', None, 'html', [str])\n app.add_config_value('html_link_suffix', None, 'html', [str])\n app.add_config_value('html_show_copyright', True, 'html')\n app.add_config_value('html_show_search_summary', True, 'html')\n app.add_config_value('html_show_sphinx', True, 'html')\n app.add_config_value('html_context', {}, 'html')\n app.add_config_value('html_output_encoding', 'utf-8', 'html')\n app.add_config_value('html_compact_lists', True, 'html')\n app.add_config_value('html_secnumber_suffix', '. ', 'html')\n app.add_config_value('html_search_language', None, 'html', [str])\n app.add_config_value('html_search_options', {}, 'html')\n app.add_config_value('html_search_scorer', '', None)\n app.add_config_value('html_scaled_image_link', True, 'html')\n app.add_config_value('html_baseurl', '', 'html')\n app.add_config_value('html_codeblock_linenos_style', 'inline', 'html', # RemovedInSphinx60Warning # NOQA\n ENUM('table', 'inline'))\n app.add_config_value('html_math_renderer', None, 'env')\n app.add_config_value('html4_writer', False, 'html')\n\n # events\n app.add_event('html-collect-pages')\n app.add_event('html-page-context')\n\n # event handlers\n app.connect('config-inited', convert_html_css_files, priority=800)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup.None_46_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/__init__.py_setup.None_46_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1369, "end_line": 1391, "span_ids": ["setup"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n # ... other code\n app.connect('config-inited', convert_html_js_files, priority=800)\n app.connect('config-inited', migrate_html_add_permalinks, priority=800)\n app.connect('config-inited', validate_html_extra_path, priority=800)\n app.connect('config-inited', validate_html_static_path, priority=800)\n app.connect('config-inited', validate_html_logo, priority=800)\n app.connect('config-inited', validate_html_favicon, priority=800)\n app.connect('builder-inited', validate_math_renderer)\n app.connect('html-page-context', setup_css_tag_helper)\n app.connect('html-page-context', setup_js_tag_helper)\n app.connect('html-page-context', setup_resource_paths)\n\n # load default math renderer\n app.setup_extension('sphinx.ext.mathjax')\n\n # load transforms for HTML builder\n app.setup_extension('sphinx.builders.html.transforms')\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/transforms.py__Transforms_for_HTML_bu_KeyboardTransform.multiwords_keys._caps_lock_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/html/transforms.py__Transforms_for_HTML_bu_KeyboardTransform.multiwords_keys._caps_lock_", "embedding": null, "metadata": {"file_path": "sphinx/builders/html/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 39, "span_ids": ["KeyboardTransform", "docstring", "imports"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Transforms for HTML builder.\"\"\"\n\nimport re\nfrom typing import Any, Dict, List\n\nfrom docutils import nodes\n\nfrom sphinx.application import Sphinx\nfrom sphinx.transforms.post_transforms import SphinxPostTransform\nfrom sphinx.util.nodes import NodeMatcher\n\n\nclass KeyboardTransform(SphinxPostTransform):\n \"\"\"Transform :kbd: role to more detailed form.\n\n Before::\n\n <literal class=\"kbd\">\n Control-x\n\n After::\n\n <literal class=\"kbd compound\">\n <literal class=\"kbd\">\n Control\n -\n <literal class=\"kbd\">\n x\n \"\"\"\n default_priority = 400\n formats = ('html',)\n pattern = re.compile(r'(?<=.)(-|\\+|\\^|\\s+)(?=.)')\n multiwords_keys = (('caps', 'lock'),\n ('page' 'down'),\n ('page', 'up'),\n ('scroll' 'lock'),\n ('num', 'lock'),\n ('sys' 'rq'),\n ('back' 'space'))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py__LaTeX_builder___isort_skip": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py__LaTeX_builder___isort_skip", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["docstring", "imports"], "tokens": 320}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"LaTeX builder.\"\"\"\n\nimport os\nfrom os import path\nfrom typing import Any, Dict, Iterable, List, Tuple, Union\n\nfrom docutils.frontend import OptionParser\nfrom docutils.nodes import Node\n\nimport sphinx.builders.latex.nodes # NOQA # Workaround: import this before writer to avoid ImportError\nfrom sphinx import addnodes, highlighting, package_dir\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.builders.latex.constants import ADDITIONAL_SETTINGS, DEFAULT_SETTINGS, SHORTHANDOFF\nfrom sphinx.builders.latex.theming import Theme, ThemeFactory\nfrom sphinx.builders.latex.util import ExtBabel\nfrom sphinx.config import ENUM, Config\nfrom sphinx.environment.adapters.asset import ImageAdapter\nfrom sphinx.errors import NoUri, SphinxError\nfrom sphinx.locale import _, __\nfrom sphinx.util import logging, progress_message, status_iterator, texescape\nfrom sphinx.util.console import bold, darkgreen # type: ignore\nfrom sphinx.util.docutils import SphinxFileOutput, new_document\nfrom sphinx.util.fileutil import copy_asset_file\nfrom sphinx.util.i18n import format_date\nfrom sphinx.util.nodes import inline_all_toctrees\nfrom sphinx.util.osutil import SEP, make_filename_from_project\nfrom sphinx.util.template import LaTeXRenderer\nfrom sphinx.writers.latex import LaTeXTranslator, LaTeXWriter\n\n# load docutils.nodes after loading sphinx.builders.latex.nodes\nfrom docutils import nodes # isort:skip", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.update_context_LaTeXBuilder.init_babel.if_not_self_babel_is_supp.logger_warning____no_Bab": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.update_context_LaTeXBuilder.init_babel.if_not_self_babel_is_supp.logger_warning____no_Bab", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 188, "end_line": 201, "span_ids": ["LaTeXBuilder.init_babel", "LaTeXBuilder.update_context"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n def update_context(self) -> None:\n \"\"\"Update template variables for .tex file just before writing.\"\"\"\n # Apply extension settings to context\n registry = self.app.registry\n self.context['packages'] = registry.latex_packages\n self.context['packages_after_hyperref'] = registry.latex_packages_after_hyperref\n\n def init_babel(self) -> None:\n self.babel = ExtBabel(self.config.language, not self.context['babel'])\n if not self.babel.is_supported_language():\n # emit warning if specified language is invalid\n # (only emitting, nothing changed to processing)\n logger.warning(__('no Babel option known for language %r'),\n self.config.language)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.finish_LaTeXBuilder.copy_support_files.if_os_name_nt_.copy_asset_file_path_join": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_LaTeXBuilder.finish_LaTeXBuilder.copy_support_files.if_os_name_nt_.copy_asset_file_path_join", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 359, "end_line": 394, "span_ids": ["LaTeXBuilder.copy_support_files", "LaTeXBuilder.finish"], "tokens": 366}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXBuilder(Builder):\n\n def finish(self) -> None:\n self.copy_image_files()\n self.write_message_catalog()\n self.copy_support_files()\n\n if self.config.latex_additional_files:\n self.copy_latex_additional_files()\n\n @progress_message(__('copying TeX support files'))\n def copy_support_files(self) -> None:\n \"\"\"copy TeX support files from texinputs.\"\"\"\n # configure usage of xindy (impacts Makefile and latexmkrc)\n # FIXME: convert this rather to a confval with suitable default\n # according to language ? but would require extra documentation\n xindy_lang_option = XINDY_LANG_OPTIONS.get(self.config.language[:2],\n '-L general -C utf8 ')\n xindy_cyrillic = self.config.language[:2] in XINDY_CYRILLIC_SCRIPTS\n\n context = {\n 'latex_engine': self.config.latex_engine,\n 'xindy_use': self.config.latex_use_xindy,\n 'xindy_lang_option': xindy_lang_option,\n 'xindy_cyrillic': xindy_cyrillic,\n }\n logger.info(bold(__('copying TeX support files...')))\n staticdirname = path.join(package_dir, 'texinputs')\n for filename in os.listdir(staticdirname):\n if not filename.startswith('.'):\n copy_asset_file(path.join(staticdirname, filename),\n self.outdir, context=context)\n\n # use pre-1.6.x Makefile for make latexpdf on Windows\n if os.name == 'nt':\n staticdirname = path.join(package_dir, 'texinputs_win')\n copy_asset_file(path.join(staticdirname, 'Makefile_t'),\n self.outdir, context=context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_validate_config_values_default_latex_documents.return._config_root_doc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/__init__.py_validate_config_values_default_latex_documents.return._config_root_doc_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 437, "end_line": 497, "span_ids": ["validate_latex_theme_options", "default_latex_docclass", "install_packages_for_ja", "default_latex_use_xindy", "validate_config_values", "default_latex_engine", "default_latex_documents"], "tokens": 518}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def validate_config_values(app: Sphinx, config: Config) -> None:\n for key in list(config.latex_elements):\n if key not in DEFAULT_SETTINGS:\n msg = __(\"Unknown configure key: latex_elements[%r], ignored.\")\n logger.warning(msg % (key,))\n config.latex_elements.pop(key)\n\n\ndef validate_latex_theme_options(app: Sphinx, config: Config) -> None:\n for key in list(config.latex_theme_options):\n if key not in Theme.UPDATABLE_KEYS:\n msg = __(\"Unknown theme option: latex_theme_options[%r], ignored.\")\n logger.warning(msg % (key,))\n config.latex_theme_options.pop(key)\n\n\ndef install_packages_for_ja(app: Sphinx) -> None:\n \"\"\"Install packages for Japanese.\"\"\"\n if app.config.language == 'ja' and app.config.latex_engine in ('platex', 'uplatex'):\n app.add_latex_package('pxjahyper', after_hyperref=True)\n\n\ndef default_latex_engine(config: Config) -> str:\n \"\"\" Better default latex_engine settings for specific languages. \"\"\"\n if config.language == 'ja':\n return 'uplatex'\n elif config.language.startswith('zh'):\n return 'xelatex'\n elif config.language == 'el':\n return 'xelatex'\n else:\n return 'pdflatex'\n\n\ndef default_latex_docclass(config: Config) -> Dict[str, str]:\n \"\"\" Better default latex_docclass settings for specific languages. \"\"\"\n if config.language == 'ja':\n if config.latex_engine == 'uplatex':\n return {'manual': 'ujbook',\n 'howto': 'ujreport'}\n else:\n return {'manual': 'jsbook',\n 'howto': 'jreport'}\n else:\n return {}\n\n\ndef default_latex_use_xindy(config: Config) -> bool:\n \"\"\" Better default latex_use_xindy settings for specific engines. \"\"\"\n return config.latex_engine in {'xelatex', 'lualatex'}\n\n\ndef default_latex_documents(config: Config) -> List[Tuple[str, str, str, str, str]]:\n \"\"\" Better default latex_documents settings. \"\"\"\n project = texescape.escape(config.project, config.latex_engine)\n author = texescape.escape(config.author, config.latex_engine)\n return [(config.root_doc,\n make_filename_from_project(config.project) + '.tex',\n texescape.escape_abbr(project),\n texescape.escape_abbr(author),\n config.latex_theme)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/constants.py__consntants_for_LaTeX_b_LUALATEX_DEFAULT_FONTPKG.XELATEX_DEFAULT_FONTPKG": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/constants.py__consntants_for_LaTeX_b_LUALATEX_DEFAULT_FONTPKG.XELATEX_DEFAULT_FONTPKG", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/constants.py", "file_name": "constants.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 64, "span_ids": ["impl:7", "impl", "docstring", "imports"], "tokens": 620}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"consntants for LaTeX builder.\"\"\"\n\nfrom typing import Any, Dict\n\nPDFLATEX_DEFAULT_FONTPKG = r'''\n\\usepackage{tgtermes}\n\\usepackage{tgheros}\n\\renewcommand{\\ttdefault}{txtt}\n'''\n\nPDFLATEX_DEFAULT_FONTSUBSTITUTION = r'''\n\\expandafter\\ifx\\csname T@LGR\\endcsname\\relax\n\\else\n% LGR was declared as font encoding\n \\substitutefont{LGR}{\\rmdefault}{cmr}\n \\substitutefont{LGR}{\\sfdefault}{cmss}\n \\substitutefont{LGR}{\\ttdefault}{cmtt}\n\\fi\n\\expandafter\\ifx\\csname T@X2\\endcsname\\relax\n \\expandafter\\ifx\\csname T@T2A\\endcsname\\relax\n \\else\n % T2A was declared as font encoding\n \\substitutefont{T2A}{\\rmdefault}{cmr}\n \\substitutefont{T2A}{\\sfdefault}{cmss}\n \\substitutefont{T2A}{\\ttdefault}{cmtt}\n \\fi\n\\else\n% X2 was declared as font encoding\n \\substitutefont{X2}{\\rmdefault}{cmr}\n \\substitutefont{X2}{\\sfdefault}{cmss}\n \\substitutefont{X2}{\\ttdefault}{cmtt}\n\\fi\n'''\n\nXELATEX_DEFAULT_FONTPKG = r'''\n\\setmainfont{FreeSerif}[\n Extension = .otf,\n UprightFont = *,\n ItalicFont = *Italic,\n BoldFont = *Bold,\n BoldItalicFont = *BoldItalic\n]\n\\setsansfont{FreeSans}[\n Extension = .otf,\n UprightFont = *,\n ItalicFont = *Oblique,\n BoldFont = *Bold,\n BoldItalicFont = *BoldOblique,\n]\n\\setmonofont{FreeMono}[\n Extension = .otf,\n UprightFont = *,\n ItalicFont = *Oblique,\n BoldFont = *Bold,\n BoldItalicFont = *BoldOblique,\n]\n'''\n\nXELATEX_GREEK_DEFAULT_FONTPKG = (XELATEX_DEFAULT_FONTPKG +\n '\\n\\\\newfontfamily\\\\greekfont{FreeSerif}' +\n '\\n\\\\newfontfamily\\\\greekfontsf{FreeSans}' +\n '\\n\\\\newfontfamily\\\\greekfonttt{FreeMono}')\n\nLUALATEX_DEFAULT_FONTPKG = XELATEX_DEFAULT_FONTPKG", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/constants.py_DEFAULT_SETTINGS_DEFAULT_SETTINGS._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/constants.py_DEFAULT_SETTINGS_DEFAULT_SETTINGS._", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/constants.py", "file_name": "constants.py", "file_type": "text/x-python", "category": "implementation", "start_line": 66, "end_line": 116, "span_ids": ["impl:7"], "tokens": 537}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "DEFAULT_SETTINGS: Dict[str, Any] = {\n 'latex_engine': 'pdflatex',\n 'papersize': '',\n 'pointsize': '',\n 'pxunit': '.75bp',\n 'classoptions': '',\n 'extraclassoptions': '',\n 'maxlistdepth': '',\n 'sphinxpkgoptions': '',\n 'sphinxsetup': '',\n 'fvset': '\\\\fvset{fontsize=auto}',\n 'passoptionstopackages': '',\n 'geometry': '\\\\usepackage{geometry}',\n 'inputenc': '',\n 'utf8extra': '',\n 'cmappkg': '\\\\usepackage{cmap}',\n 'fontenc': '\\\\usepackage[T1]{fontenc}',\n 'amsmath': '\\\\usepackage{amsmath,amssymb,amstext}',\n 'multilingual': '',\n 'babel': '\\\\usepackage{babel}',\n 'polyglossia': '',\n 'fontpkg': PDFLATEX_DEFAULT_FONTPKG,\n 'fontsubstitution': PDFLATEX_DEFAULT_FONTSUBSTITUTION,\n 'substitutefont': '',\n 'textcyrillic': '',\n 'textgreek': '\\\\usepackage{textalpha}',\n 'fncychap': '\\\\usepackage[Bjarne]{fncychap}',\n 'hyperref': ('% Include hyperref last.\\n'\n '\\\\usepackage{hyperref}\\n'\n '% Fix anchor placement for figures with captions.\\n'\n '\\\\usepackage{hypcap}% it must be loaded after hyperref.\\n'\n '% Set up styles of URL: it should be placed after hyperref.\\n'\n '\\\\urlstyle{same}'),\n 'contentsname': '',\n 'extrapackages': '',\n 'preamble': '',\n 'title': '',\n 'release': '',\n 'author': '',\n 'releasename': '',\n 'makeindex': '\\\\makeindex',\n 'shorthandoff': '',\n 'maketitle': '\\\\sphinxmaketitle',\n 'tableofcontents': '\\\\sphinxtableofcontents',\n 'atendofbody': '',\n 'printindex': '\\\\printindex',\n 'transition': '\\n\\n\\\\bigskip\\\\hrule\\\\bigskip\\n\\n',\n 'figure_align': 'htbp',\n 'tocdepth': '',\n 'secnumdepth': '',\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/nodes.py__Additional_nodes_for_L_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/nodes.py__Additional_nodes_for_L_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["impl", "thebibliography", "impl:2", "docstring", "math_reference", "captioned_literal_block", "imports", "footnotetext", "footnotemark"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Additional nodes for LaTeX writer.\"\"\"\n\nfrom docutils import nodes\n\n\nclass captioned_literal_block(nodes.container):\n \"\"\"A node for a container of literal_block having a caption.\"\"\"\n pass\n\n\nclass footnotemark(nodes.Inline, nodes.Referential, nodes.TextElement):\n \"\"\"A node represents ``\\footnotemark``.\"\"\"\n pass\n\n\nclass footnotetext(nodes.General, nodes.BackLinkable, nodes.Element,\n nodes.Labeled, nodes.Targetable):\n \"\"\"A node represents ``\\footnotetext``.\"\"\"\n\n\nclass math_reference(nodes.Inline, nodes.Referential, nodes.TextElement):\n \"\"\"A node for a reference for equation.\"\"\"\n pass\n\n\nclass thebibliography(nodes.container):\n \"\"\"A node for wrapping bibliographies.\"\"\"\n pass\n\n\nHYPERLINK_SUPPORT_NODES = (\n nodes.figure,\n nodes.literal_block,\n nodes.table,\n nodes.section,\n captioned_literal_block,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py__Theming_support_for_La_Theme.update.for_key_in_self_UPDATABLE.if_key_in_config_latex_th.setattr_self_key_value_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/theming.py__Theming_support_for_La_Theme.update.for_key_in_self_UPDATABLE.if_key_in_config_latex_th.setattr_self_key_value_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 40, "span_ids": ["impl", "Theme.update", "docstring", "Theme", "imports"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Theming support for LaTeX builder.\"\"\"\n\nimport configparser\nfrom os import path\nfrom typing import Dict\n\nfrom sphinx.application import Sphinx\nfrom sphinx.config import Config\nfrom sphinx.errors import ThemeError\nfrom sphinx.locale import __\nfrom sphinx.util import logging\n\nlogger = logging.getLogger(__name__)\n\n\nclass Theme:\n \"\"\"A set of LaTeX configurations.\"\"\"\n\n LATEX_ELEMENTS_KEYS = ['papersize', 'pointsize']\n UPDATABLE_KEYS = ['papersize', 'pointsize']\n\n def __init__(self, name: str) -> None:\n self.name = name\n self.docclass = name\n self.wrapperclass = name\n self.papersize = 'letterpaper'\n self.pointsize = '10pt'\n self.toplevel_sectioning = 'chapter'\n\n def update(self, config: Config) -> None:\n \"\"\"Override theme settings by user's configuration.\"\"\"\n for key in self.LATEX_ELEMENTS_KEYS:\n if config.latex_elements.get(key):\n value = config.latex_elements[key]\n setattr(self, key, value)\n\n for key in self.UPDATABLE_KEYS:\n if key in config.latex_theme_options:\n value = config.latex_theme_options[key]\n setattr(self, key, value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py__Transforms_for_LaTeX_b_SubstitutionDefinitionsRemover.run.for_node_in_list_self_doc.node_parent_remove_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py__Transforms_for_LaTeX_b_SubstitutionDefinitionsRemover.run.for_node_in_list_self_doc.node_parent_remove_node_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 41, "span_ids": ["SubstitutionDefinitionsRemover.run", "impl", "FootnoteDocnameUpdater.apply", "docstring", "imports", "FootnoteDocnameUpdater", "SubstitutionDefinitionsRemover"], "tokens": 332}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Transforms for LaTeX builder.\"\"\"\n\nfrom typing import Any, Dict, List, Set, Tuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\nfrom docutils.transforms.references import Substitutions\n\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.builders.latex.nodes import (captioned_literal_block, footnotemark, footnotetext,\n math_reference, thebibliography)\nfrom sphinx.domains.citation import CitationDomain\nfrom sphinx.transforms import SphinxTransform\nfrom sphinx.transforms.post_transforms import SphinxPostTransform\nfrom sphinx.util.nodes import NodeMatcher\n\nURI_SCHEMES = ('mailto:', 'http:', 'https:', 'ftp:')\n\n\nclass FootnoteDocnameUpdater(SphinxTransform):\n \"\"\"Add docname to footnote and footnote_reference nodes.\"\"\"\n default_priority = 700\n TARGET_NODES = (nodes.footnote, nodes.footnote_reference)\n\n def apply(self, **kwargs: Any) -> None:\n matcher = NodeMatcher(*self.TARGET_NODES)\n for node in self.document.findall(matcher): # type: Element\n node['docname'] = self.env.docname\n\n\nclass SubstitutionDefinitionsRemover(SphinxPostTransform):\n \"\"\"Remove ``substitution_definition node from doctrees.\"\"\"\n\n # should be invoked after Substitutions process\n default_priority = Substitutions.default_priority + 1\n formats = ('latex',)\n\n def run(self, **kwargs: Any) -> None:\n for node in list(self.document.findall(nodes.substitution_definition)):\n node.parent.remove(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform.expand_show_urls_ShowUrlsTransform.expand_show_urls.for_node_in_list_self_doc.if_uri_startswith_URI_SCH.if_node_astext_uri_.if_show_urls_footnote.else_all_other_true_v.node_parent_insert_index_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_ShowUrlsTransform.expand_show_urls_ShowUrlsTransform.expand_show_urls.for_node_in_list_self_doc.if_uri_startswith_URI_SCH.if_node_astext_uri_.if_show_urls_footnote.else_all_other_true_v.node_parent_insert_index_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 71, "end_line": 92, "span_ids": ["ShowUrlsTransform.expand_show_urls"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ShowUrlsTransform(SphinxPostTransform):\n\n def expand_show_urls(self) -> None:\n show_urls = self.config.latex_show_urls\n if show_urls is False or show_urls == 'no':\n return\n\n for node in list(self.document.findall(nodes.reference)):\n uri = node.get('refuri', '')\n if uri.startswith(URI_SCHEMES):\n if uri.startswith('mailto:'):\n uri = uri[7:]\n if node.astext() != uri:\n index = node.parent.index(node)\n docname = self.get_docname_for_node(node)\n if show_urls == 'footnote':\n fn, fnref = self.create_footnote(uri, docname)\n node.parent.insert(index + 1, fn)\n node.parent.insert(index + 2, fnref)\n\n self.expanded = True\n else: # all other true values (b/w compat)\n textnode = nodes.Text(\" (%s)\" % uri)\n node.parent.insert(index + 1, textnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_IndexInSectionTitleTransform_IndexInSectionTitleTransform.run.for_node_in_list_self_doc.if_isinstance_node_parent.for_i_index_in_enumerate.node_parent_insert_i_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/transforms.py_IndexInSectionTitleTransform_IndexInSectionTitleTransform.run.for_node_in_list_self_doc.if_isinstance_node_parent.for_i_index_in_enumerate.node_parent_insert_i_1_", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/transforms.py", "file_name": "transforms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 570, "end_line": 605, "span_ids": ["IndexInSectionTitleTransform", "IndexInSectionTitleTransform.run"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexInSectionTitleTransform(SphinxPostTransform):\n \"\"\"Move index nodes in section title to outside of the title.\n\n LaTeX index macro is not compatible with some handling of section titles\n such as uppercasing done on LaTeX side (cf. fncychap handling of ``\\\\chapter``).\n Moving the index node to after the title node fixes that.\n\n Before::\n\n <section>\n <title>\n blah blah <index entries=[...]/>blah\n <paragraph>\n blah blah blah\n ...\n\n After::\n\n <section>\n <title>\n blah blah blah\n <index entries=[...]/>\n <paragraph>\n blah blah blah\n ...\n \"\"\"\n default_priority = 400\n formats = ('latex',)\n\n def run(self, **kwargs: Any) -> None:\n for node in list(self.document.findall(nodes.title)):\n if isinstance(node.parent, nodes.section):\n for i, index in enumerate(node.findall(addnodes.index)):\n # move the index node next to the section title\n node.remove(index)\n node.parent.insert(i + 1, index)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/util.py__Utilities_for_LaTeX_bu_ExtBabel.is_supported_language.return.self_supported": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/latex/util.py__Utilities_for_LaTeX_bu_ExtBabel.is_supported_language.return.self_supported", "embedding": null, "metadata": {"file_path": "sphinx/builders/latex/util.py", "file_name": "util.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["ExtBabel.uses_cyrillic", "ExtBabel", "docstring", "imports", "ExtBabel.is_supported_language"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utilities for LaTeX builder.\"\"\"\n\nfrom typing import Optional\n\nfrom docutils.writers.latex2e import Babel\n\n\nclass ExtBabel(Babel):\n cyrillic_languages = ('bulgarian', 'kazakh', 'mongolian', 'russian', 'ukrainian')\n\n def __init__(self, language_code: str, use_polyglossia: bool = False) -> None:\n self.language_code = language_code\n self.use_polyglossia = use_polyglossia\n self.supported = True\n super().__init__(language_code)\n\n def uses_cyrillic(self) -> bool:\n return self.language in self.cyrillic_languages\n\n def is_supported_language(self) -> bool:\n return self.supported", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py__The_CheckExternalLinks_AnchorCheckParser.handle_starttag.for_key_value_in_attrs_.if_key_in_id_name_.break": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py__The_CheckExternalLinks_AnchorCheckParser.handle_starttag.for_key_value_in_attrs_.if_key_in_id_name_.break", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 84, "span_ids": ["impl", "CheckResult", "AnchorCheckParser", "AnchorCheckParser.handle_starttag", "impl:6", "docstring", "CheckRequest", "imports", "Hyperlink", "RateLimit", "impl:5"], "tokens": 541}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The CheckExternalLinksBuilder class.\"\"\"\n\nimport json\nimport re\nimport socket\nimport time\nfrom datetime import datetime, timezone\nfrom email.utils import parsedate_to_datetime\nfrom html.parser import HTMLParser\nfrom os import path\nfrom queue import PriorityQueue, Queue\nfrom threading import Thread\nfrom typing import Any, Dict, Generator, List, NamedTuple, Optional, Tuple, Union, cast\nfrom urllib.parse import unquote, urlparse, urlunparse\n\nfrom docutils import nodes\nfrom requests import Response\nfrom requests.exceptions import ConnectionError, HTTPError, TooManyRedirects\n\nfrom sphinx.application import Sphinx\nfrom sphinx.builders.dummy import DummyBuilder\nfrom sphinx.config import Config\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.locale import __\nfrom sphinx.transforms.post_transforms import SphinxPostTransform\nfrom sphinx.util import encode_uri, logging, requests\nfrom sphinx.util.console import darkgray, darkgreen, purple, red, turquoise # type: ignore\nfrom sphinx.util.nodes import get_node_line\n\nlogger = logging.getLogger(__name__)\n\nuri_re = re.compile('([a-z]+:)?//') # matches to foo:// and // (a protocol relative URL)\n\n\nclass Hyperlink(NamedTuple):\n uri: str\n docname: str\n lineno: Optional[int]\n\n\nclass CheckRequest(NamedTuple):\n next_check: float\n hyperlink: Optional[Hyperlink]\n\n\nclass CheckResult(NamedTuple):\n uri: str\n docname: str\n lineno: int\n status: str\n message: str\n code: int\n\n\nclass RateLimit(NamedTuple):\n delay: float\n next_check: float\n\n\n# Tuple is old styled CheckRequest\nCheckRequestType = Union[CheckRequest, Tuple[float, str, str, int]]\n\nDEFAULT_REQUEST_HEADERS = {\n 'Accept': 'text/html,application/xhtml+xml;q=0.9,*/*;q=0.8',\n}\nCHECK_IMMEDIATELY = 0\nQUEUE_POLL_SECS = 1\nDEFAULT_DELAY = 60.0\n\n\nclass AnchorCheckParser(HTMLParser):\n \"\"\"Specialized HTML parser that looks for a specific anchor.\"\"\"\n\n def __init__(self, search_anchor: str) -> None:\n super().__init__()\n\n self.search_anchor = search_anchor\n self.found = False\n\n def handle_starttag(self, tag: Any, attrs: Any) -> None:\n for key, value in attrs:\n if key in ('id', 'name') and value == self.search_anchor:\n self.found = True\n break", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_CheckExternalLinksBuilder_CheckExternalLinksBuilder.process_result.if_result_status_igno.else_.raise_ValueError_Unknown": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_CheckExternalLinksBuilder_CheckExternalLinksBuilder.process_result.if_result_status_igno.else_.raise_ValueError_Unknown", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 105, "end_line": 173, "span_ids": ["CheckExternalLinksBuilder.process_result", "CheckExternalLinksBuilder.init", "CheckExternalLinksBuilder"], "tokens": 686}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CheckExternalLinksBuilder(DummyBuilder):\n \"\"\"\n Checks for broken external links.\n \"\"\"\n name = 'linkcheck'\n epilog = __('Look for any errors in the above output or in '\n '%(outdir)s/output.txt')\n\n def init(self) -> None:\n self.broken_hyperlinks = 0\n self.hyperlinks: Dict[str, Hyperlink] = {}\n # set a timeout for non-responding servers\n socket.setdefaulttimeout(5.0)\n\n def process_result(self, result: CheckResult) -> None:\n filename = self.env.doc2path(result.docname, None)\n\n linkstat = dict(filename=filename, lineno=result.lineno,\n status=result.status, code=result.code, uri=result.uri,\n info=result.message)\n self.write_linkstat(linkstat)\n\n if result.status == 'unchecked':\n return\n if result.status == 'working' and result.message == 'old':\n return\n if result.lineno:\n logger.info('(%16s: line %4d) ', result.docname, result.lineno, nonl=True)\n if result.status == 'ignored':\n if result.message:\n logger.info(darkgray('-ignored- ') + result.uri + ': ' + result.message)\n else:\n logger.info(darkgray('-ignored- ') + result.uri)\n elif result.status == 'local':\n logger.info(darkgray('-local- ') + result.uri)\n self.write_entry('local', result.docname, filename, result.lineno, result.uri)\n elif result.status == 'working':\n logger.info(darkgreen('ok ') + result.uri + result.message)\n elif result.status == 'broken':\n if self.app.quiet or self.app.warningiserror:\n logger.warning(__('broken link: %s (%s)'), result.uri, result.message,\n location=(result.docname, result.lineno))\n else:\n logger.info(red('broken ') + result.uri + red(' - ' + result.message))\n self.write_entry('broken', result.docname, filename, result.lineno,\n result.uri + ': ' + result.message)\n self.broken_hyperlinks += 1\n elif result.status == 'redirected':\n try:\n text, color = {\n 301: ('permanently', purple),\n 302: ('with Found', purple),\n 303: ('with See Other', purple),\n 307: ('temporarily', turquoise),\n 308: ('permanently', purple),\n }[result.code]\n except KeyError:\n text, color = ('with unknown code', purple)\n linkstat['text'] = text\n if self.config.linkcheck_allowed_redirects:\n logger.warning('redirect ' + result.uri + ' - ' + text + ' to ' +\n result.message, location=(result.docname, result.lineno))\n else:\n logger.info(color('redirect ') + result.uri +\n color(' - ' + text + ' to ' + result.message))\n self.write_entry('redirected ' + text, result.docname, filename,\n result.lineno, result.uri + ' to ' + result.message)\n else:\n raise ValueError(\"Unknown status %s.\" % result.status)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_CheckExternalLinksBuilder.write_entry_CheckExternalLinksBuilder.finish.if_self_broken_hyperlinks.self.app.statuscode.1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_CheckExternalLinksBuilder.write_entry_CheckExternalLinksBuilder.finish.if_self_broken_hyperlinks.self.app.statuscode.1", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 175, "end_line": 193, "span_ids": ["CheckExternalLinksBuilder.write_entry", "CheckExternalLinksBuilder.write_linkstat", "CheckExternalLinksBuilder.finish"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CheckExternalLinksBuilder(DummyBuilder):\n\n def write_entry(self, what: str, docname: str, filename: str, line: int,\n uri: str) -> None:\n self.txt_outfile.write(\"%s:%s: [%s] %s\\n\" % (filename, line, what, uri))\n\n def write_linkstat(self, data: dict) -> None:\n self.json_outfile.write(json.dumps(data))\n self.json_outfile.write('\\n')\n\n def finish(self) -> None:\n checker = HyperlinkAvailabilityChecker(self.env, self.config)\n logger.info('')\n\n with open(path.join(self.outdir, 'output.txt'), 'w') as self.txt_outfile,\\\n open(path.join(self.outdir, 'output.json'), 'w') as self.json_outfile:\n for result in checker.check(self.hyperlinks):\n self.process_result(result)\n\n if self.broken_hyperlinks:\n self.app.statuscode = 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityChecker_HyperlinkAvailabilityChecker.shutdown_threads.for__worker_in_self_worke.self_wqueue_put_CheckRequ": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityChecker_HyperlinkAvailabilityChecker.shutdown_threads.for__worker_in_self_worke.self_wqueue_put_CheckRequ", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 196, "end_line": 218, "span_ids": ["HyperlinkAvailabilityChecker.shutdown_threads", "HyperlinkAvailabilityChecker", "HyperlinkAvailabilityChecker.invoke_threads"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HyperlinkAvailabilityChecker:\n def __init__(self, env: BuildEnvironment, config: Config) -> None:\n self.config = config\n self.env = env\n self.rate_limits: Dict[str, RateLimit] = {}\n self.rqueue: Queue = Queue()\n self.workers: List[Thread] = []\n self.wqueue: PriorityQueue = PriorityQueue()\n\n self.to_ignore = [re.compile(x) for x in self.config.linkcheck_ignore]\n\n def invoke_threads(self) -> None:\n for _i in range(self.config.linkcheck_workers):\n thread = HyperlinkAvailabilityCheckWorker(self.env, self.config,\n self.rqueue, self.wqueue,\n self.rate_limits)\n thread.start()\n self.workers.append(thread)\n\n def shutdown_threads(self) -> None:\n self.wqueue.join()\n for _worker in self.workers:\n self.wqueue.put(CheckRequest(CHECK_IMMEDIATELY, None), False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityChecker.check_HyperlinkAvailabilityChecker.is_ignored_uri.return.any_pat_match_uri_for_pa": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityChecker.check_HyperlinkAvailabilityChecker.is_ignored_uri.return.any_pat_match_uri_for_pa", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 220, "end_line": 240, "span_ids": ["HyperlinkAvailabilityChecker.check", "HyperlinkAvailabilityChecker.is_ignored_uri"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HyperlinkAvailabilityChecker:\n\n def check(self, hyperlinks: Dict[str, Hyperlink]) -> Generator[CheckResult, None, None]:\n self.invoke_threads()\n\n total_links = 0\n for hyperlink in hyperlinks.values():\n if self.is_ignored_uri(hyperlink.uri):\n yield CheckResult(hyperlink.uri, hyperlink.docname, hyperlink.lineno,\n 'ignored', '', 0)\n else:\n self.wqueue.put(CheckRequest(CHECK_IMMEDIATELY, hyperlink), False)\n total_links += 1\n\n done = 0\n while done < total_links:\n yield self.rqueue.get()\n done += 1\n\n self.shutdown_threads()\n\n def is_ignored_uri(self, uri: str) -> bool:\n return any(pat.match(uri) for pat in self.to_ignore)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker_HyperlinkAvailabilityCheckWorker.__init__.super___init___daemon_T": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker_HyperlinkAvailabilityCheckWorker.__init__.super___init___daemon_T", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 243, "end_line": 261, "span_ids": ["HyperlinkAvailabilityCheckWorker"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HyperlinkAvailabilityCheckWorker(Thread):\n \"\"\"A worker class for checking the availability of hyperlinks.\"\"\"\n\n def __init__(self, env: BuildEnvironment, config: Config, rqueue: Queue,\n wqueue: Queue, rate_limits: Dict[str, RateLimit]) -> None:\n self.config = config\n self.env = env\n self.rate_limits = rate_limits\n self.rqueue = rqueue\n self.wqueue = wqueue\n\n self.anchors_ignore = [re.compile(x)\n for x in self.config.linkcheck_anchors_ignore]\n self.documents_exclude = [re.compile(doc)\n for doc in self.config.linkcheck_exclude_documents]\n self.auth = [(re.compile(pattern), auth_info) for pattern, auth_info\n in self.config.linkcheck_auth]\n\n super().__init__(daemon=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run_HyperlinkAvailabilityCheckWorker.run.get_request_headers.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run_HyperlinkAvailabilityCheckWorker.run.get_request_headers.return._", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 263, "end_line": 281, "span_ids": ["HyperlinkAvailabilityCheckWorker.run"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HyperlinkAvailabilityCheckWorker(Thread):\n\n def run(self) -> None:\n kwargs = {}\n if self.config.linkcheck_timeout:\n kwargs['timeout'] = self.config.linkcheck_timeout\n\n def get_request_headers() -> Dict:\n url = urlparse(uri)\n candidates = [\"%s://%s\" % (url.scheme, url.netloc),\n \"%s://%s/\" % (url.scheme, url.netloc),\n uri,\n \"*\"]\n\n for u in candidates:\n if u in self.config.linkcheck_request_headers:\n headers = dict(DEFAULT_REQUEST_HEADERS)\n headers.update(self.config.linkcheck_request_headers[u])\n return headers\n\n return {}\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run.check_uri_HyperlinkAvailabilityCheckWorker.run.check_uri.if_response_url_rstrip_.else_.if_allowed_redirect_req_u.else_.return._redirected_new_url_0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run.check_uri_HyperlinkAvailabilityCheckWorker.run.check_uri.if_response_url_rstrip_.else_.if_allowed_redirect_req_u.else_.return._redirected_new_url_0", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 283, "end_line": 377, "span_ids": ["HyperlinkAvailabilityCheckWorker.run"], "tokens": 763}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HyperlinkAvailabilityCheckWorker(Thread):\n\n def run(self) -> None:\n # ... other code\n\n def check_uri() -> Tuple[str, str, int]:\n # split off anchor\n if '#' in uri:\n req_url, anchor = uri.split('#', 1)\n for rex in self.anchors_ignore:\n if rex.match(anchor):\n anchor = None\n break\n else:\n req_url = uri\n anchor = None\n\n # handle non-ASCII URIs\n try:\n req_url.encode('ascii')\n except UnicodeError:\n req_url = encode_uri(req_url)\n\n # Get auth info, if any\n for pattern, auth_info in self.auth:\n if pattern.match(uri):\n break\n else:\n auth_info = None\n\n # update request headers for the URL\n kwargs['headers'] = get_request_headers()\n\n try:\n if anchor and self.config.linkcheck_anchors:\n # Read the whole document and see if #anchor exists\n response = requests.get(req_url, stream=True, config=self.config,\n auth=auth_info, **kwargs)\n response.raise_for_status()\n found = check_anchor(response, unquote(anchor))\n\n if not found:\n raise Exception(__(\"Anchor '%s' not found\") % anchor)\n else:\n try:\n # try a HEAD request first, which should be easier on\n # the server and the network\n response = requests.head(req_url, allow_redirects=True,\n config=self.config, auth=auth_info,\n **kwargs)\n response.raise_for_status()\n # Servers drop the connection on HEAD requests, causing\n # ConnectionError.\n except (ConnectionError, HTTPError, TooManyRedirects) as err:\n if isinstance(err, HTTPError) and err.response.status_code == 429:\n raise\n # retry with GET request if that fails, some servers\n # don't like HEAD requests.\n response = requests.get(req_url, stream=True,\n config=self.config,\n auth=auth_info, **kwargs)\n response.raise_for_status()\n except HTTPError as err:\n if err.response.status_code == 401:\n # We'll take \"Unauthorized\" as working.\n return 'working', ' - unauthorized', 0\n elif err.response.status_code == 429:\n next_check = self.limit_rate(err.response)\n if next_check is not None:\n self.wqueue.put(CheckRequest(next_check, hyperlink), False)\n return 'rate-limited', '', 0\n return 'broken', str(err), 0\n elif err.response.status_code == 503:\n # We'll take \"Service Unavailable\" as ignored.\n return 'ignored', str(err), 0\n else:\n return 'broken', str(err), 0\n except Exception as err:\n return 'broken', str(err), 0\n else:\n netloc = urlparse(req_url).netloc\n try:\n del self.rate_limits[netloc]\n except KeyError:\n pass\n if response.url.rstrip('/') == req_url.rstrip('/'):\n return 'working', '', 0\n else:\n new_url = response.url\n if anchor:\n new_url += '#' + anchor\n\n if allowed_redirect(req_url, new_url):\n return 'working', '', 0\n elif response.history:\n # history contains any redirects, get last\n code = response.history[-1].status_code\n return 'redirected', new_url, code\n else:\n return 'redirected', new_url, 0\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run.allowed_redirect_HyperlinkAvailabilityCheckWorker.run.check.return._status_info_code_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run.allowed_redirect_HyperlinkAvailabilityCheckWorker.run.check.return._status_info_code_", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 379, "end_line": 416, "span_ids": ["HyperlinkAvailabilityCheckWorker.run"], "tokens": 334}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HyperlinkAvailabilityCheckWorker(Thread):\n\n def run(self) -> None:\n # ... other code\n\n def allowed_redirect(url: str, new_url: str) -> bool:\n for from_url, to_url in self.config.linkcheck_allowed_redirects.items():\n if from_url.match(url) and to_url.match(new_url):\n return True\n\n return False\n\n def check(docname: str) -> Tuple[str, str, int]:\n # check for various conditions without bothering the network\n\n for doc_matcher in self.documents_exclude:\n if doc_matcher.match(docname):\n info = (\n f'{docname} matched {doc_matcher.pattern} from '\n 'linkcheck_exclude_documents'\n )\n return 'ignored', info, 0\n\n if len(uri) == 0 or uri.startswith(('#', 'mailto:', 'tel:')):\n return 'unchecked', '', 0\n elif not uri.startswith(('http:', 'https:')):\n if uri_re.match(uri):\n # non supported URI schemes (ex. ftp)\n return 'unchecked', '', 0\n else:\n srcdir = path.dirname(self.env.doc2path(docname))\n if path.exists(path.join(srcdir, uri)):\n return 'working', '', 0\n else:\n return 'broken', '', 0\n\n # need to actually check the URI\n for _ in range(self.config.linkcheck_retries):\n status, info, code = check_uri()\n if status != \"broken\":\n break\n\n return (status, info, code)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run.while_True__HyperlinkAvailabilityCheckWorker.run.while_True_.self_wqueue_task_done_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.run.while_True__HyperlinkAvailabilityCheckWorker.run.while_True_.self_wqueue_task_done_", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 418, "end_line": 453, "span_ids": ["HyperlinkAvailabilityCheckWorker.run"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HyperlinkAvailabilityCheckWorker(Thread):\n\n def run(self) -> None:\n # ... other code\n\n while True:\n check_request = self.wqueue.get()\n try:\n next_check, hyperlink = check_request\n if hyperlink is None:\n break\n\n uri, docname, lineno = hyperlink\n except ValueError:\n # old styled check_request (will be deprecated in Sphinx-5.0)\n next_check, uri, docname, lineno = check_request\n\n if uri is None:\n break\n netloc = urlparse(uri).netloc\n try:\n # Refresh rate limit.\n # When there are many links in the queue, workers are all stuck waiting\n # for responses, but the builder keeps queuing. Links in the queue may\n # have been queued before rate limits were discovered.\n next_check = self.rate_limits[netloc].next_check\n except KeyError:\n pass\n if next_check > time.time():\n # Sleep before putting message back in the queue to avoid\n # waking up other threads.\n time.sleep(QUEUE_POLL_SECS)\n self.wqueue.put(CheckRequest(next_check, hyperlink), False)\n self.wqueue.task_done()\n continue\n status, info, code = check(docname)\n if status == 'rate-limited':\n logger.info(darkgray('-rate limited- ') + uri + darkgray(' | sleeping...'))\n else:\n self.rqueue.put(CheckResult(uri, docname, lineno, status, info, code))\n self.wqueue.task_done()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.limit_rate_HyperlinkAvailabilityCheckWorker.limit_rate.return.next_check": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_HyperlinkAvailabilityCheckWorker.limit_rate_HyperlinkAvailabilityCheckWorker.limit_rate.return.next_check", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 455, "end_line": 491, "span_ids": ["HyperlinkAvailabilityCheckWorker.limit_rate"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HyperlinkAvailabilityCheckWorker(Thread):\n\n def limit_rate(self, response: Response) -> Optional[float]:\n next_check = None\n retry_after = response.headers.get(\"Retry-After\")\n if retry_after:\n try:\n # Integer: time to wait before next attempt.\n delay = float(retry_after)\n except ValueError:\n try:\n # An HTTP-date: time of next attempt.\n until = parsedate_to_datetime(retry_after)\n except (TypeError, ValueError):\n # TypeError: Invalid date format.\n # ValueError: Invalid date, e.g. Oct 52th.\n pass\n else:\n next_check = datetime.timestamp(until)\n delay = (until - datetime.now(timezone.utc)).total_seconds()\n else:\n next_check = time.time() + delay\n netloc = urlparse(response.url).netloc\n if next_check is None:\n max_delay = self.config.linkcheck_rate_limit_timeout\n try:\n rate_limit = self.rate_limits[netloc]\n except KeyError:\n delay = DEFAULT_DELAY\n else:\n last_wait_time = rate_limit.delay\n delay = 2.0 * last_wait_time\n if delay > max_delay and last_wait_time < max_delay:\n delay = max_delay\n if delay > max_delay:\n return None\n next_check = time.time() + delay\n self.rate_limits[netloc] = RateLimit(delay, next_check)\n return next_check", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_rewrite_github_anchor_rewrite_github_anchor.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_rewrite_github_anchor_rewrite_github_anchor.return.None", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 530, "end_line": 542, "span_ids": ["rewrite_github_anchor"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def rewrite_github_anchor(app: Sphinx, uri: str) -> Optional[str]:\n \"\"\"Rewrite anchor name of the hyperlink to github.com\n\n The hyperlink anchors in github.com are dynamically generated. This rewrites\n them before checking and makes them comparable.\n \"\"\"\n parsed = urlparse(uri)\n if parsed.hostname == \"github.com\" and parsed.fragment:\n prefixed = parsed.fragment.startswith('user-content-')\n if not prefixed:\n fragment = f'user-content-{parsed.fragment}'\n return urlunparse(parsed._replace(fragment=fragment))\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_compile_linkcheck_allowed_redirects_compile_linkcheck_allowed_redirects.for_url_pattern_in_list_.try_.finally_.app_config_linkcheck_allo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/linkcheck.py_compile_linkcheck_allowed_redirects_compile_linkcheck_allowed_redirects.for_url_pattern_in_list_.try_.finally_.app_config_linkcheck_allo", "embedding": null, "metadata": {"file_path": "sphinx/builders/linkcheck.py", "file_name": "linkcheck.py", "file_type": "text/x-python", "category": "implementation", "start_line": 545, "end_line": 555, "span_ids": ["compile_linkcheck_allowed_redirects"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def compile_linkcheck_allowed_redirects(app: Sphinx, config: Config) -> None:\n \"\"\"Compile patterns in linkcheck_allowed_redirects to the regexp objects.\"\"\"\n for url, pattern in list(app.config.linkcheck_allowed_redirects.items()):\n try:\n app.config.linkcheck_allowed_redirects[re.compile(url)] = re.compile(pattern)\n except re.error as exc:\n logger.warning(__('Failed to compile regex in linkcheck_allowed_redirects: %r %s'),\n exc.pattern, exc.msg)\n finally:\n # Remove the original regexp-string\n app.config.linkcheck_allowed_redirects.pop(url)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py__Manual_pages_builder__logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py__Manual_pages_builder__logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/builders/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["impl", "docstring", "imports"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manual pages builder.\"\"\"\n\nfrom os import path\nfrom typing import Any, Dict, List, Set, Tuple, Union\n\nfrom docutils.frontend import OptionParser\nfrom docutils.io import FileOutput\n\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.config import Config\nfrom sphinx.locale import __\nfrom sphinx.util import logging, progress_message\nfrom sphinx.util.console import darkgreen # type: ignore\nfrom sphinx.util.nodes import inline_all_toctrees\nfrom sphinx.util.osutil import ensuredir, make_filename_from_project\nfrom sphinx.writers.manpage import ManualPageTranslator, ManualPageWriter\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py_ManualPageBuilder_ManualPageBuilder.get_target_uri.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/manpage.py_ManualPageBuilder_ManualPageBuilder.get_target_uri.return._", "embedding": null, "metadata": {"file_path": "sphinx/builders/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 23, "end_line": 43, "span_ids": ["ManualPageBuilder", "ManualPageBuilder.init", "ManualPageBuilder.get_outdated_docs", "ManualPageBuilder.get_target_uri"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ManualPageBuilder(Builder):\n \"\"\"\n Builds groff output in manual page format.\n \"\"\"\n name = 'man'\n format = 'man'\n epilog = __('The manual pages are in %(outdir)s.')\n\n default_translator_class = ManualPageTranslator\n supported_image_types: List[str] = []\n\n def init(self) -> None:\n if not self.config.man_pages:\n logger.warning(__('no \"man_pages\" config value found; no manual pages '\n 'will be written'))\n\n def get_outdated_docs(self) -> Union[str, List[str]]:\n return 'all manpages' # for now\n\n def get_target_uri(self, docname: str, typ: str = None) -> str:\n return ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py__Single_HTML_builders__logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py__Single_HTML_builders__logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/builders/singlehtml.py", "file_name": "singlehtml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["impl", "docstring", "imports"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Single HTML builders.\"\"\"\n\nfrom os import path\nfrom typing import Any, Dict, List, Tuple, Union\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\n\nfrom sphinx.application import Sphinx\nfrom sphinx.builders.html import StandaloneHTMLBuilder\nfrom sphinx.environment.adapters.toctree import TocTree\nfrom sphinx.locale import __\nfrom sphinx.util import logging, progress_message\nfrom sphinx.util.console import darkgreen # type: ignore\nfrom sphinx.util.nodes import inline_all_toctrees\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.fix_refuris_SingleFileHTMLBuilder.fix_refuris.for_refnode_in_tree_finda.None_2.refnode_refuri_fname": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.fix_refuris_SingleFileHTMLBuilder.fix_refuris.for_refnode_in_tree_finda.None_2.refnode_refuri_fname", "embedding": null, "metadata": {"file_path": "sphinx/builders/singlehtml.py", "file_name": "singlehtml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 46, "end_line": 58, "span_ids": ["SingleFileHTMLBuilder.fix_refuris"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleFileHTMLBuilder(StandaloneHTMLBuilder):\n\n def fix_refuris(self, tree: Node) -> None:\n # fix refuris with double anchor\n fname = self.config.root_doc + self.out_suffix\n for refnode in tree.findall(nodes.reference):\n if 'refuri' not in refnode:\n continue\n refuri = refnode['refuri']\n hashindex = refuri.find('#')\n if hashindex < 0:\n continue\n hashindex = refuri.find('#', hashindex + 1)\n if hashindex >= 0:\n refnode['refuri'] = fname + refuri[hashindex:]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.assemble_toc_secnumbers_SingleFileHTMLBuilder.assemble_toc_secnumbers.return._self_config_root_doc_ne": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.assemble_toc_secnumbers_SingleFileHTMLBuilder.assemble_toc_secnumbers.return._self_config_root_doc_ne", "embedding": null, "metadata": {"file_path": "sphinx/builders/singlehtml.py", "file_name": "singlehtml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 77, "end_line": 93, "span_ids": ["SingleFileHTMLBuilder.assemble_toc_secnumbers"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleFileHTMLBuilder(StandaloneHTMLBuilder):\n\n def assemble_toc_secnumbers(self) -> Dict[str, Dict[str, Tuple[int, ...]]]:\n # Assemble toc_secnumbers to resolve section numbers on SingleHTML.\n # Merge all secnumbers to single secnumber.\n #\n # Note: current Sphinx has refid confliction in singlehtml mode.\n # To avoid the problem, it replaces key of secnumbers to\n # tuple of docname and refid.\n #\n # There are related codes in inline_all_toctres() and\n # HTMLTranslter#add_secnumber().\n new_secnumbers: Dict[str, Tuple[int, ...]] = {}\n for docname, secnums in self.env.toc_secnumbers.items():\n for id, secnum in secnums.items():\n alias = \"%s/%s\" % (docname, id)\n new_secnumbers[alias] = secnum\n\n return {self.config.root_doc: new_secnumbers}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.assemble_toc_fignumbers_SingleFileHTMLBuilder.assemble_toc_fignumbers.return._self_config_root_doc_ne": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.assemble_toc_fignumbers_SingleFileHTMLBuilder.assemble_toc_fignumbers.return._self_config_root_doc_ne", "embedding": null, "metadata": {"file_path": "sphinx/builders/singlehtml.py", "file_name": "singlehtml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 95, "end_line": 114, "span_ids": ["SingleFileHTMLBuilder.assemble_toc_fignumbers"], "tokens": 297}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleFileHTMLBuilder(StandaloneHTMLBuilder):\n\n def assemble_toc_fignumbers(self) -> Dict[str, Dict[str, Dict[str, Tuple[int, ...]]]]:\n # Assemble toc_fignumbers to resolve figure numbers on SingleHTML.\n # Merge all fignumbers to single fignumber.\n #\n # Note: current Sphinx has refid confliction in singlehtml mode.\n # To avoid the problem, it replaces key of secnumbers to\n # tuple of docname and refid.\n #\n # There are related codes in inline_all_toctres() and\n # HTMLTranslter#add_fignumber().\n new_fignumbers: Dict[str, Dict[str, Tuple[int, ...]]] = {}\n # {'foo': {'figure': {'id2': (2,), 'id1': (1,)}}, 'bar': {'figure': {'id1': (3,)}}}\n for docname, fignumlist in self.env.toc_fignumbers.items():\n for figtype, fignums in fignumlist.items():\n alias = \"%s/%s\" % (docname, figtype)\n new_fignumbers.setdefault(alias, {})\n for id, fignum in fignums.items():\n new_fignumbers[alias][id] = fignum\n\n return {self.config.root_doc: new_fignumbers}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.finish_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/singlehtml.py_SingleFileHTMLBuilder.finish_", "embedding": null, "metadata": {"file_path": "sphinx/builders/singlehtml.py", "file_name": "singlehtml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 157, "end_line": 192, "span_ids": ["SingleFileHTMLBuilder.write_additional_files", "SingleFileHTMLBuilder.finish", "setup"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleFileHTMLBuilder(StandaloneHTMLBuilder):\n\n def finish(self) -> None:\n self.write_additional_files()\n self.copy_image_files()\n self.copy_download_files()\n self.copy_static_files()\n self.copy_extra_files()\n self.write_buildinfo()\n self.dump_inventory()\n\n @progress_message(__('writing additional files'))\n def write_additional_files(self) -> None:\n # no indices or search pages are supported\n\n # additional pages from conf.py\n for pagename, template in self.config.html_additional_pages.items():\n logger.info(' ' + pagename, nonl=True)\n self.handle_page(pagename, {}, template)\n\n if self.config.html_use_opensearch:\n logger.info(' opensearch', nonl=True)\n fn = path.join(self.outdir, '_static', 'opensearch.xml')\n self.handle_page('opensearch', {}, 'opensearch.xml', outfilename=fn)\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.setup_extension('sphinx.builders.html')\n\n app.add_builder(SingleFileHTMLBuilder)\n app.add_config_value('singlehtml_sidebars', lambda self: self.html_sidebars, 'html')\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py__Texinfo_builder__template_dir.os_path_join_package_dir_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/texinfo.py__Texinfo_builder__template_dir.os_path_join_package_dir_", "embedding": null, "metadata": {"file_path": "sphinx/builders/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["impl", "docstring", "imports"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Texinfo builder.\"\"\"\n\nimport os\nfrom os import path\nfrom typing import Any, Dict, Iterable, List, Tuple, Union\n\nfrom docutils import nodes\nfrom docutils.frontend import OptionParser\nfrom docutils.io import FileOutput\nfrom docutils.nodes import Node\n\nfrom sphinx import addnodes, package_dir\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.config import Config\nfrom sphinx.environment.adapters.asset import ImageAdapter\nfrom sphinx.errors import NoUri\nfrom sphinx.locale import _, __\nfrom sphinx.util import logging, progress_message, status_iterator\nfrom sphinx.util.console import darkgreen # type: ignore\nfrom sphinx.util.docutils import new_document\nfrom sphinx.util.fileutil import copy_asset_file\nfrom sphinx.util.nodes import inline_all_toctrees\nfrom sphinx.util.osutil import SEP, ensuredir, make_filename_from_project\nfrom sphinx.writers.texinfo import TexinfoTranslator, TexinfoWriter\n\nlogger = logging.getLogger(__name__)\ntemplate_dir = os.path.join(package_dir, 'templates', 'texinfo')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/text.py__Plain_text_Sphinx_buil_TextBuilder.get_outdated_docs.for_docname_in_self_env_f.None_1.except_OSError_.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/text.py__Plain_text_Sphinx_buil_TextBuilder.get_outdated_docs.for_docname_in_self_env_f.None_1.except_OSError_.pass", "embedding": null, "metadata": {"file_path": "sphinx/builders/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 50, "span_ids": ["impl", "TextBuilder", "TextBuilder.init", "docstring", "TextBuilder.get_outdated_docs", "imports"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Plain-text Sphinx builder.\"\"\"\n\nfrom os import path\nfrom typing import Any, Dict, Iterator, Set, Tuple\n\nfrom docutils.io import StringOutput\nfrom docutils.nodes import Node\n\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.osutil import ensuredir, os_path\nfrom sphinx.writers.text import TextTranslator, TextWriter\n\nlogger = logging.getLogger(__name__)\n\n\nclass TextBuilder(Builder):\n name = 'text'\n format = 'text'\n epilog = __('The text files are in %(outdir)s.')\n\n out_suffix = '.txt'\n allow_parallel = True\n default_translator_class = TextTranslator\n\n current_docname: str = None\n\n def init(self) -> None:\n # section numbers for headings in the currently visited document\n self.secnumbers: Dict[str, Tuple[int, ...]] = {}\n\n def get_outdated_docs(self) -> Iterator[str]:\n for docname in self.env.found_docs:\n if docname not in self.env.all_docs:\n yield docname\n continue\n targetname = path.join(self.outdir, docname + self.out_suffix)\n try:\n targetmtime = path.getmtime(targetname)\n except Exception:\n targetmtime = 0\n try:\n srcmtime = path.getmtime(self.env.doc2path(docname))\n if srcmtime > targetmtime:\n yield docname\n except OSError:\n # source doesn't exist anymore\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py__Docutils_native_XML_an_logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/builders/xml.py__Docutils_native_XML_an_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/builders/xml.py", "file_name": "xml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["impl", "docstring", "imports"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Docutils-native XML and pseudo-XML builders.\"\"\"\n\nfrom os import path\nfrom typing import Any, Dict, Iterator, Set, Type, Union\n\nfrom docutils import nodes\nfrom docutils.io import StringOutput\nfrom docutils.nodes import Node\nfrom docutils.writers.docutils_xml import XMLTranslator\n\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.osutil import ensuredir, os_path\nfrom sphinx.writers.xml import PseudoXMLWriter, XMLWriter\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py__Build_documentation_fr_from_sphinx_util_osutil_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/build.py__Build_documentation_fr_from_sphinx_util_osutil_i", "embedding": null, "metadata": {"file_path": "sphinx/cmd/build.py", "file_name": "build.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["docstring", "imports"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Build documentation from a provided source.\"\"\"\n\nimport argparse\nimport bdb\nimport locale\nimport multiprocessing\nimport os\nimport pdb\nimport sys\nimport traceback\nfrom os import path\nfrom typing import IO, Any, List\n\nfrom docutils.utils import SystemMessage\n\nimport sphinx.locale\nfrom sphinx import __display_version__, package_dir\nfrom sphinx.application import Sphinx\nfrom sphinx.errors import SphinxError\nfrom sphinx.locale import __\nfrom sphinx.util import Tee, format_exception_cut_frames, save_traceback\nfrom sphinx.util.console import color_terminal, nocolor, red, terminal_safe # type: ignore\nfrom sphinx.util.docutils import docutils_namespace, patch_docutils\nfrom sphinx.util.osutil import abspath, ensuredir", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py__sphinx_build_M_comman_BUILDERS._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/make_mode.py__sphinx_build_M_comman_BUILDERS._", "embedding": null, "metadata": {"file_path": "sphinx/cmd/make_mode.py", "file_name": "make_mode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 47, "span_ids": ["impl", "docstring", "imports"], "tokens": 596}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"sphinx-build -M command-line handling.\n\nThis replaces the old, platform-dependent and once-generated content\nof Makefile / make.bat.\n\nThis is in its own module so that importing it is fast. It should not\nimport the main Sphinx modules (like sphinx.applications, sphinx.builders).\n\"\"\"\n\nimport os\nimport subprocess\nimport sys\nfrom os import path\nfrom typing import List\n\nimport sphinx\nfrom sphinx.cmd.build import build_main\nfrom sphinx.util.console import blue, bold, color_terminal, nocolor # type: ignore\nfrom sphinx.util.osutil import cd, rmtree\n\nBUILDERS = [\n (\"\", \"html\", \"to make standalone HTML files\"),\n (\"\", \"dirhtml\", \"to make HTML files named index.html in directories\"),\n (\"\", \"singlehtml\", \"to make a single large HTML file\"),\n (\"\", \"pickle\", \"to make pickle files\"),\n (\"\", \"json\", \"to make JSON files\"),\n (\"\", \"htmlhelp\", \"to make HTML files and an HTML help project\"),\n (\"\", \"qthelp\", \"to make HTML files and a qthelp project\"),\n (\"\", \"devhelp\", \"to make HTML files and a Devhelp project\"),\n (\"\", \"epub\", \"to make an epub\"),\n (\"\", \"latex\", \"to make LaTeX files, you can set PAPER=a4 or PAPER=letter\"),\n (\"posix\", \"latexpdf\", \"to make LaTeX and PDF files (default pdflatex)\"),\n (\"posix\", \"latexpdfja\", \"to make LaTeX files and run them through platex/dvipdfmx\"),\n (\"\", \"text\", \"to make text files\"),\n (\"\", \"man\", \"to make manual pages\"),\n (\"\", \"texinfo\", \"to make Texinfo files\"),\n (\"posix\", \"info\", \"to make Texinfo files and run them through makeinfo\"),\n (\"\", \"gettext\", \"to make PO message catalogs\"),\n (\"\", \"changes\", \"to make an overview of all changed/added/deprecated items\"),\n (\"\", \"xml\", \"to make Docutils-native XML files\"),\n (\"\", \"pseudoxml\", \"to make pseudoxml-XML files for display purposes\"),\n (\"\", \"linkcheck\", \"to check all external links for integrity\"),\n (\"\", \"doctest\", \"to run all doctests embedded in the documentation \"\n \"(if enabled)\"),\n (\"\", \"coverage\", \"to run coverage check of the documentation (if enabled)\"),\n (\"\", \"clean\", \"to remove everything in the build directory\"),\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py__Quickly_setup_document_choice.return.val": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py__Quickly_setup_document_choice.return.val", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 111, "span_ids": ["is_path_or_empty", "impl", "term_input", "allow_empty", "imports:9", "impl:2", "imports:10", "nonempty", "docstring", "choice", "ValidationError", "impl:15", "imports", "is_path"], "tokens": 767}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Quickly setup documentation source to work with Sphinx.\"\"\"\n\nimport argparse\nimport locale\nimport os\nimport sys\nimport time\nfrom collections import OrderedDict\nfrom os import path\nfrom typing import Any, Callable, Dict, List, Union\n\n# try to import readline, unix specific enhancement\ntry:\n import readline\n if readline.__doc__ and 'libedit' in readline.__doc__:\n readline.parse_and_bind(\"bind ^I rl_complete\")\n USE_LIBEDIT = True\n else:\n readline.parse_and_bind(\"tab: complete\")\n USE_LIBEDIT = False\nexcept ImportError:\n readline = None\n USE_LIBEDIT = False\n\nfrom docutils.utils import column_width\n\nimport sphinx.locale\nfrom sphinx import __display_version__, package_dir\nfrom sphinx.locale import __\nfrom sphinx.util.console import bold, color_terminal, colorize, nocolor, red # type: ignore\nfrom sphinx.util.osutil import ensuredir\nfrom sphinx.util.template import SphinxRenderer\n\nEXTENSIONS = OrderedDict([\n ('autodoc', __('automatically insert docstrings from modules')),\n ('doctest', __('automatically test code snippets in doctest blocks')),\n ('intersphinx', __('link between Sphinx documentation of different projects')),\n ('todo', __('write \"todo\" entries that can be shown or hidden on build')),\n ('coverage', __('checks for documentation coverage')),\n ('imgmath', __('include math, rendered as PNG or SVG images')),\n ('mathjax', __('include math, rendered in the browser by MathJax')),\n ('ifconfig', __('conditional inclusion of content based on config values')),\n ('viewcode', __('include links to the source code of documented Python objects')),\n ('githubpages', __('create .nojekyll file to publish the document on GitHub pages')),\n])\n\nDEFAULTS = {\n 'path': '.',\n 'sep': False,\n 'dot': '_',\n 'language': None,\n 'suffix': '.rst',\n 'master': 'index',\n 'makefile': True,\n 'batchfile': True,\n}\n\nPROMPT_PREFIX = '> '\n\nif sys.platform == 'win32':\n # On Windows, show questions as bold because of color scheme of PowerShell (refs: #5294).\n COLOR_QUESTION = 'bold'\nelse:\n COLOR_QUESTION = 'purple'\n\n\n# function to get input from terminal -- overridden by the test suite\ndef term_input(prompt: str) -> str:\n if sys.platform == 'win32':\n # Important: On windows, readline is not enabled by default. In these\n # environment, escape sequences have been broken. To avoid the\n # problem, quickstart uses ``print()`` to show prompt.\n print(prompt, end='')\n return input('')\n else:\n return input(prompt)\n\n\nclass ValidationError(Exception):\n \"\"\"Raised for validation errors.\"\"\"\n\n\ndef is_path(x: str) -> str:\n x = path.expanduser(x)\n if not path.isdir(x):\n raise ValidationError(__(\"Please enter a valid path name.\"))\n return x\n\n\ndef is_path_or_empty(x: str) -> str:\n if x == '':\n return x\n return is_path(x)\n\n\ndef allow_empty(x: str) -> str:\n return x\n\n\ndef nonempty(x: str) -> str:\n if not x:\n raise ValidationError(__(\"Please enter some text.\"))\n return x\n\n\ndef choice(*l: str) -> Callable[[str], str]:\n def val(x: str) -> str:\n if x not in l:\n raise ValidationError(__('Please enter one of %s.') % ', '.join(l))\n return x\n return val", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_QuickstartRenderer_QuickstartRenderer.render.if_self__has_custom_templ.else_.return.super_render_template_n": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_QuickstartRenderer_QuickstartRenderer.render.if_self__has_custom_templ.else_.return.super_render_template_n", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 158, "end_line": 180, "span_ids": ["QuickstartRenderer._has_custom_template", "QuickstartRenderer", "QuickstartRenderer.render"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class QuickstartRenderer(SphinxRenderer):\n def __init__(self, templatedir: str) -> None:\n self.templatedir = templatedir or ''\n super().__init__()\n\n def _has_custom_template(self, template_name: str) -> bool:\n \"\"\"Check if custom template file exists.\n\n Note: Please don't use this function from extensions.\n It will be removed in the future without deprecation period.\n \"\"\"\n template = path.join(self.templatedir, path.basename(template_name))\n if self.templatedir and path.exists(template):\n return True\n else:\n return False\n\n def render(self, template_name: str, context: Dict) -> str:\n if self._has_custom_template(template_name):\n custom_template = path.join(self.templatedir, path.basename(template_name))\n return self.render_from_file(custom_template, context)\n else:\n return super().render(template_name, context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_generate_generate.if_d_get_make_mode_is_.else_.batchfile_template._quickstart_make_bat_t_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_generate_generate.if_d_get_make_mode_is_.else_.batchfile_template._quickstart_make_bat_t_", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 321, "end_line": 389, "span_ids": ["generate"], "tokens": 760}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def generate(d: Dict, overwrite: bool = True, silent: bool = False, templatedir: str = None\n ) -> None:\n \"\"\"Generate project based on values in *d*.\"\"\"\n template = QuickstartRenderer(templatedir=templatedir)\n\n if 'mastertoctree' not in d:\n d['mastertoctree'] = ''\n if 'mastertocmaxdepth' not in d:\n d['mastertocmaxdepth'] = 2\n\n d['root_doc'] = d['master']\n d['now'] = time.asctime()\n d['project_underline'] = column_width(d['project']) * '='\n d.setdefault('extensions', [])\n d['copyright'] = time.strftime('%Y') + ', ' + d['author']\n\n d[\"path\"] = os.path.abspath(d['path'])\n ensuredir(d['path'])\n\n srcdir = path.join(d['path'], 'source') if d['sep'] else d['path']\n\n ensuredir(srcdir)\n if d['sep']:\n builddir = path.join(d['path'], 'build')\n d['exclude_patterns'] = ''\n else:\n builddir = path.join(srcdir, d['dot'] + 'build')\n exclude_patterns = map(repr, [\n d['dot'] + 'build',\n 'Thumbs.db', '.DS_Store',\n ])\n d['exclude_patterns'] = ', '.join(exclude_patterns)\n ensuredir(builddir)\n ensuredir(path.join(srcdir, d['dot'] + 'templates'))\n ensuredir(path.join(srcdir, d['dot'] + 'static'))\n\n def write_file(fpath: str, content: str, newline: str = None) -> None:\n if overwrite or not path.isfile(fpath):\n if 'quiet' not in d:\n print(__('Creating file %s.') % fpath)\n with open(fpath, 'wt', encoding='utf-8', newline=newline) as f:\n f.write(content)\n else:\n if 'quiet' not in d:\n print(__('File %s already exists, skipping.') % fpath)\n\n conf_path = os.path.join(templatedir, 'conf.py_t') if templatedir else None\n if not conf_path or not path.isfile(conf_path):\n conf_path = os.path.join(package_dir, 'templates', 'quickstart', 'conf.py_t')\n with open(conf_path) as f:\n conf_text = f.read()\n\n write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d))\n\n masterfile = path.join(srcdir, d['master'] + d['suffix'])\n if template._has_custom_template('quickstart/master_doc.rst_t'):\n msg = ('A custom template `master_doc.rst_t` found. It has been renamed to '\n '`root_doc.rst_t`. Please rename it on your project too.')\n print(colorize('red', msg)) # RemovedInSphinx60Warning\n write_file(masterfile, template.render('quickstart/master_doc.rst_t', d))\n else:\n write_file(masterfile, template.render('quickstart/root_doc.rst_t', d))\n\n if d.get('make_mode') is True:\n makefile_template = 'quickstart/Makefile.new_t'\n batchfile_template = 'quickstart/make.bat.new_t'\n else:\n makefile_template = 'quickstart/Makefile_t'\n batchfile_template = 'quickstart/make.bat_t'\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_generate.if_d_makefile_is_True__generate.None_12": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/cmd/quickstart.py_generate.if_d_makefile_is_True__generate.None_12", "embedding": null, "metadata": {"file_path": "sphinx/cmd/quickstart.py", "file_name": "quickstart.py", "file_type": "text/x-python", "category": "implementation", "start_line": 391, "end_line": 419, "span_ids": ["generate"], "tokens": 385}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def generate(d: Dict, overwrite: bool = True, silent: bool = False, templatedir: str = None\n ) -> None:\n # ... other code\n\n if d['makefile'] is True:\n d['rsrcdir'] = 'source' if d['sep'] else '.'\n d['rbuilddir'] = 'build' if d['sep'] else d['dot'] + 'build'\n # use binary mode, to avoid writing \\r\\n on Windows\n write_file(path.join(d['path'], 'Makefile'),\n template.render(makefile_template, d), '\\n')\n\n if d['batchfile'] is True:\n d['rsrcdir'] = 'source' if d['sep'] else '.'\n d['rbuilddir'] = 'build' if d['sep'] else d['dot'] + 'build'\n write_file(path.join(d['path'], 'make.bat'),\n template.render(batchfile_template, d), '\\r\\n')\n\n if silent:\n return\n print()\n print(bold(__('Finished: An initial directory structure has been created.')))\n print()\n print(__('You should now populate your master file %s and create other documentation\\n'\n 'source files. ') % masterfile, end='')\n if d['makefile'] or d['batchfile']:\n print(__('Use the Makefile to build the docs, like so:\\n'\n ' make builder'))\n else:\n print(__('Use the sphinx-build command to build the docs, like so:\\n'\n ' sphinx-build -b builder %s %s') % (srcdir, builddir))\n print(__('where \"builder\" is one of the supported builders, '\n 'e.g. html, latex or linkcheck.'))\n print()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py__Build_configuration_fi_is_serializable.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py__Build_configuration_fi_is_serializable.return.True", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 47, "span_ids": ["impl", "impl:2", "docstring", "is_serializable", "imports:14", "imports", "ConfigValue"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Build configuration file handling.\"\"\"\n\nimport re\nimport traceback\nimport types\nfrom collections import OrderedDict\nfrom os import getenv, path\nfrom typing import (TYPE_CHECKING, Any, Callable, Dict, Generator, Iterator, List, NamedTuple,\n Optional, Set, Tuple, Union)\n\nfrom sphinx.errors import ConfigError, ExtensionError\nfrom sphinx.locale import _, __\nfrom sphinx.util import logging\nfrom sphinx.util.i18n import format_date\nfrom sphinx.util.osutil import cd, fs_encoding\nfrom sphinx.util.tags import Tags\nfrom sphinx.util.typing import NoneType\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n from sphinx.environment import BuildEnvironment\n\nlogger = logging.getLogger(__name__)\n\nCONFIG_FILENAME = 'conf.py'\nUNSERIALIZABLE_TYPES = (type, types.ModuleType, types.FunctionType)\ncopyright_year_re = re.compile(r'^((\\d{4}-)?)(\\d{4})(?=[ ,])')\n\n\nclass ConfigValue(NamedTuple):\n name: str\n value: Any\n rebuild: Union[bool, str]\n\n\ndef is_serializable(obj: Any) -> bool:\n \"\"\"Check if object is serializable or not.\"\"\"\n if isinstance(obj, UNSERIALIZABLE_TYPES):\n return False\n elif isinstance(obj, dict):\n for key, value in obj.items():\n if not is_serializable(key) or not is_serializable(value):\n return False\n elif isinstance(obj, (list, tuple, set)):\n return all(is_serializable(i) for i in obj)\n\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_ENUM_ENUM.match.if_isinstance_value_lis.else_.return.value_in_self_candidates": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_ENUM_ENUM.match.if_isinstance_value_lis.else_.return.value_in_self_candidates", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 50, "end_line": 63, "span_ids": ["ENUM", "ENUM.match"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ENUM:\n \"\"\"Represents the candidates which a config value should be one of.\n\n Example:\n app.add_config_value('latex_show_urls', 'no', None, ENUM('no', 'footnote', 'inline'))\n \"\"\"\n def __init__(self, *candidates: str) -> None:\n self.candidates = candidates\n\n def match(self, value: Union[str, List, Tuple]) -> bool:\n if isinstance(value, (list, tuple)):\n return all(item in self.candidates for item in value)\n else:\n return value in self.candidates", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config_Config._quickstart_py_file_temp": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config_Config._quickstart_py_file_temp", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 66, "end_line": 81, "span_ids": ["Config"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config:\n \"\"\"Configuration file abstraction.\n\n The config object makes the values of all config values available as\n attributes.\n\n It is exposed via the :py:attr:`sphinx.application.Application.config` and\n :py:attr:`sphinx.environment.Environment.config` attributes. For example,\n to get the value of :confval:`language`, use either ``app.config.language``\n or ``env.config.language``.\n \"\"\"\n\n # the values are: (default, what needs to be rebuilt if changed)\n\n # If you add a value here, don't forget to include it in the\n # quickstart.py file template as well as in the docs!", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.config_values_Config.config_values._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.config_values_Config.config_values._", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 83, "end_line": 143, "span_ids": ["Config"], "tokens": 756}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config:\n\n config_values: Dict[str, Tuple] = {\n # general options\n 'project': ('Python', 'env', []),\n 'author': ('unknown', 'env', []),\n 'project_copyright': ('', 'html', [str]),\n 'copyright': (lambda c: c.project_copyright, 'html', [str]),\n 'version': ('', 'env', []),\n 'release': ('', 'env', []),\n 'today': ('', 'env', []),\n # the real default is locale-dependent\n 'today_fmt': (None, 'env', [str]),\n\n 'language': ('en', 'env', [str]),\n 'locale_dirs': (['locales'], 'env', []),\n 'figure_language_filename': ('{root}.{language}{ext}', 'env', [str]),\n 'gettext_allow_fuzzy_translations': (False, 'gettext', []),\n\n 'master_doc': ('index', 'env', []),\n 'root_doc': (lambda config: config.master_doc, 'env', []),\n 'source_suffix': ({'.rst': 'restructuredtext'}, 'env', Any),\n 'source_encoding': ('utf-8-sig', 'env', []),\n 'exclude_patterns': ([], 'env', []),\n 'default_role': (None, 'env', [str]),\n 'add_function_parentheses': (True, 'env', []),\n 'add_module_names': (True, 'env', []),\n 'trim_footnote_reference_space': (False, 'env', []),\n 'show_authors': (False, 'env', []),\n 'pygments_style': (None, 'html', [str]),\n 'highlight_language': ('default', 'env', []),\n 'highlight_options': ({}, 'env', []),\n 'templates_path': ([], 'html', []),\n 'template_bridge': (None, 'html', [str]),\n 'keep_warnings': (False, 'env', []),\n 'suppress_warnings': ([], 'env', []),\n 'modindex_common_prefix': ([], 'html', []),\n 'rst_epilog': (None, 'env', [str]),\n 'rst_prolog': (None, 'env', [str]),\n 'trim_doctest_flags': (True, 'env', []),\n 'primary_domain': ('py', 'env', [NoneType]),\n 'needs_sphinx': (None, None, [str]),\n 'needs_extensions': ({}, None, []),\n 'manpages_url': (None, 'env', []),\n 'nitpicky': (False, None, []),\n 'nitpick_ignore': ([], None, []),\n 'nitpick_ignore_regex': ([], None, []),\n 'numfig': (False, 'env', []),\n 'numfig_secnum_depth': (1, 'env', []),\n 'numfig_format': ({}, 'env', []), # will be initialized in init_numfig_format()\n\n 'math_number_all': (False, 'env', []),\n 'math_eqref_format': (None, 'env', [str]),\n 'math_numfig': (True, 'env', []),\n 'tls_verify': (True, 'env', []),\n 'tls_cacerts': (None, 'env', []),\n 'user_agent': (None, 'env', [str]),\n 'smartquotes': (True, 'env', []),\n 'smartquotes_action': ('qDe', 'env', []),\n 'smartquotes_excludes': ({'languages': ['ja'],\n 'builders': ['man', 'text']},\n 'env', []),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.post_init_values_Config.filter.return._value_for_value_in_self_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_Config.post_init_values_Config.filter.return._value_for_value_in_self_", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 246, "end_line": 292, "span_ids": ["Config.add", "Config.__iter__", "Config.post_init_values", "Config.__delitem__", "Config.__getitem__", "Config.__contains__", "Config.filter", "Config.__getattr__", "Config.__setitem__"], "tokens": 399}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config:\n\n def post_init_values(self) -> None:\n \"\"\"\n Initialize additional config variables that are added after init_values() called.\n \"\"\"\n config = self._raw_config\n for name in config:\n if name not in self.__dict__ and name in self.values:\n self.__dict__[name] = config[name]\n\n check_confval_types(None, self)\n\n def __getattr__(self, name: str) -> Any:\n if name.startswith('_'):\n raise AttributeError(name)\n if name not in self.values:\n raise AttributeError(__('No such config value: %s') % name)\n default = self.values[name][0]\n if callable(default):\n return default(self)\n return default\n\n def __getitem__(self, name: str) -> Any:\n return getattr(self, name)\n\n def __setitem__(self, name: str, value: Any) -> None:\n setattr(self, name, value)\n\n def __delitem__(self, name: str) -> None:\n delattr(self, name)\n\n def __contains__(self, name: str) -> bool:\n return name in self.values\n\n def __iter__(self) -> Generator[ConfigValue, None, None]:\n for name, value in self.values.items():\n yield ConfigValue(name, getattr(self, name), value[1])\n\n def add(self, name: str, default: Any, rebuild: Union[bool, str], types: Any) -> None:\n if name in self.values:\n raise ExtensionError(__('Config value %r already present') % name)\n else:\n self.values[name] = (default, rebuild, types)\n\n def filter(self, rebuild: Union[str, List[str]]) -> Iterator[ConfigValue]:\n if isinstance(rebuild, str):\n rebuild = [rebuild]\n return (value for value in self if value.rebuild in rebuild)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_convert_highlight_options_convert_highlight_options.if_options_and_not_all_is._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_convert_highlight_options_convert_highlight_options.if_options_and_not_all_is._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 375, "end_line": 384, "span_ids": ["convert_highlight_options"], "tokens": 107}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def convert_highlight_options(app: \"Sphinx\", config: Config) -> None:\n \"\"\"Convert old styled highlight_options to new styled one.\n\n * old style: options\n * new style: a dict which maps from language name to options\n \"\"\"\n options = config.highlight_options\n if options and not all(isinstance(v, dict) for v in options.values()):\n # old styled option detected because all values are not dictionary.\n config.highlight_options = {config.highlight_language: options} # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_init_numfig_format_correct_copyright_year.if_getenv_SOURCE_DATE_EP.for_k_in_copyright_e.if_k_in_config_.config_k_copyright_yea": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_init_numfig_format_correct_copyright_year.if_getenv_SOURCE_DATE_EP.for_k_in_copyright_e.if_k_in_config_.config_k_copyright_yea", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 387, "end_line": 409, "span_ids": ["correct_copyright_year", "init_numfig_format"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def init_numfig_format(app: \"Sphinx\", config: Config) -> None:\n \"\"\"Initialize :confval:`numfig_format`.\"\"\"\n numfig_format = {'section': _('Section %s'),\n 'figure': _('Fig. %s'),\n 'table': _('Table %s'),\n 'code-block': _('Listing %s')}\n\n # override default labels by configuration\n numfig_format.update(config.numfig_format)\n config.numfig_format = numfig_format # type: ignore\n\n\ndef correct_copyright_year(app: \"Sphinx\", config: Config) -> None:\n if getenv('SOURCE_DATE_EPOCH') is not None:\n for k in ('copyright', 'epub_copyright'):\n if k in config:\n replace = r'\\g<1>%s' % format_date('%Y')\n config[k] = copyright_year_re.sub(replace, config[k])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_check_primary_domain_check_root_doc.return.changed": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/config.py_check_primary_domain_check_root_doc.return.changed", "embedding": null, "metadata": {"file_path": "sphinx/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 467, "end_line": 486, "span_ids": ["check_root_doc", "check_primary_domain"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check_primary_domain(app: \"Sphinx\", config: Config) -> None:\n primary_domain = config.primary_domain\n if primary_domain and not app.registry.has_domain(primary_domain):\n logger.warning(__('primary_domain %r not found, ignored.'), primary_domain)\n config.primary_domain = None # type: ignore\n\n\ndef check_root_doc(app: \"Sphinx\", env: \"BuildEnvironment\", added: Set[str],\n changed: Set[str], removed: Set[str]) -> Set[str]:\n \"\"\"Adjust root_doc to 'contents' to support an old project which does not have\n any root_doc setting.\n \"\"\"\n if (app.config.root_doc == 'index' and\n 'index' not in app.project.docnames and\n 'contents' in app.project.docnames):\n logger.warning(__('Since v2.0, Sphinx uses \"index\" as root_doc by default. '\n 'Please add \"root_doc = \\'contents\\'\" to your conf.py.'))\n app.config.root_doc = \"contents\" # type: ignore\n\n return changed", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/deprecation.py__Sphinx_deprecation_cla_deprecated_alias.sys_modules_modname__M": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/deprecation.py__Sphinx_deprecation_cla_deprecated_alias.sys_modules_modname__M", "embedding": null, "metadata": {"file_path": "sphinx/deprecation.py", "file_name": "deprecation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["impl", "impl:2", "deprecated_alias", "RemovedInSphinx50Warning", "docstring", "RemovedInSphinx70Warning", "imports", "RemovedInSphinx60Warning"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Sphinx deprecation classes and utilities.\"\"\"\n\nimport sys\nimport warnings\nfrom importlib import import_module\nfrom typing import Any, Dict, Type\n\n\nclass RemovedInSphinx50Warning(DeprecationWarning):\n pass\n\n\nclass RemovedInSphinx60Warning(PendingDeprecationWarning):\n pass\n\n\nclass RemovedInSphinx70Warning(PendingDeprecationWarning):\n pass\n\n\nRemovedInNextVersionWarning = RemovedInSphinx50Warning\n\n\ndef deprecated_alias(modname: str, objects: Dict[str, object],\n warning: Type[Warning], names: Dict[str, str] = {}) -> None:\n module = import_module(modname)\n sys.modules[modname] = _ModuleWrapper( # type: ignore\n module, modname, objects, warning, names)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py__Handlers_for_additiona_optional_int.if_argument_is_None_.else_.return.value": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py__Handlers_for_additiona_optional_int.if_argument_is_None_.else_.return.value", "embedding": null, "metadata": {"file_path": "sphinx/directives/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["imports:12", "impl", "impl:2", "docstring", "docstring:2", "imports", "optional_int"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Handlers for additional ReST directives.\"\"\"\n\nimport re\nfrom typing import TYPE_CHECKING, Any, Dict, Generic, List, Tuple, TypeVar, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\nfrom docutils.parsers.rst import directives, roles\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import desc_signature\nfrom sphinx.util import docutils\nfrom sphinx.util.docfields import DocFieldTransformer, Field, TypedField\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.typing import OptionSpec\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\n# RE to strip backslash escapes\nnl_escape_re = re.compile(r'\\\\\\n')\nstrip_backslash_re = re.compile(r'\\\\(.)')\n\nT = TypeVar('T')\n\n\ndef optional_int(argument: str) -> int:\n \"\"\"\n Check for an integer argument or None value; raise ``ValueError`` if not.\n \"\"\"\n if argument is None:\n return None\n else:\n value = int(argument)\n if value < 0:\n raise ValueError('negative value; must be positive or zero')\n return value", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription_ObjectDescription._doc_field_type_map._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/__init__.py_ObjectDescription_ObjectDescription._doc_field_type_map._", "embedding": null, "metadata": {"file_path": "sphinx/directives/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 63, "span_ids": ["ObjectDescription"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjectDescription(SphinxDirective, Generic[T]):\n \"\"\"\n Directive to describe a class, function or similar object. Not used\n directly, but subclassed (in domain-specific directives) to add custom\n behavior.\n \"\"\"\n\n has_content = True\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {\n 'noindex': directives.flag,\n }\n\n # types of doc fields that this directive handles, see sphinx.util.docfields\n doc_field_types: List[Field] = []\n domain: str = None\n objtype: str = None\n indexnode: addnodes.index = None\n\n # Warning: this might be removed in future version. Don't touch this from extensions.\n _doc_field_type_map: Dict[str, Tuple[Field, bool]] = {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_dedent_lines_dedent_lines.return.new_lines": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/code.py_dedent_lines_dedent_lines.return.new_lines", "embedding": null, "metadata": {"file_path": "sphinx/directives/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 65, "span_ids": ["dedent_lines"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def dedent_lines(lines: List[str], dedent: int, location: Tuple[str, int] = None) -> List[str]:\n if dedent is None:\n return textwrap.dedent(''.join(lines)).splitlines(True)\n\n if any(s[:dedent].strip() for s in lines):\n logger.warning(__('non-whitespace stripped by dedent'), location=location)\n\n new_lines = []\n for line in lines:\n new_line = line[dedent:]\n if line.endswith('\\n') and not new_line:\n new_line = '\\n' # keep CRLF\n new_lines.append(new_line)\n\n return new_lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Include_Include.run.return.super_run_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/other.py_Include_Include.run.return.super_run_", "embedding": null, "metadata": {"file_path": "sphinx/directives/other.py", "file_name": "other.py", "file_type": "text/x-python", "category": "implementation", "start_line": 347, "end_line": 361, "span_ids": ["Include", "Include.run"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Include(BaseInclude, SphinxDirective):\n \"\"\"\n Like the standard \"Include\" directive, but interprets absolute paths\n \"correctly\", i.e. relative to source directory.\n \"\"\"\n\n def run(self) -> List[Node]:\n if self.arguments[0].startswith('<') and \\\n self.arguments[0].endswith('>'):\n # docutils \"standard\" includes, do not do path processing\n return super().run()\n rel_filename, filename = self.env.relfn2path(self.arguments[0])\n self.arguments[0] = filename\n self.env.note_included(filename)\n return super().run()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_os_logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_os_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/directives/patches.py", "file_name": "patches.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 33, "span_ids": ["impl", "imports:22", "impl:2", "docstring", "imports:20", "imports:21", "imports", "impl:3", "impl:4"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport warnings\nfrom os import path\nfrom typing import TYPE_CHECKING, Any, Dict, List, Sequence, Tuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Node, make_id, system_message\nfrom docutils.parsers.rst import directives\nfrom docutils.parsers.rst.directives import images, tables\nfrom docutils.parsers.rst.roles import set_classes\n\nfrom sphinx import addnodes\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.directives import optional_int\nfrom sphinx.domains.math import MathDomain\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.nodes import set_source_info\nfrom sphinx.util.osutil import SEP, os_path, relpath\nfrom sphinx.util.typing import OptionSpec\n\ntry:\n from docutils.parsers.rst.directives.misc import Meta as MetaBase # type: ignore\nexcept ImportError:\n # docutils-0.17 or older\n from docutils.parsers.rst.directives.html import Meta as MetaBase\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_RSTTable_RSTTable.make_title.return.title_message": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_RSTTable_RSTTable.make_title.return.title_message", "embedding": null, "metadata": {"file_path": "sphinx/directives/patches.py", "file_name": "patches.py", "file_type": "text/x-python", "category": "implementation", "start_line": 81, "end_line": 96, "span_ids": ["RSTTable.run", "RSTTable.make_title", "RSTTable"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RSTTable(tables.RSTTable):\n \"\"\"The table directive which sets source and line information to its caption.\n\n Only for docutils-0.13 or older version.\"\"\"\n\n def run(self) -> List[Node]:\n warnings.warn('RSTTable is deprecated.',\n RemovedInSphinx60Warning)\n return super().run()\n\n def make_title(self) -> Tuple[nodes.title, List[system_message]]:\n title, message = super().make_title()\n if title:\n set_source_info(self, title)\n\n return title, message", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_CSVTable_CSVTable.run.return.super_run_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_CSVTable_CSVTable.run.return.super_run_", "embedding": null, "metadata": {"file_path": "sphinx/directives/patches.py", "file_name": "patches.py", "file_type": "text/x-python", "category": "implementation", "start_line": 99, "end_line": 118, "span_ids": ["CSVTable", "CSVTable.run"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CSVTable(tables.CSVTable):\n \"\"\"The csv-table directive which searches a CSV file from Sphinx project's source\n directory when an absolute path is given via :file: option.\n \"\"\"\n\n def run(self) -> List[Node]:\n if 'file' in self.options and self.options['file'].startswith((SEP, os.sep)):\n env = self.state.document.settings.env\n filename = self.options['file']\n if path.exists(filename):\n logger.warning(__('\":file:\" option for csv-table directive now recognizes '\n 'an absolute path as a relative path from source directory. '\n 'Please update your document.'),\n location=(env.docname, self.lineno))\n else:\n abspath = path.join(env.srcdir, os_path(self.options['file'][1:]))\n docdir = path.dirname(env.doc2path(env.docname))\n self.options['file'] = relpath(abspath, docdir)\n\n return super().run()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_ListTable_ListTable.make_title.return.title_message": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_ListTable_ListTable.make_title.return.title_message", "embedding": null, "metadata": {"file_path": "sphinx/directives/patches.py", "file_name": "patches.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 136, "span_ids": ["ListTable", "ListTable.make_title", "ListTable.run"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ListTable(tables.ListTable):\n \"\"\"The list-table directive which sets source and line information to its caption.\n\n Only for docutils-0.13 or older version.\"\"\"\n\n def run(self) -> List[Node]:\n warnings.warn('ListTable is deprecated.',\n RemovedInSphinx60Warning)\n return super().run()\n\n def make_title(self) -> Tuple[nodes.title, List[system_message]]:\n title, message = super().make_title()\n if title:\n set_source_info(self, title)\n\n return title, message", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_MathDirective.add_target_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/directives/patches.py_MathDirective.add_target_", "embedding": null, "metadata": {"file_path": "sphinx/directives/patches.py", "file_name": "patches.py", "file_type": "text/x-python", "category": "implementation", "start_line": 215, "end_line": 251, "span_ids": ["MathDirective.add_target", "setup"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MathDirective(SphinxDirective):\n\n def add_target(self, ret: List[Node]) -> None:\n node = cast(nodes.math_block, ret[0])\n\n # assign label automatically if math_number_all enabled\n if node['label'] == '' or (self.config.math_number_all and not node['label']):\n seq = self.env.new_serialno('sphinx.ext.math#equations')\n node['label'] = \"%s:%d\" % (self.env.docname, seq)\n\n # no targets and numbers are needed\n if not node['label']:\n return\n\n # register label to domain\n domain = cast(MathDomain, self.env.get_domain('math'))\n domain.note_equation(self.env.docname, node['label'], location=node)\n node['number'] = domain.get_equation_number_for(node['label'])\n\n # add target node\n node_id = make_id('equation-%s' % node['label'])\n target = nodes.target('', '', ids=[node_id])\n self.state.document.note_explicit_target(target)\n ret.insert(0, target)\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n directives.register_directive('figure', Figure)\n directives.register_directive('meta', Meta)\n directives.register_directive('csv-table', CSVTable)\n directives.register_directive('code', Code)\n directives.register_directive('math', MathDirective)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py__Support_for_domains__if_TYPE_CHECKING_.from_sphinx_environment_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py__Support_for_domains__if_TYPE_CHECKING_.from_sphinx_environment_i", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["imports:12", "impl", "docstring", "imports"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Support for domains.\n\nDomains are groupings of description directives\nand roles describing e.g. constructs of one programming language.\n\"\"\"\n\nimport copy\nfrom abc import ABC, abstractmethod\nfrom typing import (TYPE_CHECKING, Any, Callable, Dict, Iterable, List, NamedTuple, Optional,\n Tuple, Type, Union, cast)\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node, system_message\nfrom docutils.parsers.rst.states import Inliner\n\nfrom sphinx.addnodes import pending_xref\nfrom sphinx.errors import SphinxError\nfrom sphinx.locale import _\nfrom sphinx.roles import XRefRole\nfrom sphinx.util.typing import RoleFunction\n\nif TYPE_CHECKING:\n from sphinx.builders import Builder\n from sphinx.environment import BuildEnvironment", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_ObjType_IndexEntry.descr": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/__init__.py_ObjType_IndexEntry.descr", "embedding": null, "metadata": {"file_path": "sphinx/domains/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 27, "end_line": 60, "span_ids": ["ObjType", "IndexEntry"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjType:\n \"\"\"\n An ObjType is the description for a type of object that a domain can\n document. In the object_types attribute of Domain subclasses, object type\n names are mapped to instances of this class.\n\n Constructor arguments:\n\n - *lname*: localized name of the type (do not include domain name)\n - *roles*: all the roles that can refer to an object of this type\n - *attrs*: object attributes -- currently only \"searchprio\" is known,\n which defines the object's priority in the full-text search index,\n see :meth:`Domain.get_objects()`.\n \"\"\"\n\n known_attrs = {\n 'searchprio': 1,\n }\n\n def __init__(self, lname: str, *roles: Any, **attrs: Any) -> None:\n self.lname = lname\n self.roles: Tuple = roles\n self.attrs: Dict = self.known_attrs.copy()\n self.attrs.update(attrs)\n\n\nclass IndexEntry(NamedTuple):\n name: str\n subtype: int\n docname: str\n anchor: str\n extra: str\n qualifier: str\n descr: str", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__The_C_language_domain___expression_unary_ops._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__The_C_language_domain___expression_unary_ops._", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 75, "span_ids": ["impl", "docstring", "imports"], "tokens": 744}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The C language domain.\"\"\"\n\nimport re\nfrom typing import (Any, Callable, Dict, Generator, Iterator, List, Optional, Tuple, TypeVar,\n Union, cast)\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node, TextElement, system_message\nfrom docutils.parsers.rst import directives\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import pending_xref\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.directives import ObjectDescription\nfrom sphinx.domains import Domain, ObjType\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.locale import _, __\nfrom sphinx.roles import SphinxRole, XRefRole\nfrom sphinx.transforms import SphinxTransform\nfrom sphinx.transforms.post_transforms import ReferencesResolver\nfrom sphinx.util import logging\nfrom sphinx.util.cfamily import (ASTAttribute, ASTBaseBase, ASTBaseParenExprList, BaseParser,\n DefinitionError, NoOldIdError, StringifyTransform,\n UnsupportedMultiCharacterCharLiteral, anon_identifier_re,\n binary_literal_re, char_literal_re, float_literal_re,\n float_literal_suffix_re, hex_literal_re, identifier_re,\n integer_literal_re, integers_literal_suffix_re,\n octal_literal_re, verify_description_mode)\nfrom sphinx.util.docfields import Field, GroupedField, TypedField\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.nodes import make_refnode\nfrom sphinx.util.typing import OptionSpec\n\nlogger = logging.getLogger(__name__)\nT = TypeVar('T')\n\nDeclarationType = Union[\n \"ASTStruct\", \"ASTUnion\", \"ASTEnum\", \"ASTEnumerator\",\n \"ASTType\", \"ASTTypeWithInit\", \"ASTMacro\",\n]\n\n# https://en.cppreference.com/w/c/keyword\n_keywords = [\n 'auto', 'break', 'case', 'char', 'const', 'continue', 'default', 'do', 'double',\n 'else', 'enum', 'extern', 'float', 'for', 'goto', 'if', 'inline', 'int', 'long',\n 'register', 'restrict', 'return', 'short', 'signed', 'sizeof', 'static', 'struct',\n 'switch', 'typedef', 'union', 'unsigned', 'void', 'volatile', 'while',\n '_Alignas', '_Alignof', '_Atomic', '_Bool', '_Complex',\n '_Decimal32', '_Decimal64', '_Decimal128',\n '_Generic', '_Imaginary', '_Noreturn', '_Static_assert', '_Thread_local',\n]\n# These are only keyword'y when the corresponding headers are included.\n# They are used as default value for c_extra_keywords.\n_macroKeywords = [\n 'alignas', 'alignof', 'bool', 'complex', 'imaginary', 'noreturn', 'static_assert',\n 'thread_local',\n]\n\n# these are ordered by preceedence\n_expression_bin_ops = [\n ['||', 'or'],\n ['&&', 'and'],\n ['|', 'bitor'],\n ['^', 'xor'],\n ['&', 'bitand'],\n ['==', '!=', 'not_eq'],\n ['<=', '>=', '<', '>'],\n ['<<', '>>'],\n ['+', '-'],\n ['*', '/', '%'],\n ['.*', '->*']\n]\n_expression_unary_ops = [\"++\", \"--\", \"*\", \"&\", \"+\", \"-\", \"!\", \"not\", \"~\", \"compl\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__expression_assignment_ops_ASTBase.describe_signature.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__expression_assignment_ops_ASTBase.describe_signature.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 76, "end_line": 121, "span_ids": ["impl", "_DuplicateSymbolError", "ASTBase.describe_signature", "impl:21", "_DuplicateSymbolError.__str__", "ASTBase"], "tokens": 443}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_expression_assignment_ops = [\"=\", \"*=\", \"/=\", \"%=\", \"+=\", \"-=\",\n \">>=\", \"<<=\", \"&=\", \"and_eq\", \"^=\", \"xor_eq\", \"|=\", \"or_eq\"]\n\n_max_id = 1\n_id_prefix = [None, 'c.', 'Cv2.']\n# Ids are used in lookup keys which are used across pickled files,\n# so when _max_id changes, make sure to update the ENV_VERSION.\n\n_string_re = re.compile(r\"[LuU8]?('([^'\\\\]*(?:\\\\.[^'\\\\]*)*)'\"\n r'|\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")', re.S)\n\n# bool, complex, and imaginary are macro \"keywords\", so they are handled seperately\n_simple_type_specifiers_re = re.compile(r\"\"\"(?x)\n \\b(\n void|_Bool\n |signed|unsigned\n |short|long\n |char\n |int\n |__uint128|__int128\n |__int(8|16|32|64|128) # extension\n |float|double\n |_Decimal(32|64|128)\n |_Complex|_Imaginary\n |__float80|_Float64x|__float128|_Float128|__ibm128 # extension\n |__fp16 # extension\n |_Sat|_Fract|fract|_Accum|accum # extension\n )\\b\n\"\"\")\n\n\nclass _DuplicateSymbolError(Exception):\n def __init__(self, symbol: \"Symbol\", declaration: \"ASTDeclaration\") -> None:\n assert symbol\n assert declaration\n self.symbol = symbol\n self.declaration = declaration\n\n def __str__(self) -> str:\n return \"Internal C duplicate symbol error:\\n%s\" % self.symbol.dump(0)\n\n\nclass ASTBase(ASTBaseBase):\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n raise NotImplementedError(repr(self))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_None_10_ASTNumberLiteral.describe_signature.signode_addnodes_desc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_None_10_ASTNumberLiteral.describe_signature.signode_addnodes_desc_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 251, "end_line": 292, "span_ids": ["ASTNestedName.describe_signature", "ASTBooleanLiteral", "ASTNumberLiteral.describe_signature", "ASTNumberLiteral", "ASTExpression", "ASTNumberLiteral._stringify", "ASTBooleanLiteral._stringify", "ASTBooleanLiteral.describe_signature", "ASTLiteral"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "################################################################################\n# Expressions\n################################################################################\n\nclass ASTExpression(ASTBase):\n pass\n\n\n# Primary expressions\n################################################################################\n\nclass ASTLiteral(ASTExpression):\n pass\n\n\nclass ASTBooleanLiteral(ASTLiteral):\n def __init__(self, value: bool) -> None:\n self.value = value\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.value:\n return 'true'\n else:\n return 'false'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n txt = str(self)\n signode += addnodes.desc_sig_keyword(txt, txt)\n\n\nclass ASTNumberLiteral(ASTLiteral):\n def __init__(self, data: str) -> None:\n self.data = data\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return self.data\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n txt = str(self)\n signode += addnodes.desc_sig_literal_number(txt, txt)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTCharLiteral_ASTCharLiteral.describe_signature.signode_addnodes_desc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTCharLiteral_ASTCharLiteral.describe_signature.signode_addnodes_desc_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 295, "end_line": 314, "span_ids": ["ASTCharLiteral", "ASTCharLiteral._stringify", "ASTCharLiteral.describe_signature"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTCharLiteral(ASTLiteral):\n def __init__(self, prefix: str, data: str) -> None:\n self.prefix = prefix # may be None when no prefix\n self.data = data\n decoded = data.encode().decode('unicode-escape')\n if len(decoded) == 1:\n self.value = ord(decoded)\n else:\n raise UnsupportedMultiCharacterCharLiteral(decoded)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.prefix is None:\n return \"'\" + self.data + \"'\"\n else:\n return self.prefix + \"'\" + self.data + \"'\"\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n txt = str(self)\n signode += addnodes.desc_sig_literal_char(txt, txt)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTParenExpr_ASTParenExpr.describe_signature.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTParenExpr_ASTParenExpr.describe_signature.None_1", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 346, "end_line": 360, "span_ids": ["ASTParenExpr", "ASTParenExpr.describe_signature", "ASTParenExpr.get_id", "ASTParenExpr._stringify"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTParenExpr(ASTExpression):\n def __init__(self, expr):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return '(' + transform(self.expr) + ')'\n\n def get_id(self, version: int) -> str:\n return self.expr.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.expr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixArray_ASTPostfixArray.describe_signature.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixArray_ASTPostfixArray.describe_signature.None_1", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 382, "end_line": 393, "span_ids": ["ASTPostfixArray.describe_signature", "ASTPostfixArray._stringify", "ASTPostfixArray"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTPostfixArray(ASTPostfixOp):\n def __init__(self, expr: ASTExpression) -> None:\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return '[' + transform(self.expr) + ']'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_punctuation('[', '[')\n self.expr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(']', ']')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixInc_ASTPostfixDec.describe_signature.signode_addnodes_desc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTPostfixInc_ASTPostfixDec.describe_signature.signode_addnodes_desc_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 396, "end_line": 411, "span_ids": ["ASTPostfixInc._stringify", "ASTPostfixDec", "ASTPostfixInc.describe_signature", "ASTPostfixDec.describe_signature", "ASTPostfixDec._stringify", "ASTPostfixInc"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTPostfixInc(ASTPostfixOp):\n def _stringify(self, transform: StringifyTransform) -> str:\n return '++'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_operator('++', '++')\n\n\nclass ASTPostfixDec(ASTPostfixOp):\n def _stringify(self, transform: StringifyTransform) -> str:\n return '--'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_operator('--', '--')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTFallbackExpr_ASTTrailingTypeSpec.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTFallbackExpr_ASTTrailingTypeSpec.pass", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 598, "end_line": 618, "span_ids": ["ASTFallbackExpr", "ASTTrailingTypeSpec", "ASTFallbackExpr.describe_signature", "ASTFallbackExpr._stringify", "ASTFallbackExpr.get_id"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTFallbackExpr(ASTExpression):\n def __init__(self, expr: str):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return self.expr\n\n def get_id(self, version: int) -> str:\n return str(self.expr)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += nodes.literal(self.expr, self.expr)\n\n\n################################################################################\n# Types\n################################################################################\n\nclass ASTTrailingTypeSpec(ASTBase):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTTrailingTypeSpecFundamental_ASTTrailingTypeSpecFundamental.describe_signature.for_n_in_self_names_.signode_addnodes_desc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTTrailingTypeSpecFundamental_ASTTrailingTypeSpecFundamental.describe_signature.for_n_in_self_names_.signode_addnodes_desc_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 621, "end_line": 637, "span_ids": ["ASTTrailingTypeSpecFundamental.describe_signature", "ASTTrailingTypeSpecFundamental._stringify", "ASTTrailingTypeSpecFundamental"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTTrailingTypeSpecFundamental(ASTTrailingTypeSpec):\n def __init__(self, names: List[str]) -> None:\n assert len(names) != 0\n self.names = names\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return ' '.join(self.names)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n first = True\n for n in self.names:\n if not first:\n signode += addnodes.desc_sig_space()\n else:\n first = False\n signode += addnodes.desc_sig_keyword_type(n, n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Initializer_ASTParenExprList.describe_signature.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py__Initializer_ASTParenExprList.describe_signature.None_1", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1111, "end_line": 1134, "span_ids": ["ASTParenExprList._stringify", "ASTParenExprList", "ASTDeclaratorParen.describe_signature", "ASTParenExprList.describe_signature"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Initializer\n################################################################################\n\nclass ASTParenExprList(ASTBaseParenExprList):\n def __init__(self, exprs: List[ASTExpression]) -> None:\n self.exprs = exprs\n\n def _stringify(self, transform: StringifyTransform) -> str:\n exprs = [transform(e) for e in self.exprs]\n return '(%s)' % ', '.join(exprs)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('(', '(')\n first = True\n for e in self.exprs:\n if not first:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n else:\n first = False\n e.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTBracedInitList_ASTBracedInitList.describe_signature.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTBracedInitList_ASTBracedInitList.describe_signature.None_1", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1137, "end_line": 1161, "span_ids": ["ASTBracedInitList.describe_signature", "ASTBracedInitList", "ASTBracedInitList._stringify"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTBracedInitList(ASTBase):\n def __init__(self, exprs: List[ASTExpression], trailingComma: bool) -> None:\n self.exprs = exprs\n self.trailingComma = trailingComma\n\n def _stringify(self, transform: StringifyTransform) -> str:\n exprs = [transform(e) for e in self.exprs]\n trailingComma = ',' if self.trailingComma else ''\n return '{%s%s}' % (', '.join(exprs), trailingComma)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('{', '{')\n first = True\n for e in self.exprs:\n if not first:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n else:\n first = False\n e.describe_signature(signode, mode, env, symbol)\n if self.trailingComma:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_punctuation('}', '}')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaration.describe_signature_ASTDeclaration.describe_signature.if_self_semicolon_.mainDeclNode_addnodes_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_ASTDeclaration.describe_signature_ASTDeclaration.describe_signature.if_self_semicolon_.mainDeclNode_addnodes_", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1446, "end_line": 1486, "span_ids": ["ASTDeclaration.describe_signature"], "tokens": 421}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaration(ASTBaseBase):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", options: Dict) -> None:\n verify_description_mode(mode)\n assert self.symbol\n # The caller of the domain added a desc_signature node.\n # Always enable multiline:\n signode['is_multiline'] = True\n # Put each line in a desc_signature_line node.\n mainDeclNode = addnodes.desc_signature_line()\n mainDeclNode.sphinx_line_type = 'declarator'\n mainDeclNode['add_permalink'] = not self.symbol.isRedeclaration\n signode += mainDeclNode\n\n if self.objectType == 'member':\n pass\n elif self.objectType == 'function':\n pass\n elif self.objectType == 'macro':\n pass\n elif self.objectType == 'struct':\n mainDeclNode += addnodes.desc_sig_keyword('struct', 'struct')\n mainDeclNode += addnodes.desc_sig_space()\n elif self.objectType == 'union':\n mainDeclNode += addnodes.desc_sig_keyword('union', 'union')\n mainDeclNode += addnodes.desc_sig_space()\n elif self.objectType == 'enum':\n mainDeclNode += addnodes.desc_sig_keyword('enum', 'enum')\n mainDeclNode += addnodes.desc_sig_space()\n elif self.objectType == 'enumerator':\n mainDeclNode += addnodes.desc_sig_keyword('enumerator', 'enumerator')\n mainDeclNode += addnodes.desc_sig_space()\n elif self.objectType == 'type':\n decl = cast(ASTType, self.declaration)\n prefix = decl.get_type_declaration_prefix()\n mainDeclNode += addnodes.desc_sig_keyword(prefix, prefix)\n mainDeclNode += addnodes.desc_sig_space()\n else:\n assert False\n self.declaration.describe_signature(mainDeclNode, mode, env, self.symbol)\n if self.semicolon:\n mainDeclNode += addnodes.desc_sig_punctuation(';', ';')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_simple_type_specifier_DefinitionParser._parse_simple_type_specifiers.return.ASTTrailingTypeSpecFundam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser._parse_simple_type_specifier_DefinitionParser._parse_simple_type_specifiers.return.ASTTrailingTypeSpecFundam", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2567, "end_line": 2588, "span_ids": ["DefinitionParser._parse_simple_type_specifier", "DefinitionParser._parse_simple_type_specifiers"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_simple_type_specifier(self) -> Optional[str]:\n if self.match(_simple_type_specifiers_re):\n return self.matched_text\n for t in ('bool', 'complex', 'imaginary'):\n if t in self.config.c_extra_keywords:\n if self.skip_word(t):\n return t\n return None\n\n def _parse_simple_type_specifiers(self) -> ASTTrailingTypeSpecFundamental:\n names: List[str] = []\n\n self.skip_ws()\n while True:\n t = self._parse_simple_type_specifier()\n if t is None:\n break\n names.append(t)\n self.skip_ws()\n if len(names) == 0:\n return None\n return ASTTrailingTypeSpecFundamental(names)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser.parse_namespace_object__make_phony_error_name.return.ASTNestedName_ASTIdentif": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_DefinitionParser.parse_namespace_object__make_phony_error_name.return.ASTNestedName_ASTIdentif", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3099, "end_line": 3133, "span_ids": ["DefinitionParser.parse_expression", "_make_phony_error_name", "DefinitionParser.parse_xref_object", "DefinitionParser.parse_namespace_object"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def parse_namespace_object(self) -> ASTNestedName:\n return self._parse_nested_name()\n\n def parse_xref_object(self) -> ASTNestedName:\n name = self._parse_nested_name()\n # if there are '()' left, just skip them\n self.skip_ws()\n self.skip_string('()')\n self.assert_end()\n return name\n\n def parse_expression(self) -> Union[ASTExpression, ASTType]:\n pos = self.pos\n res: Union[ASTExpression, ASTType] = None\n try:\n res = self._parse_expression()\n self.skip_ws()\n self.assert_end()\n except DefinitionError as exExpr:\n self.pos = pos\n try:\n res = self._parse_type(False)\n self.skip_ws()\n self.assert_end()\n except DefinitionError as exType:\n header = \"Error when parsing (type) expression.\"\n errs = []\n errs.append((exExpr, \"If expression\"))\n errs.append((exType, \"If type\"))\n raise self._make_multi_error(errs, header) from exType\n return res\n\n\ndef _make_phony_error_name() -> ASTNestedName:\n return ASTNestedName([ASTIdentifier(\"PhonyNameDueToError\")], rooted=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject_CObject._add_enumerator_to_parent.Symbol_parent_targetSymbo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CObject_CObject._add_enumerator_to_parent.Symbol_parent_targetSymbo", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3136, "end_line": 3180, "span_ids": ["CObject", "CObject._add_enumerator_to_parent"], "tokens": 366}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CObject(ObjectDescription[ASTDeclaration]):\n \"\"\"\n Description of a C language object.\n \"\"\"\n\n option_spec: OptionSpec = {\n 'noindexentry': directives.flag,\n }\n\n def _add_enumerator_to_parent(self, ast: ASTDeclaration) -> None:\n assert ast.objectType == 'enumerator'\n # find the parent, if it exists && is an enum\n # then add the name to the parent scope\n symbol = ast.symbol\n assert symbol\n assert symbol.ident is not None\n parentSymbol = symbol.parent\n assert parentSymbol\n if parentSymbol.parent is None:\n # TODO: we could warn, but it is somewhat equivalent to\n # enumeratorss, without the enum\n return # no parent\n parentDecl = parentSymbol.declaration\n if parentDecl is None:\n # the parent is not explicitly declared\n # TODO: we could warn, but?\n return\n if parentDecl.objectType != 'enum':\n # TODO: maybe issue a warning, enumerators in non-enums is weird,\n # but it is somewhat equivalent to enumeratorss, without the enum\n return\n if parentDecl.directiveType != 'enum':\n return\n\n targetSymbol = parentSymbol.parent\n s = targetSymbol.find_identifier(symbol.ident, matchSelf=False, recurseInAnon=True,\n searchInSiblings=False)\n if s is not None:\n # something is already declared with that name\n return\n declClone = symbol.declaration.clone()\n declClone.enumeratorScopedSymbol = symbol\n Symbol(parent=targetSymbol, ident=symbol.ident,\n declaration=declClone,\n docname=self.env.docname, line=self.get_source_info()[1])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain_CDomain.initial_data._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/c.py_CDomain_CDomain.initial_data._", "embedding": null, "metadata": {"file_path": "sphinx/domains/c.py", "file_name": "c.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3741, "end_line": 3794, "span_ids": ["CDomain"], "tokens": 554}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CDomain(Domain):\n \"\"\"C language domain.\"\"\"\n name = 'c'\n label = 'C'\n object_types = {\n # 'identifier' is the one used for xrefs generated in signatures, not in roles\n 'member': ObjType(_('member'), 'var', 'member', 'data', 'identifier'),\n 'var': ObjType(_('variable'), 'var', 'member', 'data', 'identifier'),\n 'function': ObjType(_('function'), 'func', 'identifier', 'type'),\n 'macro': ObjType(_('macro'), 'macro', 'identifier'),\n 'struct': ObjType(_('struct'), 'struct', 'identifier', 'type'),\n 'union': ObjType(_('union'), 'union', 'identifier', 'type'),\n 'enum': ObjType(_('enum'), 'enum', 'identifier', 'type'),\n 'enumerator': ObjType(_('enumerator'), 'enumerator', 'identifier'),\n 'type': ObjType(_('type'), 'identifier', 'type'),\n # generated object types\n 'functionParam': ObjType(_('function parameter'), 'identifier', 'var', 'member', 'data'), # noqa\n }\n\n directives = {\n 'member': CMemberObject,\n 'var': CMemberObject,\n 'function': CFunctionObject,\n 'macro': CMacroObject,\n 'struct': CStructObject,\n 'union': CUnionObject,\n 'enum': CEnumObject,\n 'enumerator': CEnumeratorObject,\n 'type': CTypeObject,\n # scope control\n 'namespace': CNamespaceObject,\n 'namespace-push': CNamespacePushObject,\n 'namespace-pop': CNamespacePopObject,\n # other\n 'alias': CAliasObject\n }\n roles = {\n 'member': CXRefRole(),\n 'data': CXRefRole(),\n 'var': CXRefRole(),\n 'func': CXRefRole(fix_parens=True),\n 'macro': CXRefRole(),\n 'struct': CXRefRole(),\n 'union': CXRefRole(),\n 'enum': CXRefRole(),\n 'enumerator': CXRefRole(),\n 'type': CXRefRole(),\n 'expr': CExprRole(asCode=True),\n 'texpr': CExprRole(asCode=False)\n }\n initial_data: Dict[str, Union[Symbol, Dict[str, Tuple[str, str, str]]]] = {\n 'root_symbol': Symbol(None, None, None, None, None),\n 'objects': {}, # fullname -> docname, node_id, objtype\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/changeset.py__The_changeset_domain__ChangeSet.content": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/changeset.py__The_changeset_domain__ChangeSet.content", "embedding": null, "metadata": {"file_path": "sphinx/domains/changeset.py", "file_name": "changeset.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["impl", "imports:9", "impl:2", "docstring", "imports", "ChangeSet"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The changeset domain.\"\"\"\n\nfrom typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\n\nfrom sphinx import addnodes\nfrom sphinx.domains import Domain\nfrom sphinx.locale import _\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.typing import OptionSpec\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n from sphinx.environment import BuildEnvironment\n\n\nversionlabels = {\n 'versionadded': _('New in version %s'),\n 'versionchanged': _('Changed in version %s'),\n 'deprecated': _('Deprecated since version %s'),\n}\n\nversionlabel_classes = {\n 'versionadded': 'added',\n 'versionchanged': 'changed',\n 'deprecated': 'deprecated',\n}\n\n\nclass ChangeSet(NamedTuple):\n type: str\n docname: str\n lineno: int\n module: str\n descname: str\n content: str", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py__The_citation_domain__logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/citation.py__The_citation_domain__logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/domains/citation.py", "file_name": "citation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["impl", "imports:10", "impl:2", "docstring", "imports"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The citation domain.\"\"\"\n\nfrom typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element\n\nfrom sphinx.addnodes import pending_xref\nfrom sphinx.domains import Domain\nfrom sphinx.locale import __\nfrom sphinx.transforms import SphinxTransform\nfrom sphinx.util import logging\nfrom sphinx.util.nodes import copy_source_info, make_refnode\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n from sphinx.builders import Builder\n from sphinx.environment import BuildEnvironment\n\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__The_C_language_domai_udl_identifier_re.re_compile_r_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__The_C_language_domai_udl_identifier_re.re_compile_r_x_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 293, "span_ids": ["impl", "docstring", "imports", "impl:5"], "tokens": 2639}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The C++ language domain.\"\"\"\n\nimport re\nfrom typing import (Any, Callable, Dict, Generator, Iterator, List, Optional, Tuple, TypeVar,\n Union, cast)\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node, TextElement, system_message\nfrom docutils.parsers.rst import directives\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import desc_signature, pending_xref\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.directives import ObjectDescription\nfrom sphinx.domains import Domain, ObjType\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.errors import NoUri\nfrom sphinx.locale import _, __\nfrom sphinx.roles import SphinxRole, XRefRole\nfrom sphinx.transforms import SphinxTransform\nfrom sphinx.transforms.post_transforms import ReferencesResolver\nfrom sphinx.util import logging\nfrom sphinx.util.cfamily import (ASTAttribute, ASTBaseBase, ASTBaseParenExprList, BaseParser,\n DefinitionError, NoOldIdError, StringifyTransform,\n UnsupportedMultiCharacterCharLiteral, anon_identifier_re,\n binary_literal_re, char_literal_re, float_literal_re,\n float_literal_suffix_re, hex_literal_re, identifier_re,\n integer_literal_re, integers_literal_suffix_re,\n octal_literal_re, verify_description_mode)\nfrom sphinx.util.docfields import Field, GroupedField\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.nodes import make_refnode\nfrom sphinx.util.typing import OptionSpec\n\nlogger = logging.getLogger(__name__)\nT = TypeVar('T')\n\n\"\"\"\n Important note on ids\n ----------------------------------------------------------------------------\n\n Multiple id generation schemes are used due to backwards compatibility.\n - v1: 1.2.3 <= version < 1.3\n The style used before the rewrite.\n It is not the actual old code, but a replication of the behaviour.\n - v2: 1.3 <= version < now\n Standardised mangling scheme from\n https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling\n though not completely implemented.\n All versions are generated and attached to elements. The newest is used for\n the index. All of the versions should work as permalinks.\n\n\n Signature Nodes and Tagnames\n ----------------------------------------------------------------------------\n\n Each signature is in a desc_signature node, where all children are\n desc_signature_line nodes. Each of these lines will have the attribute\n 'sphinx_line_type' set to one of the following (prioritized):\n - 'declarator', if the line contains the name of the declared object.\n - 'templateParams', if the line starts a template parameter list,\n - 'templateParams', if the line has template parameters\n Note: such lines might get a new tag in the future.\n - 'templateIntroduction, if the line is on the form 'conceptName{...}'\n No other desc_signature nodes should exist (so far).\n\n\n Grammar\n ----------------------------------------------------------------------------\n\n See https://www.nongnu.org/hcb/ for the grammar,\n and https://github.com/cplusplus/draft/blob/master/source/grammar.tex,\n and https://github.com/cplusplus/concepts-ts\n for the newest grammar.\n\n common grammar things:\n template-declaration ->\n \"template\" \"<\" template-parameter-list \">\" declaration\n template-parameter-list ->\n template-parameter\n | template-parameter-list \",\" template-parameter\n template-parameter ->\n type-parameter\n | parameter-declaration # i.e., same as a function argument\n\n type-parameter ->\n \"class\" \"...\"[opt] identifier[opt]\n | \"class\" identifier[opt] \"=\" type-id\n | \"typename\" \"...\"[opt] identifier[opt]\n | \"typename\" identifier[opt] \"=\" type-id\n | \"template\" \"<\" template-parameter-list \">\"\n \"class\" \"...\"[opt] identifier[opt]\n | \"template\" \"<\" template-parameter-list \">\"\n \"class\" identifier[opt] \"=\" id-expression\n # also, from C++17 we can have \"typename\" in template templates\n templateDeclPrefix ->\n \"template\" \"<\" template-parameter-list \">\"\n\n simple-declaration ->\n attribute-specifier-seq[opt] decl-specifier-seq[opt]\n init-declarator-list[opt] ;\n # Make the semicolon optional.\n # For now: drop the attributes (TODO).\n # Use at most 1 init-declarator.\n -> decl-specifier-seq init-declarator\n -> decl-specifier-seq declarator initializer\n\n decl-specifier ->\n storage-class-specifier ->\n ( \"static\" (only for member_object and function_object)\n | \"extern\" (only for member_object and function_object)\n | \"register\"\n )\n thread_local[opt] (only for member_object)\n (it can also appear before the others)\n\n | type-specifier -> trailing-type-specifier\n | function-specifier -> \"inline\" | \"virtual\" | \"explicit\" (only\n for function_object)\n | \"friend\" (only for function_object)\n | \"constexpr\" (only for member_object and function_object)\n trailing-type-specifier ->\n simple-type-specifier\n | elaborated-type-specifier\n | typename-specifier\n | cv-qualifier -> \"const\" | \"volatile\"\n stricter grammar for decl-specifier-seq (with everything, each object\n uses a subset):\n visibility storage-class-specifier function-specifier \"friend\"\n \"constexpr\" \"volatile\" \"const\" trailing-type-specifier\n # where trailing-type-specifier can no be cv-qualifier\n # Inside e.g., template parameters a strict subset is used\n # (see type-specifier-seq)\n trailing-type-specifier ->\n simple-type-specifier ->\n ::[opt] nested-name-specifier[opt] type-name\n | ::[opt] nested-name-specifier \"template\" simple-template-id\n | \"char\" | \"bool\" | etc.\n | decltype-specifier\n | elaborated-type-specifier ->\n class-key attribute-specifier-seq[opt] ::[opt]\n nested-name-specifier[opt] identifier\n | class-key ::[opt] nested-name-specifier[opt] template[opt]\n simple-template-id\n | \"enum\" ::[opt] nested-name-specifier[opt] identifier\n | typename-specifier ->\n \"typename\" ::[opt] nested-name-specifier identifier\n | \"typename\" ::[opt] nested-name-specifier template[opt]\n simple-template-id\n class-key -> \"class\" | \"struct\" | \"union\"\n type-name ->* identifier | simple-template-id\n # ignoring attributes and decltype, and then some left-factoring\n trailing-type-specifier ->\n rest-of-trailing\n (\"class\" | \"struct\" | \"union\" | \"typename\") rest-of-trailing\n built-in -> \"char\" | \"bool\" | etc.\n decltype-specifier\n rest-of-trailing -> (with some simplification)\n \"::\"[opt] list-of-elements-separated-by-::\n element ->\n \"template\"[opt] identifier (\"<\" template-argument-list \">\")[opt]\n template-argument-list ->\n template-argument \"...\"[opt]\n | template-argument-list \",\" template-argument \"...\"[opt]\n template-argument ->\n constant-expression\n | type-specifier-seq abstract-declarator\n | id-expression\n\n\n declarator ->\n ptr-declarator\n | noptr-declarator parameters-and-qualifiers trailing-return-type\n ptr-declarator ->\n noptr-declarator\n | ptr-operator ptr-declarator\n noptr-declarator ->\n declarator-id attribute-specifier-seq[opt] ->\n \"...\"[opt] id-expression\n | rest-of-trailing\n | noptr-declarator parameters-and-qualifiers\n | noptr-declarator \"[\" constant-expression[opt] \"]\"\n attribute-specifier-seq[opt]\n | \"(\" ptr-declarator \")\"\n ptr-operator ->\n \"*\" attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n | \"& attribute-specifier-seq[opt]\n | \"&&\" attribute-specifier-seq[opt]\n | \"::\"[opt] nested-name-specifier \"*\" attribute-specifier-seq[opt]\n cv-qualifier-seq[opt]\n # function_object must use a parameters-and-qualifiers, the others may\n # use it (e.g., function pointers)\n parameters-and-qualifiers ->\n \"(\" parameter-clause \")\" attribute-specifier-seq[opt]\n cv-qualifier-seq[opt] ref-qualifier[opt]\n exception-specification[opt]\n ref-qualifier -> \"&\" | \"&&\"\n exception-specification ->\n \"noexcept\" (\"(\" constant-expression \")\")[opt]\n \"throw\" (\"(\" type-id-list \")\")[opt]\n # TODO: we don't implement attributes\n # member functions can have initializers, but we fold them into here\n memberFunctionInit -> \"=\" \"0\"\n # (note: only \"0\" is allowed as the value, according to the standard,\n # right?)\n\n enum-head ->\n enum-key attribute-specifier-seq[opt] nested-name-specifier[opt]\n identifier enum-base[opt]\n enum-key -> \"enum\" | \"enum struct\" | \"enum class\"\n enum-base ->\n \":\" type\n enumerator-definition ->\n identifier\n | identifier \"=\" constant-expression\n\n We additionally add the possibility for specifying the visibility as the\n first thing.\n\n concept_object:\n goal:\n just a declaration of the name (for now)\n\n grammar: only a single template parameter list, and the nested name\n may not have any template argument lists\n\n \"template\" \"<\" template-parameter-list \">\"\n nested-name-specifier\n\n type_object:\n goal:\n either a single type (e.g., \"MyClass:Something_T\" or a typedef-like\n thing (e.g. \"Something Something_T\" or \"int I_arr[]\"\n grammar, single type: based on a type in a function parameter, but\n without a name:\n parameter-declaration\n -> attribute-specifier-seq[opt] decl-specifier-seq\n abstract-declarator[opt]\n # Drop the attributes\n -> decl-specifier-seq abstract-declarator[opt]\n grammar, typedef-like: no initilizer\n decl-specifier-seq declarator\n Can start with a templateDeclPrefix.\n\n member_object:\n goal: as a type_object which must have a declarator, and optionally\n with a initializer\n grammar:\n decl-specifier-seq declarator initializer\n Can start with a templateDeclPrefix.\n\n function_object:\n goal: a function declaration, TODO: what about templates? for now: skip\n grammar: no initializer\n decl-specifier-seq declarator\n Can start with a templateDeclPrefix.\n\n class_object:\n goal: a class declaration, but with specification of a base class\n grammar:\n attribute-specifier-seq[opt]\n nested-name \"final\"[opt] (\":\" base-specifier-list)[opt]\n base-specifier-list ->\n base-specifier \"...\"[opt]\n | base-specifier-list, base-specifier \"...\"[opt]\n base-specifier ->\n base-type-specifier\n | \"virtual\" access-spe\"cifier[opt] base-type-specifier\n | access-specifier[opt] \"virtual\"[opt] base-type-specifier\n Can start with a templateDeclPrefix.\n\n enum_object:\n goal: an unscoped enum or a scoped enum, optionally with the underlying\n type specified\n grammar:\n (\"class\" | \"struct\")[opt] visibility[opt]\n attribute-specifier-seq[opt] nested-name (\":\" type)[opt]\n enumerator_object:\n goal: an element in a scoped or unscoped enum. The name should be\n injected according to the scopedness.\n grammar:\n nested-name (\"=\" constant-expression)\n\n namespace_object:\n goal: a directive to put all following declarations in a specific scope\n grammar:\n nested-name\n\"\"\"\n\nudl_identifier_re = re.compile(r'''(?x)\n [a-zA-Z_][a-zA-Z0-9_]*\\b # note, no word boundary in the beginning\n''')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTNestedName.get_id_ASTThisLiteral.describe_signature.signode_addnodes_desc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTNestedName.get_id_ASTThisLiteral.describe_signature.signode_addnodes_desc_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 720, "end_line": 975, "span_ids": ["ASTExpression.describe_signature", "ASTBooleanLiteral", "ASTNumberLiteral.describe_signature", "ASTPointerLiteral", "ASTStringLiteral", "ASTUserDefinedLiteral", "ASTNumberLiteral", "ASTNumberLiteral.get_id", "ASTThisLiteral", "ASTBooleanLiteral._stringify", "ASTUserDefinedLiteral.get_id", "ASTPointerLiteral.describe_signature", "ASTCharLiteral.describe_signature", "ASTBooleanLiteral.get_id", "ASTNestedName.describe_signature", "ASTPointerLiteral.get_id", "ASTNestedName._stringify", "ASTExpression", "ASTStringLiteral._stringify", "ASTThisLiteral.describe_signature", "ASTBooleanLiteral.describe_signature", "ASTCharLiteral", "ASTUserDefinedLiteral.describe_signature", "ASTNestedName.get_id", "ASTUserDefinedLiteral._stringify", "ASTExpression.get_id", "ASTCharLiteral._stringify", "ASTStringLiteral.get_id", "ASTCharLiteral.get_id", "ASTNumberLiteral._stringify", "ASTStringLiteral.describe_signature", "ASTThisLiteral._stringify", "ASTThisLiteral.get_id", "ASTLiteral", "ASTPointerLiteral._stringify"], "tokens": 2207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTNestedName(ASTBase):\n\n def get_id(self, version: int, modifiers: str = '') -> str:\n if version == 1:\n tt = str(self)\n if tt in _id_shorthands_v1:\n return _id_shorthands_v1[tt]\n else:\n return '::'.join(n.get_id(version) for n in self.names)\n\n res = []\n if len(self.names) > 1 or len(modifiers) > 0:\n res.append('N')\n res.append(modifiers)\n for n in self.names:\n res.append(n.get_id(version))\n if len(self.names) > 1 or len(modifiers) > 0:\n res.append('E')\n return ''.join(res)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.rooted:\n res.append('')\n for i in range(len(self.names)):\n n = self.names[i]\n if self.templates[i]:\n res.append(\"template \" + transform(n))\n else:\n res.append(transform(n))\n return '::'.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n # just print the name part, with template args, not template params\n if mode == 'noneIsName':\n if self.rooted:\n assert False, \"Can this happen?\" # TODO\n signode += nodes.Text('::')\n for i in range(len(self.names)):\n if i != 0:\n assert False, \"Can this happen?\" # TODO\n signode += nodes.Text('::blah')\n n = self.names[i]\n if self.templates[i]:\n assert False, \"Can this happen?\" # TODO\n signode += nodes.Text(\"template\")\n signode += nodes.Text(\" \")\n n.describe_signature(signode, mode, env, '', symbol)\n elif mode == 'param':\n assert not self.rooted, str(self)\n assert len(self.names) == 1\n assert not self.templates[0]\n self.names[0].describe_signature(signode, 'param', env, '', symbol)\n elif mode in ('markType', 'lastIsName', 'markName'):\n # Each element should be a pending xref targeting the complete\n # prefix. however, only the identifier part should be a link, such\n # that template args can be a link as well.\n # For 'lastIsName' we should also prepend template parameter lists.\n templateParams: List[Any] = []\n if mode == 'lastIsName':\n assert symbol is not None\n if symbol.declaration.templatePrefix is not None:\n templateParams = symbol.declaration.templatePrefix.templates\n iTemplateParams = 0\n templateParamsPrefix = ''\n prefix = ''\n first = True\n names = self.names[:-1] if mode == 'lastIsName' else self.names\n # If lastIsName, then wrap all of the prefix in a desc_addname,\n # else append directly to signode.\n # NOTE: Breathe previously relied on the prefix being in the desc_addname node,\n # so it can remove it in inner declarations.\n dest = signode\n if mode == 'lastIsName':\n dest = addnodes.desc_addname()\n if self.rooted:\n prefix += '::'\n if mode == 'lastIsName' and len(names) == 0:\n signode += addnodes.desc_sig_punctuation('::', '::')\n else:\n dest += addnodes.desc_sig_punctuation('::', '::')\n for i in range(len(names)):\n nne = names[i]\n template = self.templates[i]\n if not first:\n dest += addnodes.desc_sig_punctuation('::', '::')\n prefix += '::'\n if template:\n dest += addnodes.desc_sig_keyword('template', 'template')\n dest += addnodes.desc_sig_space()\n first = False\n txt_nne = str(nne)\n if txt_nne != '':\n if nne.templateArgs and iTemplateParams < len(templateParams):\n templateParamsPrefix += str(templateParams[iTemplateParams])\n iTemplateParams += 1\n nne.describe_signature(dest, 'markType',\n env, templateParamsPrefix + prefix, symbol)\n prefix += txt_nne\n if mode == 'lastIsName':\n if len(self.names) > 1:\n dest += addnodes.desc_sig_punctuation('::', '::')\n signode += dest\n if self.templates[-1]:\n signode += addnodes.desc_sig_keyword('template', 'template')\n signode += addnodes.desc_sig_space()\n self.names[-1].describe_signature(signode, mode, env, '', symbol)\n else:\n raise Exception('Unknown description mode: %s' % mode)\n\n\n################################################################################\n# Expressions\n################################################################################\n\nclass ASTExpression(ASTBase):\n def get_id(self, version: int) -> str:\n raise NotImplementedError(repr(self))\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n raise NotImplementedError(repr(self))\n\n\n# Primary expressions\n################################################################################\n\nclass ASTLiteral(ASTExpression):\n pass\n\n\nclass ASTPointerLiteral(ASTLiteral):\n def _stringify(self, transform: StringifyTransform) -> str:\n return 'nullptr'\n\n def get_id(self, version: int) -> str:\n return 'LDnE'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('nullptr', 'nullptr')\n\n\nclass ASTBooleanLiteral(ASTLiteral):\n def __init__(self, value: bool) -> None:\n self.value = value\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.value:\n return 'true'\n else:\n return 'false'\n\n def get_id(self, version: int) -> str:\n if self.value:\n return 'L1E'\n else:\n return 'L0E'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword(str(self), str(self))\n\n\nclass ASTNumberLiteral(ASTLiteral):\n def __init__(self, data: str) -> None:\n self.data = data\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return self.data\n\n def get_id(self, version: int) -> str:\n # TODO: floats should be mangled by writing the hex of the binary representation\n return \"L%sE\" % self.data.replace(\"'\", \"\")\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_literal_number(self.data, self.data)\n\n\nclass ASTStringLiteral(ASTLiteral):\n def __init__(self, data: str) -> None:\n self.data = data\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return self.data\n\n def get_id(self, version: int) -> str:\n # note: the length is not really correct with escaping\n return \"LA%d_KcE\" % (len(self.data) - 2)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_literal_string(self.data, self.data)\n\n\nclass ASTCharLiteral(ASTLiteral):\n def __init__(self, prefix: str, data: str) -> None:\n self.prefix = prefix # may be None when no prefix\n self.data = data\n assert prefix in _id_char_from_prefix\n self.type = _id_char_from_prefix[prefix]\n decoded = data.encode().decode('unicode-escape')\n if len(decoded) == 1:\n self.value = ord(decoded)\n else:\n raise UnsupportedMultiCharacterCharLiteral(decoded)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.prefix is None:\n return \"'\" + self.data + \"'\"\n else:\n return self.prefix + \"'\" + self.data + \"'\"\n\n def get_id(self, version: int) -> str:\n # TODO: the ID should be have L E around it\n return self.type + str(self.value)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n if self.prefix is not None:\n signode += addnodes.desc_sig_keyword(self.prefix, self.prefix)\n txt = \"'\" + self.data + \"'\"\n signode += addnodes.desc_sig_literal_char(txt, txt)\n\n\nclass ASTUserDefinedLiteral(ASTLiteral):\n def __init__(self, literal: ASTLiteral, ident: ASTIdentifier):\n self.literal = literal\n self.ident = ident\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.literal) + transform(self.ident)\n\n def get_id(self, version: int) -> str:\n # mangle as if it was a function call: ident(literal)\n return 'clL_Zli{}E{}E'.format(self.ident.get_id(version), self.literal.get_id(version))\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.literal.describe_signature(signode, mode, env, symbol)\n self.ident.describe_signature(signode, \"udl\", env, \"\", \"\", symbol)\n\n\n################################################################################\n\nclass ASTThisLiteral(ASTExpression):\n def _stringify(self, transform: StringifyTransform) -> str:\n return \"this\"\n\n def get_id(self, version: int) -> str:\n return \"fpT\"\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('this', 'this')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTFoldExpr_ASTFoldExpr.get_id.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTFoldExpr_ASTFoldExpr.get_id.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 978, "end_line": 1021, "span_ids": ["ASTFoldExpr.get_id", "ASTFoldExpr._stringify", "ASTFoldExpr"], "tokens": 359}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTFoldExpr(ASTExpression):\n def __init__(self, leftExpr: ASTExpression,\n op: str, rightExpr: ASTExpression) -> None:\n assert leftExpr is not None or rightExpr is not None\n self.leftExpr = leftExpr\n self.op = op\n self.rightExpr = rightExpr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ['(']\n if self.leftExpr:\n res.append(transform(self.leftExpr))\n res.append(' ')\n res.append(self.op)\n res.append(' ')\n res.append('...')\n if self.rightExpr:\n res.append(' ')\n res.append(self.op)\n res.append(' ')\n res.append(transform(self.rightExpr))\n res.append(')')\n return ''.join(res)\n\n def get_id(self, version: int) -> str:\n assert version >= 3\n if version == 3:\n return str(self)\n # https://github.com/itanium-cxx-abi/cxx-abi/pull/67\n res = []\n if self.leftExpr is None: # (... op expr)\n res.append('fl')\n elif self.rightExpr is None: # (expr op ...)\n res.append('fr')\n else: # (expr op ... op expr)\n # we don't check where the parameter pack is,\n # we just always call this a binary left fold\n res.append('fL')\n res.append(_id_operator_v2[self.op])\n if self.leftExpr:\n res.append(self.leftExpr.get_id(version))\n if self.rightExpr:\n res.append(self.rightExpr.get_id(version))\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTFoldExpr.describe_signature_ASTTypeId.describe_signature.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTFoldExpr.describe_signature_ASTTypeId.describe_signature.None_2", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1023, "end_line": 1250, "span_ids": ["ASTPostfixCallExpr.describe_signature", "ASTPostfixMember.get_id", "ASTPostfixExpr", "ASTPostfixInc._stringify", "ASTPostfixInc.describe_signature", "ASTPostfixDec._stringify", "ASTPostfixMember._stringify", "ASTPostfixMemberOfPointer.describe_signature", "ASTExplicitCast", "ASTPostfixMemberOfPointer.get_id", "ASTParenExpr._stringify", "ASTPostfixOp.get_id", "ASTTypeId.describe_signature", "ASTPostfixDec.describe_signature", "ASTPostfixCallExpr", "ASTPostfixArray._stringify", "ASTPostfixMemberOfPointer", "ASTPostfixCallExpr._stringify", "ASTTypeId._stringify", "ASTExplicitCast.describe_signature", "ASTPostfixMember.describe_signature", "ASTPostfixOp.describe_signature", "ASTIdExpression._stringify", "ASTPostfixArray", "ASTPostfixArray.describe_signature", "ASTPostfixArray.get_id", "ASTTypeId", "ASTParenExpr", "ASTPostfixExpr._stringify", "ASTPostfixDec", "ASTExplicitCast._stringify", "ASTPostfixExpr.describe_signature", "ASTExplicitCast.get_id", "ASTPostfixCallExpr.get_id", "ASTPostfixExpr.get_id", "ASTPostfixInc", "ASTTypeId.get_id", "ASTParenExpr.describe_signature", "ASTPostfixInc.get_id", "ASTParenExpr.get_id", "ASTFoldExpr.describe_signature", "ASTPostfixDec.get_id", "ASTPostfixMemberOfPointer._stringify", "ASTIdExpression", "ASTIdExpression.describe_signature", "ASTIdExpression.get_id", "ASTPostfixOp", "ASTPostfixMember"], "tokens": 2090}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTFoldExpr(ASTExpression):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_punctuation('(', '(')\n if self.leftExpr:\n self.leftExpr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_operator(self.op, self.op)\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation('...', '...')\n if self.rightExpr:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_operator(self.op, self.op)\n signode += addnodes.desc_sig_space()\n self.rightExpr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTParenExpr(ASTExpression):\n def __init__(self, expr: ASTExpression):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return '(' + transform(self.expr) + ')'\n\n def get_id(self, version: int) -> str:\n return self.expr.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.expr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTIdExpression(ASTExpression):\n def __init__(self, name: ASTNestedName):\n # note: this class is basically to cast a nested name as an expression\n self.name = name\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.name)\n\n def get_id(self, version: int) -> str:\n return self.name.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.name.describe_signature(signode, mode, env, symbol)\n\n\n# Postfix expressions\n################################################################################\n\nclass ASTPostfixOp(ASTBase):\n def get_id(self, idPrefix: str, version: int) -> str:\n raise NotImplementedError(repr(self))\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n raise NotImplementedError(repr(self))\n\n\nclass ASTPostfixArray(ASTPostfixOp):\n def __init__(self, expr: ASTExpression):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return '[' + transform(self.expr) + ']'\n\n def get_id(self, idPrefix: str, version: int) -> str:\n return 'ix' + idPrefix + self.expr.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_punctuation('[', '[')\n self.expr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(']', ']')\n\n\nclass ASTPostfixMember(ASTPostfixOp):\n def __init__(self, name: ASTNestedName):\n self.name = name\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return '.' + transform(self.name)\n\n def get_id(self, idPrefix: str, version: int) -> str:\n return 'dt' + idPrefix + self.name.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_punctuation('.', '.')\n self.name.describe_signature(signode, 'noneIsName', env, symbol)\n\n\nclass ASTPostfixMemberOfPointer(ASTPostfixOp):\n def __init__(self, name: ASTNestedName):\n self.name = name\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return '->' + transform(self.name)\n\n def get_id(self, idPrefix: str, version: int) -> str:\n return 'pt' + idPrefix + self.name.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_operator('->', '->')\n self.name.describe_signature(signode, 'noneIsName', env, symbol)\n\n\nclass ASTPostfixInc(ASTPostfixOp):\n def _stringify(self, transform: StringifyTransform) -> str:\n return '++'\n\n def get_id(self, idPrefix: str, version: int) -> str:\n return 'pp' + idPrefix\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_operator('++', '++')\n\n\nclass ASTPostfixDec(ASTPostfixOp):\n def _stringify(self, transform: StringifyTransform) -> str:\n return '--'\n\n def get_id(self, idPrefix: str, version: int) -> str:\n return 'mm' + idPrefix\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_operator('--', '--')\n\n\nclass ASTPostfixCallExpr(ASTPostfixOp):\n def __init__(self, lst: Union[\"ASTParenExprList\", \"ASTBracedInitList\"]) -> None:\n self.lst = lst\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.lst)\n\n def get_id(self, idPrefix: str, version: int) -> str:\n res = ['cl', idPrefix]\n for e in self.lst.exprs:\n res.append(e.get_id(version))\n res.append('E')\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.lst.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTPostfixExpr(ASTExpression):\n def __init__(self, prefix: \"ASTType\", postFixes: List[ASTPostfixOp]):\n self.prefix = prefix\n self.postFixes = postFixes\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = [transform(self.prefix)]\n for p in self.postFixes:\n res.append(transform(p))\n return ''.join(res)\n\n def get_id(self, version: int) -> str:\n id = self.prefix.get_id(version)\n for p in self.postFixes:\n id = p.get_id(id, version)\n return id\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.prefix.describe_signature(signode, mode, env, symbol)\n for p in self.postFixes:\n p.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTExplicitCast(ASTExpression):\n def __init__(self, cast: str, typ: \"ASTType\", expr: ASTExpression):\n assert cast in _id_explicit_cast\n self.cast = cast\n self.typ = typ\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = [self.cast]\n res.append('<')\n res.append(transform(self.typ))\n res.append('>(')\n res.append(transform(self.expr))\n res.append(')')\n return ''.join(res)\n\n def get_id(self, version: int) -> str:\n return (_id_explicit_cast[self.cast] +\n self.typ.get_id(version) +\n self.expr.get_id(version))\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword(self.cast, self.cast)\n signode += addnodes.desc_sig_punctuation('<', '<')\n self.typ.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation('>', '>')\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.expr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTTypeId(ASTExpression):\n def __init__(self, typeOrExpr: Union[\"ASTType\", ASTExpression], isType: bool):\n self.typeOrExpr = typeOrExpr\n self.isType = isType\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return 'typeid(' + transform(self.typeOrExpr) + ')'\n\n def get_id(self, version: int) -> str:\n prefix = 'ti' if self.isType else 'te'\n return prefix + self.typeOrExpr.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('typeid', 'typeid')\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.typeOrExpr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__Unary_expressions_ASTBinOpExpr.get_id.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__Unary_expressions_ASTBinOpExpr.get_id.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1253, "end_line": 1505, "span_ids": ["ASTSizeofExpr.describe_signature", "ASTBinOpExpr", "ASTNewExpr.get_id", "ASTDeleteExpr.describe_signature", "ASTUnaryOpExpr.get_id", "ASTSizeofExpr.get_id", "ASTCastExpr", "ASTNewExpr.describe_signature", "ASTNewExpr", "ASTCastExpr.get_id", "ASTCastExpr.describe_signature", "ASTDeleteExpr.get_id", "ASTBinOpExpr.get_id", "ASTNoexceptExpr.get_id", "ASTTypeId.describe_signature", "ASTSizeofExpr._stringify", "ASTSizeofParamPack._stringify", "ASTAlignofExpr._stringify", "ASTAlignofExpr.describe_signature", "ASTUnaryOpExpr._stringify", "ASTUnaryOpExpr.describe_signature", "ASTSizeofType.describe_signature", "ASTDeleteExpr._stringify", "ASTSizeofType._stringify", "ASTBinOpExpr._stringify", "ASTNoexceptExpr", "ASTSizeofType.get_id", "ASTSizeofParamPack.describe_signature", "ASTDeleteExpr", "ASTNoexceptExpr.describe_signature", "ASTSizeofExpr", "ASTNoexceptExpr._stringify", "ASTSizeofParamPack", "ASTAlignofExpr.get_id", "ASTSizeofType", "ASTCastExpr._stringify", "ASTUnaryOpExpr", "ASTAlignofExpr", "ASTSizeofParamPack.get_id", "ASTNewExpr._stringify"], "tokens": 2186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Unary expressions\n################################################################################\n\nclass ASTUnaryOpExpr(ASTExpression):\n def __init__(self, op: str, expr: ASTExpression):\n self.op = op\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.op[0] in 'cn':\n return self.op + \" \" + transform(self.expr)\n else:\n return self.op + transform(self.expr)\n\n def get_id(self, version: int) -> str:\n return _id_operator_unary_v2[self.op] + self.expr.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n if self.op[0] in 'cn':\n signode += addnodes.desc_sig_keyword(self.op, self.op)\n signode += addnodes.desc_sig_space()\n else:\n signode += addnodes.desc_sig_operator(self.op, self.op)\n self.expr.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTSizeofParamPack(ASTExpression):\n def __init__(self, identifier: ASTIdentifier):\n self.identifier = identifier\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return \"sizeof...(\" + transform(self.identifier) + \")\"\n\n def get_id(self, version: int) -> str:\n return 'sZ' + self.identifier.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('sizeof', 'sizeof')\n signode += addnodes.desc_sig_punctuation('...', '...')\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.identifier.describe_signature(signode, 'markType', env,\n symbol=symbol, prefix=\"\", templateArgs=\"\")\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTSizeofType(ASTExpression):\n def __init__(self, typ: \"ASTType\"):\n self.typ = typ\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return \"sizeof(\" + transform(self.typ) + \")\"\n\n def get_id(self, version: int) -> str:\n return 'st' + self.typ.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('sizeof', 'sizeof')\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.typ.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTSizeofExpr(ASTExpression):\n def __init__(self, expr: ASTExpression):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return \"sizeof \" + transform(self.expr)\n\n def get_id(self, version: int) -> str:\n return 'sz' + self.expr.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('sizeof', 'sizeof')\n signode += addnodes.desc_sig_space()\n self.expr.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTAlignofExpr(ASTExpression):\n def __init__(self, typ: \"ASTType\"):\n self.typ = typ\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return \"alignof(\" + transform(self.typ) + \")\"\n\n def get_id(self, version: int) -> str:\n return 'at' + self.typ.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('alignof', 'alignof')\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.typ.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTNoexceptExpr(ASTExpression):\n def __init__(self, expr: ASTExpression):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return 'noexcept(' + transform(self.expr) + ')'\n\n def get_id(self, version: int) -> str:\n return 'nx' + self.expr.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('noexcept', 'noexcept')\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.expr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTNewExpr(ASTExpression):\n def __init__(self, rooted: bool, isNewTypeId: bool, typ: \"ASTType\",\n initList: Union[\"ASTParenExprList\", \"ASTBracedInitList\"]) -> None:\n self.rooted = rooted\n self.isNewTypeId = isNewTypeId\n self.typ = typ\n self.initList = initList\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.rooted:\n res.append('::')\n res.append('new ')\n # TODO: placement\n if self.isNewTypeId:\n res.append(transform(self.typ))\n else:\n assert False\n if self.initList is not None:\n res.append(transform(self.initList))\n return ''.join(res)\n\n def get_id(self, version: int) -> str:\n # the array part will be in the type mangling, so na is not used\n res = ['nw']\n # TODO: placement\n res.append('_')\n res.append(self.typ.get_id(version))\n if self.initList is not None:\n res.append(self.initList.get_id(version))\n else:\n res.append('E')\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n if self.rooted:\n signode += addnodes.desc_sig_punctuation('::', '::')\n signode += addnodes.desc_sig_keyword('new', 'new')\n signode += addnodes.desc_sig_space()\n # TODO: placement\n if self.isNewTypeId:\n self.typ.describe_signature(signode, mode, env, symbol)\n else:\n assert False\n if self.initList is not None:\n self.initList.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTDeleteExpr(ASTExpression):\n def __init__(self, rooted: bool, array: bool, expr: ASTExpression):\n self.rooted = rooted\n self.array = array\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.rooted:\n res.append('::')\n res.append('delete ')\n if self.array:\n res.append('[] ')\n res.append(transform(self.expr))\n return ''.join(res)\n\n def get_id(self, version: int) -> str:\n if self.array:\n id = \"da\"\n else:\n id = \"dl\"\n return id + self.expr.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n if self.rooted:\n signode += addnodes.desc_sig_punctuation('::', '::')\n signode += addnodes.desc_sig_keyword('delete', 'delete')\n signode += addnodes.desc_sig_space()\n if self.array:\n signode += addnodes.desc_sig_punctuation('[]', '[]')\n signode += addnodes.desc_sig_space()\n self.expr.describe_signature(signode, mode, env, symbol)\n\n\n# Other expressions\n################################################################################\n\nclass ASTCastExpr(ASTExpression):\n def __init__(self, typ: \"ASTType\", expr: ASTExpression):\n self.typ = typ\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ['(']\n res.append(transform(self.typ))\n res.append(')')\n res.append(transform(self.expr))\n return ''.join(res)\n\n def get_id(self, version: int) -> str:\n return 'cv' + self.typ.get_id(version) + self.expr.get_id(version)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.typ.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n self.expr.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTBinOpExpr(ASTExpression):\n def __init__(self, exprs: List[ASTExpression], ops: List[str]):\n assert len(exprs) > 0\n assert len(exprs) == len(ops) + 1\n self.exprs = exprs\n self.ops = ops\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.exprs[0]))\n for i in range(1, len(self.exprs)):\n res.append(' ')\n res.append(self.ops[i - 1])\n res.append(' ')\n res.append(transform(self.exprs[i]))\n return ''.join(res)\n\n def get_id(self, version: int) -> str:\n assert version >= 2\n res = []\n for i in range(len(self.ops)):\n res.append(_id_operator_v2[self.ops[i]])\n res.append(self.exprs[i].get_id(version))\n res.append(self.exprs[-1].get_id(version))\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTBinOpExpr.describe_signature_ASTOperatorLiteral._describe_identifier.self_identifier_describe_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTBinOpExpr.describe_signature_ASTOperatorLiteral._describe_identifier.self_identifier_describe_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1507, "end_line": 1731, "span_ids": ["ASTCommaExpr._stringify", "ASTOperatorLiteral._stringify", "ASTOperator.is_anon", "ASTCommaExpr.describe_signature", "ASTOperator", "ASTCommaExpr.get_id", "ASTOperatorLiteral.get_id", "ASTOperator.is_operator", "ASTOperatorLiteral._describe_identifier", "ASTBracedInitList._stringify", "ASTAssignmentExpr._stringify", "ASTFallbackExpr.get_id", "ASTOperator.describe_signature", "ASTBracedInitList", "ASTOperator._describe_identifier", "ASTOperatorBuildIn.get_id", "ASTFallbackExpr.describe_signature", "ASTAssignmentExpr.get_id", "ASTBracedInitList.get_id", "ASTFallbackExpr._stringify", "ASTOperatorBuildIn._stringify", "ASTFallbackExpr", "ASTOperatorLiteral", "ASTAssignmentExpr.describe_signature", "ASTOperator.get_id", "ASTOperatorBuildIn._describe_identifier", "ASTAssignmentExpr", "ASTOperatorBuildIn", "ASTCommaExpr", "ASTBracedInitList.describe_signature", "ASTBinOpExpr.describe_signature"], "tokens": 2123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTBinOpExpr(ASTExpression):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.exprs[0].describe_signature(signode, mode, env, symbol)\n for i in range(1, len(self.exprs)):\n signode += addnodes.desc_sig_space()\n op = self.ops[i - 1]\n if ord(op[0]) >= ord('a') and ord(op[0]) <= ord('z'):\n signode += addnodes.desc_sig_keyword(op, op)\n else:\n signode += addnodes.desc_sig_operator(op, op)\n signode += addnodes.desc_sig_space()\n self.exprs[i].describe_signature(signode, mode, env, symbol)\n\n\nclass ASTBracedInitList(ASTBase):\n def __init__(self, exprs: List[Union[ASTExpression, \"ASTBracedInitList\"]],\n trailingComma: bool) -> None:\n self.exprs = exprs\n self.trailingComma = trailingComma\n\n def get_id(self, version: int) -> str:\n return \"il%sE\" % ''.join(e.get_id(version) for e in self.exprs)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n exprs = [transform(e) for e in self.exprs]\n trailingComma = ',' if self.trailingComma else ''\n return '{%s%s}' % (', '.join(exprs), trailingComma)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('{', '{')\n first = True\n for e in self.exprs:\n if not first:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n else:\n first = False\n e.describe_signature(signode, mode, env, symbol)\n if self.trailingComma:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_punctuation('}', '}')\n\n\nclass ASTAssignmentExpr(ASTExpression):\n def __init__(self, exprs: List[Union[ASTExpression, ASTBracedInitList]], ops: List[str]):\n assert len(exprs) > 0\n assert len(exprs) == len(ops) + 1\n self.exprs = exprs\n self.ops = ops\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.exprs[0]))\n for i in range(1, len(self.exprs)):\n res.append(' ')\n res.append(self.ops[i - 1])\n res.append(' ')\n res.append(transform(self.exprs[i]))\n return ''.join(res)\n\n def get_id(self, version: int) -> str:\n res = []\n for i in range(len(self.ops)):\n res.append(_id_operator_v2[self.ops[i]])\n res.append(self.exprs[i].get_id(version))\n res.append(self.exprs[-1].get_id(version))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.exprs[0].describe_signature(signode, mode, env, symbol)\n for i in range(1, len(self.exprs)):\n signode += addnodes.desc_sig_space()\n op = self.ops[i - 1]\n if ord(op[0]) >= ord('a') and ord(op[0]) <= ord('z'):\n signode += addnodes.desc_sig_keyword(op, op)\n else:\n signode += addnodes.desc_sig_operator(op, op)\n signode += addnodes.desc_sig_space()\n self.exprs[i].describe_signature(signode, mode, env, symbol)\n\n\nclass ASTCommaExpr(ASTExpression):\n def __init__(self, exprs: List[ASTExpression]):\n assert len(exprs) > 0\n self.exprs = exprs\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return ', '.join(transform(e) for e in self.exprs)\n\n def get_id(self, version: int) -> str:\n id_ = _id_operator_v2[',']\n res = []\n for i in range(len(self.exprs) - 1):\n res.append(id_)\n res.append(self.exprs[i].get_id(version))\n res.append(self.exprs[-1].get_id(version))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.exprs[0].describe_signature(signode, mode, env, symbol)\n for i in range(1, len(self.exprs)):\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n self.exprs[i].describe_signature(signode, mode, env, symbol)\n\n\nclass ASTFallbackExpr(ASTExpression):\n def __init__(self, expr: str):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return self.expr\n\n def get_id(self, version: int) -> str:\n return str(self.expr)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += nodes.literal(self.expr, self.expr)\n\n\n################################################################################\n# Types\n################################################################################\n\n# Things for ASTNestedName\n################################################################################\n\nclass ASTOperator(ASTBase):\n def is_anon(self) -> bool:\n return False\n\n def is_operator(self) -> bool:\n return True\n\n def get_id(self, version: int) -> str:\n raise NotImplementedError()\n\n def _describe_identifier(self, signode: TextElement, identnode: TextElement,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n \"\"\"Render the prefix into signode, and the last part into identnode.\"\"\"\n raise NotImplementedError()\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", prefix: str, templateArgs: str,\n symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if mode == 'lastIsName':\n mainName = addnodes.desc_name()\n self._describe_identifier(mainName, mainName, env, symbol)\n signode += mainName\n elif mode == 'markType':\n targetText = prefix + str(self) + templateArgs\n pnode = addnodes.pending_xref('', refdomain='cpp',\n reftype='identifier',\n reftarget=targetText, modname=None,\n classname=None)\n pnode['cpp:parent_key'] = symbol.get_lookup_key()\n # Render the identifier part, but collapse it into a string\n # and make that the a link to this operator.\n # E.g., if it is 'operator SomeType', then 'SomeType' becomes\n # a link to the operator, not to 'SomeType'.\n container = nodes.literal()\n self._describe_identifier(signode, container, env, symbol)\n txt = container.astext()\n pnode += addnodes.desc_name(txt, txt)\n signode += pnode\n else:\n addName = addnodes.desc_addname()\n self._describe_identifier(addName, addName, env, symbol)\n signode += addName\n\n\nclass ASTOperatorBuildIn(ASTOperator):\n def __init__(self, op: str) -> None:\n self.op = op\n\n def get_id(self, version: int) -> str:\n if version == 1:\n ids = _id_operator_v1\n if self.op not in ids:\n raise NoOldIdError()\n else:\n ids = _id_operator_v2\n if self.op not in ids:\n raise Exception('Internal error: Built-in operator \"%s\" can not '\n 'be mapped to an id.' % self.op)\n return ids[self.op]\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.op in ('new', 'new[]', 'delete', 'delete[]') or self.op[0] in \"abcnox\":\n return 'operator ' + self.op\n else:\n return 'operator' + self.op\n\n def _describe_identifier(self, signode: TextElement, identnode: TextElement,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('operator', 'operator')\n if self.op in ('new', 'new[]', 'delete', 'delete[]') or self.op[0] in \"abcnox\":\n signode += addnodes.desc_sig_space()\n identnode += addnodes.desc_sig_operator(self.op, self.op)\n\n\nclass ASTOperatorLiteral(ASTOperator):\n def __init__(self, identifier: ASTIdentifier) -> None:\n self.identifier = identifier\n\n def get_id(self, version: int) -> str:\n if version == 1:\n raise NoOldIdError()\n else:\n return 'li' + self.identifier.get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return 'operator\"\"' + transform(self.identifier)\n\n def _describe_identifier(self, signode: TextElement, identnode: TextElement,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('operator', 'operator')\n signode += addnodes.desc_sig_literal_string('\"\"', '\"\"')\n self.identifier.describe_signature(identnode, 'markType', env, '', '', symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTOperatorType_ASTFunctionParameter.describe_signature.if_self_ellipsis_.else_.self_arg_describe_signatu": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTOperatorType_ASTFunctionParameter.describe_signature.if_self_ellipsis_.else_.self_arg_describe_signatu", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1734, "end_line": 1990, "span_ids": ["ASTTemplateArgConstant", "ASTTrailingTypeSpec.get_id", "ASTTrailingTypeSpecDecltypeAuto.describe_signature", "ASTTrailingTypeSpecName.describe_signature", "ASTTrailingTypeSpec", "ASTTemplateArgConstant.get_id", "ASTTrailingTypeSpec.describe_signature", "ASTTrailingTypeSpecName.get_id", "ASTTemplateArgConstant._stringify", "ASTOperatorType", "ASTTemplateArgs._stringify", "ASTTrailingTypeSpecFundamental.get_id", "ASTTrailingTypeSpecFundamental", "ASTTrailingTypeSpecDecltypeAuto", "ASTTemplateArgs", "ASTFunctionParameter", "ASTTrailingTypeSpecDecltype.get_id", "ASTTrailingTypeSpecFundamental._stringify", "ASTFunctionParameter.get_id", "ASTOperatorType._stringify", "ASTTrailingTypeSpecFundamental.describe_signature", "ASTTrailingTypeSpecName._stringify", "ASTOperatorType.get_id", "ASTOperatorType.get_name_no_template", "ASTOperatorType._describe_identifier", "ASTTemplateArgs.describe_signature", "ASTTrailingTypeSpecName", "ASTTrailingTypeSpecName.name", "ASTTemplateArgConstant.describe_signature", "ASTTrailingTypeSpecDecltype._stringify", "ASTTrailingTypeSpecDecltypeAuto._stringify", "ASTTrailingTypeSpecDecltypeAuto.get_id", "ASTTrailingTypeSpecDecltype.describe_signature", "ASTTrailingTypeSpecDecltype", "ASTFunctionParameter._stringify", "ASTFunctionParameter.describe_signature", "ASTTemplateArgs.get_id"], "tokens": 2200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTOperatorType(ASTOperator):\n def __init__(self, type: \"ASTType\") -> None:\n self.type = type\n\n def get_id(self, version: int) -> str:\n if version == 1:\n return 'castto-%s-operator' % self.type.get_id(version)\n else:\n return 'cv' + self.type.get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return ''.join(['operator ', transform(self.type)])\n\n def get_name_no_template(self) -> str:\n return str(self)\n\n def _describe_identifier(self, signode: TextElement, identnode: TextElement,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('operator', 'operator')\n signode += addnodes.desc_sig_space()\n self.type.describe_signature(identnode, 'markType', env, symbol)\n\n\nclass ASTTemplateArgConstant(ASTBase):\n def __init__(self, value: ASTExpression) -> None:\n self.value = value\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.value)\n\n def get_id(self, version: int) -> str:\n if version == 1:\n return str(self).replace(' ', '-')\n if version == 2:\n return 'X' + str(self) + 'E'\n return 'X' + self.value.get_id(version) + 'E'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.value.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTTemplateArgs(ASTBase):\n def __init__(self, args: List[Union[\"ASTType\", ASTTemplateArgConstant]],\n packExpansion: bool) -> None:\n assert args is not None\n self.args = args\n self.packExpansion = packExpansion\n\n def get_id(self, version: int) -> str:\n if version == 1:\n res = []\n res.append(':')\n res.append('.'.join(a.get_id(version) for a in self.args))\n res.append(':')\n return ''.join(res)\n\n res = []\n res.append('I')\n if len(self.args) > 0:\n for a in self.args[:-1]:\n res.append(a.get_id(version))\n if self.packExpansion:\n res.append('J')\n res.append(self.args[-1].get_id(version))\n if self.packExpansion:\n res.append('E')\n res.append('E')\n return ''.join(res)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ', '.join(transform(a) for a in self.args)\n if self.packExpansion:\n res += '...'\n return '<' + res + '>'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('<', '<')\n first = True\n for a in self.args:\n if not first:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n first = False\n a.describe_signature(signode, 'markType', env, symbol=symbol)\n if self.packExpansion:\n signode += addnodes.desc_sig_punctuation('...', '...')\n signode += addnodes.desc_sig_punctuation('>', '>')\n\n\n# Main part of declarations\n################################################################################\n\nclass ASTTrailingTypeSpec(ASTBase):\n def get_id(self, version: int) -> str:\n raise NotImplementedError(repr(self))\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n raise NotImplementedError(repr(self))\n\n\nclass ASTTrailingTypeSpecFundamental(ASTTrailingTypeSpec):\n def __init__(self, names: List[str], canonNames: List[str]) -> None:\n assert len(names) != 0\n assert len(names) == len(canonNames), (names, canonNames)\n self.names = names\n # the canonical name list is for ID lookup\n self.canonNames = canonNames\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return ' '.join(self.names)\n\n def get_id(self, version: int) -> str:\n if version == 1:\n res = []\n for a in self.canonNames:\n if a in _id_fundamental_v1:\n res.append(_id_fundamental_v1[a])\n else:\n res.append(a)\n return '-'.join(res)\n\n txt = ' '.join(self.canonNames)\n if txt not in _id_fundamental_v2:\n raise Exception(\n 'Semi-internal error: Fundamental type \"%s\" can not be mapped '\n 'to an ID. Is it a true fundamental type? If not so, the '\n 'parser should have rejected it.' % txt)\n return _id_fundamental_v2[txt]\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n first = True\n for n in self.names:\n if not first:\n signode += addnodes.desc_sig_space()\n else:\n first = False\n signode += addnodes.desc_sig_keyword_type(n, n)\n\n\nclass ASTTrailingTypeSpecDecltypeAuto(ASTTrailingTypeSpec):\n def _stringify(self, transform: StringifyTransform) -> str:\n return 'decltype(auto)'\n\n def get_id(self, version: int) -> str:\n if version == 1:\n raise NoOldIdError()\n return 'Dc'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('decltype', 'decltype')\n signode += addnodes.desc_sig_punctuation('(', '(')\n signode += addnodes.desc_sig_keyword('auto', 'auto')\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTTrailingTypeSpecDecltype(ASTTrailingTypeSpec):\n def __init__(self, expr: ASTExpression):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return 'decltype(' + transform(self.expr) + ')'\n\n def get_id(self, version: int) -> str:\n if version == 1:\n raise NoOldIdError()\n return 'DT' + self.expr.get_id(version) + \"E\"\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('decltype', 'decltype')\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.expr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTTrailingTypeSpecName(ASTTrailingTypeSpec):\n def __init__(self, prefix: str, nestedName: ASTNestedName,\n placeholderType: Optional[str]) -> None:\n self.prefix = prefix\n self.nestedName = nestedName\n self.placeholderType = placeholderType\n\n @property\n def name(self) -> ASTNestedName:\n return self.nestedName\n\n def get_id(self, version: int) -> str:\n return self.nestedName.get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.prefix:\n res.append(self.prefix)\n res.append(' ')\n res.append(transform(self.nestedName))\n if self.placeholderType is not None:\n res.append(' ')\n res.append(self.placeholderType)\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n if self.prefix:\n signode += addnodes.desc_sig_keyword(self.prefix, self.prefix)\n signode += addnodes.desc_sig_space()\n self.nestedName.describe_signature(signode, mode, env, symbol=symbol)\n if self.placeholderType is not None:\n signode += addnodes.desc_sig_space()\n if self.placeholderType == 'auto':\n signode += addnodes.desc_sig_keyword('auto', 'auto')\n elif self.placeholderType == 'decltype(auto)':\n signode += addnodes.desc_sig_keyword('decltype', 'decltype')\n signode += addnodes.desc_sig_punctuation('(', '(')\n signode += addnodes.desc_sig_keyword('auto', 'auto')\n signode += addnodes.desc_sig_punctuation(')', ')')\n else:\n assert False, self.placeholderType\n\n\nclass ASTFunctionParameter(ASTBase):\n def __init__(self, arg: Union[\"ASTTypeWithInit\",\n \"ASTTemplateParamConstrainedTypeWithInit\"],\n ellipsis: bool = False) -> None:\n self.arg = arg\n self.ellipsis = ellipsis\n\n def get_id(self, version: int, objectType: str = None, symbol: \"Symbol\" = None) -> str:\n # this is not part of the normal name mangling in C++\n if symbol:\n # the anchor will be our parent\n return symbol.parent.declaration.get_id(version, prefixed=False)\n # else, do the usual\n if self.ellipsis:\n return 'z'\n else:\n return self.arg.get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.ellipsis:\n return '...'\n else:\n return transform(self.arg)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.ellipsis:\n signode += addnodes.desc_sig_punctuation('...', '...')\n else:\n self.arg.describe_signature(signode, mode, env, symbol=symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTNoexceptSpec_ASTParametersQualifiers._stringify.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTNoexceptSpec_ASTParametersQualifiers._stringify.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1993, "end_line": 2091, "span_ids": ["ASTParametersQualifiers._stringify", "ASTParametersQualifiers.get_param_id", "ASTParametersQualifiers.get_modifiers_id", "ASTNoexceptSpec._stringify", "ASTNoexceptSpec", "ASTNoexceptSpec.describe_signature", "ASTParametersQualifiers.function_params", "ASTParametersQualifiers"], "tokens": 727}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTNoexceptSpec(ASTBase):\n def __init__(self, expr: Optional[ASTExpression]):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.expr:\n return 'noexcept(' + transform(self.expr) + ')'\n return 'noexcept'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('noexcept', 'noexcept')\n if self.expr:\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.expr.describe_signature(signode, 'markType', env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTParametersQualifiers(ASTBase):\n def __init__(self, args: List[ASTFunctionParameter], volatile: bool, const: bool,\n refQual: Optional[str], exceptionSpec: ASTNoexceptSpec,\n trailingReturn: \"ASTType\",\n override: bool, final: bool, attrs: List[ASTAttribute],\n initializer: Optional[str]) -> None:\n self.args = args\n self.volatile = volatile\n self.const = const\n self.refQual = refQual\n self.exceptionSpec = exceptionSpec\n self.trailingReturn = trailingReturn\n self.override = override\n self.final = final\n self.attrs = attrs\n self.initializer = initializer\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.args\n\n def get_modifiers_id(self, version: int) -> str:\n res = []\n if self.volatile:\n res.append('V')\n if self.const:\n if version == 1:\n res.append('C')\n else:\n res.append('K')\n if self.refQual == '&&':\n res.append('O')\n elif self.refQual == '&':\n res.append('R')\n return ''.join(res)\n\n def get_param_id(self, version: int) -> str:\n if version == 1:\n if len(self.args) == 0:\n return ''\n else:\n return '__' + '.'.join(a.get_id(version) for a in self.args)\n if len(self.args) == 0:\n return 'v'\n else:\n return ''.join(a.get_id(version) for a in self.args)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append('(')\n first = True\n for a in self.args:\n if not first:\n res.append(', ')\n first = False\n res.append(str(a))\n res.append(')')\n if self.volatile:\n res.append(' volatile')\n if self.const:\n res.append(' const')\n if self.refQual:\n res.append(' ')\n res.append(self.refQual)\n if self.exceptionSpec:\n res.append(' ')\n res.append(transform(self.exceptionSpec))\n if self.trailingReturn:\n res.append(' -> ')\n res.append(transform(self.trailingReturn))\n if self.final:\n res.append(' final')\n if self.override:\n res.append(' override')\n for attr in self.attrs:\n res.append(' ')\n res.append(transform(attr))\n if self.initializer:\n res.append(' = ')\n res.append(self.initializer)\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTParametersQualifiers.describe_signature_ASTDeclSpecs.describe_signature.if_self_trailingTypeSpec_.if_len_str_self_rightSpec.self_rightSpecs_describe_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTParametersQualifiers.describe_signature_ASTDeclSpecs.describe_signature.if_self_trailingTypeSpec_.if_len_str_self_rightSpec.self_rightSpecs_describe_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2093, "end_line": 2341, "span_ids": ["ASTExplicitSpec._stringify", "ASTDeclSpecs.describe_signature", "ASTParametersQualifiers.describe_signature", "ASTDeclSpecs.get_id", "ASTDeclSpecsSimple._stringify", "ASTDeclSpecsSimple.mergeWith", "ASTDeclSpecsSimple", "ASTDeclSpecs", "ASTDeclSpecs._stringify", "ASTExplicitSpec.describe_signature", "ASTExplicitSpec", "ASTDeclSpecsSimple.describe_signature"], "tokens": 2124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTParametersQualifiers(ASTBase):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n # only use the desc_parameterlist for the outer list, not for inner lists\n if mode == 'lastIsName':\n paramlist = addnodes.desc_parameterlist()\n for arg in self.args:\n param = addnodes.desc_parameter('', '', noemph=True)\n arg.describe_signature(param, 'param', env, symbol=symbol)\n paramlist += param\n signode += paramlist\n else:\n signode += addnodes.desc_sig_punctuation('(', '(')\n first = True\n for arg in self.args:\n if not first:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n first = False\n arg.describe_signature(signode, 'markType', env, symbol=symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n def _add_anno(signode: TextElement, text: str) -> None:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_keyword(text, text)\n\n if self.volatile:\n _add_anno(signode, 'volatile')\n if self.const:\n _add_anno(signode, 'const')\n if self.refQual:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation(self.refQual, self.refQual)\n if self.exceptionSpec:\n signode += addnodes.desc_sig_space()\n self.exceptionSpec.describe_signature(signode, mode, env, symbol)\n if self.trailingReturn:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_operator('->', '->')\n signode += addnodes.desc_sig_space()\n self.trailingReturn.describe_signature(signode, mode, env, symbol)\n if self.final:\n _add_anno(signode, 'final')\n if self.override:\n _add_anno(signode, 'override')\n for attr in self.attrs:\n signode += addnodes.desc_sig_space()\n attr.describe_signature(signode)\n if self.initializer:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation('=', '=')\n signode += addnodes.desc_sig_space()\n assert self.initializer in ('0', 'delete', 'default')\n if self.initializer == '0':\n signode += addnodes.desc_sig_literal_number('0', '0')\n else:\n signode += addnodes.desc_sig_keyword(self.initializer, self.initializer)\n\n\nclass ASTExplicitSpec(ASTBase):\n def __init__(self, expr: Optional[ASTExpression]) -> None:\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ['explicit']\n if self.expr is not None:\n res.append('(')\n res.append(transform(self.expr))\n res.append(')')\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('explicit', 'explicit')\n if self.expr is not None:\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.expr.describe_signature(signode, 'markType', env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTDeclSpecsSimple(ASTBase):\n def __init__(self, storage: str, threadLocal: bool, inline: bool, virtual: bool,\n explicitSpec: Optional[ASTExplicitSpec],\n consteval: bool, constexpr: bool, constinit: bool,\n volatile: bool, const: bool, friend: bool,\n attrs: List[ASTAttribute]) -> None:\n self.storage = storage\n self.threadLocal = threadLocal\n self.inline = inline\n self.virtual = virtual\n self.explicitSpec = explicitSpec\n self.consteval = consteval\n self.constexpr = constexpr\n self.constinit = constinit\n self.volatile = volatile\n self.const = const\n self.friend = friend\n self.attrs = attrs\n\n def mergeWith(self, other: \"ASTDeclSpecsSimple\") -> \"ASTDeclSpecsSimple\":\n if not other:\n return self\n return ASTDeclSpecsSimple(self.storage or other.storage,\n self.threadLocal or other.threadLocal,\n self.inline or other.inline,\n self.virtual or other.virtual,\n self.explicitSpec or other.explicitSpec,\n self.consteval or other.consteval,\n self.constexpr or other.constexpr,\n self.constinit or other.constinit,\n self.volatile or other.volatile,\n self.const or other.const,\n self.friend or other.friend,\n self.attrs + other.attrs)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res: List[str] = []\n res.extend(transform(attr) for attr in self.attrs)\n if self.storage:\n res.append(self.storage)\n if self.threadLocal:\n res.append('thread_local')\n if self.inline:\n res.append('inline')\n if self.friend:\n res.append('friend')\n if self.virtual:\n res.append('virtual')\n if self.explicitSpec:\n res.append(transform(self.explicitSpec))\n if self.consteval:\n res.append('consteval')\n if self.constexpr:\n res.append('constexpr')\n if self.constinit:\n res.append('constinit')\n if self.volatile:\n res.append('volatile')\n if self.const:\n res.append('const')\n return ' '.join(res)\n\n def describe_signature(self, signode: TextElement,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n addSpace = False\n for attr in self.attrs:\n if addSpace:\n signode += addnodes.desc_sig_space()\n addSpace = True\n attr.describe_signature(signode)\n\n def _add(signode: TextElement, text: str) -> bool:\n if addSpace:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_keyword(text, text)\n return True\n\n if self.storage:\n addSpace = _add(signode, self.storage)\n if self.threadLocal:\n addSpace = _add(signode, 'thread_local')\n if self.inline:\n addSpace = _add(signode, 'inline')\n if self.friend:\n addSpace = _add(signode, 'friend')\n if self.virtual:\n addSpace = _add(signode, 'virtual')\n if self.explicitSpec:\n if addSpace:\n signode += addnodes.desc_sig_space()\n self.explicitSpec.describe_signature(signode, env, symbol)\n addSpace = True\n if self.consteval:\n addSpace = _add(signode, 'consteval')\n if self.constexpr:\n addSpace = _add(signode, 'constexpr')\n if self.constinit:\n addSpace = _add(signode, 'constinit')\n if self.volatile:\n addSpace = _add(signode, 'volatile')\n if self.const:\n addSpace = _add(signode, 'const')\n\n\nclass ASTDeclSpecs(ASTBase):\n def __init__(self, outer: str,\n leftSpecs: ASTDeclSpecsSimple, rightSpecs: ASTDeclSpecsSimple,\n trailing: ASTTrailingTypeSpec) -> None:\n # leftSpecs and rightSpecs are used for output\n # allSpecs are used for id generation\n self.outer = outer\n self.leftSpecs = leftSpecs\n self.rightSpecs = rightSpecs\n self.allSpecs = self.leftSpecs.mergeWith(self.rightSpecs)\n self.trailingTypeSpec = trailing\n\n def get_id(self, version: int) -> str:\n if version == 1:\n res = []\n res.append(self.trailingTypeSpec.get_id(version))\n if self.allSpecs.volatile:\n res.append('V')\n if self.allSpecs.const:\n res.append('C')\n return ''.join(res)\n res = []\n if self.allSpecs.volatile:\n res.append('V')\n if self.allSpecs.const:\n res.append('K')\n if self.trailingTypeSpec is not None:\n res.append(self.trailingTypeSpec.get_id(version))\n return ''.join(res)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res: List[str] = []\n l = transform(self.leftSpecs)\n if len(l) > 0:\n res.append(l)\n if self.trailingTypeSpec:\n if len(res) > 0:\n res.append(\" \")\n res.append(transform(self.trailingTypeSpec))\n r = str(self.rightSpecs)\n if len(r) > 0:\n if len(res) > 0:\n res.append(\" \")\n res.append(r)\n return \"\".join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n numChildren = len(signode)\n self.leftSpecs.describe_signature(signode, env, symbol)\n addSpace = len(signode) != numChildren\n\n if self.trailingTypeSpec:\n if addSpace:\n signode += addnodes.desc_sig_space()\n numChildren = len(signode)\n self.trailingTypeSpec.describe_signature(signode, mode, env,\n symbol=symbol)\n addSpace = len(signode) != numChildren\n\n if len(str(self.rightSpecs)) > 0:\n if addSpace:\n signode += addnodes.desc_sig_space()\n self.rightSpecs.describe_signature(signode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__Declarator_ASTDeclarator.describe_signature.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py__Declarator_ASTDeclarator.describe_signature.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2344, "end_line": 2420, "span_ids": ["ASTDeclarator.is_function_type", "ASTDeclarator.get_ptr_suffix_id", "ASTDeclarator.get_modifiers_id", "ASTDeclSpecs.describe_signature", "ASTDeclarator.get_param_id", "ASTArray", "ASTDeclarator.name_1", "ASTDeclarator.function_params", "ASTDeclarator.trailingReturn", "ASTArray.describe_signature", "ASTDeclarator.require_space_after_declSpecs", "ASTDeclarator.describe_signature", "ASTDeclarator", "ASTDeclarator.isPack", "ASTArray._stringify", "ASTDeclarator.get_type_id", "ASTDeclarator.name", "ASTArray.get_id"], "tokens": 534}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Declarator\n################################################################################\n\nclass ASTArray(ASTBase):\n def __init__(self, size: ASTExpression):\n self.size = size\n\n def _stringify(self, transform: StringifyTransform) -> str:\n if self.size:\n return '[' + transform(self.size) + ']'\n else:\n return '[]'\n\n def get_id(self, version: int) -> str:\n if version == 1:\n return 'A'\n if version == 2:\n if self.size:\n return 'A' + str(self.size) + '_'\n else:\n return 'A_'\n if self.size:\n return 'A' + self.size.get_id(version) + '_'\n else:\n return 'A_'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('[', '[')\n if self.size:\n self.size.describe_signature(signode, 'markType', env, symbol)\n signode += addnodes.desc_sig_punctuation(']', ']')\n\n\nclass ASTDeclarator(ASTBase):\n @property\n def name(self) -> ASTNestedName:\n raise NotImplementedError(repr(self))\n\n @name.setter\n def name(self, name: ASTNestedName) -> None:\n raise NotImplementedError(repr(self))\n\n @property\n def isPack(self) -> bool:\n raise NotImplementedError(repr(self))\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n raise NotImplementedError(repr(self))\n\n @property\n def trailingReturn(self) -> \"ASTType\":\n raise NotImplementedError(repr(self))\n\n def require_space_after_declSpecs(self) -> bool:\n raise NotImplementedError(repr(self))\n\n def get_modifiers_id(self, version: int) -> str:\n raise NotImplementedError(repr(self))\n\n def get_param_id(self, version: int) -> str:\n raise NotImplementedError(repr(self))\n\n def get_ptr_suffix_id(self, version: int) -> str:\n raise NotImplementedError(repr(self))\n\n def get_type_id(self, version: int, returnTypeId: str) -> str:\n raise NotImplementedError(repr(self))\n\n def is_function_type(self) -> bool:\n raise NotImplementedError(repr(self))\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n raise NotImplementedError(repr(self))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaratorNameParamQual_ASTDeclaratorPtr.describe_signature.self_next_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaratorNameParamQual_ASTDeclaratorPtr.describe_signature.self_next_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2423, "end_line": 2660, "span_ids": ["ASTDeclaratorPtr.name", "ASTDeclaratorNameParamQual.get_param_id", "ASTDeclaratorNameParamQual.trailingReturn", "ASTDeclaratorNameParamQual.describe_signature", "ASTDeclaratorNameParamQual.get_ptr_suffix_id", "ASTDeclaratorNameParamQual.get_type_id", "ASTDeclaratorNameParamQual.require_space_after_declSpecs", "ASTDeclaratorNameBitField", "ASTDeclaratorPtr.function_params", "ASTDeclaratorPtr.get_type_id", "ASTDeclaratorNameParamQual._stringify", "ASTDeclaratorNameParamQual.name", "ASTDeclaratorNameBitField.is_function_type", "ASTDeclaratorPtr.is_function_type", "ASTDeclaratorPtr", "ASTDeclaratorNameBitField.name_1", "ASTDeclaratorPtr.describe_signature", "ASTDeclaratorPtr.require_space_after_declSpecs", "ASTDeclaratorNameParamQual.name_1", "ASTDeclaratorPtr._stringify", "ASTDeclaratorNameParamQual.get_modifiers_id", "ASTDeclaratorNameParamQual.function_params", "ASTDeclaratorPtr.get_param_id", "ASTDeclaratorPtr.get_ptr_suffix_id", "ASTDeclaratorNameBitField._stringify", "ASTDeclaratorPtr.get_modifiers_id", "ASTDeclaratorNameParamQual.isPack", "ASTDeclaratorPtr.name_1", "ASTDeclaratorNameParamQual.is_function_type", "ASTDeclaratorNameBitField.get_param_id", "ASTDeclaratorNameBitField.name", "ASTDeclaratorNameBitField.describe_signature", "ASTDeclaratorPtr.trailingReturn", "ASTDeclaratorNameParamQual", "ASTDeclaratorNameBitField.require_space_after_declSpecs", "ASTDeclaratorNameBitField.get_ptr_suffix_id"], "tokens": 1845}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaratorNameParamQual(ASTDeclarator):\n def __init__(self, declId: ASTNestedName,\n arrayOps: List[ASTArray],\n paramQual: ASTParametersQualifiers) -> None:\n self.declId = declId\n self.arrayOps = arrayOps\n self.paramQual = paramQual\n\n @property\n def name(self) -> ASTNestedName:\n return self.declId\n\n @name.setter\n def name(self, name: ASTNestedName) -> None:\n self.declId = name\n\n @property\n def isPack(self) -> bool:\n return False\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.paramQual.function_params\n\n @property\n def trailingReturn(self) -> \"ASTType\":\n return self.paramQual.trailingReturn\n\n # only the modifiers for a function, e.g.,\n def get_modifiers_id(self, version: int) -> str:\n # cv-qualifiers\n if self.paramQual:\n return self.paramQual.get_modifiers_id(version)\n raise Exception(\"This should only be called on a function: %s\" % self)\n\n def get_param_id(self, version: int) -> str: # only the parameters (if any)\n if self.paramQual:\n return self.paramQual.get_param_id(version)\n else:\n return ''\n\n def get_ptr_suffix_id(self, version: int) -> str: # only the array specifiers\n return ''.join(a.get_id(version) for a in self.arrayOps)\n\n def get_type_id(self, version: int, returnTypeId: str) -> str:\n assert version >= 2\n res = []\n # TODO: can we actually have both array ops and paramQual?\n res.append(self.get_ptr_suffix_id(version))\n if self.paramQual:\n res.append(self.get_modifiers_id(version))\n res.append('F')\n res.append(returnTypeId)\n res.append(self.get_param_id(version))\n res.append('E')\n else:\n res.append(returnTypeId)\n return ''.join(res)\n\n # ------------------------------------------------------------------------\n\n def require_space_after_declSpecs(self) -> bool:\n return self.declId is not None\n\n def is_function_type(self) -> bool:\n return self.paramQual is not None\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.declId:\n res.append(transform(self.declId))\n for op in self.arrayOps:\n res.append(transform(op))\n if self.paramQual:\n res.append(transform(self.paramQual))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.declId:\n self.declId.describe_signature(signode, mode, env, symbol)\n for op in self.arrayOps:\n op.describe_signature(signode, mode, env, symbol)\n if self.paramQual:\n self.paramQual.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTDeclaratorNameBitField(ASTDeclarator):\n def __init__(self, declId: ASTNestedName, size: ASTExpression):\n self.declId = declId\n self.size = size\n\n @property\n def name(self) -> ASTNestedName:\n return self.declId\n\n @name.setter\n def name(self, name: ASTNestedName) -> None:\n self.declId = name\n\n def get_param_id(self, version: int) -> str: # only the parameters (if any)\n return ''\n\n def get_ptr_suffix_id(self, version: int) -> str: # only the array specifiers\n return ''\n\n # ------------------------------------------------------------------------\n\n def require_space_after_declSpecs(self) -> bool:\n return self.declId is not None\n\n def is_function_type(self) -> bool:\n return False\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.declId:\n res.append(transform(self.declId))\n res.append(\" : \")\n res.append(transform(self.size))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.declId:\n self.declId.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation(':', ':')\n signode += addnodes.desc_sig_space()\n self.size.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTDeclaratorPtr(ASTDeclarator):\n def __init__(self, next: ASTDeclarator, volatile: bool, const: bool,\n attrs: List[ASTAttribute]) -> None:\n assert next\n self.next = next\n self.volatile = volatile\n self.const = const\n self.attrs = attrs\n\n @property\n def name(self) -> ASTNestedName:\n return self.next.name\n\n @name.setter\n def name(self, name: ASTNestedName) -> None:\n self.next.name = name\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.next.function_params\n\n @property\n def trailingReturn(self) -> \"ASTType\":\n return self.next.trailingReturn\n\n def require_space_after_declSpecs(self) -> bool:\n return self.next.require_space_after_declSpecs()\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ['*']\n for a in self.attrs:\n res.append(transform(a))\n if len(self.attrs) > 0 and (self.volatile or self.const):\n res.append(' ')\n if self.volatile:\n res.append('volatile')\n if self.const:\n if self.volatile:\n res.append(' ')\n res.append('const')\n if self.const or self.volatile or len(self.attrs) > 0:\n if self.next.require_space_after_declSpecs():\n res.append(' ')\n res.append(transform(self.next))\n return ''.join(res)\n\n def get_modifiers_id(self, version: int) -> str:\n return self.next.get_modifiers_id(version)\n\n def get_param_id(self, version: int) -> str:\n return self.next.get_param_id(version)\n\n def get_ptr_suffix_id(self, version: int) -> str:\n if version == 1:\n res = ['P']\n if self.volatile:\n res.append('V')\n if self.const:\n res.append('C')\n res.append(self.next.get_ptr_suffix_id(version))\n return ''.join(res)\n\n res = [self.next.get_ptr_suffix_id(version)]\n res.append('P')\n if self.volatile:\n res.append('V')\n if self.const:\n res.append('C')\n return ''.join(res)\n\n def get_type_id(self, version: int, returnTypeId: str) -> str:\n # ReturnType *next, so we are part of the return type of 'next\n res = ['P']\n if self.volatile:\n res.append('V')\n if self.const:\n res.append('C')\n res.append(returnTypeId)\n return self.next.get_type_id(version, returnTypeId=''.join(res))\n\n def is_function_type(self) -> bool:\n return self.next.is_function_type()\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('*', '*')\n for a in self.attrs:\n a.describe_signature(signode)\n if len(self.attrs) > 0 and (self.volatile or self.const):\n signode += addnodes.desc_sig_space()\n\n def _add_anno(signode: TextElement, text: str) -> None:\n signode += addnodes.desc_sig_keyword(text, text)\n if self.volatile:\n _add_anno(signode, 'volatile')\n if self.const:\n if self.volatile:\n signode += addnodes.desc_sig_space()\n _add_anno(signode, 'const')\n if self.const or self.volatile or len(self.attrs) > 0:\n if self.next.require_space_after_declSpecs():\n signode += addnodes.desc_sig_space()\n self.next.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaratorRef_ASTDeclaratorMemPtr.describe_signature.self_next_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaratorRef_ASTDeclaratorMemPtr.describe_signature.self_next_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2663, "end_line": 2887, "span_ids": ["ASTDeclaratorParamPack", "ASTDeclaratorRef.get_type_id", "ASTDeclaratorMemPtr._stringify", "ASTDeclaratorParamPack.get_ptr_suffix_id", "ASTDeclaratorParamPack.require_space_after_declSpecs", "ASTDeclaratorParamPack.is_function_type", "ASTDeclaratorMemPtr.name_1", "ASTDeclaratorRef.describe_signature", "ASTDeclaratorParamPack.name_1", "ASTDeclaratorParamPack.name", "ASTDeclaratorParamPack.trailingReturn", "ASTDeclaratorParamPack.function_params", "ASTDeclaratorRef", "ASTDeclaratorParamPack.get_modifiers_id", "ASTDeclaratorRef.trailingReturn", "ASTDeclaratorMemPtr.is_function_type", "ASTDeclaratorMemPtr.get_param_id", "ASTDeclaratorMemPtr.function_params", "ASTDeclaratorRef.is_function_type", "ASTDeclaratorRef.get_ptr_suffix_id", "ASTDeclaratorRef._stringify", "ASTDeclaratorMemPtr.get_modifiers_id", "ASTDeclaratorMemPtr.get_type_id", "ASTDeclaratorMemPtr.trailingReturn", "ASTDeclaratorMemPtr.name", "ASTDeclaratorRef.require_space_after_declSpecs", "ASTDeclaratorRef.get_param_id", "ASTDeclaratorParamPack._stringify", "ASTDeclaratorMemPtr", "ASTDeclaratorMemPtr.get_ptr_suffix_id", "ASTDeclaratorParamPack.get_type_id", "ASTDeclaratorRef.function_params", "ASTDeclaratorParamPack.describe_signature", "ASTDeclaratorRef.name", "ASTDeclaratorRef.get_modifiers_id", "ASTDeclaratorMemPtr.require_space_after_declSpecs", "ASTDeclaratorMemPtr.describe_signature", "ASTDeclaratorRef.isPack", "ASTDeclaratorParamPack.get_param_id", "ASTDeclaratorRef.name_1"], "tokens": 1779}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaratorRef(ASTDeclarator):\n def __init__(self, next: ASTDeclarator, attrs: List[ASTAttribute]) -> None:\n assert next\n self.next = next\n self.attrs = attrs\n\n @property\n def name(self) -> ASTNestedName:\n return self.next.name\n\n @name.setter\n def name(self, name: ASTNestedName) -> None:\n self.next.name = name\n\n @property\n def isPack(self) -> bool:\n return True\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.next.function_params\n\n @property\n def trailingReturn(self) -> \"ASTType\":\n return self.next.trailingReturn\n\n def require_space_after_declSpecs(self) -> bool:\n return self.next.require_space_after_declSpecs()\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ['&']\n for a in self.attrs:\n res.append(transform(a))\n if len(self.attrs) > 0 and self.next.require_space_after_declSpecs():\n res.append(' ')\n res.append(transform(self.next))\n return ''.join(res)\n\n def get_modifiers_id(self, version: int) -> str:\n return self.next.get_modifiers_id(version)\n\n def get_param_id(self, version: int) -> str: # only the parameters (if any)\n return self.next.get_param_id(version)\n\n def get_ptr_suffix_id(self, version: int) -> str:\n if version == 1:\n return 'R' + self.next.get_ptr_suffix_id(version)\n else:\n return self.next.get_ptr_suffix_id(version) + 'R'\n\n def get_type_id(self, version: int, returnTypeId: str) -> str:\n assert version >= 2\n # ReturnType &next, so we are part of the return type of 'next\n return self.next.get_type_id(version, returnTypeId='R' + returnTypeId)\n\n def is_function_type(self) -> bool:\n return self.next.is_function_type()\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('&', '&')\n for a in self.attrs:\n a.describe_signature(signode)\n if len(self.attrs) > 0 and self.next.require_space_after_declSpecs():\n signode += addnodes.desc_sig_space()\n self.next.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTDeclaratorParamPack(ASTDeclarator):\n def __init__(self, next: ASTDeclarator) -> None:\n assert next\n self.next = next\n\n @property\n def name(self) -> ASTNestedName:\n return self.next.name\n\n @name.setter\n def name(self, name: ASTNestedName) -> None:\n self.next.name = name\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.next.function_params\n\n @property\n def trailingReturn(self) -> \"ASTType\":\n return self.next.trailingReturn\n\n def require_space_after_declSpecs(self) -> bool:\n return False\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = transform(self.next)\n if self.next.name:\n res = ' ' + res\n return '...' + res\n\n def get_modifiers_id(self, version: int) -> str:\n return self.next.get_modifiers_id(version)\n\n def get_param_id(self, version: int) -> str: # only the parameters (if any)\n return self.next.get_param_id(version)\n\n def get_ptr_suffix_id(self, version: int) -> str:\n if version == 1:\n return 'Dp' + self.next.get_ptr_suffix_id(version)\n else:\n return self.next.get_ptr_suffix_id(version) + 'Dp'\n\n def get_type_id(self, version: int, returnTypeId: str) -> str:\n assert version >= 2\n # ReturnType... next, so we are part of the return type of 'next\n return self.next.get_type_id(version, returnTypeId='Dp' + returnTypeId)\n\n def is_function_type(self) -> bool:\n return self.next.is_function_type()\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('...', '...')\n if self.next.name:\n signode += addnodes.desc_sig_space()\n self.next.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTDeclaratorMemPtr(ASTDeclarator):\n def __init__(self, className: ASTNestedName,\n const: bool, volatile: bool, next: ASTDeclarator) -> None:\n assert className\n assert next\n self.className = className\n self.const = const\n self.volatile = volatile\n self.next = next\n\n @property\n def name(self) -> ASTNestedName:\n return self.next.name\n\n @name.setter\n def name(self, name: ASTNestedName) -> None:\n self.next.name = name\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.next.function_params\n\n @property\n def trailingReturn(self) -> \"ASTType\":\n return self.next.trailingReturn\n\n def require_space_after_declSpecs(self) -> bool:\n return True\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.className))\n res.append('::*')\n if self.volatile:\n res.append('volatile')\n if self.const:\n if self.volatile:\n res.append(' ')\n res.append('const')\n if self.next.require_space_after_declSpecs():\n res.append(' ')\n res.append(transform(self.next))\n return ''.join(res)\n\n def get_modifiers_id(self, version: int) -> str:\n if version == 1:\n raise NoOldIdError()\n else:\n return self.next.get_modifiers_id(version)\n\n def get_param_id(self, version: int) -> str: # only the parameters (if any)\n if version == 1:\n raise NoOldIdError()\n else:\n return self.next.get_param_id(version)\n\n def get_ptr_suffix_id(self, version: int) -> str:\n if version == 1:\n raise NoOldIdError()\n else:\n raise NotImplementedError()\n return self.next.get_ptr_suffix_id(version) + 'Dp'\n\n def get_type_id(self, version: int, returnTypeId: str) -> str:\n assert version >= 2\n # ReturnType name::* next, so we are part of the return type of next\n nextReturnTypeId = ''\n if self.volatile:\n nextReturnTypeId += 'V'\n if self.const:\n nextReturnTypeId += 'K'\n nextReturnTypeId += 'M'\n nextReturnTypeId += self.className.get_id(version)\n nextReturnTypeId += returnTypeId\n return self.next.get_type_id(version, nextReturnTypeId)\n\n def is_function_type(self) -> bool:\n return self.next.is_function_type()\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.className.describe_signature(signode, 'markType', env, symbol)\n signode += addnodes.desc_sig_punctuation('::', '::')\n signode += addnodes.desc_sig_punctuation('*', '*')\n\n def _add_anno(signode: TextElement, text: str) -> None:\n signode += addnodes.desc_sig_keyword(text, text)\n if self.volatile:\n _add_anno(signode, 'volatile')\n if self.const:\n if self.volatile:\n signode += addnodes.desc_sig_space()\n _add_anno(signode, 'const')\n if self.next.require_space_after_declSpecs():\n signode += addnodes.desc_sig_space()\n self.next.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaratorParen_ASTType.describe_signature.self_decl_describe_signat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTDeclaratorParen_ASTType.describe_signature.self_decl_describe_signat", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2890, "end_line": 3135, "span_ids": ["ASTInitializer.describe_signature", "ASTDeclaratorParen.is_function_type", "ASTInitializer", "ASTDeclaratorParen.describe_signature", "ASTInitializer._stringify", "ASTPackExpansionExpr.get_id", "ASTParenExprList", "ASTDeclaratorParen.get_ptr_suffix_id", "ASTType.trailingReturn", "ASTDeclaratorParen.get_type_id", "ASTParenExprList.get_id", "ASTDeclaratorParen.name", "ASTType.name", "ASTDeclaratorParen", "ASTDeclaratorParen.name_1", "ASTType.get_id", "ASTType.get_type_declaration_prefix", "ASTParenExprList.describe_signature", "ASTPackExpansionExpr.describe_signature", "ASTType", "ASTDeclaratorParen.get_param_id", "ASTParenExprList._stringify", "ASTType.function_params", "ASTDeclaratorParen.get_modifiers_id", "ASTDeclaratorParen._stringify", "ASTDeclaratorParen.require_space_after_declSpecs", "ASTPackExpansionExpr._stringify", "ASTDeclaratorParen.trailingReturn", "ASTType.isPack", "ASTType._stringify", "ASTDeclaratorParen.function_params", "ASTType.name_1", "ASTPackExpansionExpr", "ASTType.describe_signature"], "tokens": 2138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTDeclaratorParen(ASTDeclarator):\n def __init__(self, inner: ASTDeclarator, next: ASTDeclarator) -> None:\n assert inner\n assert next\n self.inner = inner\n self.next = next\n # TODO: we assume the name, params, and qualifiers are in inner\n\n @property\n def name(self) -> ASTNestedName:\n return self.inner.name\n\n @name.setter\n def name(self, name: ASTNestedName) -> None:\n self.inner.name = name\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.inner.function_params\n\n @property\n def trailingReturn(self) -> \"ASTType\":\n return self.inner.trailingReturn\n\n def require_space_after_declSpecs(self) -> bool:\n return True\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ['(']\n res.append(transform(self.inner))\n res.append(')')\n res.append(transform(self.next))\n return ''.join(res)\n\n def get_modifiers_id(self, version: int) -> str:\n return self.inner.get_modifiers_id(version)\n\n def get_param_id(self, version: int) -> str: # only the parameters (if any)\n return self.inner.get_param_id(version)\n\n def get_ptr_suffix_id(self, version: int) -> str:\n if version == 1:\n raise NoOldIdError() # TODO: was this implemented before?\n return self.next.get_ptr_suffix_id(version) + \\\n self.inner.get_ptr_suffix_id(version)\n else:\n return self.inner.get_ptr_suffix_id(version) + \\\n self.next.get_ptr_suffix_id(version)\n\n def get_type_id(self, version: int, returnTypeId: str) -> str:\n assert version >= 2\n # ReturnType (inner)next, so 'inner' returns everything outside\n nextId = self.next.get_type_id(version, returnTypeId)\n return self.inner.get_type_id(version, returnTypeId=nextId)\n\n def is_function_type(self) -> bool:\n return self.inner.is_function_type()\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('(', '(')\n self.inner.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n self.next.describe_signature(signode, \"noneIsName\", env, symbol)\n\n\n# Type and initializer stuff\n##############################################################################################\n\nclass ASTPackExpansionExpr(ASTExpression):\n def __init__(self, expr: Union[ASTExpression, ASTBracedInitList]):\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.expr) + '...'\n\n def get_id(self, version: int) -> str:\n id = self.expr.get_id(version)\n return 'sp' + id\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.expr.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation('...', '...')\n\n\nclass ASTParenExprList(ASTBaseParenExprList):\n def __init__(self, exprs: List[Union[ASTExpression, ASTBracedInitList]]) -> None:\n self.exprs = exprs\n\n def get_id(self, version: int) -> str:\n return \"pi%sE\" % ''.join(e.get_id(version) for e in self.exprs)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n exprs = [transform(e) for e in self.exprs]\n return '(%s)' % ', '.join(exprs)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n signode += addnodes.desc_sig_punctuation('(', '(')\n first = True\n for e in self.exprs:\n if not first:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n else:\n first = False\n e.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation(')', ')')\n\n\nclass ASTInitializer(ASTBase):\n def __init__(self, value: Union[ASTExpression, ASTBracedInitList],\n hasAssign: bool = True) -> None:\n self.value = value\n self.hasAssign = hasAssign\n\n def _stringify(self, transform: StringifyTransform) -> str:\n val = transform(self.value)\n if self.hasAssign:\n return ' = ' + val\n else:\n return val\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.hasAssign:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation('=', '=')\n signode += addnodes.desc_sig_space()\n self.value.describe_signature(signode, 'markType', env, symbol)\n\n\nclass ASTType(ASTBase):\n def __init__(self, declSpecs: ASTDeclSpecs, decl: ASTDeclarator) -> None:\n assert declSpecs\n assert decl\n self.declSpecs = declSpecs\n self.decl = decl\n\n @property\n def name(self) -> ASTNestedName:\n return self.decl.name\n\n @name.setter\n def name(self, name: ASTNestedName) -> None:\n self.decl.name = name\n\n @property\n def isPack(self) -> bool:\n return self.decl.isPack\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n return self.decl.function_params\n\n @property\n def trailingReturn(self) -> \"ASTType\":\n return self.decl.trailingReturn\n\n def get_id(self, version: int, objectType: str = None,\n symbol: \"Symbol\" = None) -> str:\n if version == 1:\n res = []\n if objectType: # needs the name\n if objectType == 'function': # also modifiers\n res.append(symbol.get_full_nested_name().get_id(version))\n res.append(self.decl.get_param_id(version))\n res.append(self.decl.get_modifiers_id(version))\n if (self.declSpecs.leftSpecs.constexpr or\n (self.declSpecs.rightSpecs and\n self.declSpecs.rightSpecs.constexpr)):\n res.append('CE')\n elif objectType == 'type': # just the name\n res.append(symbol.get_full_nested_name().get_id(version))\n else:\n print(objectType)\n assert False\n else: # only type encoding\n if self.decl.is_function_type():\n raise NoOldIdError()\n res.append(self.declSpecs.get_id(version))\n res.append(self.decl.get_ptr_suffix_id(version))\n res.append(self.decl.get_param_id(version))\n return ''.join(res)\n # other versions\n res = []\n if objectType: # needs the name\n if objectType == 'function': # also modifiers\n modifiers = self.decl.get_modifiers_id(version)\n res.append(symbol.get_full_nested_name().get_id(version, modifiers))\n if version >= 4:\n # with templates we need to mangle the return type in as well\n templ = symbol.declaration.templatePrefix\n if templ is not None:\n typeId = self.decl.get_ptr_suffix_id(version)\n if self.trailingReturn:\n returnTypeId = self.trailingReturn.get_id(version)\n else:\n returnTypeId = self.declSpecs.get_id(version)\n res.append(typeId)\n res.append(returnTypeId)\n res.append(self.decl.get_param_id(version))\n elif objectType == 'type': # just the name\n res.append(symbol.get_full_nested_name().get_id(version))\n else:\n print(objectType)\n assert False\n else: # only type encoding\n # the 'returnType' of a non-function type is simply just the last\n # type, i.e., for 'int*' it is 'int'\n returnTypeId = self.declSpecs.get_id(version)\n typeId = self.decl.get_type_id(version, returnTypeId)\n res.append(typeId)\n return ''.join(res)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n declSpecs = transform(self.declSpecs)\n res.append(declSpecs)\n if self.decl.require_space_after_declSpecs() and len(declSpecs) > 0:\n res.append(' ')\n res.append(transform(self.decl))\n return ''.join(res)\n\n def get_type_declaration_prefix(self) -> str:\n if self.declSpecs.trailingTypeSpec:\n return 'typedef'\n else:\n return 'type'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.declSpecs.describe_signature(signode, 'markType', env, symbol)\n if (self.decl.require_space_after_declSpecs() and\n len(str(self.declSpecs)) > 0):\n signode += addnodes.desc_sig_space()\n # for parameters that don't really declare new names we get 'markType',\n # this should not be propagated, but be 'noneIsName'.\n if mode == 'markType':\n mode = 'noneIsName'\n self.decl.describe_signature(signode, mode, env, symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTTemplateParamConstrainedTypeWithInit_ASTEnum._stringify.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTTemplateParamConstrainedTypeWithInit_ASTEnum._stringify.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3138, "end_line": 3414, "span_ids": ["ASTTemplateParamConstrainedTypeWithInit._stringify", "ASTConcept", "ASTUnion.describe_signature", "ASTTypeWithInit._stringify", "ASTTypeWithInit.isPack", "ASTTemplateParamConstrainedTypeWithInit.get_id", "ASTConcept._stringify", "ASTTypeWithInit.describe_signature", "ASTTemplateParamConstrainedTypeWithInit.describe_signature", "ASTConcept.get_id", "ASTClass._stringify", "ASTTypeUsing.describe_signature", "ASTTypeUsing", "ASTTemplateParamConstrainedTypeWithInit.isPack", "ASTTemplateParamConstrainedTypeWithInit", "ASTClass.describe_signature", "ASTBaseClass._stringify", "ASTBaseClass", "ASTUnion._stringify", "ASTEnum._stringify", "ASTTemplateParamConstrainedTypeWithInit.name", "ASTTypeWithInit.name", "ASTTypeUsing.get_type_declaration_prefix", "ASTConcept.name", "ASTTypeWithInit", "ASTConcept.describe_signature", "ASTTypeWithInit.get_id", "ASTEnum", "ASTClass", "ASTClass.get_id", "ASTUnion", "ASTTypeUsing.get_id", "ASTTypeUsing._stringify", "ASTBaseClass.describe_signature", "ASTUnion.get_id", "ASTEnum.get_id"], "tokens": 2230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTTemplateParamConstrainedTypeWithInit(ASTBase):\n def __init__(self, type: ASTType, init: ASTType) -> None:\n assert type\n self.type = type\n self.init = init\n\n @property\n def name(self) -> ASTNestedName:\n return self.type.name\n\n @property\n def isPack(self) -> bool:\n return self.type.isPack\n\n def get_id(self, version: int, objectType: str = None, symbol: \"Symbol\" = None) -> str:\n # this is not part of the normal name mangling in C++\n assert version >= 2\n if symbol:\n # the anchor will be our parent\n return symbol.parent.declaration.get_id(version, prefixed=False)\n else:\n return self.type.get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = transform(self.type)\n if self.init:\n res += \" = \"\n res += transform(self.init)\n return res\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.type.describe_signature(signode, mode, env, symbol)\n if self.init:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation('=', '=')\n signode += addnodes.desc_sig_space()\n self.init.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTTypeWithInit(ASTBase):\n def __init__(self, type: ASTType, init: ASTInitializer) -> None:\n self.type = type\n self.init = init\n\n @property\n def name(self) -> ASTNestedName:\n return self.type.name\n\n @property\n def isPack(self) -> bool:\n return self.type.isPack\n\n def get_id(self, version: int, objectType: str = None,\n symbol: \"Symbol\" = None) -> str:\n if objectType != 'member':\n return self.type.get_id(version, objectType)\n if version == 1:\n return (symbol.get_full_nested_name().get_id(version) + '__' +\n self.type.get_id(version))\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.type))\n if self.init:\n res.append(transform(self.init))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.type.describe_signature(signode, mode, env, symbol)\n if self.init:\n self.init.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTTypeUsing(ASTBase):\n def __init__(self, name: ASTNestedName, type: ASTType) -> None:\n self.name = name\n self.type = type\n\n def get_id(self, version: int, objectType: str = None,\n symbol: \"Symbol\" = None) -> str:\n if version == 1:\n raise NoOldIdError()\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.name))\n if self.type:\n res.append(' = ')\n res.append(transform(self.type))\n return ''.join(res)\n\n def get_type_declaration_prefix(self) -> str:\n return 'using'\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.name.describe_signature(signode, mode, env, symbol=symbol)\n if self.type:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation('=', '=')\n signode += addnodes.desc_sig_space()\n self.type.describe_signature(signode, 'markType', env, symbol=symbol)\n\n\n# Other declarations\n##############################################################################################\n\nclass ASTConcept(ASTBase):\n def __init__(self, nestedName: ASTNestedName, initializer: ASTInitializer) -> None:\n self.nestedName = nestedName\n self.initializer = initializer\n\n @property\n def name(self) -> ASTNestedName:\n return self.nestedName\n\n def get_id(self, version: int, objectType: str = None,\n symbol: \"Symbol\" = None) -> str:\n if version == 1:\n raise NoOldIdError()\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = transform(self.nestedName)\n if self.initializer:\n res += transform(self.initializer)\n return res\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.nestedName.describe_signature(signode, mode, env, symbol)\n if self.initializer:\n self.initializer.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTBaseClass(ASTBase):\n def __init__(self, name: ASTNestedName, visibility: str,\n virtual: bool, pack: bool) -> None:\n self.name = name\n self.visibility = visibility\n self.virtual = virtual\n self.pack = pack\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.visibility is not None:\n res.append(self.visibility)\n res.append(' ')\n if self.virtual:\n res.append('virtual ')\n res.append(transform(self.name))\n if self.pack:\n res.append('...')\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n if self.visibility is not None:\n signode += addnodes.desc_sig_keyword(self.visibility,\n self.visibility)\n signode += addnodes.desc_sig_space()\n if self.virtual:\n signode += addnodes.desc_sig_keyword('virtual', 'virtual')\n signode += addnodes.desc_sig_space()\n self.name.describe_signature(signode, 'markType', env, symbol=symbol)\n if self.pack:\n signode += addnodes.desc_sig_punctuation('...', '...')\n\n\nclass ASTClass(ASTBase):\n def __init__(self, name: ASTNestedName, final: bool, bases: List[ASTBaseClass],\n attrs: List[ASTAttribute]) -> None:\n self.name = name\n self.final = final\n self.bases = bases\n self.attrs = attrs\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n for attr in self.attrs:\n res.append(transform(attr) + ' ')\n res.append(transform(self.name))\n if self.final:\n res.append(' final')\n if len(self.bases) > 0:\n res.append(' : ')\n first = True\n for b in self.bases:\n if not first:\n res.append(', ')\n first = False\n res.append(transform(b))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n for attr in self.attrs:\n attr.describe_signature(signode)\n signode += addnodes.desc_sig_space()\n self.name.describe_signature(signode, mode, env, symbol=symbol)\n if self.final:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_keyword('final', 'final')\n if len(self.bases) > 0:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation(':', ':')\n signode += addnodes.desc_sig_space()\n for b in self.bases:\n b.describe_signature(signode, mode, env, symbol=symbol)\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n signode.pop()\n signode.pop()\n\n\nclass ASTUnion(ASTBase):\n def __init__(self, name: ASTNestedName, attrs: List[ASTAttribute]) -> None:\n self.name = name\n self.attrs = attrs\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n if version == 1:\n raise NoOldIdError()\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n for attr in self.attrs:\n res.append(transform(attr) + ' ')\n res.append(transform(self.name))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n for attr in self.attrs:\n attr.describe_signature(signode)\n signode += addnodes.desc_sig_space()\n self.name.describe_signature(signode, mode, env, symbol=symbol)\n\n\nclass ASTEnum(ASTBase):\n def __init__(self, name: ASTNestedName, scoped: str, underlyingType: ASTType,\n attrs: List[ASTAttribute]) -> None:\n self.name = name\n self.scoped = scoped\n self.underlyingType = underlyingType\n self.attrs = attrs\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n if version == 1:\n raise NoOldIdError()\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.scoped:\n res.append(self.scoped)\n res.append(' ')\n for attr in self.attrs:\n res.append(transform(attr) + ' ')\n res.append(transform(self.name))\n if self.underlyingType:\n res.append(' : ')\n res.append(transform(self.underlyingType))\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTEnum.describe_signature_ASTTemplateParams.describe_signature.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTEnum.describe_signature_ASTTemplateParams.describe_signature.None_2", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3416, "end_line": 3683, "span_ids": ["ASTTemplateParamNonType._stringify", "ASTTemplateParam.get_id", "ASTTemplateParamTemplateType.isPack", "ASTTemplateParamNonType.describe_signature", "ASTTemplateParamTemplateType.name", "ASTEnumerator", "ASTTemplateParamType._stringify", "ASTTemplateParamType", "ASTTemplateParamTemplateType.get_identifier", "ASTTemplateParamType.get_identifier", "ASTEnumerator.describe_signature", "ASTTemplateParamType.name", "ASTTemplateParamType.get_id", "ASTTemplateParamNonType.isPack", "ASTTemplateParams.get_id", "ASTTemplateParamNonType", "ASTTemplateKeyParamPackIdDefault.get_identifier", "ASTTemplateParamType.describe_signature", "ASTTemplateKeyParamPackIdDefault", "ASTTemplateKeyParamPackIdDefault._stringify", "ASTTemplateParamTemplateType._stringify", "ASTTemplateKeyParamPackIdDefault.get_id", "ASTTemplateParamType.isPack", "ASTTemplateParams.describe_signature", "ASTTemplateParamNonType.get_id", "ASTTemplateParam.describe_signature", "ASTTemplateParamNonType.name", "ASTTemplateParams", "ASTEnum.describe_signature", "ASTTemplateKeyParamPackIdDefault.describe_signature", "ASTTemplateParam.get_identifier", "ASTTemplateParams._stringify", "ASTTemplateParamNonType.get_identifier", "ASTEnumerator._stringify", "ASTTemplateParamTemplateType.get_id", "ASTTemplateParamTemplateType.describe_signature", "ASTTemplateParamTemplateType", "ASTEnumerator.get_id", "ASTTemplateParam"], "tokens": 2143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTEnum(ASTBase):\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n # self.scoped has been done by the CPPEnumObject\n for attr in self.attrs:\n attr.describe_signature(signode)\n signode += addnodes.desc_sig_space()\n self.name.describe_signature(signode, mode, env, symbol=symbol)\n if self.underlyingType:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation(':', ':')\n signode += addnodes.desc_sig_space()\n self.underlyingType.describe_signature(signode, 'noneIsName',\n env, symbol=symbol)\n\n\nclass ASTEnumerator(ASTBase):\n def __init__(self, name: ASTNestedName, init: ASTInitializer) -> None:\n self.name = name\n self.init = init\n\n def get_id(self, version: int, objectType: str, symbol: \"Symbol\") -> str:\n if version == 1:\n raise NoOldIdError()\n return symbol.get_full_nested_name().get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.name))\n if self.init:\n res.append(transform(self.init))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n verify_description_mode(mode)\n self.name.describe_signature(signode, mode, env, symbol)\n if self.init:\n self.init.describe_signature(signode, 'markType', env, symbol)\n\n\n################################################################################\n# Templates\n################################################################################\n\n# Parameters\n################################################################################\n\nclass ASTTemplateParam(ASTBase):\n def get_identifier(self) -> ASTIdentifier:\n raise NotImplementedError(repr(self))\n\n def get_id(self, version: int) -> str:\n raise NotImplementedError(repr(self))\n\n def describe_signature(self, parentNode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n raise NotImplementedError(repr(self))\n\n\nclass ASTTemplateKeyParamPackIdDefault(ASTTemplateParam):\n def __init__(self, key: str, identifier: ASTIdentifier,\n parameterPack: bool, default: ASTType) -> None:\n assert key\n if parameterPack:\n assert default is None\n self.key = key\n self.identifier = identifier\n self.parameterPack = parameterPack\n self.default = default\n\n def get_identifier(self) -> ASTIdentifier:\n return self.identifier\n\n def get_id(self, version: int) -> str:\n assert version >= 2\n # this is not part of the normal name mangling in C++\n res = []\n if self.parameterPack:\n res.append('Dp')\n else:\n res.append('0') # we need to put something\n return ''.join(res)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = [self.key]\n if self.parameterPack:\n if self.identifier:\n res.append(' ')\n res.append('...')\n if self.identifier:\n if not self.parameterPack:\n res.append(' ')\n res.append(transform(self.identifier))\n if self.default:\n res.append(' = ')\n res.append(transform(self.default))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword(self.key, self.key)\n if self.parameterPack:\n if self.identifier:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation('...', '...')\n if self.identifier:\n if not self.parameterPack:\n signode += addnodes.desc_sig_space()\n self.identifier.describe_signature(signode, mode, env, '', '', symbol)\n if self.default:\n signode += addnodes.desc_sig_space()\n signode += addnodes.desc_sig_punctuation('=', '=')\n signode += addnodes.desc_sig_space()\n self.default.describe_signature(signode, 'markType', env, symbol)\n\n\nclass ASTTemplateParamType(ASTTemplateParam):\n def __init__(self, data: ASTTemplateKeyParamPackIdDefault) -> None:\n assert data\n self.data = data\n\n @property\n def name(self) -> ASTNestedName:\n id = self.get_identifier()\n return ASTNestedName([ASTNestedNameElement(id, None)], [False], rooted=False)\n\n @property\n def isPack(self) -> bool:\n return self.data.parameterPack\n\n def get_identifier(self) -> ASTIdentifier:\n return self.data.get_identifier()\n\n def get_id(self, version: int, objectType: str = None, symbol: \"Symbol\" = None) -> str:\n # this is not part of the normal name mangling in C++\n assert version >= 2\n if symbol:\n # the anchor will be our parent\n return symbol.parent.declaration.get_id(version, prefixed=False)\n else:\n return self.data.get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.data)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.data.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTTemplateParamTemplateType(ASTTemplateParam):\n def __init__(self, nestedParams: \"ASTTemplateParams\",\n data: ASTTemplateKeyParamPackIdDefault) -> None:\n assert nestedParams\n assert data\n self.nestedParams = nestedParams\n self.data = data\n\n @property\n def name(self) -> ASTNestedName:\n id = self.get_identifier()\n return ASTNestedName([ASTNestedNameElement(id, None)], [False], rooted=False)\n\n @property\n def isPack(self) -> bool:\n return self.data.parameterPack\n\n def get_identifier(self) -> ASTIdentifier:\n return self.data.get_identifier()\n\n def get_id(self, version: int, objectType: str = None, symbol: \"Symbol\" = None) -> str:\n assert version >= 2\n # this is not part of the normal name mangling in C++\n if symbol:\n # the anchor will be our parent\n return symbol.parent.declaration.get_id(version, prefixed=None)\n else:\n return self.nestedParams.get_id(version) + self.data.get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.nestedParams) + transform(self.data)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.nestedParams.describe_signature(signode, 'noneIsName', env, symbol)\n signode += addnodes.desc_sig_space()\n self.data.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTTemplateParamNonType(ASTTemplateParam):\n def __init__(self,\n param: Union[ASTTypeWithInit,\n ASTTemplateParamConstrainedTypeWithInit]) -> None:\n assert param\n self.param = param\n\n @property\n def name(self) -> ASTNestedName:\n id = self.get_identifier()\n return ASTNestedName([ASTNestedNameElement(id, None)], [False], rooted=False)\n\n @property\n def isPack(self) -> bool:\n return self.param.isPack\n\n def get_identifier(self) -> ASTIdentifier:\n name = self.param.name\n if name:\n assert len(name.names) == 1\n assert name.names[0].identOrOp\n assert not name.names[0].templateArgs\n res = name.names[0].identOrOp\n assert isinstance(res, ASTIdentifier)\n return res\n else:\n return None\n\n def get_id(self, version: int, objectType: str = None, symbol: \"Symbol\" = None) -> str:\n assert version >= 2\n # this is not part of the normal name mangling in C++\n if symbol:\n # the anchor will be our parent\n return symbol.parent.declaration.get_id(version, prefixed=None)\n else:\n return '_' + self.param.get_id(version)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return transform(self.param)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n self.param.describe_signature(signode, mode, env, symbol)\n\n\nclass ASTTemplateParams(ASTBase):\n def __init__(self, params: List[ASTTemplateParam]) -> None:\n assert params is not None\n self.params = params\n\n def get_id(self, version: int) -> str:\n assert version >= 2\n res = []\n res.append(\"I\")\n for param in self.params:\n res.append(param.get_id(version))\n res.append(\"E\")\n return ''.join(res)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(\"template<\")\n res.append(\", \".join(transform(a) for a in self.params))\n res.append(\"> \")\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('template', 'template')\n signode += addnodes.desc_sig_punctuation('<', '<')\n first = True\n for param in self.params:\n if not first:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n first = False\n param.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation('>', '>')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTTemplateParams.describe_signature_as_introducer_ASTTemplateIntroductionParameter.describe_signature.self_identifier_describe_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTTemplateParams.describe_signature_as_introducer_ASTTemplateIntroductionParameter.describe_signature.self_identifier_describe_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3685, "end_line": 3762, "span_ids": ["ASTTemplateIntroductionParameter.get_identifier", "ASTTemplateIntroductionParameter._stringify", "ASTTemplateIntroductionParameter.get_id", "ASTTemplateIntroductionParameter.isPack", "ASTTemplateParams.describe_signature_as_introducer", "ASTTemplateIntroductionParameter.get_id_as_arg", "ASTTemplateIntroductionParameter", "ASTTemplateIntroductionParameter.describe_signature", "ASTTemplateIntroductionParameter.name"], "tokens": 643}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTTemplateParams(ASTBase):\n\n def describe_signature_as_introducer(\n self, parentNode: desc_signature, mode: str, env: \"BuildEnvironment\",\n symbol: \"Symbol\", lineSpec: bool) -> None:\n def makeLine(parentNode: desc_signature) -> addnodes.desc_signature_line:\n signode = addnodes.desc_signature_line()\n parentNode += signode\n signode.sphinx_line_type = 'templateParams'\n return signode\n lineNode = makeLine(parentNode)\n lineNode += addnodes.desc_sig_keyword('template', 'template')\n lineNode += addnodes.desc_sig_punctuation('<', '<')\n first = True\n for param in self.params:\n if not first:\n lineNode += addnodes.desc_sig_punctuation(',', ',')\n lineNode += addnodes.desc_sig_space()\n first = False\n if lineSpec:\n lineNode = makeLine(parentNode)\n param.describe_signature(lineNode, mode, env, symbol)\n if lineSpec and not first:\n lineNode = makeLine(parentNode)\n lineNode += addnodes.desc_sig_punctuation('>', '>')\n\n\n# Template introducers\n################################################################################\n\nclass ASTTemplateIntroductionParameter(ASTBase):\n def __init__(self, identifier: ASTIdentifier, parameterPack: bool) -> None:\n self.identifier = identifier\n self.parameterPack = parameterPack\n\n @property\n def name(self) -> ASTNestedName:\n id = self.get_identifier()\n return ASTNestedName([ASTNestedNameElement(id, None)], [False], rooted=False)\n\n @property\n def isPack(self) -> bool:\n return self.parameterPack\n\n def get_identifier(self) -> ASTIdentifier:\n return self.identifier\n\n def get_id(self, version: int, objectType: str = None, symbol: \"Symbol\" = None) -> str:\n assert version >= 2\n # this is not part of the normal name mangling in C++\n if symbol:\n # the anchor will be our parent\n return symbol.parent.declaration.get_id(version, prefixed=None)\n else:\n if self.parameterPack:\n return 'Dp'\n else:\n return '0' # we need to put something\n\n def get_id_as_arg(self, version: int) -> str:\n assert version >= 2\n # used for the implicit requires clause\n res = self.identifier.get_id(version)\n if self.parameterPack:\n return 'sp' + res\n else:\n return res\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.parameterPack:\n res.append('...')\n res.append(transform(self.identifier))\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n if self.parameterPack:\n signode += addnodes.desc_sig_punctuation('...', '...')\n self.identifier.describe_signature(signode, mode, env, '', '', symbol)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTTemplateIntroduction_ASTDeclaration._stringify.return._join_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_ASTTemplateIntroduction_ASTDeclaration._stringify.return._join_res_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3765, "end_line": 3952, "span_ids": ["ASTDeclaration.function_params", "ASTDeclaration", "ASTTemplateDeclarationPrefix", "ASTTemplateDeclarationPrefix._stringify", "ASTRequiresClause._stringify", "ASTTemplateIntroduction.describe_signature_as_introducer", "ASTTemplateIntroduction", "ASTTemplateDeclarationPrefix.describe_signature", "ASTDeclaration.get_newest_id", "ASTRequiresClause.describe_signature", "ASTDeclaration.name", "ASTDeclaration.clone", "ASTDeclaration._stringify", "ASTRequiresClause", "ASTTemplateIntroduction.get_id", "ASTTemplateIntroduction._stringify", "ASTDeclaration.get_id", "ASTTemplateDeclarationPrefix.get_id"], "tokens": 1554}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTTemplateIntroduction(ASTBase):\n def __init__(self, concept: ASTNestedName,\n params: List[ASTTemplateIntroductionParameter]) -> None:\n assert len(params) > 0\n self.concept = concept\n self.params = params\n\n def get_id(self, version: int) -> str:\n assert version >= 2\n # first do the same as a normal template parameter list\n res = []\n res.append(\"I\")\n for param in self.params:\n res.append(param.get_id(version))\n res.append(\"E\")\n # let's use X expr E, which is otherwise for constant template args\n res.append(\"X\")\n res.append(self.concept.get_id(version))\n res.append(\"I\")\n for param in self.params:\n res.append(param.get_id_as_arg(version))\n res.append(\"E\")\n res.append(\"E\")\n return ''.join(res)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n res.append(transform(self.concept))\n res.append('{')\n res.append(', '.join(transform(param) for param in self.params))\n res.append('} ')\n return ''.join(res)\n\n def describe_signature_as_introducer(\n self, parentNode: desc_signature, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\", lineSpec: bool) -> None:\n # Note: 'lineSpec' has no effect on template introductions.\n signode = addnodes.desc_signature_line()\n parentNode += signode\n signode.sphinx_line_type = 'templateIntroduction'\n self.concept.describe_signature(signode, 'markType', env, symbol)\n signode += addnodes.desc_sig_punctuation('{', '{')\n first = True\n for param in self.params:\n if not first:\n signode += addnodes.desc_sig_punctuation(',', ',')\n signode += addnodes.desc_sig_space()\n first = False\n param.describe_signature(signode, mode, env, symbol)\n signode += addnodes.desc_sig_punctuation('}', '}')\n\n\n################################################################################\n\nclass ASTTemplateDeclarationPrefix(ASTBase):\n def __init__(self,\n templates: List[Union[ASTTemplateParams,\n ASTTemplateIntroduction]]) -> None:\n # templates is None means it's an explicit instantiation of a variable\n self.templates = templates\n\n def get_id(self, version: int) -> str:\n assert version >= 2\n # this is not part of a normal name mangling system\n res = []\n for t in self.templates:\n res.append(t.get_id(version))\n return ''.join(res)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n for t in self.templates:\n res.append(transform(t))\n return ''.join(res)\n\n def describe_signature(self, signode: desc_signature, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\", lineSpec: bool) -> None:\n verify_description_mode(mode)\n for t in self.templates:\n t.describe_signature_as_introducer(signode, 'lastIsName', env, symbol, lineSpec)\n\n\nclass ASTRequiresClause(ASTBase):\n def __init__(self, expr: ASTExpression) -> None:\n self.expr = expr\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return 'requires ' + transform(self.expr)\n\n def describe_signature(self, signode: addnodes.desc_signature_line, mode: str,\n env: \"BuildEnvironment\", symbol: \"Symbol\") -> None:\n signode += addnodes.desc_sig_keyword('requires', 'requires')\n signode += addnodes.desc_sig_space()\n self.expr.describe_signature(signode, mode, env, symbol)\n\n\n################################################################################\n################################################################################\n\nclass ASTDeclaration(ASTBase):\n def __init__(self, objectType: str, directiveType: str, visibility: str,\n templatePrefix: ASTTemplateDeclarationPrefix,\n requiresClause: ASTRequiresClause, declaration: Any,\n trailingRequiresClause: ASTRequiresClause,\n semicolon: bool = False) -> None:\n self.objectType = objectType\n self.directiveType = directiveType\n self.visibility = visibility\n self.templatePrefix = templatePrefix\n self.requiresClause = requiresClause\n self.declaration = declaration\n self.trailingRequiresClause = trailingRequiresClause\n self.semicolon = semicolon\n\n self.symbol: Symbol = None\n # set by CPPObject._add_enumerator_to_parent\n self.enumeratorScopedSymbol: Symbol = None\n\n def clone(self) -> \"ASTDeclaration\":\n templatePrefixClone = self.templatePrefix.clone() if self.templatePrefix else None\n requiresClasueClone = self.requiresClause.clone() if self.requiresClause else None\n trailingRequiresClasueClone = self.trailingRequiresClause.clone() \\\n if self.trailingRequiresClause else None\n return ASTDeclaration(self.objectType, self.directiveType, self.visibility,\n templatePrefixClone, requiresClasueClone,\n self.declaration.clone(), trailingRequiresClasueClone,\n self.semicolon)\n\n @property\n def name(self) -> ASTNestedName:\n return self.declaration.name\n\n @property\n def function_params(self) -> List[ASTFunctionParameter]:\n if self.objectType != 'function':\n return None\n return self.declaration.function_params\n\n def get_id(self, version: int, prefixed: bool = True) -> str:\n if version == 1:\n if self.templatePrefix:\n raise NoOldIdError()\n if self.objectType == 'enumerator' and self.enumeratorScopedSymbol:\n return self.enumeratorScopedSymbol.declaration.get_id(version)\n return self.declaration.get_id(version, self.objectType, self.symbol)\n # version >= 2\n if self.objectType == 'enumerator' and self.enumeratorScopedSymbol:\n return self.enumeratorScopedSymbol.declaration.get_id(version, prefixed)\n if prefixed:\n res = [_id_prefix[version]]\n else:\n res = []\n if self.templatePrefix:\n res.append(self.templatePrefix.get_id(version))\n if self.requiresClause or self.trailingRequiresClause:\n if version < 4:\n raise NoOldIdError()\n res.append('IQ')\n if self.requiresClause and self.trailingRequiresClause:\n res.append('aa')\n if self.requiresClause:\n res.append(self.requiresClause.expr.get_id(version))\n if self.trailingRequiresClause:\n res.append(self.trailingRequiresClause.expr.get_id(version))\n res.append('E')\n res.append(self.declaration.get_id(version, self.objectType, self.symbol))\n return ''.join(res)\n\n def get_newest_id(self) -> str:\n return self.get_id(_max_id, True)\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = []\n if self.visibility and self.visibility != \"public\":\n res.append(self.visibility)\n res.append(' ')\n if self.templatePrefix:\n res.append(transform(self.templatePrefix))\n if self.requiresClause:\n res.append(transform(self.requiresClause))\n res.append(' ')\n res.append(transform(self.declaration))\n if self.trailingRequiresClause:\n res.append(' ')\n res.append(transform(self.trailingRequiresClause))\n if self.semicolon:\n res.append(';')\n return ''.join(res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_template_argument_list_DefinitionParser._parse_trailing_type_spec.return.ASTTrailingTypeSpecName_p": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_template_argument_list_DefinitionParser._parse_trailing_type_spec.return.ASTTrailingTypeSpecName_p", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 5752, "end_line": 5999, "span_ids": ["DefinitionParser._parse_trailing_type_spec", "DefinitionParser._parse_nested_name", "DefinitionParser._parse_template_argument_list", "DefinitionParser._parse_simple_type_specifiers"], "tokens": 2243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_template_argument_list(self) -> ASTTemplateArgs:\n # template-argument-list: (but we include the < and > here\n # template-argument ...[opt]\n # template-argument-list, template-argument ...[opt]\n # template-argument:\n # constant-expression\n # type-id\n # id-expression\n self.skip_ws()\n if not self.skip_string_and_ws('<'):\n return None\n if self.skip_string('>'):\n return ASTTemplateArgs([], False)\n prevErrors = []\n templateArgs: List[Union[ASTType, ASTTemplateArgConstant]] = []\n packExpansion = False\n while 1:\n pos = self.pos\n parsedComma = False\n parsedEnd = False\n try:\n type = self._parse_type(named=False)\n self.skip_ws()\n if self.skip_string_and_ws('...'):\n packExpansion = True\n parsedEnd = True\n if not self.skip_string('>'):\n self.fail('Expected \">\" after \"...\" in template argument list.')\n elif self.skip_string('>'):\n parsedEnd = True\n elif self.skip_string(','):\n parsedComma = True\n else:\n self.fail('Expected \"...>\", \">\" or \",\" in template argument list.')\n templateArgs.append(type)\n except DefinitionError as e:\n prevErrors.append((e, \"If type argument\"))\n self.pos = pos\n try:\n value = self._parse_constant_expression(inTemplate=True)\n self.skip_ws()\n if self.skip_string_and_ws('...'):\n packExpansion = True\n parsedEnd = True\n if not self.skip_string('>'):\n self.fail('Expected \">\" after \"...\" in template argument list.')\n elif self.skip_string('>'):\n parsedEnd = True\n elif self.skip_string(','):\n parsedComma = True\n else:\n self.fail('Expected \"...>\", \">\" or \",\" in template argument list.')\n templateArgs.append(ASTTemplateArgConstant(value))\n except DefinitionError as e:\n self.pos = pos\n prevErrors.append((e, \"If non-type argument\"))\n header = \"Error in parsing template argument list.\"\n raise self._make_multi_error(prevErrors, header) from e\n if parsedEnd:\n assert not parsedComma\n break\n else:\n assert not packExpansion\n return ASTTemplateArgs(templateArgs, packExpansion)\n\n def _parse_nested_name(self, memberPointer: bool = False) -> ASTNestedName:\n names: List[ASTNestedNameElement] = []\n templates: List[bool] = []\n\n self.skip_ws()\n rooted = False\n if self.skip_string('::'):\n rooted = True\n while 1:\n self.skip_ws()\n if len(names) > 0:\n template = self.skip_word_and_ws('template')\n else:\n template = False\n templates.append(template)\n identOrOp: Union[ASTIdentifier, ASTOperator] = None\n if self.skip_word_and_ws('operator'):\n identOrOp = self._parse_operator()\n else:\n if not self.match(identifier_re):\n if memberPointer and len(names) > 0:\n templates.pop()\n break\n self.fail(\"Expected identifier in nested name.\")\n identifier = self.matched_text\n # make sure there isn't a keyword\n if identifier in _keywords:\n self.fail(\"Expected identifier in nested name, \"\n \"got keyword: %s\" % identifier)\n identOrOp = ASTIdentifier(identifier)\n # try greedily to get template arguments,\n # but otherwise a < might be because we are in an expression\n pos = self.pos\n try:\n templateArgs = self._parse_template_argument_list()\n except DefinitionError as ex:\n self.pos = pos\n templateArgs = None\n self.otherErrors.append(ex)\n names.append(ASTNestedNameElement(identOrOp, templateArgs))\n\n self.skip_ws()\n if not self.skip_string('::'):\n if memberPointer:\n self.fail(\"Expected '::' in pointer to member (function).\")\n break\n return ASTNestedName(names, templates, rooted)\n\n # ==========================================================================\n\n def _parse_simple_type_specifiers(self) -> ASTTrailingTypeSpecFundamental:\n modifier: Optional[str] = None\n signedness: Optional[str] = None\n width: List[str] = []\n typ: Optional[str] = None\n names: List[str] = [] # the parsed sequence\n\n self.skip_ws()\n while self.match(_simple_type_specifiers_re):\n t = self.matched_text\n names.append(t)\n if t in ('auto', 'void', 'bool',\n 'char', 'wchar_t', 'char8_t', 'char16_t', 'char32_t',\n 'int', '__int64', '__int128',\n 'float', 'double',\n '__float80', '_Float64x', '__float128', '_Float128'):\n if typ is not None:\n self.fail(\"Can not have both {} and {}.\".format(t, typ))\n typ = t\n elif t in ('signed', 'unsigned'):\n if signedness is not None:\n self.fail(\"Can not have both {} and {}.\".format(t, signedness))\n signedness = t\n elif t == 'short':\n if len(width) != 0:\n self.fail(\"Can not have both {} and {}.\".format(t, width[0]))\n width.append(t)\n elif t == 'long':\n if len(width) != 0 and width[0] != 'long':\n self.fail(\"Can not have both {} and {}.\".format(t, width[0]))\n width.append(t)\n elif t in ('_Imaginary', '_Complex'):\n if modifier is not None:\n self.fail(\"Can not have both {} and {}.\".format(t, modifier))\n modifier = t\n self.skip_ws()\n if len(names) == 0:\n return None\n\n if typ in ('auto', 'void', 'bool',\n 'wchar_t', 'char8_t', 'char16_t', 'char32_t',\n '__float80', '_Float64x', '__float128', '_Float128'):\n if modifier is not None:\n self.fail(\"Can not have both {} and {}.\".format(typ, modifier))\n if signedness is not None:\n self.fail(\"Can not have both {} and {}.\".format(typ, signedness))\n if len(width) != 0:\n self.fail(\"Can not have both {} and {}.\".format(typ, ' '.join(width)))\n elif typ == 'char':\n if modifier is not None:\n self.fail(\"Can not have both {} and {}.\".format(typ, modifier))\n if len(width) != 0:\n self.fail(\"Can not have both {} and {}.\".format(typ, ' '.join(width)))\n elif typ == 'int':\n if modifier is not None:\n self.fail(\"Can not have both {} and {}.\".format(typ, modifier))\n elif typ in ('__int64', '__int128'):\n if modifier is not None:\n self.fail(\"Can not have both {} and {}.\".format(typ, modifier))\n if len(width) != 0:\n self.fail(\"Can not have both {} and {}.\".format(typ, ' '.join(width)))\n elif typ == 'float':\n if signedness is not None:\n self.fail(\"Can not have both {} and {}.\".format(typ, signedness))\n if len(width) != 0:\n self.fail(\"Can not have both {} and {}.\".format(typ, ' '.join(width)))\n elif typ == 'double':\n if signedness is not None:\n self.fail(\"Can not have both {} and {}.\".format(typ, signedness))\n if len(width) > 1:\n self.fail(\"Can not have both {} and {}.\".format(typ, ' '.join(width)))\n if len(width) == 1 and width[0] != 'long':\n self.fail(\"Can not have both {} and {}.\".format(typ, ' '.join(width)))\n elif typ is None:\n if modifier is not None:\n self.fail(\"Can not have {} without a floating point type.\".format(modifier))\n else:\n assert False, \"Unhandled type {}\".format(typ)\n\n canonNames: List[str] = []\n if modifier is not None:\n canonNames.append(modifier)\n if signedness is not None:\n canonNames.append(signedness)\n canonNames.extend(width)\n if typ is not None:\n canonNames.append(typ)\n return ASTTrailingTypeSpecFundamental(names, canonNames)\n\n def _parse_trailing_type_spec(self) -> ASTTrailingTypeSpec:\n # fundamental types, https://en.cppreference.com/w/cpp/language/type\n # and extensions\n self.skip_ws()\n res = self._parse_simple_type_specifiers()\n if res is not None:\n return res\n\n # decltype\n self.skip_ws()\n if self.skip_word_and_ws('decltype'):\n if not self.skip_string_and_ws('('):\n self.fail(\"Expected '(' after 'decltype'.\")\n if self.skip_word_and_ws('auto'):\n if not self.skip_string(')'):\n self.fail(\"Expected ')' after 'decltype(auto'.\")\n return ASTTrailingTypeSpecDecltypeAuto()\n expr = self._parse_expression()\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expected ')' after 'decltype(<expr>'.\")\n return ASTTrailingTypeSpecDecltype(expr)\n\n # prefixed\n prefix = None\n self.skip_ws()\n for k in ('class', 'struct', 'enum', 'union', 'typename'):\n if self.skip_word_and_ws(k):\n prefix = k\n break\n nestedName = self._parse_nested_name()\n self.skip_ws()\n placeholderType = None\n if self.skip_word('auto'):\n placeholderType = 'auto'\n elif self.skip_word_and_ws('decltype'):\n if not self.skip_string_and_ws('('):\n self.fail(\"Expected '(' after 'decltype' in placeholder type specifier.\")\n if not self.skip_word_and_ws('auto'):\n self.fail(\"Expected 'auto' after 'decltype(' in placeholder type specifier.\")\n if not self.skip_string_and_ws(')'):\n self.fail(\"Expected ')' after 'decltype(auto' in placeholder type specifier.\")\n placeholderType = 'decltype(auto)'\n return ASTTrailingTypeSpecName(prefix, nestedName, placeholderType)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_parameters_and_qualifiers_DefinitionParser._parse_declarator_name_suffix.return.ASTDeclaratorNameParamQua": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_parameters_and_qualifiers_DefinitionParser._parse_declarator_name_suffix.return.ASTDeclaratorNameParamQua", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 6001, "end_line": 6274, "span_ids": ["DefinitionParser._parse_declarator_name_suffix", "DefinitionParser._parse_parameters_and_qualifiers", "DefinitionParser._parse_decl_specs", "DefinitionParser._parse_decl_specs_simple"], "tokens": 2040}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_parameters_and_qualifiers(self, paramMode: str) -> ASTParametersQualifiers:\n if paramMode == 'new':\n return None\n self.skip_ws()\n if not self.skip_string('('):\n if paramMode == 'function':\n self.fail('Expecting \"(\" in parameters-and-qualifiers.')\n else:\n return None\n args = []\n self.skip_ws()\n if not self.skip_string(')'):\n while 1:\n self.skip_ws()\n if self.skip_string('...'):\n args.append(ASTFunctionParameter(None, True))\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail('Expected \")\" after \"...\" in '\n 'parameters-and-qualifiers.')\n break\n # note: it seems that function arguments can always be named,\n # even in function pointers and similar.\n arg = self._parse_type_with_init(outer=None, named='single')\n # TODO: parse default parameters # TODO: didn't we just do that?\n args.append(ASTFunctionParameter(arg))\n\n self.skip_ws()\n if self.skip_string(','):\n continue\n elif self.skip_string(')'):\n break\n else:\n self.fail(\n 'Expecting \",\" or \")\" in parameters-and-qualifiers, '\n 'got \"%s\".' % self.current_char)\n\n self.skip_ws()\n const = self.skip_word_and_ws('const')\n volatile = self.skip_word_and_ws('volatile')\n if not const: # the can be permuted\n const = self.skip_word_and_ws('const')\n\n refQual = None\n if self.skip_string('&&'):\n refQual = '&&'\n if not refQual and self.skip_string('&'):\n refQual = '&'\n\n exceptionSpec = None\n self.skip_ws()\n if self.skip_string('noexcept'):\n if self.skip_string_and_ws('('):\n expr = self._parse_constant_expression(False)\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expecting ')' to end 'noexcept'.\")\n exceptionSpec = ASTNoexceptSpec(expr)\n else:\n exceptionSpec = ASTNoexceptSpec(None)\n\n self.skip_ws()\n if self.skip_string('->'):\n trailingReturn = self._parse_type(named=False)\n else:\n trailingReturn = None\n\n self.skip_ws()\n override = self.skip_word_and_ws('override')\n final = self.skip_word_and_ws('final')\n if not override:\n override = self.skip_word_and_ws(\n 'override') # they can be permuted\n\n attrs = []\n while True:\n attr = self._parse_attribute()\n if attr is None:\n break\n attrs.append(attr)\n\n self.skip_ws()\n initializer = None\n # if this is a function pointer we should not swallow an initializer\n if paramMode == 'function' and self.skip_string('='):\n self.skip_ws()\n valid = ('0', 'delete', 'default')\n for w in valid:\n if self.skip_word_and_ws(w):\n initializer = w\n break\n if not initializer:\n self.fail(\n 'Expected \"%s\" in initializer-specifier.'\n % '\" or \"'.join(valid))\n\n return ASTParametersQualifiers(\n args, volatile, const, refQual, exceptionSpec, trailingReturn,\n override, final, attrs, initializer)\n\n def _parse_decl_specs_simple(self, outer: str, typed: bool) -> ASTDeclSpecsSimple:\n \"\"\"Just parse the simple ones.\"\"\"\n storage = None\n threadLocal = None\n inline = None\n virtual = None\n explicitSpec = None\n consteval = None\n constexpr = None\n constinit = None\n volatile = None\n const = None\n friend = None\n attrs = []\n while 1: # accept any permutation of a subset of some decl-specs\n self.skip_ws()\n if not const and typed:\n const = self.skip_word('const')\n if const:\n continue\n if not volatile and typed:\n volatile = self.skip_word('volatile')\n if volatile:\n continue\n if not storage:\n if outer in ('member', 'function'):\n if self.skip_word('static'):\n storage = 'static'\n continue\n if self.skip_word('extern'):\n storage = 'extern'\n continue\n if outer == 'member':\n if self.skip_word('mutable'):\n storage = 'mutable'\n continue\n if self.skip_word('register'):\n storage = 'register'\n continue\n if not inline and outer in ('function', 'member'):\n inline = self.skip_word('inline')\n if inline:\n continue\n if not constexpr and outer in ('member', 'function'):\n constexpr = self.skip_word(\"constexpr\")\n if constexpr:\n continue\n\n if outer == 'member':\n if not constinit:\n constinit = self.skip_word('constinit')\n if constinit:\n continue\n if not threadLocal:\n threadLocal = self.skip_word('thread_local')\n if threadLocal:\n continue\n if outer == 'function':\n if not consteval:\n consteval = self.skip_word('consteval')\n if consteval:\n continue\n if not friend:\n friend = self.skip_word('friend')\n if friend:\n continue\n if not virtual:\n virtual = self.skip_word('virtual')\n if virtual:\n continue\n if not explicitSpec:\n explicit = self.skip_word_and_ws('explicit')\n if explicit:\n expr: ASTExpression = None\n if self.skip_string('('):\n expr = self._parse_constant_expression(inTemplate=False)\n if not expr:\n self.fail(\"Expected constant expression after '('\" +\n \" in explicit specifier.\")\n self.skip_ws()\n if not self.skip_string(')'):\n self.fail(\"Expected ')' to end explicit specifier.\")\n explicitSpec = ASTExplicitSpec(expr)\n continue\n attr = self._parse_attribute()\n if attr:\n attrs.append(attr)\n continue\n break\n return ASTDeclSpecsSimple(storage, threadLocal, inline, virtual,\n explicitSpec, consteval, constexpr, constinit,\n volatile, const, friend, attrs)\n\n def _parse_decl_specs(self, outer: str, typed: bool = True) -> ASTDeclSpecs:\n if outer:\n if outer not in ('type', 'member', 'function', 'templateParam'):\n raise Exception('Internal error, unknown outer \"%s\".' % outer)\n \"\"\"\n storage-class-specifier function-specifier \"constexpr\"\n \"volatile\" \"const\" trailing-type-specifier\n\n storage-class-specifier ->\n \"static\" (only for member_object and function_object)\n | \"register\"\n\n function-specifier -> \"inline\" | \"virtual\" | \"explicit\" (only for\n function_object)\n\n \"constexpr\" (only for member_object and function_object)\n \"\"\"\n leftSpecs = self._parse_decl_specs_simple(outer, typed)\n rightSpecs = None\n\n if typed:\n trailing = self._parse_trailing_type_spec()\n rightSpecs = self._parse_decl_specs_simple(outer, typed)\n else:\n trailing = None\n return ASTDeclSpecs(outer, leftSpecs, rightSpecs, trailing)\n\n def _parse_declarator_name_suffix(\n self, named: Union[bool, str], paramMode: str, typed: bool\n ) -> Union[ASTDeclaratorNameParamQual, ASTDeclaratorNameBitField]:\n # now we should parse the name, and then suffixes\n if named == 'maybe':\n pos = self.pos\n try:\n declId = self._parse_nested_name()\n except DefinitionError:\n self.pos = pos\n declId = None\n elif named == 'single':\n if self.match(identifier_re):\n identifier = ASTIdentifier(self.matched_text)\n nne = ASTNestedNameElement(identifier, None)\n declId = ASTNestedName([nne], [False], rooted=False)\n # if it's a member pointer, we may have '::', which should be an error\n self.skip_ws()\n if self.current_char == ':':\n self.fail(\"Unexpected ':' after identifier.\")\n else:\n declId = None\n elif named:\n declId = self._parse_nested_name()\n else:\n declId = None\n arrayOps = []\n while 1:\n self.skip_ws()\n if typed and self.skip_string('['):\n self.skip_ws()\n if self.skip_string(']'):\n arrayOps.append(ASTArray(None))\n continue\n\n def parser() -> ASTExpression:\n return self._parse_expression()\n value = self._parse_expression_fallback([']'], parser)\n if not self.skip_string(']'):\n self.fail(\"Expected ']' in end of array operator.\")\n arrayOps.append(ASTArray(value))\n continue\n else:\n break\n paramQual = self._parse_parameters_and_qualifiers(paramMode)\n if paramQual is None and len(arrayOps) == 0:\n # perhaps a bit-field\n if named and paramMode == 'type' and typed:\n self.skip_ws()\n if self.skip_string(':'):\n size = self._parse_constant_expression(inTemplate=False)\n return ASTDeclaratorNameBitField(declId=declId, size=size)\n return ASTDeclaratorNameParamQual(declId=declId, arrayOps=arrayOps,\n paramQual=paramQual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_type_with_init_DefinitionParser._parse_requires_clause.parse_and_expr.if_len_andExprs_1_.else_.return.ASTBinOpExpr_andExprs_op": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_type_with_init_DefinitionParser._parse_requires_clause.parse_and_expr.if_len_andExprs_1_.else_.return.ASTBinOpExpr_andExprs_op", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 6525, "end_line": 6824, "span_ids": ["DefinitionParser._parse_template_parameter_list", "DefinitionParser._parse_union", "DefinitionParser._parse_requires_clause", "DefinitionParser._parse_template_introduction", "DefinitionParser._parse_enum", "DefinitionParser._parse_class", "DefinitionParser._parse_template_parameter", "DefinitionParser._parse_type_with_init", "DefinitionParser._parse_enumerator", "DefinitionParser._parse_type_using", "DefinitionParser._parse_concept"], "tokens": 2277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_type_with_init(\n self, named: Union[bool, str],\n outer: str) -> Union[ASTTypeWithInit, ASTTemplateParamConstrainedTypeWithInit]:\n if outer:\n assert outer in ('type', 'member', 'function', 'templateParam')\n type = self._parse_type(outer=outer, named=named)\n if outer != 'templateParam':\n init = self._parse_initializer(outer=outer)\n return ASTTypeWithInit(type, init)\n # it could also be a constrained type parameter, e.g., C T = int&\n pos = self.pos\n eExpr = None\n try:\n init = self._parse_initializer(outer=outer, allowFallback=False)\n # note: init may be None if there is no =\n if init is None:\n return ASTTypeWithInit(type, None)\n # we parsed an expression, so we must have a , or a >,\n # otherwise the expression didn't get everything\n self.skip_ws()\n if self.current_char != ',' and self.current_char != '>':\n # pretend it didn't happen\n self.pos = pos\n init = None\n else:\n # we assume that it was indeed an expression\n return ASTTypeWithInit(type, init)\n except DefinitionError as e:\n self.pos = pos\n eExpr = e\n if not self.skip_string(\"=\"):\n return ASTTypeWithInit(type, None)\n try:\n typeInit = self._parse_type(named=False, outer=None)\n return ASTTemplateParamConstrainedTypeWithInit(type, typeInit)\n except DefinitionError as eType:\n if eExpr is None:\n raise eType\n errs = []\n errs.append((eExpr, \"If default template argument is an expression\"))\n errs.append((eType, \"If default template argument is a type\"))\n msg = \"Error in non-type template parameter\"\n msg += \" or constrained template parameter.\"\n raise self._make_multi_error(errs, msg) from eType\n\n def _parse_type_using(self) -> ASTTypeUsing:\n name = self._parse_nested_name()\n self.skip_ws()\n if not self.skip_string('='):\n return ASTTypeUsing(name, None)\n type = self._parse_type(False, None)\n return ASTTypeUsing(name, type)\n\n def _parse_concept(self) -> ASTConcept:\n nestedName = self._parse_nested_name()\n self.skip_ws()\n initializer = self._parse_initializer('member')\n return ASTConcept(nestedName, initializer)\n\n def _parse_class(self) -> ASTClass:\n attrs = []\n while 1:\n attr = self._parse_attribute()\n if attr is None:\n break\n attrs.append(attr)\n name = self._parse_nested_name()\n self.skip_ws()\n final = self.skip_word_and_ws('final')\n bases = []\n self.skip_ws()\n if self.skip_string(':'):\n while 1:\n self.skip_ws()\n visibility = None\n virtual = False\n pack = False\n if self.skip_word_and_ws('virtual'):\n virtual = True\n if self.match(_visibility_re):\n visibility = self.matched_text\n self.skip_ws()\n if not virtual and self.skip_word_and_ws('virtual'):\n virtual = True\n baseName = self._parse_nested_name()\n self.skip_ws()\n pack = self.skip_string('...')\n bases.append(ASTBaseClass(baseName, visibility, virtual, pack))\n self.skip_ws()\n if self.skip_string(','):\n continue\n else:\n break\n return ASTClass(name, final, bases, attrs)\n\n def _parse_union(self) -> ASTUnion:\n attrs = []\n while 1:\n attr = self._parse_attribute()\n if attr is None:\n break\n attrs.append(attr)\n name = self._parse_nested_name()\n return ASTUnion(name, attrs)\n\n def _parse_enum(self) -> ASTEnum:\n scoped = None # is set by CPPEnumObject\n attrs = []\n while 1:\n attr = self._parse_attribute()\n if attr is None:\n break\n attrs.append(attr)\n self.skip_ws()\n name = self._parse_nested_name()\n self.skip_ws()\n underlyingType = None\n if self.skip_string(':'):\n underlyingType = self._parse_type(named=False)\n return ASTEnum(name, scoped, underlyingType, attrs)\n\n def _parse_enumerator(self) -> ASTEnumerator:\n name = self._parse_nested_name()\n self.skip_ws()\n init = None\n if self.skip_string('='):\n self.skip_ws()\n\n def parser() -> ASTExpression:\n return self._parse_constant_expression(inTemplate=False)\n initVal = self._parse_expression_fallback([], parser)\n init = ASTInitializer(initVal)\n return ASTEnumerator(name, init)\n\n # ==========================================================================\n\n def _parse_template_parameter(self) -> ASTTemplateParam:\n self.skip_ws()\n if self.skip_word('template'):\n # declare a tenplate template parameter\n nestedParams = self._parse_template_parameter_list()\n else:\n nestedParams = None\n\n pos = self.pos\n try:\n # Unconstrained type parameter or template type parameter\n key = None\n self.skip_ws()\n if self.skip_word_and_ws('typename'):\n key = 'typename'\n elif self.skip_word_and_ws('class'):\n key = 'class'\n elif nestedParams:\n self.fail(\"Expected 'typename' or 'class' after \"\n \"template template parameter list.\")\n else:\n self.fail(\"Expected 'typename' or 'class' in the \"\n \"beginning of template type parameter.\")\n self.skip_ws()\n parameterPack = self.skip_string('...')\n self.skip_ws()\n if self.match(identifier_re):\n identifier = ASTIdentifier(self.matched_text)\n else:\n identifier = None\n self.skip_ws()\n if not parameterPack and self.skip_string('='):\n default = self._parse_type(named=False, outer=None)\n else:\n default = None\n if self.current_char not in ',>':\n self.fail('Expected \",\" or \">\" after (template) type parameter.')\n data = ASTTemplateKeyParamPackIdDefault(key, identifier,\n parameterPack, default)\n if nestedParams:\n return ASTTemplateParamTemplateType(nestedParams, data)\n else:\n return ASTTemplateParamType(data)\n except DefinitionError as eType:\n if nestedParams:\n raise\n try:\n # non-type parameter or constrained type parameter\n self.pos = pos\n param = self._parse_type_with_init('maybe', 'templateParam')\n return ASTTemplateParamNonType(param)\n except DefinitionError as eNonType:\n self.pos = pos\n header = \"Error when parsing template parameter.\"\n errs = []\n errs.append(\n (eType, \"If unconstrained type parameter or template type parameter\"))\n errs.append(\n (eNonType, \"If constrained type parameter or non-type parameter\"))\n raise self._make_multi_error(errs, header)\n\n def _parse_template_parameter_list(self) -> ASTTemplateParams:\n # only: '<' parameter-list '>'\n # we assume that 'template' has just been parsed\n templateParams: List[ASTTemplateParam] = []\n self.skip_ws()\n if not self.skip_string(\"<\"):\n self.fail(\"Expected '<' after 'template'\")\n while 1:\n pos = self.pos\n err = None\n try:\n param = self._parse_template_parameter()\n templateParams.append(param)\n except DefinitionError as eParam:\n self.pos = pos\n err = eParam\n self.skip_ws()\n if self.skip_string('>'):\n return ASTTemplateParams(templateParams)\n elif self.skip_string(','):\n continue\n else:\n header = \"Error in template parameter list.\"\n errs = []\n if err:\n errs.append((err, \"If parameter\"))\n try:\n self.fail('Expected \",\" or \">\".')\n except DefinitionError as e:\n errs.append((e, \"If no parameter\"))\n print(errs)\n raise self._make_multi_error(errs, header)\n\n def _parse_template_introduction(self) -> ASTTemplateIntroduction:\n pos = self.pos\n try:\n concept = self._parse_nested_name()\n except Exception:\n self.pos = pos\n return None\n self.skip_ws()\n if not self.skip_string('{'):\n self.pos = pos\n return None\n\n # for sure it must be a template introduction now\n params = []\n while 1:\n self.skip_ws()\n parameterPack = self.skip_string('...')\n self.skip_ws()\n if not self.match(identifier_re):\n self.fail(\"Expected identifier in template introduction list.\")\n txt_identifier = self.matched_text\n # make sure there isn't a keyword\n if txt_identifier in _keywords:\n self.fail(\"Expected identifier in template introduction list, \"\n \"got keyword: %s\" % txt_identifier)\n identifier = ASTIdentifier(txt_identifier)\n params.append(ASTTemplateIntroductionParameter(identifier, parameterPack))\n\n self.skip_ws()\n if self.skip_string('}'):\n break\n elif self.skip_string(','):\n continue\n else:\n self.fail(\"Error in template introduction list. \"\n 'Expected \",\", or \"}\".')\n return ASTTemplateIntroduction(concept, params)\n\n def _parse_requires_clause(self) -> Optional[ASTRequiresClause]:\n # requires-clause -> 'requires' constraint-logical-or-expression\n # constraint-logical-or-expression\n # -> constraint-logical-and-expression\n # | constraint-logical-or-expression '||' constraint-logical-and-expression\n # constraint-logical-and-expression\n # -> primary-expression\n # | constraint-logical-and-expression '&&' primary-expression\n self.skip_ws()\n if not self.skip_word('requires'):\n return None\n\n def parse_and_expr(self: DefinitionParser) -> ASTExpression:\n andExprs = []\n ops = []\n andExprs.append(self._parse_primary_expression())\n while True:\n self.skip_ws()\n oneMore = False\n if self.skip_string('&&'):\n oneMore = True\n ops.append('&&')\n elif self.skip_word('and'):\n oneMore = True\n ops.append('and')\n if not oneMore:\n break\n andExprs.append(self._parse_primary_expression())\n if len(andExprs) == 1:\n return andExprs[0]\n else:\n return ASTBinOpExpr(andExprs, ops)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_requires_clause.orExprs_DefinitionParser._check_template_consistency.return.templatePrefix": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_DefinitionParser._parse_requires_clause.orExprs_DefinitionParser._check_template_consistency.return.templatePrefix", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 6826, "end_line": 6914, "span_ids": ["DefinitionParser._check_template_consistency", "DefinitionParser._parse_template_declaration_prefix", "DefinitionParser._parse_requires_clause"], "tokens": 790}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefinitionParser(BaseParser):\n\n def _parse_requires_clause(self) -> Optional[ASTRequiresClause]:\n # ... other code\n\n orExprs = []\n ops = []\n orExprs.append(parse_and_expr(self))\n while True:\n self.skip_ws()\n oneMore = False\n if self.skip_string('||'):\n oneMore = True\n ops.append('||')\n elif self.skip_word('or'):\n oneMore = True\n ops.append('or')\n if not oneMore:\n break\n orExprs.append(parse_and_expr(self))\n if len(orExprs) == 1:\n return ASTRequiresClause(orExprs[0])\n else:\n return ASTRequiresClause(ASTBinOpExpr(orExprs, ops))\n\n def _parse_template_declaration_prefix(self, objectType: str\n ) -> Optional[ASTTemplateDeclarationPrefix]:\n templates: List[Union[ASTTemplateParams, ASTTemplateIntroduction]] = []\n while 1:\n self.skip_ws()\n # the saved position is only used to provide a better error message\n params: Union[ASTTemplateParams, ASTTemplateIntroduction] = None\n pos = self.pos\n if self.skip_word(\"template\"):\n try:\n params = self._parse_template_parameter_list()\n except DefinitionError as e:\n if objectType == 'member' and len(templates) == 0:\n return ASTTemplateDeclarationPrefix(None)\n else:\n raise e\n else:\n params = self._parse_template_introduction()\n if not params:\n break\n if objectType == 'concept' and len(templates) > 0:\n self.pos = pos\n self.fail(\"More than 1 template parameter list for concept.\")\n templates.append(params)\n if len(templates) == 0 and objectType == 'concept':\n self.fail('Missing template parameter list for concept.')\n if len(templates) == 0:\n return None\n else:\n return ASTTemplateDeclarationPrefix(templates)\n\n def _check_template_consistency(self, nestedName: ASTNestedName,\n templatePrefix: ASTTemplateDeclarationPrefix,\n fullSpecShorthand: bool, isMember: bool = False\n ) -> ASTTemplateDeclarationPrefix:\n numArgs = nestedName.num_templates()\n isMemberInstantiation = False\n if not templatePrefix:\n numParams = 0\n else:\n if isMember and templatePrefix.templates is None:\n numParams = 0\n isMemberInstantiation = True\n else:\n numParams = len(templatePrefix.templates)\n if numArgs + 1 < numParams:\n self.fail(\"Too few template argument lists comapred to parameter\"\n \" lists. Argument lists: %d, Parameter lists: %d.\"\n % (numArgs, numParams))\n if numArgs > numParams:\n numExtra = numArgs - numParams\n if not fullSpecShorthand and not isMemberInstantiation:\n msg = \"Too many template argument lists compared to parameter\" \\\n \" lists. Argument lists: %d, Parameter lists: %d,\" \\\n \" Extra empty parameters lists prepended: %d.\" \\\n % (numArgs, numParams, numExtra)\n msg += \" Declaration:\\n\\t\"\n if templatePrefix:\n msg += \"%s\\n\\t\" % templatePrefix\n msg += str(nestedName)\n self.warn(msg)\n\n newTemplates: List[Union[ASTTemplateParams, ASTTemplateIntroduction]] = []\n for _i in range(numExtra):\n newTemplates.append(ASTTemplateParams([]))\n if templatePrefix and not isMemberInstantiation:\n newTemplates.extend(templatePrefix.templates)\n templatePrefix = ASTTemplateDeclarationPrefix(newTemplates)\n return templatePrefix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPObject.handle_signature_AliasTransform._render_symbol.return.nodes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_CPPObject.handle_signature_AliasTransform._render_symbol.return.nodes", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 7218, "end_line": 7492, "span_ids": ["AliasTransform", "AliasNode.copy", "CPPClassObject", "CPPNamespacePushObject", "CPPTypeObject", "CPPNamespaceObject.run", "CPPFunctionObject", "CPPMemberObject", "CPPClassObject.display_object_type", "CPPNamespaceObject", "CPPNamespacePushObject.run", "CPPEnumeratorObject", "CPPNamespacePopObject.run", "CPPObject.handle_signature", "CPPConceptObject", "AliasNode", "CPPObject.after_content", "CPPUnionObject", "AliasTransform._render_symbol", "CPPEnumObject", "CPPNamespacePopObject", "CPPObject.before_content"], "tokens": 2206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CPPObject(ObjectDescription[ASTDeclaration]):\n\n def handle_signature(self, sig: str, signode: desc_signature) -> ASTDeclaration:\n parentSymbol: Symbol = self.env.temp_data['cpp:parent_symbol']\n\n parser = DefinitionParser(sig, location=signode, config=self.env.config)\n try:\n ast = self.parse_definition(parser)\n parser.assert_end()\n except DefinitionError as e:\n logger.warning(e, location=signode)\n # It is easier to assume some phony name than handling the error in\n # the possibly inner declarations.\n name = _make_phony_error_name()\n symbol = parentSymbol.add_name(name)\n self.env.temp_data['cpp:last_symbol'] = symbol\n raise ValueError from e\n\n try:\n symbol = parentSymbol.add_declaration(\n ast, docname=self.env.docname, line=self.get_source_info()[1])\n # append the new declaration to the sibling list\n assert symbol.siblingAbove is None\n assert symbol.siblingBelow is None\n symbol.siblingAbove = self.env.temp_data['cpp:last_symbol']\n if symbol.siblingAbove is not None:\n assert symbol.siblingAbove.siblingBelow is None\n symbol.siblingAbove.siblingBelow = symbol\n self.env.temp_data['cpp:last_symbol'] = symbol\n except _DuplicateSymbolError as e:\n # Assume we are actually in the old symbol,\n # instead of the newly created duplicate.\n self.env.temp_data['cpp:last_symbol'] = e.symbol\n msg = __(\"Duplicate C++ declaration, also defined at %s:%s.\\n\"\n \"Declaration is '.. cpp:%s:: %s'.\")\n msg = msg % (e.symbol.docname, e.symbol.line,\n self.display_object_type, sig)\n logger.warning(msg, location=signode)\n\n if ast.objectType == 'enumerator':\n self._add_enumerator_to_parent(ast)\n\n # note: handle_signature may be called multiple time per directive,\n # if it has multiple signatures, so don't mess with the original options.\n options = dict(self.options)\n options['tparam-line-spec'] = 'tparam-line-spec' in self.options\n self.describe_signature(signode, ast, options)\n return ast\n\n def before_content(self) -> None:\n lastSymbol: Symbol = self.env.temp_data['cpp:last_symbol']\n assert lastSymbol\n self.oldParentSymbol = self.env.temp_data['cpp:parent_symbol']\n self.oldParentKey: LookupKey = self.env.ref_context['cpp:parent_key']\n self.env.temp_data['cpp:parent_symbol'] = lastSymbol\n self.env.ref_context['cpp:parent_key'] = lastSymbol.get_lookup_key()\n\n def after_content(self) -> None:\n self.env.temp_data['cpp:parent_symbol'] = self.oldParentSymbol\n self.env.ref_context['cpp:parent_key'] = self.oldParentKey\n\n\nclass CPPTypeObject(CPPObject):\n object_type = 'type'\n\n\nclass CPPConceptObject(CPPObject):\n object_type = 'concept'\n\n\nclass CPPMemberObject(CPPObject):\n object_type = 'member'\n\n\nclass CPPFunctionObject(CPPObject):\n object_type = 'function'\n\n doc_field_types = CPPObject.doc_field_types + [\n GroupedField('parameter', label=_('Parameters'),\n names=('param', 'parameter', 'arg', 'argument'),\n can_collapse=True),\n GroupedField('exceptions', label=_('Throws'), rolename='expr',\n names=('throws', 'throw', 'exception'),\n can_collapse=True),\n GroupedField('retval', label=_('Return values'),\n names=('retvals', 'retval'),\n can_collapse=True),\n Field('returnvalue', label=_('Returns'), has_arg=False,\n names=('returns', 'return')),\n ]\n\n\nclass CPPClassObject(CPPObject):\n object_type = 'class'\n\n @property\n def display_object_type(self) -> str:\n # the distinction between class and struct is only cosmetic\n assert self.objtype in ('class', 'struct')\n return self.objtype\n\n\nclass CPPUnionObject(CPPObject):\n object_type = 'union'\n\n\nclass CPPEnumObject(CPPObject):\n object_type = 'enum'\n\n\nclass CPPEnumeratorObject(CPPObject):\n object_type = 'enumerator'\n\n\nclass CPPNamespaceObject(SphinxDirective):\n \"\"\"\n This directive is just to tell Sphinx that we're documenting stuff in\n namespace foo.\n \"\"\"\n\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n rootSymbol = self.env.domaindata['cpp']['root_symbol']\n if self.arguments[0].strip() in ('NULL', '0', 'nullptr'):\n symbol = rootSymbol\n stack: List[Symbol] = []\n else:\n parser = DefinitionParser(self.arguments[0],\n location=self.get_location(),\n config=self.config)\n try:\n ast = parser.parse_namespace_object()\n parser.assert_end()\n except DefinitionError as e:\n logger.warning(e, location=self.get_location())\n name = _make_phony_error_name()\n ast = ASTNamespace(name, None)\n symbol = rootSymbol.add_name(ast.nestedName, ast.templatePrefix)\n stack = [symbol]\n self.env.temp_data['cpp:parent_symbol'] = symbol\n self.env.temp_data['cpp:namespace_stack'] = stack\n self.env.ref_context['cpp:parent_key'] = symbol.get_lookup_key()\n return []\n\n\nclass CPPNamespacePushObject(SphinxDirective):\n has_content = False\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n if self.arguments[0].strip() in ('NULL', '0', 'nullptr'):\n return []\n parser = DefinitionParser(self.arguments[0],\n location=self.get_location(),\n config=self.config)\n try:\n ast = parser.parse_namespace_object()\n parser.assert_end()\n except DefinitionError as e:\n logger.warning(e, location=self.get_location())\n name = _make_phony_error_name()\n ast = ASTNamespace(name, None)\n oldParent = self.env.temp_data.get('cpp:parent_symbol', None)\n if not oldParent:\n oldParent = self.env.domaindata['cpp']['root_symbol']\n symbol = oldParent.add_name(ast.nestedName, ast.templatePrefix)\n stack = self.env.temp_data.get('cpp:namespace_stack', [])\n stack.append(symbol)\n self.env.temp_data['cpp:parent_symbol'] = symbol\n self.env.temp_data['cpp:namespace_stack'] = stack\n self.env.ref_context['cpp:parent_key'] = symbol.get_lookup_key()\n return []\n\n\nclass CPPNamespacePopObject(SphinxDirective):\n has_content = False\n required_arguments = 0\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n stack = self.env.temp_data.get('cpp:namespace_stack', None)\n if not stack or len(stack) == 0:\n logger.warning(\"C++ namespace pop on empty stack. Defaulting to global scope.\",\n location=self.get_location())\n stack = []\n else:\n stack.pop()\n if len(stack) > 0:\n symbol = stack[-1]\n else:\n symbol = self.env.domaindata['cpp']['root_symbol']\n self.env.temp_data['cpp:parent_symbol'] = symbol\n self.env.temp_data['cpp:namespace_stack'] = stack\n self.env.ref_context['cpp:parent_key'] = symbol.get_lookup_key()\n return []\n\n\nclass AliasNode(nodes.Element):\n def __init__(self, sig: str, aliasOptions: dict,\n env: \"BuildEnvironment\" = None,\n parentKey: LookupKey = None) -> None:\n super().__init__()\n self.sig = sig\n self.aliasOptions = aliasOptions\n if env is not None:\n if 'cpp:parent_symbol' not in env.temp_data:\n root = env.domaindata['cpp']['root_symbol']\n env.temp_data['cpp:parent_symbol'] = root\n env.ref_context['cpp:parent_key'] = root.get_lookup_key()\n self.parentKey = env.ref_context['cpp:parent_key']\n else:\n assert parentKey is not None\n self.parentKey = parentKey\n\n def copy(self) -> 'AliasNode':\n return self.__class__(self.sig, self.aliasOptions,\n env=None, parentKey=self.parentKey)\n\n\nclass AliasTransform(SphinxTransform):\n default_priority = ReferencesResolver.default_priority - 1\n\n def _render_symbol(self, s: Symbol, maxdepth: int, skipThis: bool,\n aliasOptions: dict, renderOptions: dict,\n document: Any) -> List[Node]:\n if maxdepth == 0:\n recurse = True\n elif maxdepth == 1:\n recurse = False\n else:\n maxdepth -= 1\n recurse = True\n\n nodes: List[Node] = []\n if not skipThis:\n signode = addnodes.desc_signature('', '')\n nodes.append(signode)\n s.declaration.describe_signature(signode, 'markName', self.env, renderOptions)\n\n if recurse:\n if skipThis:\n childContainer: Union[List[Node], addnodes.desc] = nodes\n else:\n content = addnodes.desc_content()\n desc = addnodes.desc()\n content.append(desc)\n desc.document = document\n desc['domain'] = 'cpp'\n # 'desctype' is a backwards compatible attribute\n desc['objtype'] = desc['desctype'] = 'alias'\n desc['noindex'] = True\n childContainer = desc\n\n for sChild in s._children:\n if sChild.declaration is None:\n continue\n if sChild.declaration.objectType in (\"templateParam\", \"functionParam\"):\n continue\n childNodes = self._render_symbol(\n sChild, maxdepth=maxdepth, skipThis=False,\n aliasOptions=aliasOptions, renderOptions=renderOptions,\n document=document)\n childContainer.extend(childNodes)\n\n if not skipThis and len(desc.children) != 0:\n nodes.append(content)\n return nodes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_AliasTransform.apply_CPPExprRole.run.return._signode_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/cpp.py_AliasTransform.apply_CPPExprRole.run.return._signode_", "embedding": null, "metadata": {"file_path": "sphinx/domains/cpp.py", "file_name": "cpp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 7494, "end_line": 7687, "span_ids": ["AliasTransform.apply", "CPPExprRole", "CPPAliasObject", "CPPXRefRole", "CPPXRefRole.process_link", "CPPExprRole.run", "CPPAliasObject.run"], "tokens": 1606}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AliasTransform(SphinxTransform):\n\n def apply(self, **kwargs: Any) -> None:\n for node in self.document.findall(AliasNode):\n node = cast(AliasNode, node)\n sig = node.sig\n parentKey = node.parentKey\n try:\n parser = DefinitionParser(sig, location=node,\n config=self.env.config)\n ast, isShorthand = parser.parse_xref_object()\n parser.assert_end()\n except DefinitionError as e:\n logger.warning(e, location=node)\n ast, isShorthand = None, None\n\n if ast is None:\n # could not be parsed, so stop here\n signode = addnodes.desc_signature(sig, '')\n signode.clear()\n signode += addnodes.desc_name(sig, sig)\n node.replace_self(signode)\n continue\n\n rootSymbol: Symbol = self.env.domains['cpp'].data['root_symbol']\n parentSymbol: Symbol = rootSymbol.direct_lookup(parentKey)\n if not parentSymbol:\n print(\"Target: \", sig)\n print(\"ParentKey: \", parentKey)\n print(rootSymbol.dump(1))\n assert parentSymbol # should be there\n\n symbols: List[Symbol] = []\n if isShorthand:\n assert isinstance(ast, ASTNamespace)\n ns = ast\n name = ns.nestedName\n if ns.templatePrefix:\n templateDecls = ns.templatePrefix.templates\n else:\n templateDecls = []\n symbols, failReason = parentSymbol.find_name(\n nestedName=name,\n templateDecls=templateDecls,\n typ='any',\n templateShorthand=True,\n matchSelf=True, recurseInAnon=True,\n searchInSiblings=False)\n if symbols is None:\n symbols = []\n else:\n assert isinstance(ast, ASTDeclaration)\n decl = ast\n name = decl.name\n s = parentSymbol.find_declaration(decl, 'any',\n templateShorthand=True,\n matchSelf=True, recurseInAnon=True)\n if s is not None:\n symbols.append(s)\n\n symbols = [s for s in symbols if s.declaration is not None]\n\n if len(symbols) == 0:\n signode = addnodes.desc_signature(sig, '')\n node.append(signode)\n signode.clear()\n signode += addnodes.desc_name(sig, sig)\n\n logger.warning(\"Can not find C++ declaration for alias '%s'.\" % ast,\n location=node)\n node.replace_self(signode)\n else:\n nodes = []\n renderOptions = {\n 'tparam-line-spec': False,\n }\n for s in symbols:\n assert s.declaration is not None\n res = self._render_symbol(\n s, maxdepth=node.aliasOptions['maxdepth'],\n skipThis=node.aliasOptions['noroot'],\n aliasOptions=node.aliasOptions,\n renderOptions=renderOptions,\n document=node.document)\n nodes.extend(res)\n node.replace_self(nodes)\n\n\nclass CPPAliasObject(ObjectDescription):\n option_spec: OptionSpec = {\n 'maxdepth': directives.nonnegative_int,\n 'noroot': directives.flag,\n }\n\n def run(self) -> List[Node]:\n \"\"\"\n On purpose this doesn't call the ObjectDescription version, but is based on it.\n Each alias signature may expand into multiple real signatures (an overload set).\n The code is therefore based on the ObjectDescription version.\n \"\"\"\n if ':' in self.name:\n self.domain, self.objtype = self.name.split(':', 1)\n else:\n self.domain, self.objtype = '', self.name\n\n node = addnodes.desc()\n node.document = self.state.document\n node['domain'] = self.domain\n # 'desctype' is a backwards compatible attribute\n node['objtype'] = node['desctype'] = self.objtype\n\n self.names: List[str] = []\n aliasOptions = {\n 'maxdepth': self.options.get('maxdepth', 1),\n 'noroot': 'noroot' in self.options,\n }\n if aliasOptions['noroot'] and aliasOptions['maxdepth'] == 1:\n logger.warning(\"Error in C++ alias declaration.\"\n \" Requested 'noroot' but 'maxdepth' 1.\"\n \" When skipping the root declaration,\"\n \" need 'maxdepth' 0 for infinite or at least 2.\",\n location=self.get_location())\n signatures = self.get_signatures()\n for sig in signatures:\n node.append(AliasNode(sig, aliasOptions, env=self.env))\n\n contentnode = addnodes.desc_content()\n node.append(contentnode)\n self.before_content()\n self.state.nested_parse(self.content, self.content_offset, contentnode)\n self.env.temp_data['object'] = None\n self.after_content()\n return [node]\n\n\nclass CPPXRefRole(XRefRole):\n def process_link(self, env: BuildEnvironment, refnode: Element, has_explicit_title: bool,\n title: str, target: str) -> Tuple[str, str]:\n refnode.attributes.update(env.ref_context)\n\n if not has_explicit_title:\n # major hax: replace anon names via simple string manipulation.\n # Can this actually fail?\n title = anon_identifier_re.sub(\"[anonymous]\", str(title))\n\n if refnode['reftype'] == 'any':\n # Assume the removal part of fix_parens for :any: refs.\n # The addition part is done with the reference is resolved.\n if not has_explicit_title and title.endswith('()'):\n title = title[:-2]\n if target.endswith('()'):\n target = target[:-2]\n # TODO: should this really be here?\n if not has_explicit_title:\n target = target.lstrip('~') # only has a meaning for the title\n # if the first character is a tilde, don't display the module/class\n # parts of the contents\n if title[:1] == '~':\n title = title[1:]\n dcolon = title.rfind('::')\n if dcolon != -1:\n title = title[dcolon + 2:]\n return title, target\n\n\nclass CPPExprRole(SphinxRole):\n def __init__(self, asCode: bool) -> None:\n super().__init__()\n if asCode:\n # render the expression as inline code\n self.class_type = 'cpp-expr'\n else:\n # render the expression as inline text\n self.class_type = 'cpp-texpr'\n\n def run(self) -> Tuple[List[Node], List[system_message]]:\n text = self.text.replace('\\n', ' ')\n parser = DefinitionParser(text,\n location=self.get_location(),\n config=self.config)\n # attempt to mimic XRefRole classes, except that...\n try:\n ast = parser.parse_expression()\n except DefinitionError as ex:\n logger.warning('Unparseable C++ expression: %r\\n%s', text, ex,\n location=self.get_location())\n # see below\n return [addnodes.desc_inline('cpp', text, text, classes=[self.class_type])], []\n parentSymbol = self.env.temp_data.get('cpp:parent_symbol', None)\n if parentSymbol is None:\n parentSymbol = self.env.domaindata['cpp']['root_symbol']\n # ...most if not all of these classes should really apply to the individual references,\n # not the container node\n signode = addnodes.desc_inline('cpp', classes=[self.class_type])\n ast.describe_signature(signode, 'markType', self.env, parentSymbol)\n return [signode], []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py__The_index_domain__logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py__The_index_domain__logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/domains/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["imports:12", "impl", "impl:2", "docstring", "imports"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The index domain.\"\"\"\n\nfrom typing import TYPE_CHECKING, Any, Dict, Iterable, List, Tuple\n\nfrom docutils import nodes\nfrom docutils.nodes import Node, system_message\nfrom docutils.parsers.rst import directives\n\nfrom sphinx import addnodes\nfrom sphinx.domains import Domain\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.util import logging, split_index_msg\nfrom sphinx.util.docutils import ReferenceRole, SphinxDirective\nfrom sphinx.util.nodes import process_index_entry\nfrom sphinx.util.typing import OptionSpec\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexDomain.process_doc_IndexDomain.process_doc.for_node_in_list_document.try_.else_.for_entry_in_node_entrie.entries_append_entry_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/index.py_IndexDomain.process_doc_IndexDomain.process_doc.for_node_in_list_document.try_.else_.for_entry_in_node_entrie.entries_append_entry_", "embedding": null, "metadata": {"file_path": "sphinx/domains/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 40, "end_line": 52, "span_ids": ["IndexDomain.process_doc"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexDomain(Domain):\n\n def process_doc(self, env: BuildEnvironment, docname: str, document: Node) -> None:\n \"\"\"Process a document after it is read by the environment.\"\"\"\n entries = self.entries.setdefault(env.docname, [])\n for node in list(document.findall(addnodes.index)):\n try:\n for entry in node['entries']:\n split_index_msg(entry[0], entry[1])\n except ValueError as exc:\n logger.warning(str(exc), location=node)\n node.parent.remove(node)\n else:\n for entry in node['entries']:\n entries.append(entry)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py__The_JavaScript_domain__logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py__The_JavaScript_domain__logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 25, "span_ids": ["impl", "docstring", "imports"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The JavaScript domain.\"\"\"\n\nfrom typing import Any, Dict, Iterator, List, Optional, Tuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\nfrom docutils.parsers.rst import directives\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import desc_signature, pending_xref\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.directives import ObjectDescription\nfrom sphinx.domains import Domain, ObjType\nfrom sphinx.domains.python import _pseudo_parse_arglist\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.locale import _, __\nfrom sphinx.roles import XRefRole\nfrom sphinx.util import logging\nfrom sphinx.util.docfields import Field, GroupedField, TypedField\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.nodes import make_id, make_refnode\nfrom sphinx.util.typing import OptionSpec\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject_JSObject.get_display_prefix.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSObject_JSObject.get_display_prefix.return._", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 28, "end_line": 47, "span_ids": ["JSObject.get_display_prefix", "JSObject"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JSObject(ObjectDescription[Tuple[str, str]]):\n \"\"\"\n Description of a JavaScript object.\n \"\"\"\n #: If set to ``True`` this object is callable and a `desc_parameterlist` is\n #: added\n has_arguments = False\n\n #: If ``allow_nesting`` is ``True``, the object prefixes will be accumulated\n #: based on directive nesting\n allow_nesting = False\n\n option_spec: OptionSpec = {\n 'noindex': directives.flag,\n 'noindexentry': directives.flag,\n }\n\n def get_display_prefix(self) -> List[Node]:\n #: what is displayed right before the documentation entry\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSCallable_JSConstructor.get_display_prefix.return._addnodes_desc_sig_keywor": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/javascript.py_JSCallable_JSConstructor.get_display_prefix.return._addnodes_desc_sig_keywor", "embedding": null, "metadata": {"file_path": "sphinx/domains/javascript.py", "file_name": "javascript.py", "file_type": "text/x-python", "category": "implementation", "start_line": 212, "end_line": 237, "span_ids": ["JSCallable", "JSConstructor.get_display_prefix", "JSConstructor"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JSCallable(JSObject):\n \"\"\"Description of a JavaScript function, method or constructor.\"\"\"\n has_arguments = True\n\n doc_field_types = [\n TypedField('arguments', label=_('Arguments'),\n names=('argument', 'arg', 'parameter', 'param'),\n typerolename='func', typenames=('paramtype', 'type')),\n GroupedField('errors', label=_('Throws'), rolename='func',\n names=('throws', ),\n can_collapse=True),\n Field('returnvalue', label=_('Returns'), has_arg=False,\n names=('returns', 'return')),\n Field('returntype', label=_('Return type'), has_arg=False,\n names=('rtype',)),\n ]\n\n\nclass JSConstructor(JSCallable):\n \"\"\"Like a callable but with a different prefix.\"\"\"\n\n allow_nesting = True\n\n def get_display_prefix(self) -> List[Node]:\n return [addnodes.desc_sig_keyword('class', 'class'),\n addnodes.desc_sig_space()]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py__The_math_domain__MathReferenceRole.result_nodes.return._node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py__The_math_domain__MathReferenceRole.result_nodes.return._node_", "embedding": null, "metadata": {"file_path": "sphinx/domains/math.py", "file_name": "math.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["impl", "MathReferenceRole", "impl:2", "docstring", "imports:11", "imports", "MathReferenceRole.result_nodes"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The math domain.\"\"\"\n\nfrom typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node, make_id, system_message\n\nfrom sphinx.addnodes import pending_xref\nfrom sphinx.domains import Domain\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.locale import __\nfrom sphinx.roles import XRefRole\nfrom sphinx.util import logging\nfrom sphinx.util.nodes import make_refnode\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n from sphinx.builders import Builder\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass MathReferenceRole(XRefRole):\n def result_nodes(self, document: nodes.document, env: BuildEnvironment, node: Element,\n is_ref: bool) -> Tuple[List[Node], List[system_message]]:\n node['refdomain'] = 'math'\n return [node], []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py_MathDomain.resolve_any_xref_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/math.py_MathDomain.resolve_any_xref_", "embedding": null, "metadata": {"file_path": "sphinx/domains/math.py", "file_name": "math.py", "file_type": "text/x-python", "category": "implementation", "start_line": 119, "end_line": 148, "span_ids": ["MathDomain.get_objects", "MathDomain.has_equations", "MathDomain.resolve_any_xref", "setup"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MathDomain(Domain):\n\n def resolve_any_xref(self, env: BuildEnvironment, fromdocname: str, builder: \"Builder\",\n target: str, node: pending_xref, contnode: Element\n ) -> List[Tuple[str, Element]]:\n refnode = self.resolve_xref(env, fromdocname, builder, 'eq', target, node, contnode)\n if refnode is None:\n return []\n else:\n return [('eq', refnode)]\n\n def get_objects(self) -> List:\n return []\n\n def has_equations(self, docname: str = None) -> bool:\n if docname:\n return self.data['has_equations'].get(docname, False)\n else:\n return any(self.data['has_equations'].values())\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_domain(MathDomain)\n app.add_role('eq', MathReferenceRole(warn_dangling=True))\n\n return {\n 'version': 'builtin',\n 'env_version': 2,\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__The_Python_domain__ModuleEntry.deprecated": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__The_Python_domain__ModuleEntry.deprecated", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 72, "span_ids": ["ObjectEntry", "impl", "ModuleEntry", "docstring", "imports"], "tokens": 523}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The Python domain.\"\"\"\n\nimport builtins\nimport inspect\nimport re\nimport sys\nimport typing\nimport warnings\nfrom inspect import Parameter\nfrom typing import Any, Dict, Iterable, Iterator, List, NamedTuple, Optional, Tuple, Type, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\nfrom docutils.parsers.rst import directives\nfrom docutils.parsers.rst.states import Inliner\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import desc_signature, pending_xref, pending_xref_condition\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.directives import ObjectDescription\nfrom sphinx.domains import Domain, Index, IndexEntry, ObjType\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.locale import _, __\nfrom sphinx.pycode.ast import ast\nfrom sphinx.pycode.ast import parse as ast_parse\nfrom sphinx.roles import XRefRole\nfrom sphinx.util import logging\nfrom sphinx.util.docfields import Field, GroupedField, TypedField\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.inspect import signature_from_str\nfrom sphinx.util.nodes import find_pending_xref_condition, make_id, make_refnode\nfrom sphinx.util.typing import OptionSpec, TextlikeNode\n\nlogger = logging.getLogger(__name__)\n\n\n# REs for Python signatures\npy_sig_re = re.compile(\n r'''^ ([\\w.]*\\.)? # class name(s)\n (\\w+) \\s* # thing name\n (?: \\(\\s*(.*)\\s*\\) # optional: arguments\n (?:\\s* -> \\s* (.*))? # return annotation\n )? $ # and nothing more\n ''', re.VERBOSE)\n\n\npairindextypes = {\n 'module': _('module'),\n 'keyword': _('keyword'),\n 'operator': _('operator'),\n 'object': _('object'),\n 'exception': _('exception'),\n 'statement': _('statement'),\n 'builtin': _('built-in function'),\n}\n\n\nclass ObjectEntry(NamedTuple):\n docname: str\n node_id: str\n objtype: str\n aliased: bool\n\n\nclass ModuleEntry(NamedTuple):\n docname: str\n node_id: str\n synopsis: str\n platform: str\n deprecated: bool", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_parse_reftarget_parse_reftarget.return.reftype_reftarget_title": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_parse_reftarget_parse_reftarget.return.reftype_reftarget_title", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 75, "end_line": 99, "span_ids": ["parse_reftarget"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_reftarget(reftarget: str, suppress_prefix: bool = False\n ) -> Tuple[str, str, str, bool]:\n \"\"\"Parse a type string and return (reftype, reftarget, title, refspecific flag)\"\"\"\n refspecific = False\n if reftarget.startswith('.'):\n reftarget = reftarget[1:]\n title = reftarget\n refspecific = True\n elif reftarget.startswith('~'):\n reftarget = reftarget[1:]\n title = reftarget.split('.')[-1]\n elif suppress_prefix:\n title = reftarget.split('.')[-1]\n elif reftarget.startswith('typing.'):\n title = reftarget[7:]\n else:\n title = reftarget\n\n if reftarget == 'None' or reftarget.startswith('typing.'):\n # typing module provides non-class types. Obj reference is good to refer them.\n reftype = 'obj'\n else:\n reftype = 'class'\n\n return reftype, reftarget, title, refspecific", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_type_to_xref_type_to_xref.return.pending_xref_contnod": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_type_to_xref_type_to_xref.return.pending_xref_contnod", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 125, "span_ids": ["type_to_xref"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def type_to_xref(target: str, env: BuildEnvironment = None, suppress_prefix: bool = False\n ) -> addnodes.pending_xref:\n \"\"\"Convert a type string to a cross reference node.\"\"\"\n if env:\n kwargs = {'py:module': env.ref_context.get('py:module'),\n 'py:class': env.ref_context.get('py:class')}\n else:\n kwargs = {}\n\n reftype, target, title, refspecific = parse_reftarget(target, suppress_prefix)\n\n if env.config.python_use_unqualified_type_names:\n # Note: It would be better to use qualname to describe the object to support support\n # nested classes. But python domain can't access the real python object because this\n # module should work not-dynamically.\n shortname = title.split('.')[-1]\n contnodes: List[Node] = [pending_xref_condition('', shortname, condition='resolved'),\n pending_xref_condition('', title, condition='*')]\n else:\n contnodes = [nodes.Text(title)]\n\n return pending_xref('', *contnodes,\n refdomain='py', reftype=reftype, reftarget=target,\n refspecific=refspecific, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__parse_annotation__parse_annotation.unparse.if_isinstance_node_ast_A.else_._unsupported_syntax": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__parse_annotation__parse_annotation.unparse.if_isinstance_node_ast_A.else_._unsupported_syntax", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 128, "end_line": 220, "span_ids": ["_parse_annotation"], "tokens": 875}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _parse_annotation(annotation: str, env: BuildEnvironment) -> List[Node]:\n \"\"\"Parse type annotation.\"\"\"\n def unparse(node: ast.AST) -> List[Node]:\n if isinstance(node, ast.Attribute):\n return [nodes.Text(\"%s.%s\" % (unparse(node.value)[0], node.attr))]\n elif isinstance(node, ast.BinOp):\n result: List[Node] = unparse(node.left)\n result.extend(unparse(node.op))\n result.extend(unparse(node.right))\n return result\n elif isinstance(node, ast.BitOr):\n return [addnodes.desc_sig_space(),\n addnodes.desc_sig_punctuation('', '|'),\n addnodes.desc_sig_space()]\n elif isinstance(node, ast.Constant): # type: ignore\n if node.value is Ellipsis:\n return [addnodes.desc_sig_punctuation('', \"...\")]\n elif isinstance(node.value, bool):\n return [addnodes.desc_sig_keyword('', repr(node.value))]\n elif isinstance(node.value, int):\n return [addnodes.desc_sig_literal_number('', repr(node.value))]\n elif isinstance(node.value, str):\n return [addnodes.desc_sig_literal_string('', repr(node.value))]\n else:\n # handles None, which is further handled by type_to_xref later\n # and fallback for other types that should be converted\n return [nodes.Text(repr(node.value))]\n elif isinstance(node, ast.Expr):\n return unparse(node.value)\n elif isinstance(node, ast.Index):\n return unparse(node.value)\n elif isinstance(node, ast.Invert):\n return [addnodes.desc_sig_punctuation('', '~')]\n elif isinstance(node, ast.List):\n result = [addnodes.desc_sig_punctuation('', '[')]\n if node.elts:\n # check if there are elements in node.elts to only pop the\n # last element of result if the for-loop was run at least\n # once\n for elem in node.elts:\n result.extend(unparse(elem))\n result.append(addnodes.desc_sig_punctuation('', ','))\n result.append(addnodes.desc_sig_space())\n result.pop()\n result.pop()\n result.append(addnodes.desc_sig_punctuation('', ']'))\n return result\n elif isinstance(node, ast.Module):\n return sum((unparse(e) for e in node.body), [])\n elif isinstance(node, ast.Name):\n return [nodes.Text(node.id)]\n elif isinstance(node, ast.Subscript):\n result = unparse(node.value)\n result.append(addnodes.desc_sig_punctuation('', '['))\n result.extend(unparse(node.slice))\n result.append(addnodes.desc_sig_punctuation('', ']'))\n\n # Wrap the Text nodes inside brackets by literal node if the subscript is a Literal\n if result[0] in ('Literal', 'typing.Literal'):\n for i, subnode in enumerate(result[1:], start=1):\n if isinstance(subnode, nodes.Text):\n result[i] = nodes.literal('', '', subnode)\n return result\n elif isinstance(node, ast.UnaryOp):\n return unparse(node.op) + unparse(node.operand)\n elif isinstance(node, ast.Tuple):\n if node.elts:\n result = []\n for elem in node.elts:\n result.extend(unparse(elem))\n result.append(addnodes.desc_sig_punctuation('', ','))\n result.append(addnodes.desc_sig_space())\n result.pop()\n result.pop()\n else:\n result = [addnodes.desc_sig_punctuation('', '('),\n addnodes.desc_sig_punctuation('', ')')]\n\n return result\n else:\n if sys.version_info < (3, 8):\n if isinstance(node, ast.Bytes):\n return [addnodes.desc_sig_literal_string('', repr(node.s))]\n elif isinstance(node, ast.Ellipsis):\n return [addnodes.desc_sig_punctuation('', \"...\")]\n elif isinstance(node, ast.NameConstant):\n return [nodes.Text(node.value)]\n elif isinstance(node, ast.Num):\n return [addnodes.desc_sig_literal_string('', repr(node.n))]\n elif isinstance(node, ast.Str):\n return [addnodes.desc_sig_literal_string('', repr(node.s))]\n\n raise SyntaxError # unsupported syntax\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__parse_annotation.try___parse_annotation.try_.except_SyntaxError_.return._type_to_xref_annotation_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py__parse_annotation.try___parse_annotation.try_.except_SyntaxError_.return._type_to_xref_annotation_", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 222, "end_line": 239, "span_ids": ["_parse_annotation"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _parse_annotation(annotation: str, env: BuildEnvironment) -> List[Node]:\n # ... other code\n\n try:\n tree = ast_parse(annotation)\n result: List[Node] = []\n for node in unparse(tree):\n if isinstance(node, nodes.literal):\n result.append(node[0])\n elif isinstance(node, nodes.Text) and node.strip():\n if (result and isinstance(result[-1], addnodes.desc_sig_punctuation) and\n result[-1].astext() == '~'):\n result.pop()\n result.append(type_to_xref(str(node), env, suppress_prefix=True))\n else:\n result.append(type_to_xref(str(node), env))\n else:\n result.append(node)\n return result\n except SyntaxError:\n return [type_to_xref(annotation, env)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyXrefMixin.make_xrefs_PyTypedField.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyXrefMixin.make_xrefs_PyTypedField.pass", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 377, "end_line": 414, "span_ids": ["PyXrefMixin.make_xrefs", "PyField", "PyGroupedField", "PyTypedField"], "tokens": 321}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyXrefMixin:\n\n def make_xrefs(self, rolename: str, domain: str, target: str,\n innernode: Type[TextlikeNode] = nodes.emphasis,\n contnode: Node = None, env: BuildEnvironment = None,\n inliner: Inliner = None, location: Node = None) -> List[Node]:\n delims = r'(\\s*[\\[\\]\\(\\),](?:\\s*or\\s)?\\s*|\\s+or\\s+|\\s*\\|\\s*|\\.\\.\\.)'\n delims_re = re.compile(delims)\n sub_targets = re.split(delims, target)\n\n split_contnode = bool(contnode and contnode.astext() == target)\n\n in_literal = False\n results = []\n for sub_target in filter(None, sub_targets):\n if split_contnode:\n contnode = nodes.Text(sub_target)\n\n if in_literal or delims_re.match(sub_target):\n results.append(contnode or innernode(sub_target, sub_target))\n else:\n results.append(self.make_xref(rolename, domain, sub_target,\n innernode, contnode, env, inliner, location))\n\n if sub_target in ('Literal', 'typing.Literal'):\n in_literal = True\n\n return results\n\n\nclass PyField(PyXrefMixin, Field):\n pass\n\n\nclass PyGroupedField(PyXrefMixin, GroupedField):\n pass\n\n\nclass PyTypedField(PyXrefMixin, TypedField):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyMethod_PyMethod.get_signature_prefix.return.prefix": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyMethod_PyMethod.get_signature_prefix.return.prefix", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 770, "end_line": 809, "span_ids": ["PyMethod.get_signature_prefix", "PyMethod.needs_arglist", "PyMethod"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyMethod(PyObject):\n \"\"\"Description of a method.\"\"\"\n\n option_spec: OptionSpec = PyObject.option_spec.copy()\n option_spec.update({\n 'abstractmethod': directives.flag,\n 'async': directives.flag,\n 'classmethod': directives.flag,\n 'final': directives.flag,\n 'property': directives.flag,\n 'staticmethod': directives.flag,\n })\n\n def needs_arglist(self) -> bool:\n if 'property' in self.options:\n return False\n else:\n return True\n\n def get_signature_prefix(self, sig: str) -> List[nodes.Node]:\n prefix: List[nodes.Node] = []\n if 'final' in self.options:\n prefix.append(nodes.Text('final'))\n prefix.append(addnodes.desc_sig_space())\n if 'abstractmethod' in self.options:\n prefix.append(nodes.Text('abstract'))\n prefix.append(addnodes.desc_sig_space())\n if 'async' in self.options:\n prefix.append(nodes.Text('async'))\n prefix.append(addnodes.desc_sig_space())\n if 'classmethod' in self.options:\n prefix.append(nodes.Text('classmethod'))\n prefix.append(addnodes.desc_sig_space())\n if 'property' in self.options:\n prefix.append(nodes.Text('property'))\n prefix.append(addnodes.desc_sig_space())\n if 'staticmethod' in self.options:\n prefix.append(nodes.Text('static'))\n prefix.append(addnodes.desc_sig_space())\n return prefix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyProperty_PyProperty.get_signature_prefix.return.prefix": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyProperty_PyProperty.get_signature_prefix.return.prefix", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 918, "end_line": 952, "span_ids": ["PyProperty", "PyProperty.get_signature_prefix", "PyProperty.handle_signature"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyProperty(PyObject):\n \"\"\"Description of an attribute.\"\"\"\n\n option_spec = PyObject.option_spec.copy()\n option_spec.update({\n 'abstractmethod': directives.flag,\n 'classmethod': directives.flag,\n 'type': directives.unchanged,\n })\n\n def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]:\n fullname, prefix = super().handle_signature(sig, signode)\n\n typ = self.options.get('type')\n if typ:\n annotations = _parse_annotation(typ, self.env)\n signode += addnodes.desc_annotation(typ, '',\n addnodes.desc_sig_punctuation('', ':'),\n addnodes.desc_sig_space(),\n *annotations)\n\n return fullname, prefix\n\n def get_signature_prefix(self, sig: str) -> List[nodes.Node]:\n prefix: List[nodes.Node] = []\n if 'abstractmethod' in self.options:\n prefix.append(nodes.Text('abstract'))\n prefix.append(addnodes.desc_sig_space())\n if 'classmethod' in self.options:\n prefix.append(nodes.Text('class'))\n prefix.append(addnodes.desc_sig_space())\n\n prefix.append(nodes.Text('property'))\n prefix.append(addnodes.desc_sig_space())\n return prefix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyProperty.get_index_text_PyProperty.get_index_text.return.__s_s_property_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_PyProperty.get_index_text_PyProperty.get_index_text.return.__s_s_property_", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 954, "end_line": 966, "span_ids": ["PyProperty.get_index_text"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PyProperty(PyObject):\n\n def get_index_text(self, modname: str, name_cls: Tuple[str, str]) -> str:\n name, cls = name_cls\n try:\n clsname, attrname = name.rsplit('.', 1)\n if modname and self.env.config.add_module_names:\n clsname = '.'.join([modname, clsname])\n except ValueError:\n if modname:\n return _('%s (in module %s)') % (name, modname)\n else:\n return name\n\n return _('%s (%s property)') % (attrname, clsname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_builtin_resolver_builtin_resolver.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_builtin_resolver_builtin_resolver.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1435, "end_line": 1457, "span_ids": ["builtin_resolver"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def builtin_resolver(app: Sphinx, env: BuildEnvironment,\n node: pending_xref, contnode: Element) -> Element:\n \"\"\"Do not emit nitpicky warnings for built-in types.\"\"\"\n def istyping(s: str) -> bool:\n if s.startswith('typing.'):\n s = s.split('.', 1)[1]\n\n return s in typing.__all__ # type: ignore\n\n if node.get('refdomain') != 'py':\n return None\n elif node.get('reftype') in ('class', 'obj') and node.get('reftarget') == 'None':\n return contnode\n elif node.get('reftype') in ('class', 'obj', 'exc'):\n reftarget = node.get('reftarget')\n if inspect.isclass(getattr(builtins, reftarget, None)):\n # built-in class\n return contnode\n elif istyping(reftarget):\n # typing class\n return contnode\n\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/python.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/domains/python.py", "file_name": "python.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1460, "end_line": 1474, "span_ids": ["setup"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.setup_extension('sphinx.directives')\n\n app.add_domain(PythonDomain)\n app.add_config_value('python_use_unqualified_type_names', False, 'env')\n app.connect('object-description-transform', filter_meta_fields)\n app.connect('missing-reference', builtin_resolver, priority=900)\n\n return {\n 'version': 'builtin',\n 'env_version': 3,\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py__The_reStructuredText_d_dir_sig_re.re_compile_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/rst.py__The_reStructuredText_d_dir_sig_re.re_compile_r_", "embedding": null, "metadata": {"file_path": "sphinx/domains/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["impl", "docstring", "imports"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The reStructuredText domain.\"\"\"\n\nimport re\nfrom typing import Any, Dict, Iterator, List, Optional, Tuple, cast\n\nfrom docutils.nodes import Element\nfrom docutils.parsers.rst import directives\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import desc_signature, pending_xref\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.directives import ObjectDescription\nfrom sphinx.domains import Domain, ObjType\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.locale import _, __\nfrom sphinx.roles import XRefRole\nfrom sphinx.util import logging\nfrom sphinx.util.nodes import make_id, make_refnode\nfrom sphinx.util.typing import OptionSpec\n\nlogger = logging.getLogger(__name__)\n\ndir_sig_re = re.compile(r'\\.\\. (.+?)::(.*)$')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py__The_standard_domain__token_re.re_compile_r_w_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py__The_standard_domain__token_re.re_compile_r_w_", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["impl", "impl:2", "docstring", "imports", "imports:18"], "tokens": 295}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The standard domain.\"\"\"\n\nimport re\nfrom copy import copy\nfrom typing import (TYPE_CHECKING, Any, Callable, Dict, Iterable, Iterator, List, Optional,\n Tuple, Type, Union, cast)\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node, system_message\nfrom docutils.parsers.rst import Directive, directives\nfrom docutils.statemachine import StringList\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import desc_signature, pending_xref\nfrom sphinx.directives import ObjectDescription\nfrom sphinx.domains import Domain, ObjType\nfrom sphinx.locale import _, __\nfrom sphinx.roles import XRefRole\nfrom sphinx.util import docname_join, logging, ws_re\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.nodes import clean_astext, make_id, make_refnode\nfrom sphinx.util.typing import OptionSpec, RoleFunction\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n from sphinx.builders import Builder\n from sphinx.environment import BuildEnvironment\n\nlogger = logging.getLogger(__name__)\n\n\n# RE for option descriptions\noption_desc_re = re.compile(r'((?:/|--|-|\\+)?[^\\s=]+)(=?\\s*.*)')\n# RE for grammar tokens\ntoken_re = re.compile(r'`((~?\\w*:)?\\w+)`', re.U)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain_StandardDomain.enumerable_nodes._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain_StandardDomain.enumerable_nodes._", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 535, "end_line": 610, "span_ids": ["StandardDomain"], "tokens": 746}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n \"\"\"\n Domain for all objects that don't fit into another domain or are added\n via the application interface.\n \"\"\"\n\n name = 'std'\n label = 'Default'\n\n object_types: Dict[str, ObjType] = {\n 'term': ObjType(_('glossary term'), 'term', searchprio=-1),\n 'token': ObjType(_('grammar token'), 'token', searchprio=-1),\n 'label': ObjType(_('reference label'), 'ref', 'keyword',\n searchprio=-1),\n 'envvar': ObjType(_('environment variable'), 'envvar'),\n 'cmdoption': ObjType(_('program option'), 'option'),\n 'doc': ObjType(_('document'), 'doc', searchprio=-1)\n }\n\n directives: Dict[str, Type[Directive]] = {\n 'program': Program,\n 'cmdoption': Cmdoption, # old name for backwards compatibility\n 'option': Cmdoption,\n 'envvar': EnvVar,\n 'glossary': Glossary,\n 'productionlist': ProductionList,\n }\n roles: Dict[str, Union[RoleFunction, XRefRole]] = {\n 'option': OptionXRefRole(warn_dangling=True),\n 'envvar': EnvVarXRefRole(),\n # links to tokens in grammar productions\n 'token': TokenXRefRole(),\n # links to terms in glossary\n 'term': XRefRole(innernodeclass=nodes.inline,\n warn_dangling=True),\n # links to headings or arbitrary labels\n 'ref': XRefRole(lowercase=True, innernodeclass=nodes.inline,\n warn_dangling=True),\n # links to labels of numbered figures, tables and code-blocks\n 'numref': XRefRole(lowercase=True,\n warn_dangling=True),\n # links to labels, without a different title\n 'keyword': XRefRole(warn_dangling=True),\n # links to documents\n 'doc': XRefRole(warn_dangling=True, innernodeclass=nodes.inline),\n }\n\n initial_data = {\n 'progoptions': {}, # (program, name) -> docname, labelid\n 'objects': {}, # (type, name) -> docname, labelid\n 'labels': { # labelname -> docname, labelid, sectionname\n 'genindex': ('genindex', '', _('Index')),\n 'modindex': ('py-modindex', '', _('Module Index')),\n 'search': ('search', '', _('Search Page')),\n },\n 'anonlabels': { # labelname -> docname, labelid\n 'genindex': ('genindex', ''),\n 'modindex': ('py-modindex', ''),\n 'search': ('search', ''),\n },\n }\n\n dangling_warnings = {\n 'term': 'term not in glossary: %(target)s',\n 'numref': 'undefined label: %(target)s',\n 'keyword': 'unknown keyword: %(target)s',\n 'doc': 'unknown document: %(target)s',\n 'option': 'unknown option: %(target)s',\n }\n\n # node_class -> (figtype, title_getter)\n enumerable_nodes: Dict[Type[Node], Tuple[str, Optional[Callable]]] = {\n nodes.figure: ('figure', None),\n nodes.table: ('table', None),\n nodes.container: ('code-block', None),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._terms_StandardDomain.anonlabels._labelname_docname_l": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain._terms_StandardDomain.anonlabels._labelname_docname_l", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 660, "end_line": 684, "span_ids": ["StandardDomain.anonlabels", "StandardDomain._note_term", "StandardDomain.labels", "StandardDomain._terms", "StandardDomain.progoptions"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n @property\n def _terms(self) -> Dict[str, Tuple[str, str]]:\n \"\"\".. note:: Will be removed soon. internal use only.\"\"\"\n return self.data.setdefault('terms', {}) # (name) -> docname, labelid\n\n def _note_term(self, term: str, labelid: str, location: Any = None) -> None:\n \"\"\"Note a term for cross reference.\n\n .. note:: Will be removed soon. internal use only.\n \"\"\"\n self.note_object('term', term, labelid, location)\n\n self._terms[term.lower()] = (self.env.docname, labelid)\n\n @property\n def progoptions(self) -> Dict[Tuple[str, str], Tuple[str, str]]:\n return self.data.setdefault('progoptions', {}) # (program, name) -> docname, labelid\n\n @property\n def labels(self) -> Dict[str, Tuple[str, str, str]]:\n return self.data.setdefault('labels', {}) # labelname -> docname, labelid, sectionname\n\n @property\n def anonlabels(self) -> Dict[str, Tuple[str, str]]:\n return self.data.setdefault('anonlabels', {}) # labelname -> docname, labelid", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_fignumber_StandardDomain.get_full_qualified_name.if_node_get_reftype_.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/domains/std.py_StandardDomain.get_fignumber_StandardDomain.get_full_qualified_name.if_node_get_reftype_.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/domains/std.py", "file_name": "std.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1052, "end_line": 1087, "span_ids": ["StandardDomain.get_full_qualified_name", "StandardDomain.get_fignumber"], "tokens": 341}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StandardDomain(Domain):\n\n def get_fignumber(self, env: \"BuildEnvironment\", builder: \"Builder\",\n figtype: str, docname: str, target_node: Element) -> Tuple[int, ...]:\n if figtype == 'section':\n if builder.name == 'latex':\n return tuple()\n elif docname not in env.toc_secnumbers:\n raise ValueError # no number assigned\n else:\n anchorname = '#' + target_node['ids'][0]\n if anchorname not in env.toc_secnumbers[docname]:\n # try first heading which has no anchor\n return env.toc_secnumbers[docname].get('')\n else:\n return env.toc_secnumbers[docname].get(anchorname)\n else:\n try:\n figure_id = target_node['ids'][0]\n return env.toc_fignumbers[docname][figtype][figure_id]\n except (KeyError, IndexError) as exc:\n # target_node is found, but fignumber is not assigned.\n # Maybe it is defined in orphaned document.\n raise ValueError from exc\n\n def get_full_qualified_name(self, node: Element) -> Optional[str]:\n if node.get('reftype') == 'option':\n progname = node.get('std:program')\n command = ws_re.split(node.get('reftarget'))\n if progname:\n command.insert(0, progname)\n option = command.pop()\n if command:\n return '.'.join(['-'.join(command), option])\n else:\n return None\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py__Global_creation_enviro_versioning_conditions._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py__Global_creation_enviro_versioning_conditions._", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 77, "span_ids": ["impl", "imports:26", "impl:2", "docstring", "imports"], "tokens": 537}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Global creation environment.\"\"\"\n\nimport os\nimport pickle\nimport warnings\nfrom collections import defaultdict\nfrom copy import copy\nfrom datetime import datetime\nfrom os import path\nfrom typing import (TYPE_CHECKING, Any, Callable, Dict, Generator, Iterator, List, Optional,\n Set, Tuple, Union)\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\n\nfrom sphinx import addnodes\nfrom sphinx.config import Config\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.domains import Domain\nfrom sphinx.environment.adapters.toctree import TocTree\nfrom sphinx.errors import BuildEnvironmentError, DocumentError, ExtensionError, SphinxError\nfrom sphinx.events import EventManager\nfrom sphinx.locale import __\nfrom sphinx.project import Project\nfrom sphinx.transforms import SphinxTransformer\nfrom sphinx.util import DownloadFiles, FilenameUniqDict, logging\nfrom sphinx.util.docutils import LoggingReporter\nfrom sphinx.util.i18n import CatalogRepository, docname_to_domain\nfrom sphinx.util.nodes import is_translatable\nfrom sphinx.util.osutil import canon_path, os_path\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n from sphinx.builders import Builder\n\n\nlogger = logging.getLogger(__name__)\n\ndefault_settings: Dict[str, Any] = {\n 'auto_id_prefix': 'id',\n 'embed_images': False,\n 'embed_stylesheet': False,\n 'cloak_email_addresses': True,\n 'pep_base_url': 'https://peps.python.org/',\n 'pep_references': None,\n 'rfc_base_url': 'https://datatracker.ietf.org/doc/html/',\n 'rfc_references': None,\n 'input_encoding': 'utf-8-sig',\n 'doctitle_xform': False,\n 'sectsubtitle_xform': False,\n 'section_self_link': False,\n 'halt_level': 5,\n 'file_insertion_enabled': True,\n 'smartquotes_locales': [],\n}\n\n# This is increased every time an environment attribute is added\n# or changed to properly invalidate pickle files.\nENV_VERSION = 56\n\n# config status\nCONFIG_OK = 1\nCONFIG_NEW = 2\nCONFIG_CHANGED = 3\nCONFIG_EXTENSIONS_CHANGED = 4\n\nCONFIG_CHANGED_REASON = {\n CONFIG_NEW: __('new config'),\n CONFIG_CHANGED: __('config changed'),\n CONFIG_EXTENSIONS_CHANGED: __('extensions changed'),\n}\n\n\nversioning_conditions: Dict[str, Union[bool, Callable]] = {\n 'none': False,\n 'text': is_translatable,\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment_BuildEnvironment.__init__.if_app_.else_.warnings_warn_The_app_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment_BuildEnvironment.__init__.if_app_.else_.warnings_warn_The_app_", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 183, "span_ids": ["BuildEnvironment"], "tokens": 993}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n \"\"\"\n The environment in which the ReST files are translated.\n Stores an inventory of cross-file targets and provides doctree\n transformations to resolve links to them.\n \"\"\"\n\n domains: Dict[str, Domain]\n\n # --------- ENVIRONMENT INITIALIZATION -------------------------------------\n\n def __init__(self, app: \"Sphinx\" = None):\n self.app: Sphinx = None\n self.doctreedir: str = None\n self.srcdir: str = None\n self.config: Config = None\n self.config_status: int = None\n self.config_status_extra: str = None\n self.events: EventManager = None\n self.project: Project = None\n self.version: Dict[str, str] = None\n\n # the method of doctree versioning; see set_versioning_method\n self.versioning_condition: Union[bool, Callable] = None\n self.versioning_compare: bool = None\n\n # all the registered domains, set by the application\n self.domains = {}\n\n # the docutils settings for building\n self.settings = default_settings.copy()\n self.settings['env'] = self\n\n # All \"docnames\" here are /-separated and relative and exclude\n # the source suffix.\n\n # docname -> mtime at the time of reading\n # contains all read docnames\n self.all_docs: Dict[str, float] = {}\n # docname -> set of dependent file\n # names, relative to documentation root\n self.dependencies: Dict[str, Set[str]] = defaultdict(set)\n # docname -> set of included file\n # docnames included from other documents\n self.included: Dict[str, Set[str]] = defaultdict(set)\n # docnames to re-read unconditionally on next build\n self.reread_always: Set[str] = set()\n\n # File metadata\n # docname -> dict of metadata items\n self.metadata: Dict[str, Dict[str, Any]] = defaultdict(dict)\n\n # TOC inventory\n # docname -> title node\n self.titles: Dict[str, nodes.title] = {}\n # docname -> title node; only different if\n # set differently with title directive\n self.longtitles: Dict[str, nodes.title] = {}\n # docname -> table of contents nodetree\n self.tocs: Dict[str, nodes.bullet_list] = {}\n # docname -> number of real entries\n self.toc_num_entries: Dict[str, int] = {}\n\n # used to determine when to show the TOC\n # in a sidebar (don't show if it's only one item)\n # docname -> dict of sectionid -> number\n self.toc_secnumbers: Dict[str, Dict[str, Tuple[int, ...]]] = {}\n # docname -> dict of figtype -> dict of figureid -> number\n self.toc_fignumbers: Dict[str, Dict[str, Dict[str, Tuple[int, ...]]]] = {}\n\n # docname -> list of toctree includefiles\n self.toctree_includes: Dict[str, List[str]] = {}\n # docname -> set of files (containing its TOCs) to rebuild too\n self.files_to_rebuild: Dict[str, Set[str]] = {}\n # docnames that have :glob: toctrees\n self.glob_toctrees: Set[str] = set()\n # docnames that have :numbered: toctrees\n self.numbered_toctrees: Set[str] = set()\n\n # domain-specific inventories, here to be pickled\n # domainname -> domain-specific dict\n self.domaindata: Dict[str, Dict] = {}\n\n # these map absolute path -> (docnames, unique filename)\n self.images: FilenameUniqDict = FilenameUniqDict()\n # filename -> (set of docnames, destination)\n self.dlfiles: DownloadFiles = DownloadFiles()\n\n # the original URI for images\n self.original_image_uri: Dict[str, str] = {}\n\n # temporary data storage while reading a document\n self.temp_data: Dict[str, Any] = {}\n # context for cross-references (e.g. current module or class)\n # this is similar to temp_data, but will for example be copied to\n # attributes of \"any\" cross references\n self.ref_context: Dict[str, Any] = {}\n\n # set up environment\n if app:\n self.setup(app)\n else:\n warnings.warn(\"The 'app' argument for BuildEnvironment() becomes required now.\",\n RemovedInSphinx60Warning, stacklevel=2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.path2doc_BuildEnvironment.doc2path.return.self_project_doc2path_doc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.path2doc_BuildEnvironment.doc2path.return.self_project_doc2path_doc", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 312, "end_line": 325, "span_ids": ["BuildEnvironment.path2doc", "BuildEnvironment.doc2path"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def path2doc(self, filename: str) -> Optional[str]:\n \"\"\"Return the docname for the filename if the file is document.\n\n *filename* should be absolute or relative to the source directory.\n \"\"\"\n return self.project.path2doc(filename)\n\n def doc2path(self, docname: str, base: bool = True) -> str:\n \"\"\"Return the filename for the document name.\n\n If *base* is True, return absolute path under self.srcdir.\n If *base* is False, return relative path to self.srcdir.\n \"\"\"\n return self.project.doc2path(docname, base)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.check_consistency_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/__init__.py_BuildEnvironment.check_consistency_", "embedding": null, "metadata": {"file_path": "sphinx/environment/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 614, "end_line": 634, "span_ids": ["BuildEnvironment.check_consistency"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BuildEnvironment:\n\n def check_consistency(self) -> None:\n \"\"\"Do consistency checks.\"\"\"\n included = set().union(*self.included.values())\n for docname in sorted(self.all_docs):\n if docname not in self.files_to_rebuild:\n if docname == self.config.root_doc:\n # the master file is not included anywhere ;)\n continue\n if docname in included:\n # the document is included from other documents\n continue\n if 'orphan' in self.metadata[docname]:\n continue\n logger.warning(__('document isn\\'t included in any toctree'),\n location=docname)\n\n # call check-consistency for all extensions\n for domain in self.domains.values():\n domain.check_consistency()\n self.events.emit('env-check-consistency', self)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/asset.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/asset.py__", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/asset.py", "file_name": "asset.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["ImageAdapter", "ImageAdapter.get_original_image_uri", "docstring", "imports"], "tokens": 87}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Assets adapter for sphinx.environment.\"\"\"\n\nfrom sphinx.environment import BuildEnvironment\n\n\nclass ImageAdapter:\n def __init__(self, env: BuildEnvironment) -> None:\n self.env = env\n\n def get_original_image_uri(self, name: str) -> str:\n \"\"\"Get the original image URI.\"\"\"\n while name in self.env.original_image_uri:\n name = self.env.original_image_uri[name]\n\n return name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py__Index_entries_adapters_IndexEntries.create_index.add_entry.if_subword_.elif_link_.try_.else_.entry_0_append_main_ur": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/indexentries.py__Index_entries_adapters_IndexEntries.create_index.add_entry.if_subword_.elif_link_.try_.else_.entry_0_append_main_ur", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/indexentries.py", "file_name": "indexentries.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["impl", "docstring", "IndexEntries.create_index", "imports", "IndexEntries"], "tokens": 391}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Index entries adapters for sphinx.environment.\"\"\"\n\nimport re\nimport unicodedata\nfrom itertools import groupby\nfrom typing import Any, Dict, List, Pattern, Tuple, cast\n\nfrom sphinx.builders import Builder\nfrom sphinx.domains.index import IndexDomain\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.errors import NoUri\nfrom sphinx.locale import _, __\nfrom sphinx.util import logging, split_into\n\nlogger = logging.getLogger(__name__)\n\n\nclass IndexEntries:\n def __init__(self, env: BuildEnvironment) -> None:\n self.env = env\n\n def create_index(self, builder: Builder, group_entries: bool = True,\n _fixre: Pattern = re.compile(r'(.*) ([(][^()]*[)])')\n ) -> List[Tuple[str, List[Tuple[str, Any]]]]:\n \"\"\"Create the real index from the collected index entries.\"\"\"\n new: Dict[str, List] = {}\n\n def add_entry(word: str, subword: str, main: str, link: bool = True,\n dic: Dict = new, key: str = None) -> None:\n # Force the word to be unicode if it's a ASCII bytestring.\n # This will solve problems with unicode normalization later.\n # For instance the RFC role will add bytestrings at the moment\n word = str(word)\n entry = dic.get(word)\n if not entry:\n dic[word] = entry = [[], {}, key]\n if subword:\n add_entry(subword, '', main, link=link, dic=entry[1], key=key)\n elif link:\n try:\n uri = builder.get_relative_uri('genindex', fn) + '#' + tid\n except NoUri:\n pass\n else:\n entry[0].append((main, uri))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py__Toctree_adapter_for_sp_logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py__Toctree_adapter_for_sp_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["impl", "imports:9", "impl:2", "docstring", "imports"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Toctree adapter for sphinx.environment.\"\"\"\n\nfrom typing import TYPE_CHECKING, Any, Iterable, List, Optional, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\n\nfrom sphinx import addnodes\nfrom sphinx.locale import __\nfrom sphinx.util import logging, url_re\nfrom sphinx.util.matching import Matcher\nfrom sphinx.util.nodes import clean_astext, process_only_nodes\n\nif TYPE_CHECKING:\n from sphinx.builders import Builder\n from sphinx.environment import BuildEnvironment\n\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree_TocTree.note.self_env_toctree_includes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/adapters/toctree.py_TocTree_TocTree.note.self_env_toctree_includes", "embedding": null, "metadata": {"file_path": "sphinx/environment/adapters/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 22, "end_line": 39, "span_ids": ["TocTree", "TocTree.note"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TocTree:\n def __init__(self, env: \"BuildEnvironment\") -> None:\n self.env = env\n\n def note(self, docname: str, toctreenode: addnodes.toctree) -> None:\n \"\"\"Note a TOC tree directive in a document and gather information about\n file relations from it.\n \"\"\"\n if toctreenode['glob']:\n self.env.glob_toctrees.add(docname)\n if toctreenode.get('numbered'):\n self.env.numbered_toctrees.add(docname)\n includefiles = toctreenode['includefiles']\n for includefile in includefiles:\n # note that if the included file is rebuilt, this one must be\n # too (since the TOC of the included file could have changed)\n self.env.files_to_rebuild.setdefault(includefile, set()).add(docname)\n self.env.toctree_includes.setdefault(docname, []).extend(includefiles)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/__init__.py__The_data_collector_com_EnvironmentCollector.enable.self.listener_ids._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/__init__.py__The_data_collector_com_EnvironmentCollector.enable.self.listener_ids._", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["impl", "EnvironmentCollector", "docstring", "imports:4", "imports", "EnvironmentCollector.enable"], "tokens": 275}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The data collector components for sphinx.environment.\"\"\"\n\nfrom typing import TYPE_CHECKING, Dict, List, Optional, Set\n\nfrom docutils import nodes\n\nfrom sphinx.environment import BuildEnvironment\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nclass EnvironmentCollector:\n \"\"\"An EnvironmentCollector is a specific data collector from each document.\n\n It gathers data and stores :py:class:`BuildEnvironment\n <sphinx.environment.BuildEnvironment>` as a database. Examples of specific\n data would be images, download files, section titles, metadatas, index\n entries and toctrees, etc.\n \"\"\"\n\n listener_ids: Optional[Dict[str, int]] = None\n\n def enable(self, app: \"Sphinx\") -> None:\n assert self.listener_ids is None\n self.listener_ids = {\n 'doctree-read': app.connect('doctree-read', self.process_doc),\n 'env-merge-info': app.connect('env-merge-info', self.merge_other),\n 'env-purge-doc': app.connect('env-purge-doc', self.clear_doc),\n 'env-get-updated': app.connect('env-get-updated', self.get_updated_docs),\n 'env-get-outdated': app.connect('env-get-outdated', self.get_outdated_docs),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py__The_image_collector_fo_logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py__The_image_collector_fo_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/asset.py", "file_name": "asset.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["impl", "docstring", "imports"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The image collector for sphinx.environment.\"\"\"\n\nimport os\nfrom glob import glob\nfrom os import path\nfrom typing import Any, Dict, List, Set\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\nfrom docutils.utils import relative_path\n\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.environment.collectors import EnvironmentCollector\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.i18n import get_image_filename_for_language, search_image_for_language\nfrom sphinx.util.images import guess_mimetype\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py_ImageCollector_ImageCollector.process_doc.for_node_in_doctree_finda.for_imgpath_in_candidates.app_env_images_add_file_d": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/asset.py_ImageCollector_ImageCollector.process_doc.for_node_in_doctree_finda.for_imgpath_in_candidates.app_env_images_add_file_d", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/asset.py", "file_name": "asset.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 83, "span_ids": ["ImageCollector.merge_other", "ImageCollector.process_doc", "ImageCollector.clear_doc", "ImageCollector"], "tokens": 625}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ImageCollector(EnvironmentCollector):\n \"\"\"Image files collector for sphinx.environment.\"\"\"\n\n def clear_doc(self, app: Sphinx, env: BuildEnvironment, docname: str) -> None:\n env.images.purge_doc(docname)\n\n def merge_other(self, app: Sphinx, env: BuildEnvironment,\n docnames: Set[str], other: BuildEnvironment) -> None:\n env.images.merge_other(docnames, other.images)\n\n def process_doc(self, app: Sphinx, doctree: nodes.document) -> None:\n \"\"\"Process and rewrite image URIs.\"\"\"\n docname = app.env.docname\n\n for node in doctree.findall(nodes.image):\n # Map the mimetype to the corresponding image. The writer may\n # choose the best image from these candidates. The special key * is\n # set if there is only single candidate to be used by a writer.\n # The special key ? is set for nonlocal URIs.\n candidates: Dict[str, str] = {}\n node['candidates'] = candidates\n imguri = node['uri']\n if imguri.startswith('data:'):\n candidates['?'] = imguri\n continue\n elif imguri.find('://') != -1:\n candidates['?'] = imguri\n continue\n\n if imguri.endswith(os.extsep + '*'):\n # Update `node['uri']` to a relative path from srcdir\n # from a relative path from current document.\n rel_imgpath, full_imgpath = app.env.relfn2path(imguri, docname)\n node['uri'] = rel_imgpath\n\n # Search language-specific figures at first\n i18n_imguri = get_image_filename_for_language(imguri, app.env)\n _, full_i18n_imgpath = app.env.relfn2path(i18n_imguri, docname)\n self.collect_candidates(app.env, full_i18n_imgpath, candidates, node)\n\n self.collect_candidates(app.env, full_imgpath, candidates, node)\n else:\n # substitute imguri by figure_language_filename\n # (ex. foo.png -> foo.en.png)\n imguri = search_image_for_language(imguri, app.env)\n\n # Update `node['uri']` to a relative path from srcdir\n # from a relative path from current document.\n node['uri'], _ = app.env.relfn2path(imguri, docname)\n candidates['*'] = node['uri']\n\n # map image paths to unique image names (so that they can be put\n # into a single directory)\n for imgpath in candidates.values():\n app.env.dependencies[docname].add(imgpath)\n if not os.access(path.join(app.srcdir, imgpath), os.R_OK):\n logger.warning(__('image file not readable: %s') % imgpath,\n location=node, type='image', subtype='not_readable')\n continue\n app.env.images.add_file(docname, imgpath)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/dependencies.py__The_dependencies_colle_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/dependencies.py__The_dependencies_colle_", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/dependencies.py", "file_name": "dependencies.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 53, "span_ids": ["DependenciesCollector.process_doc", "setup", "DependenciesCollector", "docstring", "DependenciesCollector.merge_other", "imports", "DependenciesCollector.clear_doc"], "tokens": 383}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The dependencies collector components for sphinx.environment.\"\"\"\n\nimport os\nfrom os import path\nfrom typing import Any, Dict, Set\n\nfrom docutils import nodes\nfrom docutils.utils import relative_path\n\nfrom sphinx.application import Sphinx\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.environment.collectors import EnvironmentCollector\nfrom sphinx.util.osutil import fs_encoding\n\n\nclass DependenciesCollector(EnvironmentCollector):\n \"\"\"dependencies collector for sphinx.environment.\"\"\"\n\n def clear_doc(self, app: Sphinx, env: BuildEnvironment, docname: str) -> None:\n env.dependencies.pop(docname, None)\n\n def merge_other(self, app: Sphinx, env: BuildEnvironment,\n docnames: Set[str], other: BuildEnvironment) -> None:\n for docname in docnames:\n if docname in other.dependencies:\n env.dependencies[docname] = other.dependencies[docname]\n\n def process_doc(self, app: Sphinx, doctree: nodes.document) -> None:\n \"\"\"Process docutils-generated dependency info.\"\"\"\n cwd = os.getcwd()\n frompath = path.join(path.normpath(app.srcdir), 'dummy')\n deps = doctree.settings.record_dependencies\n if not deps:\n return\n for dep in deps.list:\n # the dependency path is relative to the working dir, so get\n # one relative to the srcdir\n if isinstance(dep, bytes):\n dep = dep.decode(fs_encoding)\n relpath = relative_path(frompath,\n path.normpath(path.join(cwd, dep)))\n app.env.dependencies[app.env.docname].add(relpath)\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_env_collector(DependenciesCollector)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/metadata.py__The_metadata_collector_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/metadata.py__The_metadata_collector_", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/metadata.py", "file_name": "metadata.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 67, "span_ids": ["MetadataCollector.merge_other", "MetadataCollector.process_doc", "setup", "MetadataCollector.clear_doc", "docstring", "imports", "MetadataCollector"], "tokens": 525}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The metadata collector components for sphinx.environment.\"\"\"\n\nfrom typing import Any, Dict, List, Set, cast\n\nfrom docutils import nodes\n\nfrom sphinx.application import Sphinx\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.environment.collectors import EnvironmentCollector\n\n\nclass MetadataCollector(EnvironmentCollector):\n \"\"\"metadata collector for sphinx.environment.\"\"\"\n\n def clear_doc(self, app: Sphinx, env: BuildEnvironment, docname: str) -> None:\n env.metadata.pop(docname, None)\n\n def merge_other(self, app: Sphinx, env: BuildEnvironment,\n docnames: Set[str], other: BuildEnvironment) -> None:\n for docname in docnames:\n env.metadata[docname] = other.metadata[docname]\n\n def process_doc(self, app: Sphinx, doctree: nodes.document) -> None:\n \"\"\"Process the docinfo part of the doctree as metadata.\n\n Keep processing minimal -- just return what docutils says.\n \"\"\"\n index = doctree.first_child_not_matching_class(nodes.PreBibliographic)\n if index is None:\n return\n elif isinstance(doctree[index], nodes.docinfo):\n md = app.env.metadata[app.env.docname]\n for node in doctree[index]: # type: ignore\n # nodes are multiply inherited...\n if isinstance(node, nodes.authors):\n authors = cast(List[nodes.author], node)\n md['authors'] = [author.astext() for author in authors]\n elif isinstance(node, nodes.field):\n assert len(node) == 2\n field_name = cast(nodes.field_name, node[0])\n field_body = cast(nodes.field_body, node[1])\n md[field_name.astext()] = field_body.astext()\n elif isinstance(node, nodes.TextElement):\n # other children must be TextElement\n # see: https://docutils.sourceforge.io/docs/ref/doctree.html#bibliographic-elements # NOQA\n md[node.__class__.__name__] = node.astext()\n\n for name, value in md.items():\n if name in ('tocdepth',):\n try:\n value = int(value)\n except ValueError:\n value = 0\n md[name] = value\n\n doctree.pop(index)\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_env_collector(MetadataCollector)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/title.py__The_title_collector_co_TitleCollector.merge_other.for_docname_in_docnames_.env_longtitles_docname_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/title.py__The_title_collector_co_TitleCollector.merge_other.for_docname_in_docnames_.env_longtitles_docname_", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/title.py", "file_name": "title.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["TitleCollector", "TitleCollector.merge_other", "docstring", "imports", "TitleCollector.clear_doc"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The title collector components for sphinx.environment.\"\"\"\n\nfrom typing import Any, Dict, Set\n\nfrom docutils import nodes\n\nfrom sphinx.application import Sphinx\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.environment.collectors import EnvironmentCollector\nfrom sphinx.transforms import SphinxContentsFilter\n\n\nclass TitleCollector(EnvironmentCollector):\n \"\"\"title collector for sphinx.environment.\"\"\"\n\n def clear_doc(self, app: Sphinx, env: BuildEnvironment, docname: str) -> None:\n env.titles.pop(docname, None)\n env.longtitles.pop(docname, None)\n\n def merge_other(self, app: Sphinx, env: BuildEnvironment,\n docnames: Set[str], other: BuildEnvironment) -> None:\n for docname in docnames:\n env.titles[docname] = other.titles[docname]\n env.longtitles[docname] = other.longtitles[docname]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py__Toctree_collector_for__logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/environment/collectors/toctree.py__Toctree_collector_for__logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/environment/collectors/toctree.py", "file_name": "toctree.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["impl", "docstring", "imports"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Toctree collector for sphinx.environment.\"\"\"\n\nfrom typing import Any, Dict, List, Set, Tuple, Type, TypeVar, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\n\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.environment.adapters.toctree import TocTree\nfrom sphinx.environment.collectors import EnvironmentCollector\nfrom sphinx.locale import __\nfrom sphinx.transforms import SphinxContentsFilter\nfrom sphinx.util import logging, url_re\n\nN = TypeVar('N')\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/errors.py__Contains_SphinxError_a_ApplicationError.category._Application_error_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/errors.py__Contains_SphinxError_a_ApplicationError.category._Application_error_", "embedding": null, "metadata": {"file_path": "sphinx/errors.py", "file_name": "errors.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["SphinxError", "ApplicationError", "docstring", "imports", "SphinxWarning"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Contains SphinxError and a few subclasses.\"\"\"\n\nfrom typing import Any\n\n\nclass SphinxError(Exception):\n \"\"\"Base class for Sphinx errors.\n\n This is the base class for \"nice\" exceptions. When such an exception is\n raised, Sphinx will abort the build and present the exception category and\n message to the user.\n\n Extensions are encouraged to derive from this exception for their custom\n errors.\n\n Exceptions *not* derived from :exc:`SphinxError` are treated as unexpected\n and shown to the user with a part of the traceback (and the full traceback\n saved in a temporary file).\n\n .. attribute:: category\n\n Description of the exception \"category\", used in converting the\n exception to a string (\"category: message\"). Should be set accordingly\n in subclasses.\n \"\"\"\n category = 'Sphinx error'\n\n\nclass SphinxWarning(SphinxError):\n \"\"\"Warning, treated as error.\"\"\"\n category = 'Warning, treated as error'\n\n\nclass ApplicationError(SphinxError):\n \"\"\"Application initialization error.\"\"\"\n category = 'Application error'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/errors.py_ExtensionError_ExtensionError.__str__.return.parent_str": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/errors.py_ExtensionError_ExtensionError.__str__.return.parent_str", "embedding": null, "metadata": {"file_path": "sphinx/errors.py", "file_name": "errors.py", "file_type": "text/x-python", "category": "implementation", "start_line": 39, "end_line": 65, "span_ids": ["ExtensionError.__str__", "ExtensionError", "ExtensionError.category", "ExtensionError.__repr__"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExtensionError(SphinxError):\n \"\"\"Extension error.\"\"\"\n\n def __init__(self, message: str, orig_exc: Exception = None, modname: str = None) -> None:\n super().__init__(message)\n self.message = message\n self.orig_exc = orig_exc\n self.modname = modname\n\n @property\n def category(self) -> str: # type: ignore\n if self.modname:\n return 'Extension error (%s)' % self.modname\n else:\n return 'Extension error'\n\n def __repr__(self) -> str:\n if self.orig_exc:\n return '%s(%r, %r)' % (self.__class__.__name__,\n self.message, self.orig_exc)\n return '%s(%r)' % (self.__class__.__name__, self.message)\n\n def __str__(self) -> str:\n parent_str = super().__str__()\n if self.orig_exc:\n return '%s (exception: %s)' % (parent_str, self.orig_exc)\n return parent_str", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/events.py__Sphinx_core_events__core_events._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/events.py__Sphinx_core_events__core_events._", "embedding": null, "metadata": {"file_path": "sphinx/events.py", "file_name": "events.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["impl", "impl:2", "impl:5", "docstring", "EventListener", "imports", "imports:8", "impl:4"], "tokens": 333}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Sphinx core events.\n\nGracefully adapted from the TextPress system by Armin.\n\"\"\"\n\nfrom collections import defaultdict\nfrom operator import attrgetter\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, List, NamedTuple, Tuple, Type\n\nfrom sphinx.errors import ExtensionError, SphinxError\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.inspect import safe_getattr\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass EventListener(NamedTuple):\n id: int\n handler: Callable\n priority: int\n\n\n# List of all known core events. Maps name to arguments description.\ncore_events = {\n 'builder-inited': '',\n 'config-inited': 'config',\n 'env-get-outdated': 'env, added, changed, removed',\n 'env-get-updated': 'env',\n 'env-purge-doc': 'env, docname',\n 'env-before-read-docs': 'env, docnames',\n 'env-check-consistency': 'env',\n 'source-read': 'docname, source text',\n 'doctree-read': 'the doctree before being pickled',\n 'env-merge-info': 'env, read docnames, other env instance',\n 'missing-reference': 'env, node, contnode',\n 'warn-missing-reference': 'domain, node',\n 'doctree-resolved': 'doctree, docname',\n 'env-updated': 'env',\n 'build-finished': 'exception',\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py__Extension_to_create_au_members_set_option.return._x_strip_for_x_in_arg_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py__Extension_to_create_au_members_set_option.return._x_strip_for_x_in_arg_s", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 102, "span_ids": ["impl", "identity", "members_option", "_All.__contains__", "impl:2", "docstring", "_All.append", "imports:21", "members_set_option", "imports", "_Empty.__contains__", "_Empty", "_All", "impl:10"], "tokens": 778}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Extension to create automatic documentation from code docstrings.\n\nAutomatically insert docstrings for functions, classes or whole modules into\nthe doctree, thus avoiding duplication between docstrings and documentation\nfor those who like elaborate docstrings.\n\"\"\"\n\nimport re\nimport warnings\nfrom inspect import Parameter, Signature\nfrom types import ModuleType\nfrom typing import (TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Optional, Sequence,\n Set, Tuple, Type, TypeVar, Union)\n\nfrom docutils.statemachine import StringList\n\nimport sphinx\nfrom sphinx.application import Sphinx\nfrom sphinx.config import ENUM, Config\nfrom sphinx.deprecation import RemovedInSphinx50Warning, RemovedInSphinx60Warning\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.ext.autodoc.importer import (get_class_members, get_object_members, import_module,\n import_object)\nfrom sphinx.ext.autodoc.mock import ismock, mock, undecorate\nfrom sphinx.locale import _, __\nfrom sphinx.pycode import ModuleAnalyzer, PycodeError\nfrom sphinx.util import inspect, logging\nfrom sphinx.util.docstrings import prepare_docstring, separate_metadata\nfrom sphinx.util.inspect import (evaluate_signature, getdoc, object_description, safe_getattr,\n stringify_signature)\nfrom sphinx.util.typing import OptionSpec, get_type_hints, restify\nfrom sphinx.util.typing import stringify as stringify_typehint\n\nif TYPE_CHECKING:\n from sphinx.ext.autodoc.directive import DocumenterBridge\n\n\nlogger = logging.getLogger(__name__)\n\n\n# This type isn't exposed directly in any modules, but can be found\n# here in most Python versions\nMethodDescriptorType = type(type.__subclasses__)\n\n\n#: extended signature RE: with explicit module name separated by ::\npy_ext_sig_re = re.compile(\n r'''^ ([\\w.]+::)? # explicit module name\n ([\\w.]+\\.)? # module and/or class name(s)\n (\\w+) \\s* # thing name\n (?: \\((.*)\\) # optional: arguments\n (?:\\s* -> \\s* (.*))? # return annotation\n )? $ # and nothing more\n ''', re.VERBOSE)\nspecial_member_re = re.compile(r'^__\\S+__$')\n\n\ndef identity(x: Any) -> Any:\n return x\n\n\nclass _All:\n \"\"\"A special value for :*-members: that matches to any member.\"\"\"\n\n def __contains__(self, item: Any) -> bool:\n return True\n\n def append(self, item: Any) -> None:\n pass # nothing\n\n\nclass _Empty:\n \"\"\"A special value for :exclude-members: that never matches to any member.\"\"\"\n\n def __contains__(self, item: Any) -> bool:\n return False\n\n\nALL = _All()\nEMPTY = _Empty()\nUNINITIALIZED_ATTR = object()\nINSTANCEATTR = object()\nSLOTSATTR = object()\n\n\ndef members_option(arg: Any) -> Union[object, List[str]]:\n \"\"\"Used to convert the :members: option to auto directives.\"\"\"\n if arg in (None, True):\n return ALL\n elif arg is False:\n return None\n else:\n return [x.strip() for x in arg.split(',') if x.strip()]\n\n\ndef members_set_option(arg: Any) -> Union[object, Set[str]]:\n \"\"\"Used to convert the :members: option to auto directives.\"\"\"\n warnings.warn(\"members_set_option() is deprecated.\",\n RemovedInSphinx50Warning, stacklevel=2)\n if arg is None:\n return ALL\n return {x.strip() for x in arg.split(',') if x.strip()}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_exclude_members_option_bool_option.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_exclude_members_option_bool_option.return.True", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 105, "end_line": 153, "span_ids": ["inherited_members_option", "class_doc_from_option", "member_order_option", "bool_option", "exclude_members_option", "annotation_option", "impl:20"], "tokens": 342}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def exclude_members_option(arg: Any) -> Union[object, Set[str]]:\n \"\"\"Used to convert the :exclude-members: option.\"\"\"\n if arg in (None, True):\n return EMPTY\n return {x.strip() for x in arg.split(',') if x.strip()}\n\n\ndef inherited_members_option(arg: Any) -> Union[object, Set[str]]:\n \"\"\"Used to convert the :members: option to auto directives.\"\"\"\n if arg in (None, True):\n return 'object'\n else:\n return arg\n\n\ndef member_order_option(arg: Any) -> Optional[str]:\n \"\"\"Used to convert the :members: option to auto directives.\"\"\"\n if arg in (None, True):\n return None\n elif arg in ('alphabetical', 'bysource', 'groupwise'):\n return arg\n else:\n raise ValueError(__('invalid value for member-order option: %s') % arg)\n\n\ndef class_doc_from_option(arg: Any) -> Optional[str]:\n \"\"\"Used to convert the :class-doc-from: option to autoclass directives.\"\"\"\n if arg in ('both', 'class', 'init'):\n return arg\n else:\n raise ValueError(__('invalid value for class-doc-from option: %s') % arg)\n\n\nSUPPRESS = object()\n\n\ndef annotation_option(arg: Any) -> Any:\n if arg in (None, True):\n # suppress showing the representation of the object\n return SUPPRESS\n else:\n return arg\n\n\ndef bool_option(arg: Any) -> bool:\n \"\"\"Used to convert flag options to auto directives. (Instead of\n directives.flag(), which returns None).\n \"\"\"\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DocstringSignatureMixin.get_doc_DocstringSignatureMixin.format_signature.if_self__signatures_.else_.return.sig": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_DocstringSignatureMixin.get_doc_DocstringSignatureMixin.format_signature.if_self__signatures_.else_.return.sig", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1242, "end_line": 1258, "span_ids": ["DocstringSignatureMixin.get_doc", "DocstringSignatureMixin.format_signature"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocstringSignatureMixin:\n\n def get_doc(self, ignore: int = None) -> List[List[str]]:\n if self._new_docstrings is not None:\n return self._new_docstrings\n return super().get_doc(ignore) # type: ignore\n\n def format_signature(self, **kwargs: Any) -> str:\n if self.args is None and self.config.autodoc_docstring_signature: # type: ignore\n # only act if a signature is not explicitly given already, and if\n # the feature is enabled\n result = self._find_signature()\n if result is not None:\n self.args, self.retann = result\n sig = super().format_signature(**kwargs) # type: ignore\n if self._signatures:\n return \"\\n\".join([sig] + self._signatures)\n else:\n return sig", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter.merge_default_value_FunctionDocumenter.annotate_to_first_argument.if_params_0_annotation_i.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_FunctionDocumenter.merge_default_value_FunctionDocumenter.annotate_to_first_argument.if_params_0_annotation_i.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1366, "end_line": 1403, "span_ids": ["FunctionDocumenter.merge_default_value", "FunctionDocumenter.annotate_to_first_argument"], "tokens": 319}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def merge_default_value(self, actual: Signature, overload: Signature) -> Signature:\n \"\"\"Merge default values of actual implementation to the overload variants.\"\"\"\n parameters = list(overload.parameters.values())\n for i, param in enumerate(parameters):\n actual_param = actual.parameters.get(param.name)\n if actual_param and param.default == '...':\n parameters[i] = param.replace(default=actual_param.default)\n\n return overload.replace(parameters=parameters)\n\n def annotate_to_first_argument(self, func: Callable, typ: Type) -> Optional[Callable]:\n \"\"\"Annotate type hint to the first argument of function if needed.\"\"\"\n try:\n sig = inspect.signature(func, type_aliases=self.config.autodoc_type_aliases)\n except TypeError as exc:\n logger.warning(__(\"Failed to get a function signature for %s: %s\"),\n self.fullname, exc)\n return None\n except ValueError:\n return None\n\n if len(sig.parameters) == 0:\n return None\n\n def dummy():\n pass\n\n params = list(sig.parameters.values())\n if params[0].annotation is Parameter.empty:\n params[0] = params[0].replace(annotation=typ)\n try:\n dummy.__signature__ = sig.replace(parameters=params) # type: ignore\n return dummy\n except (AttributeError, TypeError):\n # failed to update signature (ex. built-in or extension types)\n return None\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter._find_signature_ClassDocumenter._find_signature.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter._find_signature_ClassDocumenter._find_signature.return.result", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1583, "end_line": 1595, "span_ids": ["ClassDocumenter._find_signature"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def _find_signature(self) -> Tuple[str, str]:\n result = super()._find_signature()\n if result is not None:\n # Strip a return value from signature of constructor in docstring (first entry)\n result = (result[0], None)\n\n for i, sig in enumerate(self._signatures):\n if sig.endswith(' -> None'):\n # Strip a return value from signatures of constructor in docstring (subsequent\n # entries)\n self._signatures[i] = sig[:-8]\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_canonical_fullname_ClassDocumenter.get_canonical_fullname.if___modname___and___qual.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_canonical_fullname_ClassDocumenter.get_canonical_fullname.if___modname___and___qual.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1646, "end_line": 1658, "span_ids": ["ClassDocumenter.get_canonical_fullname"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def get_canonical_fullname(self) -> Optional[str]:\n __modname__ = safe_getattr(self.object, '__module__', self.modname)\n __qualname__ = safe_getattr(self.object, '__qualname__', None)\n if __qualname__ is None:\n __qualname__ = safe_getattr(self.object, '__name__', None)\n if __qualname__ and '<locals>' in __qualname__:\n # No valid qualname found if the object is defined as locals\n __qualname__ = None\n\n if __modname__ and __qualname__:\n return '.'.join([__modname__, __qualname__])\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.add_directive_header_ClassDocumenter.add_directive_header.None_3.self_add_line___": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.add_directive_header_ClassDocumenter.add_directive_header.None_3.self_add_line___", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1660, "end_line": 1696, "span_ids": ["ClassDocumenter.add_directive_header"], "tokens": 386}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def add_directive_header(self, sig: str) -> None:\n sourcename = self.get_sourcename()\n\n if self.doc_as_attr:\n self.directivetype = 'attribute'\n super().add_directive_header(sig)\n\n if self.analyzer and '.'.join(self.objpath) in self.analyzer.finals:\n self.add_line(' :final:', sourcename)\n\n canonical_fullname = self.get_canonical_fullname()\n if not self.doc_as_attr and canonical_fullname and self.fullname != canonical_fullname:\n self.add_line(' :canonical: %s' % canonical_fullname, sourcename)\n\n # add inheritance info, if wanted\n if not self.doc_as_attr and self.options.show_inheritance:\n if inspect.getorigbases(self.object):\n # A subclass of generic types\n # refs: PEP-560 <https://peps.python.org/pep-0560/>\n bases = list(self.object.__orig_bases__)\n elif hasattr(self.object, '__bases__') and len(self.object.__bases__):\n # A normal class\n bases = list(self.object.__bases__)\n else:\n bases = []\n\n self.env.events.emit('autodoc-process-bases',\n self.fullname, self.object, self.options, bases)\n\n if self.config.autodoc_typehints_format == \"short\":\n base_classes = [restify(cls, \"smart\") for cls in bases]\n else:\n base_classes = [restify(cls) for cls in bases]\n\n sourcename = self.get_sourcename()\n self.add_line('', sourcename)\n self.add_line(' ' + _('Bases: %s') % ', '.join(base_classes), sourcename)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_variable_comment_ClassDocumenter.add_content.super_add_content_more_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.get_variable_comment_ClassDocumenter.add_content.super_add_content_more_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1769, "end_line": 1801, "span_ids": ["ClassDocumenter.add_content", "ClassDocumenter.get_variable_comment"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def get_variable_comment(self) -> Optional[List[str]]:\n try:\n key = ('', '.'.join(self.objpath))\n if self.doc_as_attr:\n analyzer = ModuleAnalyzer.for_module(self.modname)\n else:\n analyzer = ModuleAnalyzer.for_module(self.get_real_modname())\n analyzer.analyze()\n return list(analyzer.attr_docs.get(key, []))\n except PycodeError:\n return None\n\n def add_content(self, more_content: Optional[StringList], no_docstring: bool = False\n ) -> None:\n if self.doc_as_attr and self.modname != self.get_real_modname():\n try:\n # override analyzer to obtain doccomment around its definition.\n self.analyzer = ModuleAnalyzer.for_module(self.modname)\n self.analyzer.analyze()\n except PycodeError:\n pass\n\n if self.doc_as_attr and not self.get_variable_comment():\n try:\n if self.config.autodoc_typehints_format == \"short\":\n alias = restify(self.object, \"smart\")\n else:\n alias = restify(self.object)\n more_content = StringList([_('alias of %s') % alias], source='')\n except AttributeError:\n pass # Invalid class object is passed.\n\n super().add_content(more_content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.document_members_ClassDocumenter.generate.return.super_generate_more_con": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ClassDocumenter.document_members_ClassDocumenter.generate.return.super_generate_more_con", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1803, "end_line": 1817, "span_ids": ["ClassDocumenter.generate", "ClassDocumenter.document_members"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):\n\n def document_members(self, all_members: bool = False) -> None:\n if self.doc_as_attr:\n return\n super().document_members(all_members)\n\n def generate(self, more_content: Optional[StringList] = None, real_modname: str = None,\n check_module: bool = False, all_members: bool = False) -> None:\n # Do not pass real_modname and use the name from the __module__\n # attribute of the class.\n # If a class gets imported into the module real_modname\n # the analyzer won't find the source of the class, if\n # it looks in real_modname.\n return super().generate(more_content=more_content,\n check_module=check_module,\n all_members=all_members)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ExceptionDocumenter_DataDocumenterMixinBase.update_content.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_ExceptionDocumenter_DataDocumenterMixinBase.update_content.pass", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1820, "end_line": 1855, "span_ids": ["DataDocumenterMixinBase.update_content", "DataDocumenterMixinBase", "DataDocumenterMixinBase.should_suppress_value_header", "ExceptionDocumenter.can_document_member", "DataDocumenterMixinBase.should_suppress_directive_header", "ExceptionDocumenter"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExceptionDocumenter(ClassDocumenter):\n \"\"\"\n Specialized ClassDocumenter subclass for exceptions.\n \"\"\"\n objtype = 'exception'\n member_order = 10\n\n # needs a higher priority than ClassDocumenter\n priority = 10\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n return isinstance(member, type) and issubclass(member, BaseException)\n\n\nclass DataDocumenterMixinBase:\n # define types of instance variables\n config: Config = None\n env: BuildEnvironment = None\n modname: str = None\n parent: Any = None\n object: Any = None\n objpath: List[str] = None\n\n def should_suppress_directive_header(self) -> bool:\n \"\"\"Check directive header should be suppressed.\"\"\"\n return False\n\n def should_suppress_value_header(self) -> bool:\n \"\"\"Check :value: header should be suppressed.\"\"\"\n return False\n\n def update_content(self, more_content: StringList) -> None:\n \"\"\"Update docstring for the NewType object.\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter_MethodDocumenter.import_object.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter_MethodDocumenter.import_object.return.ret", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2125, "end_line": 2154, "span_ids": ["MethodDocumenter.import_object", "MethodDocumenter.can_document_member", "MethodDocumenter"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter): # type: ignore\n \"\"\"\n Specialized Documenter subclass for methods (normal, static and class).\n \"\"\"\n objtype = 'method'\n directivetype = 'method'\n member_order = 50\n priority = 1 # must be more than FunctionDocumenter\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n return inspect.isroutine(member) and not isinstance(parent, ModuleDocumenter)\n\n def import_object(self, raiseerror: bool = False) -> bool:\n ret = super().import_object(raiseerror)\n if not ret:\n return ret\n\n # to distinguish classmethod/staticmethod\n obj = self.parent.__dict__.get(self.object_name)\n if obj is None:\n obj = self.object\n\n if (inspect.isclassmethod(obj) or\n inspect.isstaticmethod(obj, cls=self.parent, name=self.object_name)):\n # document class and static members before ordinary ones\n self.member_order = self.member_order - 1\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.merge_default_value_MethodDocumenter.annotate_to_first_argument.if_params_1_annotation_i.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.merge_default_value_MethodDocumenter.annotate_to_first_argument.if_params_1_annotation_i.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2262, "end_line": 2299, "span_ids": ["MethodDocumenter.annotate_to_first_argument", "MethodDocumenter.merge_default_value"], "tokens": 319}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter):\n\n def merge_default_value(self, actual: Signature, overload: Signature) -> Signature:\n \"\"\"Merge default values of actual implementation to the overload variants.\"\"\"\n parameters = list(overload.parameters.values())\n for i, param in enumerate(parameters):\n actual_param = actual.parameters.get(param.name)\n if actual_param and param.default == '...':\n parameters[i] = param.replace(default=actual_param.default)\n\n return overload.replace(parameters=parameters)\n\n def annotate_to_first_argument(self, func: Callable, typ: Type) -> Optional[Callable]:\n \"\"\"Annotate type hint to the first argument of function if needed.\"\"\"\n try:\n sig = inspect.signature(func, type_aliases=self.config.autodoc_type_aliases)\n except TypeError as exc:\n logger.warning(__(\"Failed to get a method signature for %s: %s\"),\n self.fullname, exc)\n return None\n except ValueError:\n return None\n\n if len(sig.parameters) == 1:\n return None\n\n def dummy():\n pass\n\n params = list(sig.parameters.values())\n if params[1].annotation is Parameter.empty:\n params[1] = params[1].replace(annotation=typ)\n try:\n dummy.__signature__ = sig.replace(parameters=params) # type: ignore\n return dummy\n except (AttributeError, TypeError):\n # failed to update signature (ex. built-in or extension types)\n return None\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.get_doc_MethodDocumenter.get_doc.if_self_objpath_1__.else_.return.super_get_doc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_MethodDocumenter.get_doc_MethodDocumenter.get_doc.if_self_objpath_1__.else_.return.super_get_doc_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2301, "end_line": 2335, "span_ids": ["MethodDocumenter.get_doc"], "tokens": 386}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter):\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n if self._new_docstrings is not None:\n # docstring already returned previously, then modified by\n # `DocstringSignatureMixin`. Just return the previously-computed\n # result, so that we don't lose the processing done by\n # `DocstringSignatureMixin`.\n return self._new_docstrings\n if self.objpath[-1] == '__init__':\n docstring = getdoc(self.object, self.get_attr,\n self.config.autodoc_inherit_docstrings,\n self.parent, self.object_name)\n if (docstring is not None and\n (docstring == object.__init__.__doc__ or # for pypy\n docstring.strip() == object.__init__.__doc__)): # for !pypy\n docstring = None\n if docstring:\n tab_width = self.directive.state.document.settings.tab_width\n return [prepare_docstring(docstring, tabsize=tab_width)]\n else:\n return []\n elif self.objpath[-1] == '__new__':\n docstring = getdoc(self.object, self.get_attr,\n self.config.autodoc_inherit_docstrings,\n self.parent, self.object_name)\n if (docstring is not None and\n (docstring == object.__new__.__doc__ or # for pypy\n docstring.strip() == object.__new__.__doc__)): # for !pypy\n docstring = None\n if docstring:\n tab_width = self.directive.state.document.settings.tab_width\n return [prepare_docstring(docstring, tabsize=tab_width)]\n else:\n return []\n else:\n return super().get_doc()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_SlotsMixin_SlotsMixin.should_suppress_value_header.if_self_object_is_SLOTSAT.else_.return.super_should_suppress_v": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_SlotsMixin_SlotsMixin.should_suppress_value_header.if_self_object_is_SLOTSAT.else_.return.super_should_suppress_v", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2369, "end_line": 2396, "span_ids": ["SlotsMixin.should_suppress_value_header", "SlotsMixin", "SlotsMixin.isslotsattribute", "SlotsMixin.import_object"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SlotsMixin(DataDocumenterMixinBase):\n \"\"\"\n Mixin for AttributeDocumenter to provide the feature for supporting __slots__.\n \"\"\"\n\n def isslotsattribute(self) -> bool:\n \"\"\"Check the subject is an attribute in __slots__.\"\"\"\n try:\n __slots__ = inspect.getslots(self.parent)\n if __slots__ and self.objpath[-1] in __slots__:\n return True\n else:\n return False\n except (ValueError, TypeError):\n return False\n\n def import_object(self, raiseerror: bool = False) -> bool:\n ret = super().import_object(raiseerror) # type: ignore\n if self.isslotsattribute():\n self.object = SLOTSATTR\n\n return ret\n\n def should_suppress_value_header(self) -> bool:\n if self.object is SLOTSATTR:\n return True\n else:\n return super().should_suppress_value_header()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_SlotsMixin.get_doc_SlotsMixin._datadescriptor.if_self_object_is_SLOTSAT.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_SlotsMixin.get_doc_SlotsMixin._datadescriptor.if_self_object_is_SLOTSAT.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2398, "end_line": 2421, "span_ids": ["SlotsMixin._datadescriptor", "SlotsMixin.get_doc"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SlotsMixin(DataDocumenterMixinBase):\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n if self.object is SLOTSATTR:\n try:\n __slots__ = inspect.getslots(self.parent)\n if __slots__ and __slots__.get(self.objpath[-1]):\n docstring = prepare_docstring(__slots__[self.objpath[-1]])\n return [docstring]\n else:\n return []\n except ValueError as exc:\n logger.warning(__('Invalid __slots__ found on %s. Ignored.'),\n (self.parent.__qualname__, exc), type='autodoc')\n return []\n else:\n return super().get_doc(ignore) # type: ignore\n\n @property\n def _datadescriptor(self) -> bool:\n warnings.warn('AttributeDocumenter._datadescriptor() is deprecated.',\n RemovedInSphinx60Warning)\n if self.object is SLOTSATTR:\n return True\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_RuntimeInstanceAttributeMixin.is_runtime_instance_attribute_not_commented_RuntimeInstanceAttributeMixin.is_runtime_instance_attribute_not_commented.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_RuntimeInstanceAttributeMixin.is_runtime_instance_attribute_not_commented_RuntimeInstanceAttributeMixin.is_runtime_instance_attribute_not_commented.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2448, "end_line": 2464, "span_ids": ["RuntimeInstanceAttributeMixin.is_runtime_instance_attribute_not_commented"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RuntimeInstanceAttributeMixin(DataDocumenterMixinBase):\n\n def is_runtime_instance_attribute_not_commented(self, parent: Any) -> bool:\n \"\"\"Check the subject is an attribute defined in __init__() without comment.\"\"\"\n for cls in inspect.getmro(parent):\n try:\n module = safe_getattr(cls, '__module__')\n qualname = safe_getattr(cls, '__qualname__')\n\n analyzer = ModuleAnalyzer.for_module(module)\n analyzer.analyze()\n if qualname and self.objpath:\n key = '.'.join([qualname, self.objpath[-1]])\n if key in analyzer.tagorder:\n return True\n except (AttributeError, PycodeError):\n pass\n\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_RuntimeInstanceAttributeMixin.import_object_RuntimeInstanceAttributeMixin.get_doc.if_self_object_is_self_R.else_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_RuntimeInstanceAttributeMixin.import_object_RuntimeInstanceAttributeMixin.get_doc.if_self_object_is_self_R.else_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2466, "end_line": 2501, "span_ids": ["RuntimeInstanceAttributeMixin.should_suppress_value_header", "RuntimeInstanceAttributeMixin.get_doc", "RuntimeInstanceAttributeMixin.import_object"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RuntimeInstanceAttributeMixin(DataDocumenterMixinBase):\n\n def import_object(self, raiseerror: bool = False) -> bool:\n \"\"\"Check the existence of runtime instance attribute after failing to import the\n attribute.\"\"\"\n try:\n return super().import_object(raiseerror=True) # type: ignore\n except ImportError as exc:\n try:\n with mock(self.config.autodoc_mock_imports):\n ret = import_object(self.modname, self.objpath[:-1], 'class',\n attrgetter=self.get_attr, # type: ignore\n warningiserror=self.config.autodoc_warningiserror)\n parent = ret[3]\n if self.is_runtime_instance_attribute(parent):\n self.object = self.RUNTIME_INSTANCE_ATTRIBUTE\n self.parent = parent\n return True\n except ImportError:\n pass\n\n if raiseerror:\n raise\n else:\n logger.warning(exc.args[0], type='autodoc', subtype='import_object')\n self.env.note_reread()\n return False\n\n def should_suppress_value_header(self) -> bool:\n return (self.object is self.RUNTIME_INSTANCE_ATTRIBUTE or\n super().should_suppress_value_header())\n\n def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:\n if (self.object is self.RUNTIME_INSTANCE_ATTRIBUTE and\n self.is_runtime_instance_attribute_not_commented(self.parent)):\n return None\n else:\n return super().get_doc(ignore) # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.update_annotations_AttributeDocumenter.update_annotations.try_.except_AttributeError_T.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_AttributeDocumenter.update_annotations_AttributeDocumenter.update_annotations.try_.except_AttributeError_T.pass", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2616, "end_line": 2636, "span_ids": ["AttributeDocumenter.update_annotations"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AttributeDocumenter(GenericAliasMixin, NewTypeMixin, SlotsMixin, # type: ignore\n TypeVarMixin, RuntimeInstanceAttributeMixin,\n UninitializedInstanceAttributeMixin, NonDataDescriptorMixin,\n DocstringStripSignatureMixin, ClassLevelDocumenter):\n\n def update_annotations(self, parent: Any) -> None:\n \"\"\"Update __annotations__ to support type_comment and so on.\"\"\"\n try:\n annotations = dict(inspect.getannotations(parent))\n parent.__annotations__ = annotations\n\n for cls in inspect.getmro(parent):\n try:\n module = safe_getattr(cls, '__module__')\n qualname = safe_getattr(cls, '__qualname__')\n\n analyzer = ModuleAnalyzer.for_module(module)\n analyzer.analyze()\n for (classname, attrname), annotation in analyzer.annotations.items():\n if classname == qualname and attrname not in annotations:\n annotations[attrname] = annotation\n except (AttributeError, PycodeError):\n pass\n except (AttributeError, TypeError):\n # Failed to set __annotations__ (built-in, extensions, etc.)\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_PropertyDocumenter_PropertyDocumenter.can_document_member.if_isinstance_parent_Cla.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_PropertyDocumenter_PropertyDocumenter.can_document_member.if_isinstance_parent_Cla.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2734, "end_line": 2755, "span_ids": ["PropertyDocumenter", "PropertyDocumenter.can_document_member"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PropertyDocumenter(DocstringStripSignatureMixin, ClassLevelDocumenter): # type: ignore\n \"\"\"\n Specialized Documenter subclass for properties.\n \"\"\"\n objtype = 'property'\n member_order = 60\n\n # before AttributeDocumenter\n priority = AttributeDocumenter.priority + 1\n\n @classmethod\n def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any\n ) -> bool:\n if isinstance(parent, ClassDocumenter):\n if inspect.isproperty(member):\n return True\n else:\n __dict__ = safe_getattr(parent.object, '__dict__', {})\n obj = __dict__.get(membername)\n return isinstance(obj, classmethod) and inspect.isproperty(obj.__func__)\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_PropertyDocumenter.import_object_PropertyDocumenter.get_real_modname.return.real_modname_or_self_modn": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_PropertyDocumenter.import_object_PropertyDocumenter.get_real_modname.return.real_modname_or_self_modn", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2757, "end_line": 2779, "span_ids": ["PropertyDocumenter.get_real_modname", "PropertyDocumenter.document_members", "PropertyDocumenter.import_object"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PropertyDocumenter(DocstringStripSignatureMixin, ClassLevelDocumenter):\n\n def import_object(self, raiseerror: bool = False) -> bool:\n \"\"\"Check the exisitence of uninitialized instance attribute when failed to import\n the attribute.\"\"\"\n ret = super().import_object(raiseerror)\n if ret and not inspect.isproperty(self.object):\n __dict__ = safe_getattr(self.parent, '__dict__', {})\n obj = __dict__.get(self.objpath[-1])\n if isinstance(obj, classmethod) and inspect.isproperty(obj.__func__):\n self.object = obj.__func__\n self.isclassmethod = True\n return True\n else:\n return False\n\n self.isclassmethod = False\n return ret\n\n def document_members(self, all_members: bool = False) -> None:\n pass\n\n def get_real_modname(self) -> str:\n real_modname = self.get_attr(self.parent or self.object, '__module__', None)\n return real_modname or self.modname", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_PropertyDocumenter.add_directive_header_PropertyDocumenter.add_directive_header.if_func_and_self_config_a.try_.except_ValueError_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/__init__.py_PropertyDocumenter.add_directive_header_PropertyDocumenter.add_directive_header.if_func_and_self_config_a.try_.except_ValueError_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2781, "end_line": 2808, "span_ids": ["PropertyDocumenter.add_directive_header"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PropertyDocumenter(DocstringStripSignatureMixin, ClassLevelDocumenter):\n\n def add_directive_header(self, sig: str) -> None:\n super().add_directive_header(sig)\n sourcename = self.get_sourcename()\n if inspect.isabstractmethod(self.object):\n self.add_line(' :abstractmethod:', sourcename)\n if self.isclassmethod:\n self.add_line(' :classmethod:', sourcename)\n\n if safe_getattr(self.object, 'fget', None): # property\n func = self.object.fget\n elif safe_getattr(self.object, 'func', None): # cached_property\n func = self.object.func\n else:\n func = None\n\n if func and self.config.autodoc_typehints != 'none':\n try:\n signature = inspect.signature(func,\n type_aliases=self.config.autodoc_type_aliases)\n if signature.return_annotation is not Parameter.empty:\n objrepr = stringify_typehint(signature.return_annotation)\n self.add_line(' :type: ' + objrepr, sourcename)\n except TypeError as exc:\n logger.warning(__(\"Failed to get a function signature for %s: %s\"),\n self.fullname, exc)\n return None\n except ValueError:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py__The_deprecated_Documen_SingledispatchFunctionDocumenter.__init__.super___init___args_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/deprecated.py__The_deprecated_Documen_SingledispatchFunctionDocumenter.__init__.super___init___args_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/deprecated.py", "file_name": "deprecated.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["SingledispatchFunctionDocumenter", "docstring", "imports"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The deprecated Documenters for autodoc.\"\"\"\n\nimport warnings\nfrom typing import Any\n\nfrom sphinx.deprecation import RemovedInSphinx50Warning\nfrom sphinx.ext.autodoc import (AttributeDocumenter, DataDocumenter, FunctionDocumenter,\n MethodDocumenter)\n\n\nclass SingledispatchFunctionDocumenter(FunctionDocumenter):\n \"\"\"\n Used to be a specialized Documenter subclass for singledispatch'ed functions.\n\n Retained for backwards compatibility, now does the same as the FunctionDocumenter\n \"\"\"\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n warnings.warn(\"%s is deprecated.\" % self.__class__.__name__,\n RemovedInSphinx50Warning, stacklevel=2)\n super().__init__(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py__Importer_utilities_for_mangle.return.name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py__Importer_utilities_for_mangle.return.name", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/importer.py", "file_name": "importer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["impl", "imports:10", "impl:2", "mangle", "docstring", "imports:11", "docstring:2", "imports"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Importer utilities for autodoc\"\"\"\n\nimport importlib\nimport traceback\nimport warnings\nfrom typing import Any, Callable, Dict, List, NamedTuple, Optional, Tuple\n\nfrom sphinx.deprecation import RemovedInSphinx50Warning\nfrom sphinx.ext.autodoc.mock import ismock, undecorate\nfrom sphinx.pycode import ModuleAnalyzer, PycodeError\nfrom sphinx.util import logging\nfrom sphinx.util.inspect import (getannotations, getmro, getslots, isclass, isenumclass,\n safe_getattr)\n\nif False:\n # For type annotation\n from typing import Type # NOQA\n\n from sphinx.ext.autodoc import ObjectMember\n\nlogger = logging.getLogger(__name__)\n\n\ndef mangle(subject: Any, name: str) -> str:\n \"\"\"Mangle the given name.\"\"\"\n try:\n if isclass(subject) and name.startswith('__') and not name.endswith('__'):\n return \"_%s%s\" % (subject.__name__, name)\n except AttributeError:\n pass\n\n return name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_get_module_members_Attribute.value": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_get_module_members_Attribute.value", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/importer.py", "file_name": "importer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 142, "end_line": 168, "span_ids": ["Attribute", "get_module_members"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_module_members(module: Any) -> List[Tuple[str, Any]]:\n \"\"\"Get members of target module.\"\"\"\n from sphinx.ext.autodoc import INSTANCEATTR\n\n warnings.warn('sphinx.ext.autodoc.importer.get_module_members() is deprecated.',\n RemovedInSphinx50Warning)\n\n members: Dict[str, Tuple[str, Any]] = {}\n for name in dir(module):\n try:\n value = safe_getattr(module, name, None)\n members[name] = (name, value)\n except AttributeError:\n continue\n\n # annotation only member (ex. attr: int)\n for name in getannotations(module):\n if name not in members:\n members[name] = (name, INSTANCEATTR)\n\n return sorted(list(members.values()))\n\n\nclass Attribute(NamedTuple):\n name: str\n directly_defined: bool\n value: Any", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_get_class_members_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/importer.py_get_class_members_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/importer.py", "file_name": "importer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 232, "end_line": 317, "span_ids": ["get_class_members"], "tokens": 651}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_class_members(subject: Any, objpath: List[str], attrgetter: Callable\n ) -> Dict[str, \"ObjectMember\"]:\n \"\"\"Get members and attributes of target class.\"\"\"\n from sphinx.ext.autodoc import INSTANCEATTR, ObjectMember\n\n # the members directly defined in the class\n obj_dict = attrgetter(subject, '__dict__', {})\n\n members: Dict[str, ObjectMember] = {}\n\n # enum members\n if isenumclass(subject):\n for name, value in subject.__members__.items():\n if name not in members:\n members[name] = ObjectMember(name, value, class_=subject)\n\n superclass = subject.__mro__[1]\n for name in obj_dict:\n if name not in superclass.__dict__:\n value = safe_getattr(subject, name)\n members[name] = ObjectMember(name, value, class_=subject)\n\n # members in __slots__\n try:\n __slots__ = getslots(subject)\n if __slots__:\n from sphinx.ext.autodoc import SLOTSATTR\n\n for name, docstring in __slots__.items():\n members[name] = ObjectMember(name, SLOTSATTR, class_=subject,\n docstring=docstring)\n except (TypeError, ValueError):\n pass\n\n # other members\n for name in dir(subject):\n try:\n value = attrgetter(subject, name)\n if ismock(value):\n value = undecorate(value)\n\n unmangled = unmangle(subject, name)\n if unmangled and unmangled not in members:\n if name in obj_dict:\n members[unmangled] = ObjectMember(unmangled, value, class_=subject)\n else:\n members[unmangled] = ObjectMember(unmangled, value)\n except AttributeError:\n continue\n\n try:\n for cls in getmro(subject):\n try:\n modname = safe_getattr(cls, '__module__')\n qualname = safe_getattr(cls, '__qualname__')\n analyzer = ModuleAnalyzer.for_module(modname)\n analyzer.analyze()\n except AttributeError:\n qualname = None\n analyzer = None\n except PycodeError:\n analyzer = None\n\n # annotation only member (ex. attr: int)\n for name in getannotations(cls):\n name = unmangle(cls, name)\n if name and name not in members:\n if analyzer and (qualname, name) in analyzer.attr_docs:\n docstring = '\\n'.join(analyzer.attr_docs[qualname, name])\n else:\n docstring = None\n\n members[name] = ObjectMember(name, INSTANCEATTR, class_=cls,\n docstring=docstring)\n\n # append instance attributes (cf. self.attr1) if analyzer knows\n if analyzer:\n for (ns, name), docstring in analyzer.attr_docs.items():\n if ns == qualname and name not in members:\n members[name] = ObjectMember(name, INSTANCEATTR, class_=cls,\n docstring='\\n'.join(docstring))\n except AttributeError:\n pass\n\n return members", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py__mock_for_autodoc___MockObject.__repr__.return.self___display_name__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py__mock_for_autodoc___MockObject.__repr__.return.self___display_name__", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/mock.py", "file_name": "mock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 62, "span_ids": ["_MockObject.__call__", "impl", "_MockObject.__mro_entries__", "_MockObject.__getattr__", "_MockObject", "_MockObject.__iter__", "docstring", "_MockObject.__new__", "_MockObject.__init__", "_MockObject.__len__", "_MockObject.__getitem__", "imports", "_MockObject.__repr__", "_MockObject.__contains__"], "tokens": 475}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"mock for autodoc\"\"\"\n\nimport contextlib\nimport os\nimport sys\nfrom importlib.abc import Loader, MetaPathFinder\nfrom importlib.machinery import ModuleSpec\nfrom types import MethodType, ModuleType\nfrom typing import Any, Generator, Iterator, List, Optional, Sequence, Tuple, Union\n\nfrom sphinx.util import logging\nfrom sphinx.util.inspect import isboundmethod, safe_getattr\n\nlogger = logging.getLogger(__name__)\n\n\nclass _MockObject:\n \"\"\"Used by autodoc_mock_imports.\"\"\"\n\n __display_name__ = '_MockObject'\n __name__ = ''\n __sphinx_mock__ = True\n __sphinx_decorator_args__: Tuple[Any, ...] = ()\n\n def __new__(cls, *args: Any, **kwargs: Any) -> Any:\n if len(args) == 3 and isinstance(args[1], tuple):\n superclass = args[1][-1].__class__\n if superclass is cls:\n # subclassing MockObject\n return _make_subclass(args[0], superclass.__display_name__,\n superclass=superclass, attributes=args[2])\n\n return super().__new__(cls)\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n self.__qualname__ = self.__name__\n\n def __len__(self) -> int:\n return 0\n\n def __contains__(self, key: str) -> bool:\n return False\n\n def __iter__(self) -> Iterator:\n return iter([])\n\n def __mro_entries__(self, bases: Tuple) -> Tuple:\n return (self.__class__,)\n\n def __getitem__(self, key: Any) -> \"_MockObject\":\n return _make_subclass(str(key), self.__display_name__, self.__class__)()\n\n def __getattr__(self, key: str) -> \"_MockObject\":\n return _make_subclass(key, self.__display_name__, self.__class__)()\n\n def __call__(self, *args: Any, **kwargs: Any) -> Any:\n call = self.__class__()\n call.__sphinx_decorator_args__ = args\n return call\n\n def __repr__(self) -> str:\n return self.__display_name__", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_MockFinder_MockFinder.invalidate_caches.for_modname_in_self_mocke.sys_modules_pop_modname_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_MockFinder_MockFinder.invalidate_caches.for_modname_in_self_mocke.sys_modules_pop_modname_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/mock.py", "file_name": "mock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 108, "end_line": 129, "span_ids": ["MockFinder.invalidate_caches", "MockFinder.find_spec", "MockFinder"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MockFinder(MetaPathFinder):\n \"\"\"A finder for mocking.\"\"\"\n\n def __init__(self, modnames: List[str]) -> None:\n super().__init__()\n self.modnames = modnames\n self.loader = MockLoader(self)\n self.mocked_modules: List[str] = []\n\n def find_spec(self, fullname: str, path: Optional[Sequence[Union[bytes, str]]],\n target: ModuleType = None) -> Optional[ModuleSpec]:\n for modname in self.modnames:\n # check if fullname is (or is a descendant of) one of our targets\n if modname == fullname or fullname.startswith(modname + '.'):\n return ModuleSpec(fullname, self.loader)\n\n return None\n\n def invalidate_caches(self) -> None:\n \"\"\"Invalidate mocked modules on sys.modules.\"\"\"\n for modname in self.mocked_modules:\n sys.modules.pop(modname, None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_mock_ismockmodule.return.isinstance_subject__Mock": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/mock.py_mock_ismockmodule.return.isinstance_subject__Mock", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/mock.py", "file_name": "mock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 132, "end_line": 151, "span_ids": ["mock", "ismockmodule"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextlib.contextmanager\ndef mock(modnames: List[str]) -> Generator[None, None, None]:\n \"\"\"Insert mock modules during context::\n\n with mock(['target.module.name']):\n # mock modules are enabled here\n ...\n \"\"\"\n try:\n finder = MockFinder(modnames)\n sys.meta_path.insert(0, finder)\n yield\n finally:\n sys.meta_path.remove(finder)\n finder.invalidate_caches()\n\n\ndef ismockmodule(subject: Any) -> bool:\n \"\"\"Check if the object is a mocked module.\"\"\"\n return isinstance(subject, _MockModule)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/preserve_defaults.py__Preserve_function_defa_DefaultValue.__repr__.return.self_name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/preserve_defaults.py__Preserve_function_defa_DefaultValue.__repr__.return.self_name", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/preserve_defaults.py", "file_name": "preserve_defaults.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 26, "span_ids": ["impl", "docstring", "imports", "DefaultValue.__repr__", "DefaultValue"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Preserve function defaults.\n\nPreserve the default argument values of function signatures in source code\nand keep them not evaluated for readability.\n\"\"\"\n\nimport ast\nimport inspect\nimport sys\nfrom typing import Any, Dict, List, Optional\n\nfrom sphinx.application import Sphinx\nfrom sphinx.locale import __\nfrom sphinx.pycode.ast import parse as ast_parse\nfrom sphinx.pycode.ast import unparse as ast_unparse\nfrom sphinx.util import logging\n\nlogger = logging.getLogger(__name__)\n\n\nclass DefaultValue:\n def __init__(self, name: str) -> None:\n self.name = name\n\n def __repr__(self) -> str:\n return self.name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/preserve_defaults.py_get_function_def_get_default_value.try_.except_AttributeError_I.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/preserve_defaults.py_get_function_def_get_default_value.try_.except_AttributeError_I.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/preserve_defaults.py", "file_name": "preserve_defaults.py", "file_type": "text/x-python", "category": "implementation", "start_line": 29, "end_line": 59, "span_ids": ["get_function_def", "get_default_value"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_function_def(obj: Any) -> ast.FunctionDef:\n \"\"\"Get FunctionDef object from living object.\n This tries to parse original code for living object and returns\n AST node for given *obj*.\n \"\"\"\n try:\n source = inspect.getsource(obj)\n if source.startswith((' ', r'\\t')):\n # subject is placed inside class or block. To read its docstring,\n # this adds if-block before the declaration.\n module = ast_parse('if True:\\n' + source)\n return module.body[0].body[0] # type: ignore\n else:\n module = ast_parse(source)\n return module.body[0] # type: ignore\n except (OSError, TypeError): # failed to load source code\n return None\n\n\ndef get_default_value(lines: List[str], position: ast.AST) -> Optional[str]:\n try:\n if sys.version_info < (3, 8): # only for py38+\n return None\n elif position.lineno == position.end_lineno:\n line = lines[position.lineno - 1]\n return line[position.col_offset:position.end_col_offset]\n else:\n # multiline value is not supported now\n return None\n except (AttributeError, IndexError):\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/preserve_defaults.py_update_defvalue_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/preserve_defaults.py_update_defvalue_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/preserve_defaults.py", "file_name": "preserve_defaults.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 116, "span_ids": ["update_defvalue", "setup"], "tokens": 483}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def update_defvalue(app: Sphinx, obj: Any, bound_method: bool) -> None:\n \"\"\"Update defvalue info of *obj* using type_comments.\"\"\"\n if not app.config.autodoc_preserve_defaults:\n return\n\n try:\n lines = inspect.getsource(obj).splitlines()\n if lines[0].startswith((' ', r'\\t')):\n lines.insert(0, '') # insert a dummy line to follow what get_function_def() does.\n except (OSError, TypeError):\n lines = []\n\n try:\n function = get_function_def(obj)\n if function.args.defaults or function.args.kw_defaults:\n sig = inspect.signature(obj)\n defaults = list(function.args.defaults)\n kw_defaults = list(function.args.kw_defaults)\n parameters = list(sig.parameters.values())\n for i, param in enumerate(parameters):\n if param.default is param.empty:\n if param.kind == param.KEYWORD_ONLY:\n # Consume kw_defaults for kwonly args\n kw_defaults.pop(0)\n else:\n if param.kind in (param.POSITIONAL_ONLY, param.POSITIONAL_OR_KEYWORD):\n default = defaults.pop(0)\n value = get_default_value(lines, default)\n if value is None:\n value = ast_unparse(default) # type: ignore\n parameters[i] = param.replace(default=DefaultValue(value))\n else:\n default = kw_defaults.pop(0)\n value = get_default_value(lines, default)\n if value is None:\n value = ast_unparse(default) # type: ignore\n parameters[i] = param.replace(default=DefaultValue(value))\n sig = sig.replace(parameters=parameters)\n obj.__signature__ = sig\n except (AttributeError, TypeError):\n # failed to update signature (ex. built-in or extension types)\n pass\n except NotImplementedError as exc: # failed to ast.unparse()\n logger.warning(__(\"Failed to parse a default argument value for %r: %s\"), obj, exc)\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_config_value('autodoc_preserve_defaults', False, True)\n app.connect('autodoc-before-process-signature', update_defvalue)\n\n return {\n 'version': '1.0',\n 'parallel_read_safe': True\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py__Update_annotations_inf_not_suppressed.if_len_argtypes_0_.else_not_suppressed.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/type_comment.py__Update_annotations_inf_not_suppressed.if_len_argtypes_0_.else_not_suppressed.return.True", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/type_comment.py", "file_name": "type_comment.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 27, "span_ids": ["not_suppressed", "impl", "docstring", "imports"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Update annotations info of living objects using type_comments.\"\"\"\n\nfrom inspect import Parameter, Signature, getsource\nfrom typing import Any, Dict, List, cast\n\nimport sphinx\nfrom sphinx.application import Sphinx\nfrom sphinx.locale import __\nfrom sphinx.pycode.ast import ast\nfrom sphinx.pycode.ast import parse as ast_parse\nfrom sphinx.pycode.ast import unparse as ast_unparse\nfrom sphinx.util import inspect, logging\n\nlogger = logging.getLogger(__name__)\n\n\ndef not_suppressed(argtypes: List[ast.AST] = []) -> bool:\n \"\"\"Check given *argtypes* is suppressed type_comment or not.\"\"\"\n if len(argtypes) == 0: # no argtypees\n return False\n elif len(argtypes) == 1 and ast_unparse(argtypes[0]) == \"...\": # suppressed\n # Note: To support multiple versions of python, this uses ``ast_unparse()`` for\n # comparison with Ellipsis. Since 3.8, ast.Constant has been used to represent\n # Ellipsis node instead of ast.Ellipsis.\n return False\n else: # not suppressed\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py__Generating_content_for_record_typehints.try_.except_TypeError_ValueE.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py__Generating_content_for_record_typehints.try_.except_TypeError_ValueE.pass", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/typehints.py", "file_name": "typehints.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["record_typehints", "docstring", "imports"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Generating content for autodoc using typehints\"\"\"\n\nimport re\nfrom collections import OrderedDict\nfrom typing import Any, Dict, Iterable, Set, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element\n\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.util import inspect, typing\n\n\ndef record_typehints(app: Sphinx, objtype: str, name: str, obj: Any,\n options: Dict, args: str, retann: str) -> None:\n \"\"\"Record type hints to env object.\"\"\"\n if app.config.autodoc_typehints_format == 'short':\n mode = 'smart'\n else:\n mode = 'fully-qualified'\n\n try:\n if callable(obj):\n annotations = app.env.temp_data.setdefault('annotations', {})\n annotation = annotations.setdefault(name, OrderedDict())\n sig = inspect.signature(obj, type_aliases=app.config.autodoc_type_aliases)\n for param in sig.parameters.values():\n if param.annotation is not param.empty:\n annotation[param.name] = typing.stringify(param.annotation, mode)\n if sig.return_annotation is not sig.empty:\n annotation['return'] = typing.stringify(sig.return_annotation, mode)\n except (TypeError, ValueError):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py_modify_field_list_modify_field_list.if_return_in_annotation.node_field": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py_modify_field_list_modify_field_list.if_return_in_annotation.node_field", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/typehints.py", "file_name": "typehints.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 124, "span_ids": ["modify_field_list"], "tokens": 389}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def modify_field_list(node: nodes.field_list, annotations: Dict[str, str]) -> None:\n arguments: Dict[str, Dict[str, bool]] = {}\n fields = cast(Iterable[nodes.field], node)\n for field in fields:\n field_name = field[0].astext()\n parts = re.split(' +', field_name)\n if parts[0] == 'param':\n if len(parts) == 2:\n # :param xxx:\n arg = arguments.setdefault(parts[1], {})\n arg['param'] = True\n elif len(parts) > 2:\n # :param xxx yyy:\n name = ' '.join(parts[2:])\n arg = arguments.setdefault(name, {})\n arg['param'] = True\n arg['type'] = True\n elif parts[0] == 'type':\n name = ' '.join(parts[1:])\n arg = arguments.setdefault(name, {})\n arg['type'] = True\n elif parts[0] == 'rtype':\n arguments['return'] = {'type': True}\n\n for name, annotation in annotations.items():\n if name == 'return':\n continue\n\n arg = arguments.get(name, {})\n if not arg.get('type'):\n field = nodes.field()\n field += nodes.field_name('', 'type ' + name)\n field += nodes.field_body('', nodes.paragraph('', annotation))\n node += field\n if not arg.get('param'):\n field = nodes.field()\n field += nodes.field_name('', 'param ' + name)\n field += nodes.field_body('', nodes.paragraph('', ''))\n node += field\n\n if 'return' in annotations and 'return' not in arguments:\n field = nodes.field()\n field += nodes.field_name('', 'rtype')\n field += nodes.field_body('', nodes.paragraph('', annotation))\n node += field", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py_augment_descriptions_with_types_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autodoc/typehints.py_augment_descriptions_with_types_", "embedding": null, "metadata": {"file_path": "sphinx/ext/autodoc/typehints.py", "file_name": "typehints.py", "file_type": "text/x-python", "category": "implementation", "start_line": 127, "end_line": 182, "span_ids": ["setup", "augment_descriptions_with_types"], "tokens": 460}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def augment_descriptions_with_types(\n node: nodes.field_list,\n annotations: Dict[str, str],\n) -> None:\n fields = cast(Iterable[nodes.field], node)\n has_description = set() # type: Set[str]\n has_type = set() # type: Set[str]\n for field in fields:\n field_name = field[0].astext()\n parts = re.split(' +', field_name)\n if parts[0] == 'param':\n if len(parts) == 2:\n # :param xxx:\n has_description.add(parts[1])\n elif len(parts) > 2:\n # :param xxx yyy:\n name = ' '.join(parts[2:])\n has_description.add(name)\n has_type.add(name)\n elif parts[0] == 'type':\n name = ' '.join(parts[1:])\n has_type.add(name)\n elif parts[0] in ('return', 'returns'):\n has_description.add('return')\n elif parts[0] == 'rtype':\n has_type.add('return')\n\n # Add 'type' for parameters with a description but no declared type.\n for name in annotations:\n if name in ('return', 'returns'):\n continue\n if name in has_description and name not in has_type:\n field = nodes.field()\n field += nodes.field_name('', 'type ' + name)\n field += nodes.field_body('', nodes.paragraph('', annotations[name]))\n node += field\n\n # Add 'rtype' if 'return' is present and 'rtype' isn't.\n if 'return' in annotations:\n if 'return' in has_description and 'return' not in has_type:\n field = nodes.field()\n field += nodes.field_name('', 'rtype')\n field += nodes.field_body('', nodes.paragraph('', annotations['return']))\n node += field\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.connect('autodoc-process-signature', record_typehints)\n app.connect('object-description-transform', merge_typehints)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autosectionlabel.py__Allow_reference_sectio_get_node_depth.return.i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/autosectionlabel.py__Allow_reference_sectio_get_node_depth.return.i", "embedding": null, "metadata": {"file_path": "sphinx/ext/autosectionlabel.py", "file_name": "autosectionlabel.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["impl", "get_node_depth", "docstring", "imports"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Allow reference sections by :ref: role using its title.\"\"\"\n\nfrom typing import Any, Dict, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\n\nfrom sphinx.application import Sphinx\nfrom sphinx.domains.std import StandardDomain\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.nodes import clean_astext\n\nlogger = logging.getLogger(__name__)\n\n\ndef get_node_depth(node: Node) -> int:\n i = 0\n cur_node = node\n while cur_node.parent != node.document:\n cur_node = cur_node.parent\n i += 1\n return i", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py__Check_Python_modules_a_compile_regex_list.return.lst": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/coverage.py__Check_Python_modules_a_compile_regex_list.return.lst", "embedding": null, "metadata": {"file_path": "sphinx/ext/coverage.py", "file_name": "coverage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 39, "span_ids": ["impl", "compile_regex_list", "write_header", "docstring", "imports"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Check Python modules and C API for coverage.\n\nMostly written by Josip Dzolonga for the Google Highly Open Participation\ncontest.\n\"\"\"\n\nimport glob\nimport inspect\nimport pickle\nimport re\nfrom importlib import import_module\nfrom os import path\nfrom typing import IO, Any, Dict, List, Pattern, Set, Tuple\n\nimport sphinx\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.console import red # type: ignore\nfrom sphinx.util.inspect import safe_getattr\n\nlogger = logging.getLogger(__name__)\n\n\n# utility\ndef write_header(f: IO, text: str, char: str = '-') -> None:\n f.write(text + '\\n')\n f.write(char * len(text) + '\\n')\n\n\ndef compile_regex_list(name: str, exps: str) -> List[Pattern]:\n lst = []\n for exp in exps:\n try:\n lst.append(re.compile(exp))\n except Exception:\n logger.warning(__('invalid regex %r in %s'), exp, name)\n return lst", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__Mimic_doctest_in_Sphin_doctestopt_re.re_compile_r_s_doctest_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/doctest.py__Mimic_doctest_in_Sphin_doctestopt_re.re_compile_r_s_doctest_", "embedding": null, "metadata": {"file_path": "sphinx/ext/doctest.py", "file_name": "doctest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["impl", "impl:2", "docstring", "imports:21", "imports"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Mimic doctest in Sphinx.\n\nThe extension automatically execute code snippets and checks their results.\n\"\"\"\n\nimport doctest\nimport re\nimport sys\nimport time\nfrom io import StringIO\nfrom os import path\nfrom typing import (TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Sequence, Set, Tuple,\n Type)\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node, TextElement\nfrom docutils.parsers.rst import directives\nfrom packaging.specifiers import InvalidSpecifier, SpecifierSet\nfrom packaging.version import Version\n\nimport sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.console import bold # type: ignore\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.osutil import relpath\nfrom sphinx.util.typing import OptionSpec\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nlogger = logging.getLogger(__name__)\n\nblankline_re = re.compile(r'^\\s*<BLANKLINE>', re.MULTILINE)\ndoctestopt_re = re.compile(r'#\\s*doctest:.+$', re.MULTILINE)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/duration.py__Measure_durations_of_S_DurationDomain.merge_domaindata.for_docname_duration_in_.if_docname_in_docnames_.self_reading_durations_do": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/duration.py__Measure_durations_of_S_DurationDomain.merge_domaindata.for_docname_duration_in_.if_docname_in_docnames_.self_reading_durations_do", "embedding": null, "metadata": {"file_path": "sphinx/ext/duration.py", "file_name": "duration.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["impl", "DurationDomain.clear", "DurationDomain.clear_doc", "docstring", "DurationDomain.merge_domaindata", "imports", "DurationDomain.reading_durations", "DurationDomain.note_reading_duration", "DurationDomain"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Measure durations of Sphinx processing.\"\"\"\n\nfrom datetime import datetime, timedelta\nfrom itertools import islice\nfrom operator import itemgetter\nfrom typing import Any, Dict, List, cast\n\nfrom docutils import nodes\n\nfrom sphinx.application import Sphinx\nfrom sphinx.domains import Domain\nfrom sphinx.locale import __\nfrom sphinx.util import logging\n\nlogger = logging.getLogger(__name__)\n\n\nclass DurationDomain(Domain):\n \"\"\"A domain for durations of Sphinx processing.\"\"\"\n name = 'duration'\n\n @property\n def reading_durations(self) -> Dict[str, timedelta]:\n return self.data.setdefault('reading_durations', {})\n\n def note_reading_duration(self, duration: timedelta) -> None:\n self.reading_durations[self.env.docname] = duration\n\n def clear(self) -> None:\n self.reading_durations.clear()\n\n def clear_doc(self, docname: str) -> None:\n self.reading_durations.pop(docname, None)\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict[str, timedelta]) -> None:\n for docname, duration in otherdata.items():\n if docname in docnames:\n self.reading_durations[docname] = duration", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py__Extension_to_save_typi_logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py__Extension_to_save_typi_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/ext/extlinks.py", "file_name": "extlinks.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["impl", "docstring", "imports"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Extension to save typing and prevent hard-coding of base URLs in reST files.\n\nThis adds a new config value called ``extlinks`` that is created like this::\n\n extlinks = {'exmpl': ('https://example.invalid/%s.html', caption), ...}\n\nNow you can use e.g. :exmpl:`foo` in your documents. This will create a\nlink to ``https://example.invalid/foo.html``. The link caption depends on\nthe *caption* value given:\n\n- If it is ``None``, the caption will be the full URL.\n- If it is a string, it must contain ``%s`` exactly once. In this case the\n caption will be *caption* with the role content substituted for ``%s``.\n\nYou can also give an explicit caption, e.g. :exmpl:`Foo <foo>`.\n\nBoth, the url string and the caption string must escape ``%`` as ``%%``.\n\"\"\"\n\nimport re\nimport sys\nfrom typing import Any, Dict, List, Tuple\n\nfrom docutils import nodes, utils\nfrom docutils.nodes import Node, system_message\nfrom docutils.parsers.rst.states import Inliner\n\nimport sphinx\nfrom sphinx.application import Sphinx\nfrom sphinx.locale import __\nfrom sphinx.transforms.post_transforms import SphinxPostTransform\nfrom sphinx.util import logging, rst\nfrom sphinx.util.nodes import split_explicit_title\nfrom sphinx.util.typing import RoleFunction\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_ExternalLinksChecker_ExternalLinksChecker.check_uri.for_alias_base_uri__ca.if_match_and_match_groupd.logger_warning_msg_uri_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_ExternalLinksChecker_ExternalLinksChecker.check_uri.for_alias_base_uri__ca.if_match_and_match_groupd.logger_warning_msg_uri_", "embedding": null, "metadata": {"file_path": "sphinx/ext/extlinks.py", "file_name": "extlinks.py", "file_type": "text/x-python", "category": "implementation", "start_line": 39, "end_line": 84, "span_ids": ["ExternalLinksChecker.run", "ExternalLinksChecker", "ExternalLinksChecker.check_uri"], "tokens": 411}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExternalLinksChecker(SphinxPostTransform):\n \"\"\"\n For each external link, check if it can be replaced by an extlink.\n\n We treat each ``reference`` node without ``internal`` attribute as an external link.\n \"\"\"\n\n default_priority = 500\n\n def run(self, **kwargs: Any) -> None:\n if not self.config.extlinks_detect_hardcoded_links:\n return\n\n for refnode in self.document.findall(nodes.reference):\n self.check_uri(refnode)\n\n def check_uri(self, refnode: nodes.reference) -> None:\n \"\"\"\n If the URI in ``refnode`` has a replacement in ``extlinks``,\n emit a warning with a replacement suggestion.\n \"\"\"\n if 'internal' in refnode or 'refuri' not in refnode:\n return\n\n uri = refnode['refuri']\n title = refnode.astext()\n\n for alias, (base_uri, _caption) in self.app.config.extlinks.items():\n if sys.version_info < (3, 7):\n # Replace a leading backslash because re.escape() inserts a backslash before %\n # on python 3.6\n uri_pattern = re.compile(re.escape(base_uri).replace('\\\\%s', '(?P<value>.+)'))\n else:\n uri_pattern = re.compile(re.escape(base_uri).replace('%s', '(?P<value>.+)'))\n\n match = uri_pattern.match(uri)\n if match and match.groupdict().get('value'):\n # build a replacement suggestion\n msg = __('hardcoded link %r could be replaced by an extlink '\n '(try using %r instead)')\n value = match.groupdict().get('value')\n if uri != title:\n replacement = f\":{alias}:`{rst.escape(title)} <{value}>`\"\n else:\n replacement = f\":{alias}:`{value}`\"\n logger.warning(msg, uri, replacement, location=refnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_make_link_role_make_link_role.if_caption_is_not_None_.try_.except_TypeError_ValueE.caption.caption_replace_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_make_link_role_make_link_role.if_caption_is_not_None_.try_.except_TypeError_ValueE.caption.caption_replace_", "embedding": null, "metadata": {"file_path": "sphinx/ext/extlinks.py", "file_name": "extlinks.py", "file_type": "text/x-python", "category": "implementation", "start_line": 87, "end_line": 107, "span_ids": ["make_link_role"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def make_link_role(name: str, base_url: str, caption: str) -> RoleFunction:\n # Check whether we have base_url and caption strings have an '%s' for\n # expansion. If not, fall back the the old behaviour and use the string as\n # a prefix.\n # Remark: It is an implementation detail that we use Pythons %-formatting.\n # So far we only expose ``%s`` and require quoting of ``%`` using ``%%``.\n try:\n base_url % 'dummy'\n except (TypeError, ValueError):\n logger.warn(__('extlinks: Sphinx-6.0 will require base URL to '\n 'contain exactly one \\'%s\\' and all other \\'%\\' need '\n 'to be escaped as \\'%%\\'.')) # RemovedInSphinx60Warning\n base_url = base_url.replace('%', '%%') + '%s'\n if caption is not None:\n try:\n caption % 'dummy'\n except (TypeError, ValueError):\n logger.warning(__('extlinks: Sphinx-6.0 will require a caption string to '\n 'contain exactly one \\'%s\\' and all other \\'%\\' need '\n 'to be escaped as \\'%%\\'.')) # RemovedInSphinx60Warning\n caption = caption.replace('%', '%%') + '%s'\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_make_link_role.role_make_link_role.return.role": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_make_link_role.role_make_link_role.return.role", "embedding": null, "metadata": {"file_path": "sphinx/ext/extlinks.py", "file_name": "extlinks.py", "file_type": "text/x-python", "category": "implementation", "start_line": 109, "end_line": 122, "span_ids": ["make_link_role"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def make_link_role(name: str, base_url: str, caption: str) -> RoleFunction:\n # ... other code\n\n def role(typ: str, rawtext: str, text: str, lineno: int,\n inliner: Inliner, options: Dict = {}, content: List[str] = []\n ) -> Tuple[List[Node], List[system_message]]:\n text = utils.unescape(text)\n has_explicit_title, title, part = split_explicit_title(text)\n full_url = base_url % part\n if not has_explicit_title:\n if caption is None:\n title = full_url\n else:\n title = caption % part\n pnode = nodes.reference(title, title, internal=False, refuri=full_url)\n return [pnode], []\n return role", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_setup_link_roles_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/extlinks.py_setup_link_roles_", "embedding": null, "metadata": {"file_path": "sphinx/ext/extlinks.py", "file_name": "extlinks.py", "file_type": "text/x-python", "category": "implementation", "start_line": 125, "end_line": 137, "span_ids": ["setup_link_roles", "setup"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup_link_roles(app: Sphinx) -> None:\n for name, (base_url, caption) in app.config.extlinks.items():\n app.add_role(name, make_link_role(name, base_url, caption))\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_config_value('extlinks', {}, 'env')\n app.add_config_value('extlinks_detect_hardcoded_links', False, 'env')\n\n app.connect('builder-inited', setup_link_roles)\n app.add_post_transform(ExternalLinksChecker)\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/githubpages.py__To_publish_HTML_docs_a_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/githubpages.py__To_publish_HTML_docs_a_", "embedding": null, "metadata": {"file_path": "sphinx/ext/githubpages.py", "file_name": "githubpages.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["create_nojekyll_and_cname", "docstring", "imports", "setup"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"To publish HTML docs at GitHub Pages, create .nojekyll file.\"\"\"\n\nimport os\nimport urllib\nfrom typing import Any, Dict\n\nimport sphinx\nfrom sphinx.application import Sphinx\nfrom sphinx.environment import BuildEnvironment\n\n\ndef create_nojekyll_and_cname(app: Sphinx, env: BuildEnvironment) -> None:\n if app.builder.format == 'html':\n open(os.path.join(app.builder.outdir, '.nojekyll'), 'wt').close()\n\n html_baseurl = app.config.html_baseurl\n if html_baseurl:\n domain = urllib.parse.urlparse(html_baseurl).hostname\n if domain and not domain.endswith(\".github.io\"):\n with open(os.path.join(app.builder.outdir, 'CNAME'), 'wt') as f:\n # NOTE: don't write a trailing newline. The `CNAME` file that's\n # auto-generated by the Github UI doesn't have one.\n f.write(domain)\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.connect('env-updated', create_nojekyll_and_cname)\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/ifconfig.py__Provides_the_ifconfi_IfConfig.run.return._node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/ifconfig.py__Provides_the_ifconfi_IfConfig.run.return._node_", "embedding": null, "metadata": {"file_path": "sphinx/ext/ifconfig.py", "file_name": "ifconfig.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 47, "span_ids": ["IfConfig", "IfConfig.run", "docstring", "imports", "ifconfig"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Provides the ``ifconfig`` directive.\n\nThe ``ifconfig`` directive enables writing documentation\nthat is included depending on configuration variables.\n\nUsage::\n\n .. ifconfig:: releaselevel in ('alpha', 'beta', 'rc')\n\n This stuff is only included in the built docs for unstable versions.\n\nThe argument for ``ifconfig`` is a plain Python expression, evaluated in the\nnamespace of the project configuration (that is, all variables from\n``conf.py`` are available.)\n\"\"\"\n\nfrom typing import Any, Dict, List\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\n\nimport sphinx\nfrom sphinx.application import Sphinx\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.nodes import nested_parse_with_titles\nfrom sphinx.util.typing import OptionSpec\n\n\nclass ifconfig(nodes.Element):\n pass\n\n\nclass IfConfig(SphinxDirective):\n\n has_content = True\n required_arguments = 1\n optional_arguments = 0\n final_argument_whitespace = True\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n node = ifconfig()\n node.document = self.state.document\n self.set_source_info(node)\n node['expr'] = self.arguments[0]\n nested_parse_with_titles(self.state, self.content, node)\n return [node]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgconverter.py__Image_converter_extens_ImagemagickConverter.is_available.try_.except_CalledProcessError.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgconverter.py__Image_converter_extens_ImagemagickConverter.is_available.try_.except_CalledProcessError.return.False", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgconverter.py", "file_name": "imgconverter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 41, "span_ids": ["impl", "ImagemagickConverter", "docstring", "imports", "ImagemagickConverter.is_available"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Image converter extension for Sphinx\"\"\"\n\nimport subprocess\nimport sys\nfrom subprocess import PIPE, CalledProcessError\nfrom typing import Any, Dict\n\nfrom sphinx.application import Sphinx\nfrom sphinx.errors import ExtensionError\nfrom sphinx.locale import __\nfrom sphinx.transforms.post_transforms.images import ImageConverter\nfrom sphinx.util import logging\n\nlogger = logging.getLogger(__name__)\n\n\nclass ImagemagickConverter(ImageConverter):\n conversion_rules = [\n ('image/svg+xml', 'image/png'),\n ('image/gif', 'image/png'),\n ('application/pdf', 'image/png'),\n ('application/illustrator', 'image/png'),\n ]\n\n def is_available(self) -> bool:\n \"\"\"Confirms the converter is available or not.\"\"\"\n try:\n args = [self.config.image_converter, '-version']\n logger.debug('Invoking %r ...', args)\n subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True)\n return True\n except OSError as exc:\n logger.warning(__('convert command %r cannot be run, '\n 'check the image_converter setting: %s'),\n self.config.image_converter, exc)\n return False\n except CalledProcessError as exc:\n logger.warning(__('convert exited with error:\\n'\n '[stderr]\\n%r\\n[stdout]\\n%r'),\n exc.stderr, exc.stdout)\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py__Render_math_in_HTML_vi_write_svg_depth.with_open_filename_a_.f_write_n_DEPTH_s_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py__Render_math_in_HTML_vi_write_svg_depth.with_open_filename_a_.f_write_n_DEPTH_s_", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 73, "span_ids": ["impl", "read_svg_depth", "impl:6", "docstring", "write_svg_depth", "MathExtError", "InvokeError", "imports", "impl:5"], "tokens": 509}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Render math in HTML via dvipng or dvisvgm.\"\"\"\n\nimport posixpath\nimport re\nimport shutil\nimport subprocess\nimport tempfile\nfrom os import path\nfrom subprocess import PIPE, CalledProcessError\nfrom typing import Any, Dict, List, Tuple\n\nfrom docutils import nodes\nfrom docutils.nodes import Element\n\nimport sphinx\nfrom sphinx import package_dir\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.config import Config\nfrom sphinx.errors import SphinxError\nfrom sphinx.locale import _, __\nfrom sphinx.util import logging, sha1\nfrom sphinx.util.math import get_node_equation_number, wrap_displaymath\nfrom sphinx.util.osutil import ensuredir\nfrom sphinx.util.png import read_png_depth, write_png_depth\nfrom sphinx.util.template import LaTeXRenderer\nfrom sphinx.writers.html import HTMLTranslator\n\nlogger = logging.getLogger(__name__)\n\ntemplates_path = path.join(package_dir, 'templates', 'imgmath')\n\n\nclass MathExtError(SphinxError):\n category = 'Math extension error'\n\n def __init__(self, msg: str, stderr: str = None, stdout: str = None) -> None:\n if stderr:\n msg += '\\n[stderr]\\n' + stderr\n if stdout:\n msg += '\\n[stdout]\\n' + stdout\n super().__init__(msg)\n\n\nclass InvokeError(SphinxError):\n \"\"\"errors on invoking converters.\"\"\"\n\n\nSUPPORT_FORMAT = ('png', 'svg')\n\ndepth_re = re.compile(r'\\[\\d+ depth=(-?\\d+)\\]')\ndepthsvg_re = re.compile(r'.*, depth=(.*)pt')\ndepthsvgcomment_re = re.compile(r'<!-- DEPTH=(-?\\d+) -->')\n\n\ndef read_svg_depth(filename: str) -> int:\n \"\"\"Read the depth from comment at last line of SVG file\n \"\"\"\n with open(filename) as f:\n for line in f: # noqa: B007\n pass\n # Only last line is checked\n matched = depthsvgcomment_re.match(line)\n if matched:\n return int(matched.group(1))\n return None\n\n\ndef write_svg_depth(filename: str, depth: int) -> None:\n \"\"\"Write the depth to SVG file as a comment at end of file\n \"\"\"\n with open(filename, 'a') as f:\n f.write('\\n<!-- DEPTH=%s -->' % depth)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/imgmath.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/ext/imgmath.py", "file_name": "imgmath.py", "file_type": "text/x-python", "category": "implementation", "start_line": 337, "end_line": 357, "span_ids": ["setup"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: Sphinx) -> Dict[str, Any]:\n app.add_html_math_renderer('imgmath',\n (html_visit_math, None),\n (html_visit_displaymath, None))\n\n app.add_config_value('imgmath_image_format', 'png', 'html')\n app.add_config_value('imgmath_dvipng', 'dvipng', 'html')\n app.add_config_value('imgmath_dvisvgm', 'dvisvgm', 'html')\n app.add_config_value('imgmath_latex', 'latex', 'html')\n app.add_config_value('imgmath_use_preview', False, 'html')\n app.add_config_value('imgmath_dvipng_args',\n ['-gamma', '1.5', '-D', '110', '-bg', 'Transparent'],\n 'html')\n app.add_config_value('imgmath_dvisvgm_args', ['--no-fonts'], 'html')\n app.add_config_value('imgmath_latex_args', [], 'html')\n app.add_config_value('imgmath_latex_preamble', '', 'html')\n app.add_config_value('imgmath_add_tooltips', True, 'html')\n app.add_config_value('imgmath_font_size', 12, 'html')\n app.connect('build-finished', cleanup_tempdir)\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_r_Defines_a_docutils_di_py_builtins._obj_for_obj_in_vars_buil": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/inheritance_diagram.py_r_Defines_a_docutils_di_py_builtins._obj_for_obj_in_vars_buil", "embedding": null, "metadata": {"file_path": "sphinx/ext/inheritance_diagram.py", "file_name": "inheritance_diagram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 60, "span_ids": ["impl", "docstring", "imports"], "tokens": 391}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "r\"\"\"Defines a docutils directive for inserting inheritance diagrams.\n\nProvide the directive with one or more classes or modules (separated\nby whitespace). For modules, all of the classes in that module will\nbe used.\n\nExample::\n\n Given the following classes:\n\n class A: pass\n class B(A): pass\n class C(A): pass\n class D(B, C): pass\n class E(B): pass\n\n .. inheritance-diagram: D E\n\n Produces a graph like the following:\n\n A\n / \\\n B C\n / \\ /\n E D\n\nThe graph is inserted as a PNG+image map into HTML and a PDF in\nLaTeX.\n\"\"\"\n\nimport builtins\nimport inspect\nimport re\nfrom importlib import import_module\nfrom typing import Any, Dict, Iterable, List, Tuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\nfrom docutils.parsers.rst import directives\n\nimport sphinx\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.ext.graphviz import (figure_wrapper, graphviz, render_dot_html, render_dot_latex,\n render_dot_texinfo)\nfrom sphinx.util import md5\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.typing import OptionSpec\nfrom sphinx.writers.html import HTMLTranslator\nfrom sphinx.writers.latex import LaTeXTranslator\nfrom sphinx.writers.texinfo import TexinfoTranslator\n\nmodule_sig_re = re.compile(r'''^(?:([\\w.]*)\\.)? # module names\n (\\w+) \\s* $ # class/final module name\n ''', re.VERBOSE)\n\n\npy_builtins = [obj for obj in vars(builtins).values()\n if inspect.isclass(obj)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__Insert_links_to_object_logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__Insert_links_to_object_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 49, "span_ids": ["impl", "docstring", "imports"], "tokens": 385}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Insert links to objects documented in remote Sphinx documentation.\n\nThis works as follows:\n\n* Each Sphinx HTML build creates a file named \"objects.inv\" that contains a\n mapping from object names to URIs relative to the HTML set's root.\n\n* Projects using the Intersphinx extension can specify links to such mapping\n files in the `intersphinx_mapping` config value. The mapping will then be\n used to resolve otherwise missing references to objects into links to the\n other documentation.\n\n* By default, the mapping file is assumed to be at the same location as the\n rest of the documentation; however, the location of the mapping file can\n also be specified individually, e.g. if the docs should be buildable\n without Internet access.\n\"\"\"\n\nimport concurrent.futures\nimport functools\nimport posixpath\nimport re\nimport sys\nimport time\nfrom os import path\nfrom types import ModuleType\nfrom typing import IO, Any, Dict, List, Optional, Tuple, cast\nfrom urllib.parse import urlsplit, urlunsplit\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node, TextElement, system_message\nfrom docutils.utils import Reporter, relative_path\n\nimport sphinx\nfrom sphinx.addnodes import pending_xref\nfrom sphinx.application import Sphinx\nfrom sphinx.builders.html import INVENTORY_FILENAME\nfrom sphinx.config import Config\nfrom sphinx.domains import Domain\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.errors import ExtensionError\nfrom sphinx.locale import _, __\nfrom sphinx.transforms.post_transforms import ReferencesResolver\nfrom sphinx.util import logging, requests\nfrom sphinx.util.docutils import CustomReSTDispatcher, SphinxRole\nfrom sphinx.util.inventory import InventoryFile\nfrom sphinx.util.typing import Inventory, InventoryItem, RoleFunction\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__create_element_from_result__create_element_from_result.return.newnode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__create_element_from_result__create_element_from_result.return.newnode", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 260, "end_line": 287, "span_ids": ["_create_element_from_result"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _create_element_from_result(domain: Domain, inv_name: Optional[str],\n data: InventoryItem,\n node: pending_xref, contnode: TextElement) -> Element:\n proj, version, uri, dispname = data\n if '://' not in uri and node.get('refdoc'):\n # get correct path in case of subdirectories\n uri = path.join(relative_path(node['refdoc'], '.'), uri)\n if version:\n reftitle = _('(in %s v%s)') % (proj, version)\n else:\n reftitle = _('(in %s)') % (proj,)\n newnode = nodes.reference('', '', internal=False, refuri=uri, reftitle=reftitle)\n if node.get('refexplicit'):\n # use whatever title was given\n newnode.append(contnode)\n elif dispname == '-' or \\\n (domain.name == 'std' and node['reftype'] == 'keyword'):\n # use whatever title was given, but strip prefix\n title = contnode.astext()\n if inv_name is not None and title.startswith(inv_name + ':'):\n newnode.append(contnode.__class__(title[len(inv_name) + 1:],\n title[len(inv_name) + 1:]))\n else:\n newnode.append(contnode)\n else:\n # else use the given display name (used for :ref:)\n newnode.append(contnode.__class__(dispname, dispname))\n return newnode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__resolve_reference_in_domain_by_target__resolve_reference_in_domain_by_target.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__resolve_reference_in_domain_by_target__resolve_reference_in_domain_by_target.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 290, "end_line": 319, "span_ids": ["_resolve_reference_in_domain_by_target"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _resolve_reference_in_domain_by_target(\n inv_name: Optional[str], inventory: Inventory,\n domain: Domain, objtypes: List[str],\n target: str,\n node: pending_xref, contnode: TextElement) -> Optional[Element]:\n for objtype in objtypes:\n if objtype not in inventory:\n # Continue if there's nothing of this kind in the inventory\n continue\n\n if target in inventory[objtype]:\n # Case sensitive match, use it\n data = inventory[objtype][target]\n elif objtype == 'std:term':\n # Check for potential case insensitive matches for terms only\n target_lower = target.lower()\n insensitive_matches = list(filter(lambda k: k.lower() == target_lower,\n inventory[objtype].keys()))\n if insensitive_matches:\n data = inventory[objtype][insensitive_matches[0]]\n else:\n # No case insensitive match either, continue to the next candidate\n continue\n else:\n # Could reach here if we're not a term but have a case insensitive match.\n # This is a fix for terms specifically, but potentially should apply to\n # other types.\n continue\n return _create_element_from_result(domain, inv_name, data, node, contnode)\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__resolve_reference_in_domain__resolve_reference_in_domain.return._resolve_reference_in_dom": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__resolve_reference_in_domain__resolve_reference_in_domain.return._resolve_reference_in_dom", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 322, "end_line": 355, "span_ids": ["_resolve_reference_in_domain"], "tokens": 353}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _resolve_reference_in_domain(env: BuildEnvironment,\n inv_name: Optional[str], inventory: Inventory,\n honor_disabled_refs: bool,\n domain: Domain, objtypes: List[str],\n node: pending_xref, contnode: TextElement\n ) -> Optional[Element]:\n # we adjust the object types for backwards compatibility\n if domain.name == 'std' and 'cmdoption' in objtypes:\n # until Sphinx-1.6, cmdoptions are stored as std:option\n objtypes.append('option')\n if domain.name == 'py' and 'attribute' in objtypes:\n # Since Sphinx-2.1, properties are stored as py:method\n objtypes.append('method')\n\n # the inventory contains domain:type as objtype\n objtypes = [\"{}:{}\".format(domain.name, t) for t in objtypes]\n\n # now that the objtypes list is complete we can remove the disabled ones\n if honor_disabled_refs:\n disabled = env.config.intersphinx_disabled_reftypes\n objtypes = [o for o in objtypes if o not in disabled]\n\n # without qualification\n res = _resolve_reference_in_domain_by_target(inv_name, inventory, domain, objtypes,\n node['reftarget'], node, contnode)\n if res is not None:\n return res\n\n # try with qualification of the current scope instead\n full_qualified_name = domain.get_full_qualified_name(node)\n if full_qualified_name is None:\n return None\n return _resolve_reference_in_domain_by_target(inv_name, inventory, domain, objtypes,\n full_qualified_name, node, contnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__resolve_reference__resolve_reference.if_typ_any_.else_.return._resolve_reference_in_dom": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py__resolve_reference__resolve_reference.if_typ_any_.else_.return._resolve_reference_in_dom", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 358, "end_line": 396, "span_ids": ["_resolve_reference"], "tokens": 330}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _resolve_reference(env: BuildEnvironment, inv_name: Optional[str], inventory: Inventory,\n honor_disabled_refs: bool,\n node: pending_xref, contnode: TextElement) -> Optional[Element]:\n # disabling should only be done if no inventory is given\n honor_disabled_refs = honor_disabled_refs and inv_name is None\n\n if honor_disabled_refs and '*' in env.config.intersphinx_disabled_reftypes:\n return None\n\n typ = node['reftype']\n if typ == 'any':\n for domain_name, domain in env.domains.items():\n if honor_disabled_refs \\\n and (domain_name + \":*\") in env.config.intersphinx_disabled_reftypes:\n continue\n objtypes = list(domain.object_types)\n res = _resolve_reference_in_domain(env, inv_name, inventory,\n honor_disabled_refs,\n domain, objtypes,\n node, contnode)\n if res is not None:\n return res\n return None\n else:\n domain_name = node.get('refdomain')\n if not domain_name:\n # only objects in domains are in the inventory\n return None\n if honor_disabled_refs \\\n and (domain_name + \":*\") in env.config.intersphinx_disabled_reftypes:\n return None\n domain = env.get_domain(domain_name)\n objtypes = domain.objtypes_for_role(typ)\n if not objtypes:\n return None\n return _resolve_reference_in_domain(env, inv_name, inventory,\n honor_disabled_refs,\n domain, objtypes,\n node, contnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_inventory_exists_resolve_reference_any_inventory.return._resolve_reference_env_N": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_inventory_exists_resolve_reference_any_inventory.return._resolve_reference_env_N", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 399, "end_line": 428, "span_ids": ["inventory_exists", "resolve_reference_in_inventory", "resolve_reference_any_inventory"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def inventory_exists(env: BuildEnvironment, inv_name: str) -> bool:\n return inv_name in InventoryAdapter(env).named_inventory\n\n\ndef resolve_reference_in_inventory(env: BuildEnvironment,\n inv_name: str,\n node: pending_xref, contnode: TextElement\n ) -> Optional[Element]:\n \"\"\"Attempt to resolve a missing reference via intersphinx references.\n\n Resolution is tried in the given inventory with the target as is.\n\n Requires ``inventory_exists(env, inv_name)``.\n \"\"\"\n assert inventory_exists(env, inv_name)\n return _resolve_reference(env, inv_name, InventoryAdapter(env).named_inventory[inv_name],\n False, node, contnode)\n\n\ndef resolve_reference_any_inventory(env: BuildEnvironment,\n honor_disabled_refs: bool,\n node: pending_xref, contnode: TextElement\n ) -> Optional[Element]:\n \"\"\"Attempt to resolve a missing reference via intersphinx references.\n\n Resolution is tried with the target as is in any inventory.\n \"\"\"\n return _resolve_reference(env, None, InventoryAdapter(env).main_inventory,\n honor_disabled_refs,\n node, contnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_resolve_reference_detect_inventory_resolve_reference_detect_inventory.return.res_inv": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_resolve_reference_detect_inventory_resolve_reference_detect_inventory.return.res_inv", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 431, "end_line": 457, "span_ids": ["resolve_reference_detect_inventory"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def resolve_reference_detect_inventory(env: BuildEnvironment,\n node: pending_xref, contnode: TextElement\n ) -> Optional[Element]:\n \"\"\"Attempt to resolve a missing reference via intersphinx references.\n\n Resolution is tried first with the target as is in any inventory.\n If this does not succeed, then the target is split by the first ``:``,\n to form ``inv_name:newtarget``. If ``inv_name`` is a named inventory, then resolution\n is tried in that inventory with the new target.\n \"\"\"\n\n # ordinary direct lookup, use data as is\n res = resolve_reference_any_inventory(env, True, node, contnode)\n if res is not None:\n return res\n\n # try splitting the target into 'inv_name:target'\n target = node['reftarget']\n if ':' not in target:\n return None\n inv_name, newtarget = target.split(':', 1)\n if not inventory_exists(env, inv_name):\n return None\n node['reftarget'] = newtarget\n res_inv = resolve_reference_in_inventory(env, inv_name, node, contnode)\n node['reftarget'] = target\n return res_inv", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_missing_reference_IntersphinxDispatcher.role.if_len_role_name_9_and.else_.return.super_role_role_name_l": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_missing_reference_IntersphinxDispatcher.role.if_len_role_name_9_and.else_.return.super_role_role_name_l", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 460, "end_line": 478, "span_ids": ["IntersphinxDispatcher", "missing_reference", "IntersphinxDispatcher.role"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def missing_reference(app: Sphinx, env: BuildEnvironment, node: pending_xref,\n contnode: TextElement) -> Optional[Element]:\n \"\"\"Attempt to resolve a missing reference via intersphinx references.\"\"\"\n\n return resolve_reference_detect_inventory(env, node, contnode)\n\n\nclass IntersphinxDispatcher(CustomReSTDispatcher):\n \"\"\"Custom dispatcher for external role.\n\n This enables :external:***:/:external+***: roles on parsing reST document.\n \"\"\"\n\n def role(self, role_name: str, language_module: ModuleType, lineno: int, reporter: Reporter\n ) -> Tuple[RoleFunction, List[system_message]]:\n if len(role_name) > 9 and role_name.startswith(('external:', 'external+')):\n return IntersphinxRole(role_name), []\n else:\n return super().role(role_name, language_module, lineno, reporter)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole_IntersphinxRole.run.return.result_messages": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole_IntersphinxRole.run.return.result_messages", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 481, "end_line": 510, "span_ids": ["IntersphinxRole", "IntersphinxRole.run"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IntersphinxRole(SphinxRole):\n # group 1: just for the optionality of the inventory name\n # group 2: the inventory name (optional)\n # group 3: the domain:role or role part\n _re_inv_ref = re.compile(r\"(\\+([^:]+))?:(.*)\")\n\n def __init__(self, orig_name: str) -> None:\n self.orig_name = orig_name\n\n def run(self) -> Tuple[List[Node], List[system_message]]:\n assert self.name == self.orig_name.lower()\n inventory, name_suffix = self.get_inventory_and_name_suffix(self.orig_name)\n if inventory and not inventory_exists(self.env, inventory):\n logger.warning(__('inventory for external cross-reference not found: %s'),\n inventory, location=(self.env.docname, self.lineno))\n return [], []\n\n role_name = self.get_role_name(name_suffix)\n if role_name is None:\n logger.warning(__('role for external cross-reference not found: %s'), name_suffix,\n location=(self.env.docname, self.lineno))\n return [], []\n\n result, messages = self.invoke_role(role_name)\n for node in result:\n if isinstance(node, pending_xref):\n node['intersphinx'] = True\n node['inventory'] = inventory\n\n return result, messages", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole.get_inventory_and_name_suffix_IntersphinxRole.get_inventory_and_name_suffix.return.inv_suffix": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole.get_inventory_and_name_suffix_IntersphinxRole.get_inventory_and_name_suffix.return.inv_suffix", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 512, "end_line": 522, "span_ids": ["IntersphinxRole.get_inventory_and_name_suffix"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IntersphinxRole(SphinxRole):\n # group 1: just for the optionality of the inventory name\n # group 2: the inventory name (optional)\n\n def get_inventory_and_name_suffix(self, name: str) -> Tuple[Optional[str], str]:\n assert name.startswith('external'), name\n assert name[8] in ':+', name\n # either we have an explicit inventory name, i.e,\n # :external+inv:role: or\n # :external+inv:domain:role:\n # or we look in all inventories, i.e.,\n # :external:role: or\n # :external:domain:role:\n inv, suffix = IntersphinxRole._re_inv_ref.fullmatch(name, 8).group(2, 3)\n return inv, suffix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole.get_role_name_IntersphinxRole.get_role_name.if_domain_and_self_is_exi.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole.get_role_name_IntersphinxRole.get_role_name.if_domain_and_self_is_exi.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 524, "end_line": 543, "span_ids": ["IntersphinxRole.get_role_name"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IntersphinxRole(SphinxRole):\n # group 1: just for the optionality of the inventory name\n # group 2: the inventory name (optional)\n\n def get_role_name(self, name: str) -> Optional[Tuple[str, str]]:\n names = name.split(':')\n if len(names) == 1:\n # role\n default_domain = self.env.temp_data.get('default_domain')\n domain = default_domain.name if default_domain else None\n role = names[0]\n elif len(names) == 2:\n # domain:role:\n domain = names[0]\n role = names[1]\n else:\n return None\n\n if domain and self.is_existent_role(domain, role):\n return (domain, role)\n elif self.is_existent_role('std', role):\n return ('std', role)\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole.is_existent_role_IntersphinxRole.invoke_role.if_domain_.else_.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRole.is_existent_role_IntersphinxRole.invoke_role.if_domain_.else_.return._", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 545, "end_line": 563, "span_ids": ["IntersphinxRole.is_existent_role", "IntersphinxRole.invoke_role"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IntersphinxRole(SphinxRole):\n # group 1: just for the optionality of the inventory name\n # group 2: the inventory name (optional)\n\n def is_existent_role(self, domain_name: str, role_name: str) -> bool:\n try:\n domain = self.env.get_domain(domain_name)\n if role_name in domain.roles:\n return True\n else:\n return False\n except ExtensionError:\n return False\n\n def invoke_role(self, role: Tuple[str, str]) -> Tuple[List[Node], List[system_message]]:\n domain = self.env.get_domain(role[0])\n if domain:\n role_func = domain.role(role[1])\n\n return role_func(':'.join(role), self.rawtext, self.text, self.lineno,\n self.inliner, self.options, self.content)\n else:\n return [], []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRoleResolver_IntersphinxRoleResolver.run.for_node_in_self_document.if_newnode_is_None_.else_.node_replace_self_newnode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_IntersphinxRoleResolver_IntersphinxRoleResolver.run.for_node_in_self_document.if_newnode_is_None_.else_.node_replace_self_newnode", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 566, "end_line": 592, "span_ids": ["IntersphinxRoleResolver", "IntersphinxRoleResolver.run"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IntersphinxRoleResolver(ReferencesResolver):\n \"\"\"pending_xref node resolver for intersphinx role.\n\n This resolves pending_xref nodes generated by :intersphinx:***: role.\n \"\"\"\n\n default_priority = ReferencesResolver.default_priority - 1\n\n def run(self, **kwargs: Any) -> None:\n for node in self.document.traverse(pending_xref):\n if 'intersphinx' not in node:\n continue\n contnode = cast(nodes.TextElement, node[0].deepcopy())\n inv_name = node['inventory']\n if inv_name is not None:\n assert inventory_exists(self.env, inv_name)\n newnode = resolve_reference_in_inventory(self.env, inv_name, node, contnode)\n else:\n newnode = resolve_reference_any_inventory(self.env, False, node, contnode)\n if newnode is None:\n typ = node['reftype']\n msg = (__('external %s:%s reference target not found: %s') %\n (node['refdomain'], typ, node['reftarget']))\n logger.warning(msg, location=node, type='ref', subtype=typ)\n node.replace_self(contnode)\n else:\n node.replace_self(newnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_install_dispatcher_normalize_intersphinx_mapping.for_key_value_in_config_.try_.except_Exception_as_exc_.config_intersphinx_mappin": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/intersphinx.py_install_dispatcher_normalize_intersphinx_mapping.for_key_value_in_config_.try_.except_Exception_as_exc_.config_intersphinx_mappin", "embedding": null, "metadata": {"file_path": "sphinx/ext/intersphinx.py", "file_name": "intersphinx.py", "file_type": "text/x-python", "category": "implementation", "start_line": 595, "end_line": 626, "span_ids": ["normalize_intersphinx_mapping", "install_dispatcher"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def install_dispatcher(app: Sphinx, docname: str, source: List[str]) -> None:\n \"\"\"Enable IntersphinxDispatcher.\n\n .. note:: The installed dispatcher will uninstalled on disabling sphinx_domain\n automatically.\n \"\"\"\n dispatcher = IntersphinxDispatcher()\n dispatcher.enable()\n\n\ndef normalize_intersphinx_mapping(app: Sphinx, config: Config) -> None:\n for key, value in config.intersphinx_mapping.copy().items():\n try:\n if isinstance(value, (list, tuple)):\n # new format\n name, (uri, inv) = key, value\n if not isinstance(name, str):\n logger.warning(__('intersphinx identifier %r is not string. Ignored'),\n name)\n config.intersphinx_mapping.pop(key)\n continue\n else:\n # old format, no name\n name, uri, inv = None, key, value\n\n if not isinstance(inv, tuple):\n config.intersphinx_mapping[key] = (name, (uri, (inv,)))\n else:\n config.intersphinx_mapping[key] = (name, (uri, inv))\n except Exception as exc:\n logger.warning(__('Failed to read intersphinx_mapping[%s], ignored: %r'), key, exc)\n config.intersphinx_mapping.pop(key)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/linkcode.py__Add_external_links_to__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/linkcode.py__Add_external_links_to__", "embedding": null, "metadata": {"file_path": "sphinx/ext/linkcode.py", "file_name": "linkcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 72, "span_ids": ["setup", "docstring", "doctree_read", "imports", "LinkcodeError"], "tokens": 479}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Add external links to module code in Python object descriptions.\"\"\"\n\nfrom typing import Any, Dict, Set\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\n\nimport sphinx\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.errors import SphinxError\nfrom sphinx.locale import _\n\n\nclass LinkcodeError(SphinxError):\n category = \"linkcode error\"\n\n\ndef doctree_read(app: Sphinx, doctree: Node) -> None:\n env = app.builder.env\n\n resolve_target = getattr(env.config, 'linkcode_resolve', None)\n if not callable(env.config.linkcode_resolve):\n raise LinkcodeError(\n \"Function `linkcode_resolve` is not given in conf.py\")\n\n domain_keys = {\n 'py': ['module', 'fullname'],\n 'c': ['names'],\n 'cpp': ['names'],\n 'js': ['object', 'fullname'],\n }\n\n for objnode in list(doctree.findall(addnodes.desc)):\n domain = objnode.get('domain')\n uris: Set[str] = set()\n for signode in objnode:\n if not isinstance(signode, addnodes.desc_signature):\n continue\n\n # Convert signode to a specified format\n info = {}\n for key in domain_keys.get(domain, []):\n value = signode.get(key)\n if not value:\n value = ''\n info[key] = value\n if not info:\n continue\n\n # Call user code to resolve the link\n uri = resolve_target(domain, info)\n if not uri:\n # no source\n continue\n\n if uri in uris or not uri:\n # only one link per name, please\n continue\n uris.add(uri)\n\n inline = nodes.inline('', _('[source]'), classes=['viewcode-link'])\n onlynode = addnodes.only(expr='html')\n onlynode += nodes.reference('', '', inline, internal=False, refuri=uri)\n signode += onlynode\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.connect('doctree-read', doctree_read)\n app.add_config_value('linkcode_resolve', None, '')\n return {'version': sphinx.__display_version__, 'parallel_read_safe': True}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py__Allow_MathJax___to_be_html_visit_math.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py__Allow_MathJax___to_be_html_visit_math.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/ext/mathjax.py", "file_name": "mathjax.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 33, "span_ids": ["html_visit_math", "impl", "docstring", "imports"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Allow `MathJax`_ to be used to display math in Sphinx's HTML writer.\n\nThis requires the MathJax JavaScript library on your webserver/computer.\n\n.. _MathJax: https://www.mathjax.org/\n\"\"\"\n\nimport json\nfrom typing import Any, Dict, cast\n\nfrom docutils import nodes\n\nimport sphinx\nfrom sphinx.application import Sphinx\nfrom sphinx.domains.math import MathDomain\nfrom sphinx.errors import ExtensionError\nfrom sphinx.locale import _\nfrom sphinx.util.math import get_node_equation_number\nfrom sphinx.writers.html import HTMLTranslator\n\n# more information for mathjax secure url is here:\n# https://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn\nMATHJAX_URL = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'\n\nlogger = sphinx.util.logging.getLogger(__name__)\n\n\ndef html_visit_math(self: HTMLTranslator, node: nodes.math) -> None:\n self.body.append(self.starttag(node, 'span', '', CLASS='math notranslate nohighlight'))\n self.body.append(self.builder.config.mathjax_inline[0] +\n self.encode(node.astext()) +\n self.builder.config.mathjax_inline[1] + '</span>')\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py_install_mathjax_install_mathjax.if_app_registry_html_asse.app_add_js_file_app_confi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/mathjax.py_install_mathjax_install_mathjax.if_app_registry_html_asse.app_add_js_file_app_confi", "embedding": null, "metadata": {"file_path": "sphinx/ext/mathjax.py", "file_name": "mathjax.py", "file_type": "text/x-python", "category": "implementation", "start_line": 68, "end_line": 100, "span_ids": ["install_mathjax"], "tokens": 392}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def install_mathjax(app: Sphinx, pagename: str, templatename: str, context: Dict,\n event_arg: Any) -> None:\n if app.builder.format != 'html' or app.builder.math_renderer_name != 'mathjax': # type: ignore # NOQA\n return\n if not app.config.mathjax_path:\n raise ExtensionError('mathjax_path config value must be set for the '\n 'mathjax extension to work')\n\n domain = cast(MathDomain, app.env.get_domain('math'))\n if app.registry.html_assets_policy == 'always' or domain.has_equations(pagename):\n # Enable mathjax only if equations exists\n if app.config.mathjax2_config:\n if app.config.mathjax_path == MATHJAX_URL:\n logger.warning(\n 'mathjax_config/mathjax2_config does not work '\n 'for the current MathJax version, use mathjax3_config instead')\n body = 'MathJax.Hub.Config(%s)' % json.dumps(app.config.mathjax2_config)\n app.add_js_file(None, type='text/x-mathjax-config', body=body)\n if app.config.mathjax3_config:\n body = 'window.MathJax = %s' % json.dumps(app.config.mathjax3_config)\n app.add_js_file(None, body=body)\n\n options = {}\n if app.config.mathjax_options:\n options.update(app.config.mathjax_options)\n if 'async' not in options and 'defer' not in options:\n if app.config.mathjax3_config:\n # Load MathJax v3 via \"defer\" method\n options['defer'] = 'defer'\n else:\n # Load other MathJax via \"async\" method\n options['async'] = 'async'\n app.add_js_file(app.config.mathjax_path, **options)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__Support_for_NumPy_and__Config": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/__init__.py__Support_for_NumPy_and__Config", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 286, "span_ids": ["Config", "docstring", "imports"], "tokens": 68}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Support for NumPy and Google style docstrings.\"\"\"\n\nfrom typing import Any, Dict, List\n\nfrom sphinx import __display_version__ as __version__\nfrom sphinx.application import Sphinx\nfrom sphinx.ext.napoleon.docstring import GoogleDocstring, NumpyDocstring\nfrom sphinx.util import inspect\n\n\nclass Config:", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__Classes_for_docstring___convert_type_spec.return._type": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py__Classes_for_docstring___convert_type_spec.return._type", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 59, "span_ids": ["impl", "_convert_type_spec", "docstring", "imports"], "tokens": 603}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Classes for docstring parsing and formatting.\"\"\"\n\nimport collections\nimport inspect\nimport re\nimport warnings\nfrom functools import partial\nfrom typing import Any, Callable, Dict, List, Tuple, Type, Union\n\nfrom sphinx.application import Sphinx\nfrom sphinx.config import Config as SphinxConfig\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.ext.napoleon.iterators import modify_iter\nfrom sphinx.locale import _, __\nfrom sphinx.util import logging\nfrom sphinx.util.inspect import stringify_annotation\nfrom sphinx.util.typing import get_type_hints\n\nlogger = logging.getLogger(__name__)\n\n_directive_regex = re.compile(r'\\.\\. \\S+::')\n_google_section_regex = re.compile(r'^(\\s|\\w)+:\\s*$')\n_google_typed_arg_regex = re.compile(r'(.+?)\\(\\s*(.*[^\\s]+)\\s*\\)')\n_numpy_section_regex = re.compile(r'^[=\\-`:\\'\"~^_*+#<>]{2,}\\s*$')\n_single_colon_regex = re.compile(r'(?<!:):(?!:)')\n_xref_or_code_regex = re.compile(\n r'((?::(?:[a-zA-Z0-9]+[\\-_+:.])*[a-zA-Z0-9]+:`.+?`)|'\n r'(?:``.+?``))')\n_xref_regex = re.compile(\n r'(?:(?::(?:[a-zA-Z0-9]+[\\-_+:.])*[a-zA-Z0-9]+:)?`.+?`)'\n)\n_bullet_list_regex = re.compile(r'^(\\*|\\+|\\-)(\\s+\\S|\\s*$)')\n_enumerated_list_regex = re.compile(\n r'^(?P<paren>\\()?'\n r'(\\d+|#|[ivxlcdm]+|[IVXLCDM]+|[a-zA-Z])'\n r'(?(paren)\\)|\\.)(\\s+\\S|\\s*$)')\n_token_regex = re.compile(\n r\"(,\\sor\\s|\\sor\\s|\\sof\\s|:\\s|\\sto\\s|,\\sand\\s|\\sand\\s|,\\s\"\n r\"|[{]|[}]\"\n r'|\"(?:\\\\\"|[^\"])*\"'\n r\"|'(?:\\\\'|[^'])*')\"\n)\n_default_regex = re.compile(\n r\"^default[^_0-9A-Za-z].*$\",\n)\n_SINGLETONS = (\"None\", \"True\", \"False\", \"Ellipsis\")\n\n\ndef _convert_type_spec(_type: str, translations: Dict[str, str] = {}) -> str:\n \"\"\"Convert type specification to reference in reST.\"\"\"\n if _type in translations:\n return translations[_type]\n else:\n if _type == 'None':\n return ':obj:`None`'\n else:\n return ':class:`%s`' % _type\n\n return _type", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_keyword_arguments_section_GoogleDocstring._parse_parameters_section.if_self__config_napoleon_.else_.return.self__format_fields___Pa": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/docstring.py_GoogleDocstring._parse_keyword_arguments_section_GoogleDocstring._parse_parameters_section.if_self__config_napoleon_.else_.return.self__format_fields___Pa", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/docstring.py", "file_name": "docstring.py", "file_type": "text/x-python", "category": "implementation", "start_line": 686, "end_line": 727, "span_ids": ["GoogleDocstring._parse_notes_section", "GoogleDocstring._parse_keyword_arguments_section", "GoogleDocstring._parse_methods_section", "GoogleDocstring._parse_other_parameters_section", "GoogleDocstring._parse_parameters_section"], "tokens": 418}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstring:\n\n def _parse_keyword_arguments_section(self, section: str) -> List[str]:\n fields = self._consume_fields()\n if self._config.napoleon_use_keyword:\n return self._format_docutils_params(\n fields,\n field_role=\"keyword\",\n type_role=\"kwtype\")\n else:\n return self._format_fields(_('Keyword Arguments'), fields)\n\n def _parse_methods_section(self, section: str) -> List[str]:\n lines: List[str] = []\n for _name, _type, _desc in self._consume_fields(parse_type=False):\n lines.append('.. method:: %s' % _name)\n if self._opt and 'noindex' in self._opt:\n lines.append(' :noindex:')\n if _desc:\n lines.extend([''] + self._indent(_desc, 3))\n lines.append('')\n return lines\n\n def _parse_notes_section(self, section: str) -> List[str]:\n use_admonition = self._config.napoleon_use_admonition_for_notes\n return self._parse_generic_section(_('Notes'), use_admonition)\n\n def _parse_other_parameters_section(self, section: str) -> List[str]:\n if self._config.napoleon_use_param:\n # Allow to declare multiple parameters at once (ex: x, y: int)\n fields = self._consume_fields(multiple=True)\n return self._format_docutils_params(fields)\n else:\n fields = self._consume_fields()\n return self._format_fields(_('Other Parameters'), fields)\n\n def _parse_parameters_section(self, section: str) -> List[str]:\n if self._config.napoleon_use_param:\n # Allow to declare multiple parameters at once (ex: x, y: int)\n fields = self._consume_fields(multiple=True)\n return self._format_docutils_params(fields)\n else:\n fields = self._consume_fields()\n return self._format_fields(_('Parameters'), fields)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py__A_collection_of_helpfu_peek_iter.has_next.return.self_peek_self_senti": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/napoleon/iterators.py__A_collection_of_helpfu_peek_iter.has_next.return.self_peek_self_senti", "embedding": null, "metadata": {"file_path": "sphinx/ext/napoleon/iterators.py", "file_name": "iterators.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 79, "span_ids": ["peek_iter.__next__", "docstring", "peek_iter.__iter__", "peek_iter._fillcache", "imports", "peek_iter", "peek_iter.has_next"], "tokens": 568}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"A collection of helpful iterators.\"\"\"\n\nimport collections\nfrom typing import Any, Iterable, Optional\n\n\nclass peek_iter:\n \"\"\"An iterator object that supports peeking ahead.\n\n Parameters\n ----------\n o : iterable or callable\n `o` is interpreted very differently depending on the presence of\n `sentinel`.\n\n If `sentinel` is not given, then `o` must be a collection object\n which supports either the iteration protocol or the sequence protocol.\n\n If `sentinel` is given, then `o` must be a callable object.\n\n sentinel : any value, optional\n If given, the iterator will call `o` with no arguments for each\n call to its `next` method; if the value returned is equal to\n `sentinel`, :exc:`StopIteration` will be raised, otherwise the\n value will be returned.\n\n See Also\n --------\n `peek_iter` can operate as a drop in replacement for the built-in\n `iter <https://docs.python.org/3/library/functions.html#iter>`_ function.\n\n Attributes\n ----------\n sentinel\n The value used to indicate the iterator is exhausted. If `sentinel`\n was not given when the `peek_iter` was instantiated, then it will\n be set to a new object instance: ``object()``.\n\n \"\"\"\n def __init__(self, *args: Any) -> None:\n \"\"\"__init__(o, sentinel=None)\"\"\"\n self._iterable: Iterable = iter(*args)\n self._cache: collections.deque = collections.deque()\n if len(args) == 2:\n self.sentinel = args[1]\n else:\n self.sentinel = object()\n\n def __iter__(self) -> \"peek_iter\":\n return self\n\n def __next__(self, n: int = None) -> Any:\n return self.next(n)\n\n def _fillcache(self, n: Optional[int]) -> None:\n \"\"\"Cache `n` items. If `n` is 0 or None, then 1 item is cached.\"\"\"\n if not n:\n n = 1\n try:\n while len(self._cache) < n:\n self._cache.append(next(self._iterable)) # type: ignore\n except StopIteration:\n while len(self._cache) < n:\n self._cache.append(self.sentinel)\n\n def has_next(self) -> bool:\n \"\"\"Determine if iterator is exhausted.\n\n Returns\n -------\n bool\n True if iterator has more items, False otherwise.\n\n Note\n ----\n Will never raise :exc:`StopIteration`.\n\n \"\"\"\n return self.peek() != self.sentinel", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py__Allow_todos_to_be_inse_todolist.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py__Allow_todos_to_be_inse_todolist.pass", "embedding": null, "metadata": {"file_path": "sphinx/ext/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["impl", "todo_node", "todolist", "docstring", "imports"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Allow todos to be inserted into your documentation.\n\nInclusion of todos can be switched of by a configuration variable.\nThe todolist directive collects all todos of your project and lists them along\nwith a backlink to the original location.\n\"\"\"\n\nfrom typing import Any, Dict, List, Tuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\nfrom docutils.parsers.rst import directives\nfrom docutils.parsers.rst.directives.admonitions import BaseAdmonition\n\nimport sphinx\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.domains import Domain\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.errors import NoUri\nfrom sphinx.locale import _, __\nfrom sphinx.util import logging, texescape\nfrom sphinx.util.docutils import SphinxDirective, new_document\nfrom sphinx.util.typing import OptionSpec\nfrom sphinx.writers.html import HTMLTranslator\nfrom sphinx.writers.latex import LaTeXTranslator\n\nlogger = logging.getLogger(__name__)\n\n\nclass todo_node(nodes.Admonition, nodes.Element):\n pass\n\n\nclass todolist(nodes.General, nodes.Element):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_TodoDomain_TodoList.run.return._todolist_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_TodoDomain_TodoList.run.return._todolist_", "embedding": null, "metadata": {"file_path": "sphinx/ext/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 72, "end_line": 113, "span_ids": ["TodoDomain.todos", "TodoDomain.merge_domaindata", "TodoList.run", "TodoList", "TodoDomain", "TodoDomain.process_doc", "TodoDomain.clear_doc"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TodoDomain(Domain):\n name = 'todo'\n label = 'todo'\n\n @property\n def todos(self) -> Dict[str, List[todo_node]]:\n return self.data.setdefault('todos', {})\n\n def clear_doc(self, docname: str) -> None:\n self.todos.pop(docname, None)\n\n def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:\n for docname in docnames:\n self.todos[docname] = otherdata['todos'][docname]\n\n def process_doc(self, env: BuildEnvironment, docname: str,\n document: nodes.document) -> None:\n todos = self.todos.setdefault(docname, [])\n for todo in document.findall(todo_node):\n env.app.emit('todo-defined', todo)\n todos.append(todo)\n\n if env.config.todo_emit_warnings:\n logger.warning(__(\"TODO entry found: %s\"), todo[1].astext(),\n location=todo)\n\n\nclass TodoList(SphinxDirective):\n \"\"\"\n A list of all todo entries.\n \"\"\"\n\n has_content = False\n required_arguments = 0\n optional_arguments = 0\n final_argument_whitespace = False\n option_spec: OptionSpec = {}\n\n def run(self) -> List[Node]:\n # Simply insert an empty todolist node which will be replaced later\n # when process_todo_nodes is called\n return [todolist('')]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_TodoListProcessor_TodoListProcessor.process.for_node_in_list_doctree_.node_replace_self_content": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_TodoListProcessor_TodoListProcessor.process.for_node_in_list_doctree_.node_replace_self_content", "embedding": null, "metadata": {"file_path": "sphinx/ext/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 116, "end_line": 149, "span_ids": ["TodoListProcessor.process", "TodoListProcessor"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TodoListProcessor:\n def __init__(self, app: Sphinx, doctree: nodes.document, docname: str) -> None:\n self.builder = app.builder\n self.config = app.config\n self.env = app.env\n self.domain = cast(TodoDomain, app.env.get_domain('todo'))\n self.document = new_document('')\n\n self.process(doctree, docname)\n\n def process(self, doctree: nodes.document, docname: str) -> None:\n todos: List[todo_node] = sum(self.domain.todos.values(), [])\n for node in list(doctree.findall(todolist)):\n if not self.config.todo_include_todos:\n node.parent.remove(node)\n continue\n\n if node.get('ids'):\n content: List[Element] = [nodes.target()]\n else:\n content = []\n\n for todo in todos:\n # Create a copy of the todo node\n new_todo = todo.deepcopy()\n new_todo['ids'].clear()\n\n self.resolve_reference(new_todo, docname)\n content.append(new_todo)\n\n todo_ref = self.create_todo_reference(todo, docname)\n content.append(todo_ref)\n\n node.replace_self(content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_TodoListProcessor.create_todo_reference_TodoListProcessor.resolve_reference.self_document_remove_todo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_TodoListProcessor.create_todo_reference_TodoListProcessor.resolve_reference.self_document_remove_todo", "embedding": null, "metadata": {"file_path": "sphinx/ext/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 151, "end_line": 188, "span_ids": ["TodoListProcessor.create_todo_reference", "TodoListProcessor.resolve_reference"], "tokens": 339}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TodoListProcessor:\n\n def create_todo_reference(self, todo: todo_node, docname: str) -> nodes.paragraph:\n if self.config.todo_link_only:\n description = _('<<original entry>>')\n else:\n description = (_('(The <<original entry>> is located in %s, line %d.)') %\n (todo.source, todo.line))\n\n prefix = description[:description.find('<<')]\n suffix = description[description.find('>>') + 2:]\n\n para = nodes.paragraph(classes=['todo-source'])\n para += nodes.Text(prefix, prefix)\n\n # Create a reference\n linktext = nodes.emphasis(_('original entry'), _('original entry'))\n reference = nodes.reference('', '', linktext, internal=True)\n try:\n reference['refuri'] = self.builder.get_relative_uri(docname, todo['docname'])\n reference['refuri'] += '#' + todo['ids'][0]\n except NoUri:\n # ignore if no URI can be determined, e.g. for LaTeX output\n pass\n\n para += reference\n para += nodes.Text(suffix, suffix)\n\n return para\n\n def resolve_reference(self, todo: todo_node, docname: str) -> None:\n \"\"\"Resolve references in the todo content.\"\"\"\n for node in todo.findall(addnodes.pending_xref):\n if 'refdoc' in node:\n node['refdoc'] = docname\n\n # Note: To resolve references, it is needed to wrap it with document node\n self.document += todo\n self.env.resolve_references(self.document, docname, self.builder)\n self.document.remove(todo)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_visit_todo_node_latex_depart_todo_node.self_body_append_end_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/todo.py_visit_todo_node_latex_depart_todo_node.self_body_append_end_s", "embedding": null, "metadata": {"file_path": "sphinx/ext/todo.py", "file_name": "todo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 191, "end_line": 216, "span_ids": ["latex_visit_todo_node", "depart_todo_node", "latex_depart_todo_node", "visit_todo_node"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def visit_todo_node(self: HTMLTranslator, node: todo_node) -> None:\n if self.config.todo_include_todos:\n self.visit_admonition(node)\n else:\n raise nodes.SkipNode\n\n\ndef depart_todo_node(self: HTMLTranslator, node: todo_node) -> None:\n self.depart_admonition(node)\n\n\ndef latex_visit_todo_node(self: LaTeXTranslator, node: todo_node) -> None:\n if self.config.todo_include_todos:\n self.body.append('\\n\\\\begin{sphinxadmonition}{note}{')\n self.body.append(self.hypertarget_to(node))\n\n title_node = cast(nodes.title, node[0])\n title = texescape.escape(title_node.astext(), self.config.latex_engine)\n self.body.append('%s:}' % title)\n node.pop(0)\n else:\n raise nodes.SkipNode\n\n\ndef latex_depart_todo_node(self: LaTeXTranslator, node: todo_node) -> None:\n self.body.append('\\\\end{sphinxadmonition}\\n')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py__Add_links_to_module_co_viewcode_anchor._Node_for_viewcode_anch": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py__Add_links_to_module_co_viewcode_anchor._Node_for_viewcode_anch", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["impl", "viewcode_anchor", "docstring", "imports"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Add links to module code in Python object descriptions.\"\"\"\n\nimport posixpath\nimport traceback\nimport warnings\nfrom os import path\nfrom typing import Any, Dict, Generator, Iterable, Optional, Set, Tuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\n\nimport sphinx\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import Builder\nfrom sphinx.builders.html import StandaloneHTMLBuilder\nfrom sphinx.deprecation import RemovedInSphinx50Warning\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.locale import _, __\nfrom sphinx.pycode import ModuleAnalyzer\nfrom sphinx.transforms.post_transforms import SphinxPostTransform\nfrom sphinx.util import get_full_modname, logging, status_iterator\nfrom sphinx.util.nodes import make_refnode\n\nlogger = logging.getLogger(__name__)\n\n\nOUTPUT_DIRNAME = '_modules'\n\n\nclass viewcode_anchor(Element):\n \"\"\"Node for viewcode anchors.\n\n This node will be processed in the resolving phase.\n For viewcode supported builders, they will be all converted to the anchors.\n For not supported builders, they will be removed.\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_doctree_read.for_objnode_in_list_doctr_doctree_read.for_objnode_in_list_doctr.for_signode_in_objnode_.signode_viewcode_ancho": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_doctree_read.for_objnode_in_list_doctr_doctree_read.for_objnode_in_list_doctr.for_signode_in_objnode_.signode_viewcode_ancho", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 103, "end_line": 130, "span_ids": ["doctree_read"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def doctree_read(app: Sphinx, doctree: Node) -> None:\n # ... other code\n\n for objnode in list(doctree.findall(addnodes.desc)):\n if objnode.get('domain') != 'py':\n continue\n names: Set[str] = set()\n for signode in objnode:\n if not isinstance(signode, addnodes.desc_signature):\n continue\n modname = signode.get('module')\n fullname = signode.get('fullname')\n refname = modname\n if env.config.viewcode_follow_imported_members:\n new_modname = app.emit_firstresult(\n 'viewcode-follow-imported', modname, fullname,\n )\n if not new_modname:\n new_modname = _get_full_modname(app, modname, fullname)\n modname = new_modname\n if not modname:\n continue\n fullname = signode.get('fullname')\n if not has_tag(modname, fullname, env.docname, refname):\n continue\n if fullname in names:\n # only one link per name, please\n continue\n names.add(fullname)\n pagename = posixpath.join(OUTPUT_DIRNAME, modname.replace('.', '/'))\n signode += viewcode_anchor(reftarget=pagename, refid=fullname, refdoc=env.docname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_env_merge_info_env_merge_info.for_modname_entry_in_oth.if_modname_not_in_env__vi.else_.if_env__viewcode_modules_.for_fullname_docname_in_.if_fullname_not_in_used_.used_fullname_docname": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_env_merge_info_env_merge_info.for_modname_entry_in_oth.if_modname_not_in_env__vi.else_.if_env__viewcode_modules_.for_fullname_docname_in_.if_fullname_not_in_used_.used_fullname_docname", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 133, "end_line": 149, "span_ids": ["env_merge_info"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def env_merge_info(app: Sphinx, env: BuildEnvironment, docnames: Iterable[str],\n other: BuildEnvironment) -> None:\n if not hasattr(other, '_viewcode_modules'):\n return\n # create a _viewcode_modules dict on the main environment\n if not hasattr(env, '_viewcode_modules'):\n env._viewcode_modules = {} # type: ignore\n # now merge in the information from the subprocess\n for modname, entry in other._viewcode_modules.items(): # type: ignore\n if modname not in env._viewcode_modules: # type: ignore\n env._viewcode_modules[modname] = entry # type: ignore\n else:\n if env._viewcode_modules[modname]: # type: ignore\n used = env._viewcode_modules[modname][2] # type: ignore\n for fullname, docname in entry[2].items():\n if fullname not in used:\n used[fullname] = docname", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_env_purge_doc_ViewcodeAnchorTransform.remove_viewcode_anchors.for_node_in_list_self_doc.node_parent_remove_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/ext/viewcode.py_env_purge_doc_ViewcodeAnchorTransform.remove_viewcode_anchors.for_node_in_list_self_doc.node_parent_remove_node_", "embedding": null, "metadata": {"file_path": "sphinx/ext/viewcode.py", "file_name": "viewcode.py", "file_type": "text/x-python", "category": "implementation", "start_line": 152, "end_line": 187, "span_ids": ["ViewcodeAnchorTransform.remove_viewcode_anchors", "ViewcodeAnchorTransform.run", "ViewcodeAnchorTransform", "ViewcodeAnchorTransform.convert_viewcode_anchors", "env_purge_doc"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def env_purge_doc(app: Sphinx, env: BuildEnvironment, docname: str) -> None:\n modules = getattr(env, '_viewcode_modules', {})\n\n for modname, entry in list(modules.items()):\n if entry is False:\n continue\n\n code, tags, used, refname = entry\n for fullname in list(used):\n if used[fullname] == docname:\n used.pop(fullname)\n\n if len(used) == 0:\n modules.pop(modname)\n\n\nclass ViewcodeAnchorTransform(SphinxPostTransform):\n \"\"\"Convert or remove viewcode_anchor nodes depends on builder.\"\"\"\n default_priority = 100\n\n def run(self, **kwargs: Any) -> None:\n if is_supported_builder(self.app.builder):\n self.convert_viewcode_anchors()\n else:\n self.remove_viewcode_anchors()\n\n def convert_viewcode_anchors(self) -> None:\n for node in self.document.findall(viewcode_anchor):\n anchor = nodes.inline('', _('[source]'), classes=['viewcode-link'])\n refnode = make_refnode(self.app.builder, node['refdoc'], node['reftarget'],\n node['refid'], anchor)\n node.replace_self(refnode)\n\n def remove_viewcode_anchors(self) -> None:\n for node in list(self.document.findall(viewcode_anchor)):\n node.parent.remove(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/extension.py__Utilities_for_Sphinx_e_Extension.__init__.self.parallel_write_safe.kwargs_pop_parallel_writ": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/extension.py__Utilities_for_Sphinx_e_Extension.__init__.self.parallel_write_safe.kwargs_pop_parallel_writ", "embedding": null, "metadata": {"file_path": "sphinx/extension.py", "file_name": "extension.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 33, "span_ids": ["impl", "impl:2", "docstring", "Extension", "imports", "imports:7"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utilities for Sphinx extensions.\"\"\"\n\nfrom typing import TYPE_CHECKING, Any, Dict\n\nfrom packaging.version import InvalidVersion, Version\n\nfrom sphinx.config import Config\nfrom sphinx.errors import VersionRequirementError\nfrom sphinx.locale import __\nfrom sphinx.util import logging\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\nlogger = logging.getLogger(__name__)\n\n\nclass Extension:\n def __init__(self, name: str, module: Any, **kwargs: Any) -> None:\n self.name = name\n self.module = module\n self.metadata = kwargs\n self.version = kwargs.pop('version', 'unknown version')\n\n # The extension supports parallel read or not. The default value\n # is ``None``. It means the extension does not tell the status.\n # It will be warned on parallel reading.\n self.parallel_read_safe = kwargs.pop('parallel_read_safe', None)\n\n # The extension supports parallel write or not. The default value\n # is ``True``. Sphinx writes parallelly documents even if\n # the extension does not tell its status.\n self.parallel_write_safe = kwargs.pop('parallel_write_safe', True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py__Highlight_code_blocks__if_version_parse_pygments._LATEX_ADD_STYLES__LAT": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/highlighting.py__Highlight_code_blocks__if_version_parse_pygments._LATEX_ADD_STYLES__LAT", "embedding": null, "metadata": {"file_path": "sphinx/highlighting.py", "file_name": "highlighting.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 60, "span_ids": ["impl", "docstring", "imports"], "tokens": 621}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Highlight code blocks using Pygments.\"\"\"\n\nfrom functools import partial\nfrom importlib import import_module\nfrom typing import Any, Dict\n\nfrom packaging import version\nfrom pygments import __version__ as pygmentsversion\nfrom pygments import highlight\nfrom pygments.filters import ErrorToken\nfrom pygments.formatter import Formatter\nfrom pygments.formatters import HtmlFormatter, LatexFormatter\nfrom pygments.lexer import Lexer\nfrom pygments.lexers import (CLexer, Python3Lexer, PythonConsoleLexer, PythonLexer, RstLexer,\n TextLexer, get_lexer_by_name, guess_lexer)\nfrom pygments.style import Style\nfrom pygments.styles import get_style_by_name\nfrom pygments.util import ClassNotFound\n\nfrom sphinx.locale import __\nfrom sphinx.pygments_styles import NoneStyle, SphinxStyle\nfrom sphinx.util import logging, texescape\n\nlogger = logging.getLogger(__name__)\n\nlexers: Dict[str, Lexer] = {}\nlexer_classes: Dict[str, Lexer] = {\n 'none': partial(TextLexer, stripnl=False),\n 'python': partial(PythonLexer, stripnl=False),\n 'python3': partial(Python3Lexer, stripnl=False),\n 'pycon': partial(PythonConsoleLexer, stripnl=False),\n 'pycon3': partial(PythonConsoleLexer, python3=True, stripnl=False),\n 'rest': partial(RstLexer, stripnl=False),\n 'c': partial(CLexer, stripnl=False),\n}\n\n\nescape_hl_chars = {ord('\\\\'): '\\\\PYGZbs{}',\n ord('{'): '\\\\PYGZob{}',\n ord('}'): '\\\\PYGZcb{}'}\n\n# used if Pygments is available\n# use textcomp quote to get a true single quote\n_LATEX_ADD_STYLES = r'''\n\\renewcommand\\PYGZsq{\\textquotesingle}\n'''\n# fix extra space between lines when Pygments highlighting uses \\fcolorbox\n# add a {..} to limit \\fboxsep scope, and force \\fcolorbox use correct value\n# cf pygments #1708 which makes this unneeded for Pygments > 2.7.4\n_LATEX_ADD_STYLES_FIXPYG = r'''\n\\makeatletter\n% fix for Pygments <= 2.7.4\n\\let\\spx@original@fcolorbox\\fcolorbox\n\\def\\spx@fixpyg@fcolorbox{\\fboxsep-\\fboxrule\\spx@original@fcolorbox}\n\\def\\PYG#1#2{\\PYG@reset\\PYG@toks#1+\\relax+%\n {\\let\\fcolorbox\\spx@fixpyg@fcolorbox\\PYG@do{#2}}}\n\\makeatother\n'''\nif version.parse(pygmentsversion).release <= (2, 7, 4):\n _LATEX_ADD_STYLES += _LATEX_ADD_STYLES_FIXPYG", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py__Input_Output_files__logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/io.py__Input_Output_files__logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/io.py", "file_name": "io.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["impl", "impl:2", "docstring", "imports:21", "imports"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Input/Output files\"\"\"\nimport codecs\nfrom typing import TYPE_CHECKING, Any, List, Type\n\nfrom docutils import nodes\nfrom docutils.core import Publisher\nfrom docutils.frontend import Values\nfrom docutils.io import FileInput, Input, NullOutput\nfrom docutils.parsers import Parser\nfrom docutils.parsers.rst import Parser as RSTParser\nfrom docutils.readers import standalone\nfrom docutils.transforms import Transform\nfrom docutils.transforms.references import DanglingReferences\nfrom docutils.writers import UnfilteredWriter\n\nfrom sphinx import addnodes\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.transforms import (AutoIndexUpgrader, DoctreeReadEvent, FigureAligner,\n SphinxTransformer)\nfrom sphinx.transforms.i18n import (Locale, PreserveTranslatableMessages,\n RemoveTranslatableInline)\nfrom sphinx.transforms.references import SphinxDomains\nfrom sphinx.util import UnicodeDecodeErrorHandler, get_filetype, logging\nfrom sphinx.util.docutils import LoggingReporter\nfrom sphinx.versioning import UIDTransform\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py__Glue_code_for_the_jinj__toint.try_.except_ValueError_.return.0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/jinja2glue.py__Glue_code_for_the_jinj__toint.try_.except_ValueError_.return.0", "embedding": null, "metadata": {"file_path": "sphinx/jinja2glue.py", "file_name": "jinja2glue.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["imports:12", "impl", "_toint", "impl:2", "docstring", "imports:14", "imports", "impl:3", "imports:13", "_tobool"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Glue code for the jinja2 templating engine.\"\"\"\n\nfrom os import path\nfrom pprint import pformat\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Tuple, Union\n\nfrom jinja2 import BaseLoader, FileSystemLoader, TemplateNotFound\nfrom jinja2.environment import Environment\nfrom jinja2.sandbox import SandboxedEnvironment\nfrom jinja2.utils import open_if_exists\n\nfrom sphinx.application import TemplateBridge\nfrom sphinx.theming import Theme\nfrom sphinx.util import logging\nfrom sphinx.util.osutil import mtimes_of_files\n\ntry:\n from jinja2.utils import pass_context\nexcept ImportError:\n from jinja2 import contextfunction as pass_context\n\nif TYPE_CHECKING:\n from sphinx.builders import Builder\n\n\ndef _tobool(val: str) -> bool:\n if isinstance(val, str):\n return val.lower() in ('true', '1', 'yes', 'on')\n return bool(val)\n\n\ndef _toint(val: str) -> int:\n try:\n return int(val)\n except ValueError:\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py__Locale_utilities___TranslationProxy.__repr__.try_.except_Exception_.return._s_broken_self___cl": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/locale/__init__.py__Locale_utilities___TranslationProxy.__repr__.try_.except_Exception_.return._s_broken_self___cl", "embedding": null, "metadata": {"file_path": "sphinx/locale/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 95, "span_ids": ["_TranslationProxy.__dir__", "_TranslationProxy.__getstate__", "_TranslationProxy.__setstate__", "_TranslationProxy.__new__", "docstring", "_TranslationProxy.__rmul__", "_TranslationProxy.__radd__", "_TranslationProxy.__copy__", "_TranslationProxy.__init__", "_TranslationProxy.__mod__", "_TranslationProxy.__mul__", "_TranslationProxy.__str__", "_TranslationProxy.__repr__", "_TranslationProxy.__add__", "imports", "_TranslationProxy.__getnewargs__", "_TranslationProxy", "_TranslationProxy.__getattr__", "_TranslationProxy.data", "_TranslationProxy.encode", "_TranslationProxy.__rmod__"], "tokens": 737}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Locale utilities.\"\"\"\n\nimport gettext\nimport locale\nfrom collections import UserString, defaultdict\nfrom gettext import NullTranslations\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union\n\n\nclass _TranslationProxy(UserString):\n \"\"\"\n Class for proxy strings from gettext translations. This is a helper for the\n lazy_* functions from this module.\n\n The proxy implementation attempts to be as complete as possible, so that\n the lazy objects should mostly work as expected, for example for sorting.\n\n This inherits from UserString because some docutils versions use UserString\n for their Text nodes, which then checks its argument for being either a\n basestring or UserString, otherwise calls str() -- not unicode() -- on it.\n \"\"\"\n __slots__ = ('_func', '_args')\n\n def __new__(cls, func: Callable, *args: str) -> object: # type: ignore\n if not args:\n # not called with \"function\" and \"arguments\", but a plain string\n return str(func)\n return object.__new__(cls)\n\n def __getnewargs__(self) -> Tuple[str]:\n return (self._func,) + self._args # type: ignore\n\n def __init__(self, func: Callable, *args: str) -> None:\n self._func = func\n self._args = args\n\n @property\n def data(self) -> str: # type: ignore\n return self._func(*self._args)\n\n # replace function from UserString; it instantiates a self.__class__\n # for the encoding result\n\n def encode(self, encoding: str = None, errors: str = None) -> bytes: # type: ignore\n if encoding:\n if errors:\n return self.data.encode(encoding, errors)\n else:\n return self.data.encode(encoding)\n else:\n return self.data.encode()\n\n def __dir__(self) -> List[str]:\n return dir(str)\n\n def __str__(self) -> str:\n return str(self.data)\n\n def __add__(self, other: str) -> str: # type: ignore\n return self.data + other\n\n def __radd__(self, other: str) -> str:\n return other + self.data\n\n def __mod__(self, other: str) -> str: # type: ignore\n return self.data % other\n\n def __rmod__(self, other: str) -> str:\n return other % self.data\n\n def __mul__(self, other: Any) -> str: # type: ignore\n return self.data * other\n\n def __rmul__(self, other: Any) -> str:\n return other * self.data\n\n def __getattr__(self, name: str) -> Any:\n if name == '__members__':\n return self.__dir__()\n return getattr(self.data, name)\n\n def __getstate__(self) -> Tuple[Callable, Tuple[str, ...]]:\n return self._func, self._args\n\n def __setstate__(self, tup: Tuple[Callable, Tuple[str]]) -> None:\n self._func, self._args = tup\n\n def __copy__(self) -> \"_TranslationProxy\":\n return self\n\n def __repr__(self) -> str:\n try:\n return 'i' + repr(str(self.data))\n except Exception:\n return '<%s broken>' % self.__class__.__name__", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/parsers.py__A_Base_class_for_addit_if_TYPE_CHECKING_.from_sphinx_application_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/parsers.py__A_Base_class_for_addit_if_TYPE_CHECKING_.from_sphinx_application_i", "embedding": null, "metadata": {"file_path": "sphinx/parsers.py", "file_name": "parsers.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["impl", "docstring", "imports", "imports:14"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"A Base class for additional parsers.\"\"\"\n\nimport warnings\nfrom typing import TYPE_CHECKING, Any, Dict, List, Type, Union\n\nimport docutils.parsers\nimport docutils.parsers.rst\nfrom docutils import nodes\nfrom docutils.parsers.rst import states\nfrom docutils.statemachine import StringList\nfrom docutils.transforms import Transform\nfrom docutils.transforms.universal import SmartQuotes\n\nfrom sphinx.config import Config\nfrom sphinx.deprecation import RemovedInSphinx50Warning\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.util.rst import append_epilog, prepend_prolog\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/project.py__Utility_function_and_c_Project.restore.self.docnames.other_docnames": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/project.py__Utility_function_and_c_Project.restore.self.docnames.other_docnames", "embedding": null, "metadata": {"file_path": "sphinx/project.py", "file_name": "project.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["impl", "Project", "docstring", "Project.restore", "imports"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utility function and classes for Sphinx projects.\"\"\"\n\nimport os\nfrom glob import glob\nfrom typing import Dict, List, Optional, Set\n\nfrom sphinx.locale import __\nfrom sphinx.util import get_matching_files, logging, path_stabilize\nfrom sphinx.util.matching import compile_matchers\nfrom sphinx.util.osutil import SEP, relpath\n\nlogger = logging.getLogger(__name__)\nEXCLUDE_PATHS = ['**/_sources', '.#*', '**/.#*', '*.lproj/**']\n\n\nclass Project:\n \"\"\"A project is the source code set of the Sphinx document(s).\"\"\"\n\n def __init__(self, srcdir: str, source_suffix: Dict[str, str]) -> None:\n #: Source directory.\n self.srcdir = srcdir\n\n #: source_suffix. Same as :confval:`source_suffix`.\n self.source_suffix = source_suffix\n\n #: The name of documents belongs to this project.\n self.docnames: Set[str] = set()\n\n def restore(self, other: \"Project\") -> None:\n \"\"\"Take over a result of last build.\"\"\"\n self.docnames = other.docnames", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py__Utilities_parsing_and__ModuleAnalyzer.get_module_source.return.filename_None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py__Utilities_parsing_and__ModuleAnalyzer.get_module_source.return.filename_None", "embedding": null, "metadata": {"file_path": "sphinx/pycode/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 76, "span_ids": ["ModuleAnalyzer.get_module_source", "ModuleAnalyzer", "docstring", "imports"], "tokens": 671}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utilities parsing and analyzing Python code.\"\"\"\n\nimport re\nimport tokenize\nimport warnings\nfrom collections import OrderedDict\nfrom importlib import import_module\nfrom inspect import Signature\nfrom io import StringIO\nfrom os import path\nfrom typing import IO, Any, Dict, List, Optional, Tuple\nfrom zipfile import ZipFile\n\nfrom sphinx.deprecation import RemovedInSphinx50Warning\nfrom sphinx.errors import PycodeError\nfrom sphinx.pycode.parser import Parser\n\n\nclass ModuleAnalyzer:\n annotations: Dict[Tuple[str, str], str]\n attr_docs: Dict[Tuple[str, str], List[str]]\n finals: List[str]\n overloads: Dict[str, List[Signature]]\n tagorder: Dict[str, int]\n tags: Dict[str, Tuple[str, int, int]]\n\n # cache for analyzer objects -- caches both by module and file name\n cache: Dict[Tuple[str, str], Any] = {}\n\n @staticmethod\n def get_module_source(modname: str) -> Tuple[Optional[str], Optional[str]]:\n \"\"\"Try to find the source code for a module.\n\n Returns ('filename', 'source'). One of it can be None if\n no filename or source found\n \"\"\"\n try:\n mod = import_module(modname)\n except Exception as err:\n raise PycodeError('error importing %r' % modname, err) from err\n loader = getattr(mod, '__loader__', None)\n filename = getattr(mod, '__file__', None)\n if loader and getattr(loader, 'get_source', None):\n # prefer Native loader, as it respects #coding directive\n try:\n source = loader.get_source(modname)\n if source:\n # no exception and not None - it must be module source\n return filename, source\n except ImportError:\n pass # Try other \"source-mining\" methods\n if filename is None and loader and getattr(loader, 'get_filename', None):\n # have loader, but no filename\n try:\n filename = loader.get_filename(modname)\n except ImportError as err:\n raise PycodeError('error getting filename for %r' % modname, err) from err\n if filename is None:\n # all methods for getting filename failed, so raise...\n raise PycodeError('no source found for module %r' % modname)\n filename = path.normpath(path.abspath(filename))\n if filename.lower().endswith(('.pyo', '.pyc')):\n filename = filename[:-1]\n if not path.isfile(filename) and path.isfile(filename + 'w'):\n filename += 'w'\n elif not filename.lower().endswith(('.py', '.pyw')):\n raise PycodeError('source is not a .py file: %r' % filename)\n elif ('.egg' + path.sep) in filename:\n pat = '(?<=\\\\.egg)' + re.escape(path.sep)\n eggpath, _ = re.split(pat, filename, 1)\n if path.isfile(eggpath):\n return filename, None\n\n if not path.isfile(filename):\n raise PycodeError('source file is not present: %r' % filename)\n return filename, None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.analyze_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/__init__.py_ModuleAnalyzer.analyze_", "embedding": null, "metadata": {"file_path": "sphinx/pycode/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 144, "end_line": 178, "span_ids": ["ModuleAnalyzer.find_tags", "ModuleAnalyzer.analyze", "ModuleAnalyzer.find_attr_docs"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ModuleAnalyzer:\n\n def analyze(self) -> None:\n \"\"\"Analyze the source code.\"\"\"\n if self._analyzed:\n return None\n\n try:\n parser = Parser(self.code)\n parser.parse()\n\n self.attr_docs = OrderedDict()\n for (scope, comment) in parser.comments.items():\n if comment:\n self.attr_docs[scope] = comment.splitlines() + ['']\n else:\n self.attr_docs[scope] = ['']\n\n self.annotations = parser.annotations\n self.finals = parser.finals\n self.overloads = parser.overloads\n self.tags = parser.definitions\n self.tagorder = parser.deforders\n self._analyzed = True\n except Exception as exc:\n raise PycodeError('parsing %r failed: %r' % (self.srcname, exc)) from exc\n\n def find_attr_docs(self) -> Dict[Tuple[str, str], List[str]]:\n \"\"\"Find class and module-level attributes and their documentation.\"\"\"\n self.analyze()\n return self.attr_docs\n\n def find_tags(self) -> Dict[str, Tuple[str, int, int]]:\n \"\"\"Find class, function and method definitions and their location.\"\"\"\n self.analyze()\n return self.tags", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__Helpers_for_AST_Abstr_OPERATORS._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py__Helpers_for_AST_Abstr_OPERATORS._", "embedding": null, "metadata": {"file_path": "sphinx/pycode/ast.py", "file_name": "ast.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["impl", "imports:5", "impl:2", "impl:5", "docstring", "imports:4", "imports", "docstring:2", "imports:3", "impl:4"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Helpers for AST (Abstract Syntax Tree).\"\"\"\n\nimport sys\nfrom typing import Dict, List, Optional, Type, overload\n\nif sys.version_info > (3, 8):\n import ast\nelse:\n try:\n # use typed_ast module if installed\n from typed_ast import ast3 as ast\n except ImportError:\n import ast # type: ignore\n\n\nOPERATORS: Dict[Type[ast.AST], str] = {\n ast.Add: \"+\",\n ast.And: \"and\",\n ast.BitAnd: \"&\",\n ast.BitOr: \"|\",\n ast.BitXor: \"^\",\n ast.Div: \"/\",\n ast.FloorDiv: \"//\",\n ast.Invert: \"~\",\n ast.LShift: \"<<\",\n ast.MatMult: \"@\",\n ast.Mult: \"*\",\n ast.Mod: \"%\",\n ast.Not: \"not\",\n ast.Pow: \"**\",\n ast.Or: \"or\",\n ast.RShift: \">>\",\n ast.Sub: \"-\",\n ast.UAdd: \"+\",\n ast.USub: \"-\",\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py_parse_unparse_3.return._UnparseVisitor_code_vis": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/ast.py_parse_unparse_3.return._UnparseVisitor_code_vis", "embedding": null, "metadata": {"file_path": "sphinx/pycode/ast.py", "file_name": "ast.py", "file_type": "text/x-python", "category": "implementation", "start_line": 39, "end_line": 73, "span_ids": ["unparse_2", "unparse_3", "unparse", "parse"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse(code: str, mode: str = 'exec') -> \"ast.AST\":\n \"\"\"Parse the *code* using the built-in ast or typed_ast libraries.\n\n This enables \"type_comments\" feature if possible.\n \"\"\"\n try:\n # type_comments parameter is available on py38+\n return ast.parse(code, mode=mode, type_comments=True) # type: ignore\n except SyntaxError:\n # Some syntax error found. To ignore invalid type comments, retry parsing without\n # type_comments parameter (refs: https://github.com/sphinx-doc/sphinx/issues/8652).\n return ast.parse(code, mode=mode)\n except TypeError:\n # fallback to ast module.\n # typed_ast is used to parse type_comments if installed.\n return ast.parse(code, mode=mode)\n\n\n@overload\ndef unparse(node: None, code: str = '') -> None:\n ...\n\n\n@overload\ndef unparse(node: ast.AST, code: str = '') -> str:\n ...\n\n\ndef unparse(node: Optional[ast.AST], code: str = '') -> Optional[str]:\n \"\"\"Unparse an AST to string.\"\"\"\n if node is None:\n return None\n elif isinstance(node, str):\n return node\n return _UnparseVisitor(code).visit(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py__Utilities_parsing_and__get_assign_targets.if_isinstance_node_ast_A.else_._type_ignore": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py__Utilities_parsing_and__get_assign_targets.if_isinstance_node_ast_A.else_._type_ignore", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["impl", "filter_whitespace", "docstring", "imports", "get_assign_targets"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utilities parsing and analyzing Python code.\"\"\"\nimport inspect\nimport itertools\nimport re\nimport tokenize\nfrom collections import OrderedDict\nfrom inspect import Signature\nfrom token import DEDENT, INDENT, NAME, NEWLINE, NUMBER, OP, STRING\nfrom tokenize import COMMENT, NL\nfrom typing import Any, Dict, List, Optional, Tuple\n\nfrom sphinx.pycode.ast import ast # for py37 or older\nfrom sphinx.pycode.ast import parse, unparse\n\ncomment_re = re.compile('^\\\\s*#: ?(.*)\\r?\\n?$')\nindent_re = re.compile('^\\\\s*$')\nemptyline_re = re.compile('^\\\\s*(#.*)?$')\n\n\ndef filter_whitespace(code: str) -> str:\n return code.replace('\\f', ' ') # replace FF (form feed) with whitespace\n\n\ndef get_assign_targets(node: ast.AST) -> List[ast.expr]:\n \"\"\"Get list of targets from Assign and AnnAssign node.\"\"\"\n if isinstance(node, ast.Assign):\n return node.targets\n else:\n return [node.target] # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker_VariableCommentPicker.is_overload.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker_VariableCommentPicker.is_overload.return.False", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 209, "end_line": 301, "span_ids": ["VariableCommentPicker.is_overload", "VariableCommentPicker.add_overload_entry", "VariableCommentPicker.add_variable_comment", "VariableCommentPicker", "VariableCommentPicker.is_final", "VariableCommentPicker.add_final_entry", "VariableCommentPicker.get_qualname_for", "VariableCommentPicker.add_variable_annotation", "VariableCommentPicker.add_entry"], "tokens": 770}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VariableCommentPicker(ast.NodeVisitor):\n \"\"\"Python source code parser to pick up variable comments.\"\"\"\n\n def __init__(self, buffers: List[str], encoding: str) -> None:\n self.counter = itertools.count()\n self.buffers = buffers\n self.encoding = encoding\n self.context: List[str] = []\n self.current_classes: List[str] = []\n self.current_function: Optional[ast.FunctionDef] = None\n self.comments: Dict[Tuple[str, str], str] = OrderedDict()\n self.annotations: Dict[Tuple[str, str], str] = {}\n self.previous: Optional[ast.AST] = None\n self.deforders: Dict[str, int] = {}\n self.finals: List[str] = []\n self.overloads: Dict[str, List[Signature]] = {}\n self.typing: Optional[str] = None\n self.typing_final: Optional[str] = None\n self.typing_overload: Optional[str] = None\n super().__init__()\n\n def get_qualname_for(self, name: str) -> Optional[List[str]]:\n \"\"\"Get qualified name for given object as a list of string(s).\"\"\"\n if self.current_function:\n if self.current_classes and self.context[-1] == \"__init__\":\n # store variable comments inside __init__ method of classes\n return self.context[:-1] + [name]\n else:\n return None\n else:\n return self.context + [name]\n\n def add_entry(self, name: str) -> None:\n qualname = self.get_qualname_for(name)\n if qualname:\n self.deforders[\".\".join(qualname)] = next(self.counter)\n\n def add_final_entry(self, name: str) -> None:\n qualname = self.get_qualname_for(name)\n if qualname:\n self.finals.append(\".\".join(qualname))\n\n def add_overload_entry(self, func: ast.FunctionDef) -> None:\n # avoid circular import problem\n from sphinx.util.inspect import signature_from_ast\n qualname = self.get_qualname_for(func.name)\n if qualname:\n overloads = self.overloads.setdefault(\".\".join(qualname), [])\n overloads.append(signature_from_ast(func))\n\n def add_variable_comment(self, name: str, comment: str) -> None:\n qualname = self.get_qualname_for(name)\n if qualname:\n basename = \".\".join(qualname[:-1])\n self.comments[(basename, name)] = comment\n\n def add_variable_annotation(self, name: str, annotation: ast.AST) -> None:\n qualname = self.get_qualname_for(name)\n if qualname:\n basename = \".\".join(qualname[:-1])\n self.annotations[(basename, name)] = unparse(annotation)\n\n def is_final(self, decorators: List[ast.expr]) -> bool:\n final = []\n if self.typing:\n final.append('%s.final' % self.typing)\n if self.typing_final:\n final.append(self.typing_final)\n\n for decorator in decorators:\n try:\n if unparse(decorator) in final:\n return True\n except NotImplementedError:\n pass\n\n return False\n\n def is_overload(self, decorators: List[ast.expr]) -> bool:\n overload = []\n if self.typing:\n overload.append('%s.overload' % self.typing)\n if self.typing_overload:\n overload.append(self.typing_overload)\n\n for decorator in decorators:\n try:\n if unparse(decorator) in overload:\n return True\n except NotImplementedError:\n pass\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.get_self_VariableCommentPicker.visit_ImportFrom.for_name_in_node_names_.if_node_module_typing.elif_node_module_typi.self.typing_overload.name_asname_or_name_name": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pycode/parser.py_VariableCommentPicker.get_self_VariableCommentPicker.visit_ImportFrom.for_name_in_node_names_.if_node_module_typing.elif_node_module_typi.self.typing_overload.name_asname_or_name_name", "embedding": null, "metadata": {"file_path": "sphinx/pycode/parser.py", "file_name": "parser.py", "file_type": "text/x-python", "category": "implementation", "start_line": 303, "end_line": 343, "span_ids": ["VariableCommentPicker.visit_ImportFrom", "VariableCommentPicker.get_self", "VariableCommentPicker.visit", "VariableCommentPicker.visit_Import", "VariableCommentPicker.get_line"], "tokens": 390}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VariableCommentPicker(ast.NodeVisitor):\n\n def get_self(self) -> Optional[ast.arg]:\n \"\"\"Returns the name of the first argument if in a function.\"\"\"\n if self.current_function and self.current_function.args.args:\n return self.current_function.args.args[0]\n elif (self.current_function and\n getattr(self.current_function.args, 'posonlyargs', None)):\n # for py38+\n return self.current_function.args.posonlyargs[0] # type: ignore\n else:\n return None\n\n def get_line(self, lineno: int) -> str:\n \"\"\"Returns specified line.\"\"\"\n return self.buffers[lineno - 1]\n\n def visit(self, node: ast.AST) -> None:\n \"\"\"Updates self.previous to the given node.\"\"\"\n super().visit(node)\n self.previous = node\n\n def visit_Import(self, node: ast.Import) -> None:\n \"\"\"Handles Import node and record the order of definitions.\"\"\"\n for name in node.names:\n self.add_entry(name.asname or name.name)\n\n if name.name == 'typing':\n self.typing = name.asname or name.name\n elif name.name == 'typing.final':\n self.typing_final = name.asname or name.name\n elif name.name == 'typing.overload':\n self.typing_overload = name.asname or name.name\n\n def visit_ImportFrom(self, node: ast.ImportFrom) -> None:\n \"\"\"Handles Import node and record the order of definitions.\"\"\"\n for name in node.names:\n self.add_entry(name.asname or name.name)\n\n if node.module == 'typing' and name.name == 'final':\n self.typing_final = name.asname or name.name\n elif node.module == 'typing' and name.name == 'overload':\n self.typing_overload = name.asname or name.name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pygments_styles.py__Sphinx_theme_specific__SphinxStyle.styles_update_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/pygments_styles.py__Sphinx_theme_specific__SphinxStyle.styles_update_", "embedding": null, "metadata": {"file_path": "sphinx/pygments_styles.py", "file_name": "pygments_styles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 27, "span_ids": ["NoneStyle", "SphinxStyle", "docstring", "imports"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Sphinx theme specific highlighting styles.\"\"\"\n\nfrom pygments.style import Style\nfrom pygments.styles.friendly import FriendlyStyle\nfrom pygments.token import (Comment, Error, Generic, Keyword, Name, Number, Operator, String,\n Whitespace)\n\n\nclass NoneStyle(Style):\n \"\"\"Style without any styling.\"\"\"\n\n\nclass SphinxStyle(Style):\n \"\"\"\n Like friendly, but a bit darker to enhance contrast on the green\n background.\n \"\"\"\n\n background_color = '#eeffcc'\n default_style = ''\n\n styles = FriendlyStyle.styles\n styles.update({\n Generic.Output: '#333',\n Comment: 'italic #408090',\n Number: '#208050',\n })", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py__Sphinx_component_regis_EXTENSION_BLACKLIST._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py__Sphinx_component_regis_EXTENSION_BLACKLIST._", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 47, "span_ids": ["imports:28", "imports:12", "impl", "impl:2", "docstring", "docstring:2", "imports", "imports:13", "impl:3", "impl:4"], "tokens": 347}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Sphinx component registry.\"\"\"\n\nimport traceback\nimport warnings\nfrom importlib import import_module\nfrom types import MethodType\nfrom typing import (TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Optional, Tuple, Type,\n Union)\n\nfrom docutils import nodes\nfrom docutils.io import Input\nfrom docutils.nodes import Element, Node, TextElement\nfrom docutils.parsers import Parser\nfrom docutils.parsers.rst import Directive\nfrom docutils.transforms import Transform\n\ntry: # Python < 3.10 (backport)\n from importlib_metadata import entry_points\nexcept ImportError:\n from importlib.metadata import entry_points\n\nfrom sphinx.builders import Builder\nfrom sphinx.config import Config\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.domains import Domain, Index, ObjType\nfrom sphinx.domains.std import GenericObject, Target\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.errors import ExtensionError, SphinxError, VersionRequirementError\nfrom sphinx.extension import Extension\nfrom sphinx.locale import __\nfrom sphinx.parsers import Parser as SphinxParser\nfrom sphinx.roles import XRefRole\nfrom sphinx.util import logging\nfrom sphinx.util.logging import prefixed_warnings\nfrom sphinx.util.typing import RoleFunction, TitleGetter\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n from sphinx.ext.autodoc import Documenter\n\nlogger = logging.getLogger(__name__)\n\n# list of deprecated extensions. Keys are extension name.\n# Values are Sphinx version that merge the extension.\nEXTENSION_BLACKLIST = {\n \"sphinxjp.themecore\": \"1.2\"\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry_SphinxComponentRegistry.__init__.self.transforms._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry_SphinxComponentRegistry.__init__.self.transforms._", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 50, "end_line": 126, "span_ids": ["SphinxComponentRegistry"], "tokens": 748}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n def __init__(self) -> None:\n #: special attrgetter for autodoc; class object -> attrgetter\n self.autodoc_attrgettrs: Dict[Type, Callable[[Any, str, Any], Any]] = {}\n\n #: builders; a dict of builder name -> bulider class\n self.builders: Dict[str, Type[Builder]] = {}\n\n #: autodoc documenters; a dict of documenter name -> documenter class\n self.documenters: Dict[str, Type[Documenter]] = {}\n\n #: css_files; a list of tuple of filename and attributes\n self.css_files: List[Tuple[str, Dict[str, Any]]] = []\n\n #: domains; a dict of domain name -> domain class\n self.domains: Dict[str, Type[Domain]] = {}\n\n #: additional directives for domains\n #: a dict of domain name -> dict of directive name -> directive\n self.domain_directives: Dict[str, Dict[str, Any]] = {}\n\n #: additional indices for domains\n #: a dict of domain name -> list of index class\n self.domain_indices: Dict[str, List[Type[Index]]] = {}\n\n #: additional object types for domains\n #: a dict of domain name -> dict of objtype name -> objtype\n self.domain_object_types: Dict[str, Dict[str, ObjType]] = {}\n\n #: additional roles for domains\n #: a dict of domain name -> dict of role name -> role impl.\n self.domain_roles: Dict[str, Dict[str, Union[RoleFunction, XRefRole]]] = {}\n\n #: additional enumerable nodes\n #: a dict of node class -> tuple of figtype and title_getter function\n self.enumerable_nodes: Dict[Type[Node], Tuple[str, TitleGetter]] = {}\n\n #: HTML inline and block math renderers\n #: a dict of name -> tuple of visit function and depart function\n self.html_inline_math_renderers: Dict[str, Tuple[Callable, Callable]] = {}\n self.html_block_math_renderers: Dict[str, Tuple[Callable, Callable]] = {}\n\n #: HTML assets\n self.html_assets_policy: str = 'per_page'\n\n #: HTML themes\n self.html_themes: Dict[str, str] = {}\n\n #: js_files; list of JS paths or URLs\n self.js_files: List[Tuple[str, Dict[str, Any]]] = []\n\n #: LaTeX packages; list of package names and its options\n self.latex_packages: List[Tuple[str, str]] = []\n\n self.latex_packages_after_hyperref: List[Tuple[str, str]] = []\n\n #: post transforms; list of transforms\n self.post_transforms: List[Type[Transform]] = []\n\n #: source paresrs; file type -> parser class\n self.source_parsers: Dict[str, Type[Parser]] = {}\n\n #: source inputs; file type -> input class\n self.source_inputs: Dict[str, Type[Input]] = {}\n\n #: source suffix: suffix -> file type\n self.source_suffix: Dict[str, str] = {}\n\n #: custom translators; builder name -> translator class\n self.translators: Dict[str, Type[nodes.NodeVisitor]] = {}\n\n #: custom handlers for translators\n #: a dict of builder name -> dict of node name -> visitor and departure functions\n self.translation_handlers: Dict[str, Dict[str, Tuple[Callable, Callable]]] = {}\n\n #: additional transforms; list of transforms\n self.transforms: List[Type[Transform]] = []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_html_math_renderer_SphinxComponentRegistry.add_html_theme.self_html_themes_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/registry.py_SphinxComponentRegistry.add_html_math_renderer_SphinxComponentRegistry.add_html_theme.self_html_themes_name_", "embedding": null, "metadata": {"file_path": "sphinx/registry.py", "file_name": "registry.py", "file_type": "text/x-python", "category": "implementation", "start_line": 397, "end_line": 409, "span_ids": ["SphinxComponentRegistry.add_html_math_renderer", "SphinxComponentRegistry.add_html_theme"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxComponentRegistry:\n\n def add_html_math_renderer(self, name: str,\n inline_renderers: Tuple[Callable, Callable],\n block_renderers: Tuple[Callable, Callable]) -> None:\n logger.debug('[app] adding html_math_renderer: %s, %r, %r',\n name, inline_renderers, block_renderers)\n if name in self.html_inline_math_renderers:\n raise ExtensionError(__('math renderer %s is already registered') % name)\n\n self.html_inline_math_renderers[name] = inline_renderers\n self.html_block_math_renderers[name] = block_renderers\n\n def add_html_theme(self, name: str, theme_path: str) -> None:\n self.html_themes[name] = theme_path", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__Handlers_for_additiona_generic_docroles._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__Handlers_for_additiona_generic_docroles._", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["impl", "imports:10", "impl:2", "docstring", "imports"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Handlers for additional ReST roles.\"\"\"\n\nimport re\nfrom typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type\n\nfrom docutils import nodes, utils\nfrom docutils.nodes import Element, Node, TextElement, system_message\n\nfrom sphinx import addnodes\nfrom sphinx.locale import _, __\nfrom sphinx.util import ws_re\nfrom sphinx.util.docutils import ReferenceRole, SphinxRole\nfrom sphinx.util.typing import RoleFunction\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n from sphinx.environment import BuildEnvironment\n\n\ngeneric_docroles = {\n 'command': addnodes.literal_strong,\n 'dfn': nodes.emphasis,\n 'kbd': nodes.literal,\n 'mailheader': addnodes.literal_emphasis,\n 'makevar': addnodes.literal_strong,\n 'manpage': addnodes.manpage,\n 'mimetype': addnodes.literal_emphasis,\n 'newsgroup': addnodes.literal_emphasis,\n 'program': addnodes.literal_strong, # XXX should be an x-ref\n 'regexp': nodes.literal,\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__generic_cross_refere_XRefRole.update_title_and_target.return.title_target": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__generic_cross_refere_XRefRole.update_title_and_target.return.title_target", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 34, "end_line": 87, "span_ids": ["impl:2", "XRefRole", "XRefRole.update_title_and_target"], "tokens": 472}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# -- generic cross-reference role ----------------------------------------------\n\nclass XRefRole(ReferenceRole):\n \"\"\"\n A generic cross-referencing role. To create a callable that can be used as\n a role function, create an instance of this class.\n\n The general features of this role are:\n\n * Automatic creation of a reference and a content node.\n * Optional separation of title and target with `title <target>`.\n * The implementation is a class rather than a function to make\n customization easier.\n\n Customization can be done in two ways:\n\n * Supplying constructor parameters:\n * `fix_parens` to normalize parentheses (strip from target, and add to\n title if configured)\n * `lowercase` to lowercase the target\n * `nodeclass` and `innernodeclass` select the node classes for\n the reference and the content node\n\n * Subclassing and overwriting `process_link()` and/or `result_nodes()`.\n \"\"\"\n\n nodeclass: Type[Element] = addnodes.pending_xref\n innernodeclass: Type[TextElement] = nodes.literal\n\n def __init__(self, fix_parens: bool = False, lowercase: bool = False,\n nodeclass: Type[Element] = None, innernodeclass: Type[TextElement] = None,\n warn_dangling: bool = False) -> None:\n self.fix_parens = fix_parens\n self.lowercase = lowercase\n self.warn_dangling = warn_dangling\n if nodeclass is not None:\n self.nodeclass = nodeclass\n if innernodeclass is not None:\n self.innernodeclass = innernodeclass\n\n super().__init__()\n\n def update_title_and_target(self, title: str, target: str) -> Tuple[str, str]:\n if not self.has_explicit_title:\n if title.endswith('()'):\n # remove parentheses\n title = title[:-2]\n if self.config.add_function_parentheses:\n # add them back to all occurrences if configured\n title += '()'\n # remove parentheses from the target too\n if target.endswith('()'):\n target = target[:-2]\n return title, target", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole.run_XRefRole.create_non_xref_node.return.self_result_nodes_self_in": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_XRefRole.run_XRefRole.create_non_xref_node.return.self_result_nodes_self_in", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 89, "end_line": 109, "span_ids": ["XRefRole.create_non_xref_node", "XRefRole.run"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class XRefRole(ReferenceRole):\n\n def run(self) -> Tuple[List[Node], List[system_message]]:\n if ':' not in self.name:\n self.refdomain, self.reftype = '', self.name\n self.classes = ['xref', self.reftype]\n else:\n self.refdomain, self.reftype = self.name.split(':', 1)\n self.classes = ['xref', self.refdomain, '%s-%s' % (self.refdomain, self.reftype)]\n\n if self.disabled:\n return self.create_non_xref_node()\n else:\n return self.create_xref_node()\n\n def create_non_xref_node(self) -> Tuple[List[Node], List[system_message]]:\n text = utils.unescape(self.text[1:])\n if self.fix_parens:\n self.has_explicit_title = False # treat as implicit\n text, target = self.update_title_and_target(text, \"\")\n\n node = self.innernodeclass(self.rawtext, text, classes=self.classes)\n return self.result_nodes(self.inliner.document, self.env, node, is_ref=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_PEP_PEP.build_uri.if_len_ret_2_.else_.return.base_url_pep_04d_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_PEP_PEP.build_uri.if_len_ret_2_.else_.return.base_url_pep_04d_", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 166, "end_line": 198, "span_ids": ["PEP.run", "PEP.build_uri", "PEP"], "tokens": 337}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PEP(ReferenceRole):\n def run(self) -> Tuple[List[Node], List[system_message]]:\n target_id = 'index-%s' % self.env.new_serialno('index')\n entries = [('single', _('Python Enhancement Proposals; PEP %s') % self.target,\n target_id, '', None)]\n\n index = addnodes.index(entries=entries)\n target = nodes.target('', '', ids=[target_id])\n self.inliner.document.note_explicit_target(target)\n\n try:\n refuri = self.build_uri()\n reference = nodes.reference('', '', internal=False, refuri=refuri, classes=['pep'])\n if self.has_explicit_title:\n reference += nodes.strong(self.title, self.title)\n else:\n title = \"PEP \" + self.title\n reference += nodes.strong(title, title)\n except ValueError:\n msg = self.inliner.reporter.error(__('invalid PEP number %s') % self.target,\n line=self.lineno)\n prb = self.inliner.problematic(self.rawtext, self.rawtext, msg)\n return [prb], [msg]\n\n return [index, target, reference], []\n\n def build_uri(self) -> str:\n base_url = self.inliner.document.settings.pep_base_url\n ret = self.target.split('#', 1)\n if len(ret) == 2:\n return base_url + 'pep-%04d/#%s' % (int(ret[0]), ret[1])\n else:\n return base_url + 'pep-%04d/' % int(ret[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__amp_re_parens_re.re_compile_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__amp_re_parens_re.re_compile_r_", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 235, "end_line": 265, "span_ids": ["impl:4", "impl:6", "MenuSelection.run", "MenuSelection", "GUILabel", "GUILabel.run"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_amp_re = re.compile(r'(?<!&)&(?![&\\s])')\n\n\nclass GUILabel(SphinxRole):\n amp_re = re.compile(r'(?<!&)&(?![&\\s])')\n\n def run(self) -> Tuple[List[Node], List[system_message]]:\n node = nodes.inline(rawtext=self.rawtext, classes=[self.name])\n spans = self.amp_re.split(self.text)\n node += nodes.Text(spans.pop(0))\n for span in spans:\n span = span.replace('&&', '&')\n\n letter = nodes.Text(span[0])\n accelerator = nodes.inline('', '', letter, classes=['accelerator'])\n node += accelerator\n node += nodes.Text(span[1:])\n\n return [node], []\n\n\nclass MenuSelection(GUILabel):\n BULLET_CHARACTER = '\\N{TRIANGULAR BULLET}'\n\n def run(self) -> Tuple[List[Node], List[system_message]]:\n self.text = self.text.replace('-->', self.BULLET_CHARACTER)\n return super().run()\n\n\n_litvar_re = re.compile('{([^}]+)}')\nparens_re = re.compile(r'(\\\\*{|\\\\*})')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__abbr_re_specific_docroles._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py__abbr_re_specific_docroles._", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 318, "end_line": 349, "span_ids": ["Abbreviation", "impl:12", "Abbreviation.run", "impl:10"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_abbr_re = re.compile(r'\\((.*)\\)$', re.S)\n\n\nclass Abbreviation(SphinxRole):\n abbr_re = re.compile(r'\\((.*)\\)$', re.S)\n\n def run(self) -> Tuple[List[Node], List[system_message]]:\n options = self.options.copy()\n matched = self.abbr_re.search(self.text)\n if matched:\n text = self.text[:matched.start()].strip()\n options['explanation'] = matched.group(1)\n else:\n text = self.text\n\n return [nodes.abbreviation(self.rawtext, text, **options)], []\n\n\nspecific_docroles: Dict[str, RoleFunction] = {\n # links to download references\n 'download': XRefRole(nodeclass=addnodes.download_reference),\n # links to anything\n 'any': AnyXRefRole(warn_dangling=True),\n\n 'pep': PEP(),\n 'rfc': RFC(),\n 'guilabel': GUILabel(),\n 'menuselection': MenuSelection(),\n 'file': EmphasizedLiteral(),\n 'samp': EmphasizedLiteral(),\n 'abbr': Abbreviation(),\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/roles.py_setup_", "embedding": null, "metadata": {"file_path": "sphinx/roles.py", "file_name": "roles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 352, "end_line": 368, "span_ids": ["setup"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(app: \"Sphinx\") -> Dict[str, Any]:\n from docutils.parsers.rst import roles\n\n for rolename, nodeclass in generic_docroles.items():\n generic = roles.GenericRole(rolename, nodeclass)\n role = roles.CustomRole(rolename, generic, {'classes': [rolename]})\n roles.register_local_role(rolename, role)\n\n for rolename, func in specific_docroles.items():\n roles.register_local_role(rolename, func)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py__Create_a_full_text_sea_SearchLanguage.word_filter.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py__Create_a_full_text_sea_SearchLanguage.word_filter.return._", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 105, "span_ids": ["SearchLanguage.stem", "SearchLanguage.word_filter", "docstring", "imports", "SearchLanguage.split", "SearchLanguage", "SearchLanguage.init"], "tokens": 764}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Create a full-text search index for offline search.\"\"\"\nimport html\nimport pickle\nimport re\nfrom importlib import import_module\nfrom os import path\nfrom typing import IO, Any, Dict, Iterable, List, Optional, Set, Tuple, Type\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\n\nfrom sphinx import addnodes, package_dir\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.util import jsdump\n\n\nclass SearchLanguage:\n \"\"\"\n This class is the base class for search natural language preprocessors. If\n you want to add support for a new language, you should override the methods\n of this class.\n\n You should override `lang` class property too (e.g. 'en', 'fr' and so on).\n\n .. attribute:: stopwords\n\n This is a set of stop words of the target language. Default `stopwords`\n is empty. This word is used for building index and embedded in JS.\n\n .. attribute:: js_splitter_code\n\n Return splitter function of JavaScript version. The function should be\n named as ``splitQuery``. And it should take a string and return list of\n strings.\n\n .. versionadded:: 3.0\n\n .. attribute:: js_stemmer_code\n\n Return stemmer class of JavaScript version. This class' name should be\n ``Stemmer`` and this class must have ``stemWord`` method. This string is\n embedded as-is in searchtools.js.\n\n This class is used to preprocess search word which Sphinx HTML readers\n type, before searching index. Default implementation does nothing.\n \"\"\"\n lang: str = None\n language_name: str = None\n stopwords: Set[str] = set()\n js_splitter_code: str = \"\"\n js_stemmer_rawcode: str = None\n js_stemmer_code = \"\"\"\n/**\n * Dummy stemmer for languages without stemming rules.\n */\nvar Stemmer = function() {\n this.stemWord = function(w) {\n return w;\n }\n}\n\"\"\"\n\n _word_re = re.compile(r'(?u)\\w+')\n\n def __init__(self, options: Dict) -> None:\n self.options = options\n self.init(options)\n\n def init(self, options: Dict) -> None:\n \"\"\"\n Initialize the class with the options the user has given.\n \"\"\"\n\n def split(self, input: str) -> List[str]:\n \"\"\"\n This method splits a sentence into words. Default splitter splits input\n at white spaces, which should be enough for most languages except CJK\n languages.\n \"\"\"\n return self._word_re.findall(input)\n\n def stem(self, word: str) -> str:\n \"\"\"\n This method implements stemming algorithm of the Python version.\n\n Default implementation does nothing. You should implement this if the\n language has any stemming rules.\n\n This class is used to preprocess search words before registering them in\n the search index. The stemming of the Python version and the JS version\n (given in the js_stemmer_code attribute) must be compatible.\n \"\"\"\n return word\n\n def word_filter(self, word: str) -> bool:\n \"\"\"\n Return true if the target word should be registered in the search index.\n This method is called after stemming.\n \"\"\"\n return (\n len(word) == 0 or not (\n ((len(word) < 3) and (12353 < ord(word[0]) < 12436)) or\n (ord(word[0]) < 256 and (\n word in self.stopwords\n ))))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py__JavaScriptIndex__JavaScriptIndex.load.return.self_loads_f_read_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py__JavaScriptIndex__JavaScriptIndex.load.return.self_loads_f_read_", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 147, "end_line": 170, "span_ids": ["_JavaScriptIndex.load", "_JavaScriptIndex.dumps", "_JavaScriptIndex.dump", "_JavaScriptIndex.loads", "_JavaScriptIndex"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _JavaScriptIndex:\n \"\"\"\n The search index as JavaScript file that calls a function\n on the documentation search object to register the index.\n \"\"\"\n\n PREFIX = 'Search.setIndex('\n SUFFIX = ')'\n\n def dumps(self, data: Any) -> str:\n return self.PREFIX + jsdump.dumps(data) + self.SUFFIX\n\n def loads(self, s: str) -> Any:\n data = s[len(self.PREFIX):-len(self.SUFFIX)]\n if not data or not s.startswith(self.PREFIX) or not \\\n s.endswith(self.SUFFIX):\n raise ValueError('invalid data')\n return jsdump.loads(data)\n\n def dump(self, data: Any, f: IO) -> None:\n f.write(self.dumps(data))\n\n def load(self, f: IO) -> Any:\n return self.loads(f.read())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_js_index_WordCollector.is_meta_keywords.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_js_index_WordCollector.is_meta_keywords.return.False", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 173, "end_line": 196, "span_ids": ["WordCollector.is_meta_keywords", "WordCollector", "impl:4"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "js_index = _JavaScriptIndex()\n\n\nclass WordCollector(nodes.NodeVisitor):\n \"\"\"\n A special visitor that collects words for the `IndexBuilder`.\n \"\"\"\n\n def __init__(self, document: nodes.document, lang: SearchLanguage) -> None:\n super().__init__(document)\n self.found_words: List[str] = []\n self.found_title_words: List[str] = []\n self.lang = lang\n\n def is_meta_keywords(self, node: Element) -> bool:\n if (isinstance(node, (addnodes.meta, addnodes.docutils_meta)) and\n node.get('name') == 'keywords'):\n meta_lang = node.get('lang')\n if meta_lang is None: # lang not specified\n return True\n elif meta_lang == self.lang.lang: # matched to html_search_language\n return True\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_WordCollector.dispatch_visit_WordCollector.dispatch_visit.if_isinstance_node_nodes.elif_isinstance_node_Ele.self_found_words_extend_k": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_WordCollector.dispatch_visit_WordCollector.dispatch_visit.if_isinstance_node_nodes.elif_isinstance_node_Ele.self_found_words_extend_k", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 198, "end_line": 218, "span_ids": ["WordCollector.dispatch_visit"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WordCollector(nodes.NodeVisitor):\n\n def dispatch_visit(self, node: Node) -> None:\n if isinstance(node, nodes.comment):\n raise nodes.SkipNode\n elif isinstance(node, nodes.raw):\n if 'html' in node.get('format', '').split():\n # Some people might put content in raw HTML that should be searched,\n # so we just amateurishly strip HTML tags and index the remaining\n # content\n nodetext = re.sub(r'(?is)<style.*?</style>', '', node.astext())\n nodetext = re.sub(r'(?is)<script.*?</script>', '', nodetext)\n nodetext = re.sub(r'<[^<]+?>', '', nodetext)\n self.found_words.extend(self.lang.split(nodetext))\n raise nodes.SkipNode\n elif isinstance(node, nodes.Text):\n self.found_words.extend(self.lang.split(node.astext()))\n elif isinstance(node, nodes.title):\n self.found_title_words.extend(self.lang.split(node.astext()))\n elif isinstance(node, Element) and self.is_meta_keywords(node):\n keywords = node['content']\n keywords = [keyword.strip() for keyword in keywords.split(',')]\n self.found_words.extend(keywords)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder_IndexBuilder.__init__.self.js_splitter_code._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder_IndexBuilder.__init__.self.js_splitter_code._", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 221, "end_line": 264, "span_ids": ["IndexBuilder"], "tokens": 443}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexBuilder:\n \"\"\"\n Helper class that creates a search index based on the doctrees\n passed to the `feed` method.\n \"\"\"\n formats = {\n 'jsdump': jsdump,\n 'pickle': pickle\n }\n\n def __init__(self, env: BuildEnvironment, lang: str, options: Dict, scoring: str) -> None:\n self.env = env\n self._titles: Dict[str, str] = {} # docname -> title\n self._filenames: Dict[str, str] = {} # docname -> filename\n self._mapping: Dict[str, Set[str]] = {} # stemmed word -> set(docname)\n # stemmed words in titles -> set(docname)\n self._title_mapping: Dict[str, Set[str]] = {}\n self._stem_cache: Dict[str, str] = {} # word -> stemmed word\n self._objtypes: Dict[Tuple[str, str], int] = {} # objtype -> index\n # objtype index -> (domain, type, objname (localized))\n self._objnames: Dict[int, Tuple[str, str, str]] = {}\n # add language-specific SearchLanguage instance\n lang_class: Type[SearchLanguage] = languages.get(lang)\n\n # fallback; try again with language-code\n if lang_class is None and '_' in lang:\n lang_class = languages.get(lang.split('_')[0])\n\n if lang_class is None:\n self.lang: SearchLanguage = SearchEnglish(options)\n elif isinstance(lang_class, str):\n module, classname = lang_class.rsplit('.', 1)\n lang_class = getattr(import_module(module), classname)\n self.lang = lang_class(options)\n else:\n # it's directly a class (e.g. added by app.add_search_language)\n self.lang = lang_class(options)\n\n if scoring:\n with open(scoring, 'rb') as fp:\n self.js_scorer_code = fp.read().decode()\n else:\n self.js_scorer_code = ''\n self.js_splitter_code = \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.context_for_searchtool_IndexBuilder.context_for_searchtool.return._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.context_for_searchtool_IndexBuilder.context_for_searchtool.return._", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 412, "end_line": 423, "span_ids": ["IndexBuilder.context_for_searchtool"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexBuilder:\n\n def context_for_searchtool(self) -> Dict[str, Any]:\n if self.lang.js_splitter_code:\n js_splitter_code = self.lang.js_splitter_code\n else:\n js_splitter_code = self.js_splitter_code\n\n return {\n 'search_language_stemming_code': self.get_js_stemmer_code(),\n 'search_language_stop_words': jsdump.dumps(sorted(self.lang.stopwords)),\n 'search_scorer_tool': self.js_scorer_code,\n 'search_word_splitter_code': js_splitter_code,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_js_stemmer_rawcodes_IndexBuilder.get_js_stemmer_rawcode.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_js_stemmer_rawcodes_IndexBuilder.get_js_stemmer_rawcode.return.None", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 425, "end_line": 436, "span_ids": ["IndexBuilder.get_js_stemmer_rawcode", "IndexBuilder.get_js_stemmer_rawcodes"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexBuilder:\n\n def get_js_stemmer_rawcodes(self) -> List[str]:\n \"\"\"Returns a list of non-minified stemmer JS files to copy.\"\"\"\n if self.lang.js_stemmer_rawcode:\n return [\n path.join(package_dir, 'search', 'non-minified-js', fname)\n for fname in ('base-stemmer.js', self.lang.js_stemmer_rawcode)\n ]\n else:\n return []\n\n def get_js_stemmer_rawcode(self) -> Optional[str]:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_js_stemmer_code_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/__init__.py_IndexBuilder.get_js_stemmer_code_", "embedding": null, "metadata": {"file_path": "sphinx/search/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 438, "end_line": 450, "span_ids": ["IndexBuilder.get_js_stemmer_code"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IndexBuilder:\n\n def get_js_stemmer_code(self) -> str:\n \"\"\"Returns JS code that will be inserted into language_data.js.\"\"\"\n if self.lang.js_stemmer_rawcode:\n js_dir = path.join(package_dir, 'search', 'minified-js')\n with open(path.join(js_dir, 'base-stemmer.js')) as js_file:\n base_js = js_file.read()\n with open(path.join(js_dir, self.lang.js_stemmer_rawcode)) as js_file:\n language_js = js_file.read()\n return ('%s\\n%s\\nStemmer = %sStemmer;' %\n (base_js, language_js, self.lang.language_name))\n else:\n return self.lang.js_stemmer_code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/da.py__Danish_search_language_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/da.py__Danish_search_language_", "embedding": null, "metadata": {"file_path": "sphinx/search/da.py", "file_name": "da.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 119, "span_ids": ["impl", "SearchDanish", "docstring", "imports", "SearchDanish.init", "SearchDanish.stem"], "tokens": 1000}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Danish search language: includes the JS Danish stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\ndanish_stopwords = parse_stop_word('''\n| source: http://snowball.tartarus.org/algorithms/danish/stop.txt\nog | and\ni | in\njeg | I\ndet | that (dem. pronoun)/it (pers. pronoun)\nat | that (in front of a sentence)/to (with infinitive)\nen | a/an\nden | it (pers. pronoun)/that (dem. pronoun)\ntil | to/at/for/until/against/by/of/into, more\ner | present tense of \"to be\"\nsom | who, as\np\u00e5 | on/upon/in/on/at/to/after/of/with/for, on\nde | they\nmed | with/by/in, along\nhan | he\naf | of/by/from/off/for/in/with/on, off\nfor | at/for/to/from/by/of/ago, in front/before, because\nikke | not\nder | who/which, there/those\nvar | past tense of \"to be\"\nmig | me/myself\nsig | oneself/himself/herself/itself/themselves\nmen | but\net | a/an/one, one (number), someone/somebody/one\nhar | present tense of \"to have\"\nom | round/about/for/in/a, about/around/down, if\nvi | we\nmin | my\nhavde | past tense of \"to have\"\nham | him\nhun | she\nnu | now\nover | over/above/across/by/beyond/past/on/about, over/past\nda | then, when/as/since\nfra | from/off/since, off, since\ndu | you\nud | out\nsin | his/her/its/one's\ndem | them\nos | us/ourselves\nop | up\nman | you/one\nhans | his\nhvor | where\neller | or\nhvad | what\nskal | must/shall etc.\nselv | myself/yourself/herself/ourselves etc., even\nher | here\nalle | all/everyone/everybody etc.\nvil | will (verb)\nblev | past tense of \"to stay/to remain/to get/to become\"\nkunne | could\nind | in\nn\u00e5r | when\nv\u00e6re | present tense of \"to be\"\ndog | however/yet/after all\nnoget | something\nville | would\njo | you know/you see (adv), yes\nderes | their/theirs\nefter | after/behind/according to/for/by/from, later/afterwards\nned | down\nskulle | should\ndenne | this\nend | than\ndette | this\nmit | my/mine\nogs\u00e5 | also\nunder | under/beneath/below/during, below/underneath\nhave | have\ndig | you\nanden | other\nhende | her\nmine | my\nalt | everything\nmeget | much/very, plenty of\nsit | his, her, its, one's\nsine | his, her, its, one's\nvor | our\nmod | against\ndisse | these\nhvis | if\ndin | your/yours\nnogle | some\nhos | by/at\nblive | be/become\nmange | many\nad | by/through\nbliver | present tense of \"to be/to become\"\nhendes | her/hers\nv\u00e6ret | be\nthi | for (conj)\njer | you\ns\u00e5dan | such, like this/like that\n''')\n\n\nclass SearchDanish(SearchLanguage):\n lang = 'da'\n language_name = 'Danish'\n js_stemmer_rawcode = 'danish-stemmer.js'\n stopwords = danish_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('danish')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/de.py__German_search_language_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/de.py__German_search_language_", "embedding": null, "metadata": {"file_path": "sphinx/search/de.py", "file_name": "de.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 302, "span_ids": ["SearchGerman", "impl", "docstring", "SearchGerman.init", "imports", "SearchGerman.stem"], "tokens": 1412}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"German search language: includes the JS German stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\ngerman_stopwords = parse_stop_word('''\n|source: http://snowball.tartarus.org/algorithms/german/stop.txt\naber | but\n\nalle | all\nallem\nallen\naller\nalles\n\nals | than, as\nalso | so\nam | an + dem\nan | at\n\nander | other\nandere\nanderem\nanderen\nanderer\nanderes\nanderm\nandern\nanderr\nanders\n\nauch | also\nauf | on\naus | out of\nbei | by\nbin | am\nbis | until\nbist | art\nda | there\ndamit | with it\ndann | then\n\nder | the\nden\ndes\ndem\ndie\ndas\n\nda\u00df | that\n\nderselbe | the same\nderselben\ndenselben\ndesselben\ndemselben\ndieselbe\ndieselben\ndasselbe\n\ndazu | to that\n\ndein | thy\ndeine\ndeinem\ndeinen\ndeiner\ndeines\n\ndenn | because\n\nderer | of those\ndessen | of him\n\ndich | thee\ndir | to thee\ndu | thou\n\ndies | this\ndiese\ndiesem\ndiesen\ndieser\ndieses\n\n\ndoch | (several meanings)\ndort | (over) there\n\n\ndurch | through\n\nein | a\neine\neinem\neinen\neiner\neines\n\neinig | some\neinige\neinigem\neinigen\neiniger\neiniges\n\neinmal | once\n\ner | he\nihn | him\nihm | to him\n\nes | it\netwas | something\n\neuer | your\neure\neurem\neuren\neurer\neures\n\nf\u00fcr | for\ngegen | towards\ngewesen | p.p. of sein\nhab | have\nhabe | have\nhaben | have\nhat | has\nhatte | had\nhatten | had\nhier | here\nhin | there\nhinter | behind\n\nich | I\nmich | me\nmir | to me\n\n\nihr | you, to her\nihre\nihrem\nihren\nihrer\nihres\neuch | to you\n\nim | in + dem\nin | in\nindem | while\nins | in + das\nist | is\n\njede | each, every\njedem\njeden\njeder\njedes\n\njene | that\njenem\njenen\njener\njenes\n\njetzt | now\nkann | can\n\nkein | no\nkeine\nkeinem\nkeinen\nkeiner\nkeines\n\nk\u00f6nnen | can\nk\u00f6nnte | could\nmachen | do\nman | one\n\nmanche | some, many a\nmanchem\nmanchen\nmancher\nmanches\n\nmein | my\nmeine\nmeinem\nmeinen\nmeiner\nmeines\n\nmit | with\nmuss | must\nmusste | had to\nnach | to(wards)\nnicht | not\nnichts | nothing\nnoch | still, yet\nnun | now\nnur | only\nob | whether\noder | or\nohne | without\nsehr | very\n\nsein | his\nseine\nseinem\nseinen\nseiner\nseines\n\nselbst | self\nsich | herself\n\nsie | they, she\nihnen | to them\n\nsind | are\nso | so\n\nsolche | such\nsolchem\nsolchen\nsolcher\nsolches\n\nsoll | shall\nsollte | should\nsondern | but\nsonst | else\n\u00fcber | over\num | about, around\nund | and\n\nuns | us\nunse\nunsem\nunsen\nunser\nunses\n\nunter | under\nviel | much\nvom | von + dem\nvon | from\nvor | before\nw\u00e4hrend | while\nwar | was\nwaren | were\nwarst | wast\nwas | what\nweg | away, off\nweil | because\nweiter | further\n\nwelche | which\nwelchem\nwelchen\nwelcher\nwelches\n\nwenn | when\nwerde | will\nwerden | will\nwie | how\nwieder | again\nwill | want\nwir | we\nwird | will\nwirst | willst\nwo | where\nwollen | want\nwollte | wanted\nw\u00fcrde | would\nw\u00fcrden | would\nzu | to\nzum | zu + dem\nzur | zu + der\nzwar | indeed\nzwischen | between\n''')\n\n\nclass SearchGerman(SearchLanguage):\n lang = 'de'\n language_name = 'German'\n js_stemmer_rawcode = 'german-stemmer.js'\n stopwords = german_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('german')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/en.py__English_search_languag_english_stopwords.set_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/en.py__English_search_languag_english_stopwords.set_", "embedding": null, "metadata": {"file_path": "sphinx/search/en.py", "file_name": "en.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["impl", "docstring", "imports"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"English search language: includes the JS porter stemmer.\"\"\"\n\nfrom typing import Dict\n\nfrom sphinx.search import SearchLanguage\nfrom sphinx.util.stemmer import get_stemmer\n\nenglish_stopwords = set(\"\"\"\na and are as at\nbe but by\nfor\nif in into is it\nnear no not\nof on or\nsuch\nthat the their then there these they this to\nwas will with\n\"\"\".split())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/en.py_js_porter_stemmer_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/en.py_js_porter_stemmer_", "embedding": null, "metadata": {"file_path": "sphinx/search/en.py", "file_name": "en.py", "file_type": "text/x-python", "category": "implementation", "start_line": 20, "end_line": 218, "span_ids": ["SearchEnglish", "impl", "SearchEnglish.stem", "SearchEnglish.init"], "tokens": 1565}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "js_porter_stemmer = \"\"\"\n/**\n * Porter Stemmer\n */\nvar Stemmer = function() {\n\n var step2list = {\n ational: 'ate',\n tional: 'tion',\n enci: 'ence',\n anci: 'ance',\n izer: 'ize',\n bli: 'ble',\n alli: 'al',\n entli: 'ent',\n eli: 'e',\n ousli: 'ous',\n ization: 'ize',\n ation: 'ate',\n ator: 'ate',\n alism: 'al',\n iveness: 'ive',\n fulness: 'ful',\n ousness: 'ous',\n aliti: 'al',\n iviti: 'ive',\n biliti: 'ble',\n logi: 'log'\n };\n\n var step3list = {\n icate: 'ic',\n ative: '',\n alize: 'al',\n iciti: 'ic',\n ical: 'ic',\n ful: '',\n ness: ''\n };\n\n var c = \"[^aeiou]\"; // consonant\n var v = \"[aeiouy]\"; // vowel\n var C = c + \"[^aeiouy]*\"; // consonant sequence\n var V = v + \"[aeiou]*\"; // vowel sequence\n\n var mgr0 = \"^(\" + C + \")?\" + V + C; // [C]VC... is m>0\n var meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\"; // [C]VC[V] is m=1\n var mgr1 = \"^(\" + C + \")?\" + V + C + V + C; // [C]VCVC... is m>1\n var s_v = \"^(\" + C + \")?\" + v; // vowel in stem\n\n this.stemWord = function (w) {\n var stem;\n var suffix;\n var firstch;\n var origword = w;\n\n if (w.length < 3)\n return w;\n\n var re;\n var re2;\n var re3;\n var re4;\n\n firstch = w.substr(0,1);\n if (firstch == \"y\")\n w = firstch.toUpperCase() + w.substr(1);\n\n // Step 1a\n re = /^(.+?)(ss|i)es$/;\n re2 = /^(.+?)([^s])s$/;\n\n if (re.test(w))\n w = w.replace(re,\"$1$2\");\n else if (re2.test(w))\n w = w.replace(re2,\"$1$2\");\n\n // Step 1b\n re = /^(.+?)eed$/;\n re2 = /^(.+?)(ed|ing)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n re = new RegExp(mgr0);\n if (re.test(fp[1])) {\n re = /.$/;\n w = w.replace(re,\"\");\n }\n }\n else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1];\n re2 = new RegExp(s_v);\n if (re2.test(stem)) {\n w = stem;\n re2 = /(at|bl|iz)$/;\n re3 = new RegExp(\"([^aeiouylsz])\\\\\\\\1$\");\n re4 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n if (re2.test(w))\n w = w + \"e\";\n else if (re3.test(w)) {\n re = /.$/;\n w = w.replace(re,\"\");\n }\n else if (re4.test(w))\n w = w + \"e\";\n }\n }\n\n // Step 1c\n re = /^(.+?)y$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = new RegExp(s_v);\n if (re.test(stem))\n w = stem + \"i\";\n }\n\n // Step 2\n re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|\\\nization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = new RegExp(mgr0);\n if (re.test(stem))\n w = stem + step2list[suffix];\n }\n\n // Step 3\n re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = new RegExp(mgr0);\n if (re.test(stem))\n w = stem + step3list[suffix];\n }\n\n // Step 4\n re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|\\\niti|ous|ive|ize)$/;\n re2 = /^(.+?)(s|t)(ion)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = new RegExp(mgr1);\n if (re.test(stem))\n w = stem;\n }\n else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1] + fp[2];\n re2 = new RegExp(mgr1);\n if (re2.test(stem))\n w = stem;\n }\n\n // Step 5\n re = /^(.+?)e$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = new RegExp(mgr1);\n re2 = new RegExp(meq1);\n re3 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))\n w = stem;\n }\n re = /ll$/;\n re2 = new RegExp(mgr1);\n if (re.test(w) && re2.test(w)) {\n re = /.$/;\n w = w.replace(re,\"\");\n }\n\n // and turn initial Y back to y\n if (firstch == \"y\")\n w = firstch.toLowerCase() + w.substr(1);\n return w;\n }\n}\n\"\"\"\n\n\nclass SearchEnglish(SearchLanguage):\n lang = 'en'\n language_name = 'English'\n js_stemmer_code = js_porter_stemmer\n stopwords = english_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = get_stemmer()\n\n def stem(self, word: str) -> str:\n return self.stemmer.stem(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/es.py__Spanish_search_languag_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/es.py__Spanish_search_languag_", "embedding": null, "metadata": {"file_path": "sphinx/search/es.py", "file_name": "es.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 362, "span_ids": ["impl", "SearchSpanish.init", "docstring", "imports", "SearchSpanish", "SearchSpanish.stem"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Spanish search language: includes the JS Spanish stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\nspanish_stopwords =\n # ... other code\n\n\nclass SearchSpanish(SearchLanguage):\n lang = 'es'\n language_name = 'Spanish'\n js_stemmer_rawcode = 'spanish-stemmer.js'\n stopwords = spanish_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('spanish')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/fi.py__Finnish_search_languag_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/fi.py__Finnish_search_languag_", "embedding": null, "metadata": {"file_path": "sphinx/search/fi.py", "file_name": "fi.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 112, "span_ids": ["impl", "docstring", "SearchFinnish", "SearchFinnish.stem", "imports", "SearchFinnish.init"], "tokens": 1089}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Finnish search language: includes the JS Finnish stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\nfinnish_stopwords = parse_stop_word('''\n| source: http://snowball.tartarus.org/algorithms/finnish/stop.txt\n| forms of BE\n\nolla\nolen\nolet\non\nolemme\nolette\novat\nole | negative form\n\noli\nolisi\nolisit\nolisin\nolisimme\nolisitte\nolisivat\nolit\nolin\nolimme\nolitte\nolivat\nollut\nolleet\n\nen | negation\net\nei\nemme\nette\neiv\u00e4t\n\n|Nom Gen Acc Part Iness Elat Illat Adess Ablat Allat Ess Trans\nmin\u00e4 minun minut minua minussa minusta minuun minulla minulta minulle | I\nsin\u00e4 sinun sinut sinua sinussa sinusta sinuun sinulla sinulta sinulle | you\nh\u00e4n h\u00e4nen h\u00e4net h\u00e4nt\u00e4 h\u00e4ness\u00e4 h\u00e4nest\u00e4 h\u00e4neen h\u00e4nell\u00e4 h\u00e4nelt\u00e4 h\u00e4nelle | he she\nme meid\u00e4n meid\u00e4t meit\u00e4 meiss\u00e4 meist\u00e4 meihin meill\u00e4 meilt\u00e4 meille | we\nte teid\u00e4n teid\u00e4t teit\u00e4 teiss\u00e4 teist\u00e4 teihin teill\u00e4 teilt\u00e4 teille | you\nhe heid\u00e4n heid\u00e4t heit\u00e4 heiss\u00e4 heist\u00e4 heihin heill\u00e4 heilt\u00e4 heille | they\n\nt\u00e4m\u00e4 t\u00e4m\u00e4n t\u00e4t\u00e4 t\u00e4ss\u00e4 t\u00e4st\u00e4 t\u00e4h\u00e4n t\u00e4ll\u00e4 t\u00e4lt\u00e4 t\u00e4lle t\u00e4n\u00e4 t\u00e4ksi | this\ntuo tuon tuota tuossa tuosta tuohon tuolla tuolta tuolle tuona tuoksi | that\nse sen sit\u00e4 siin\u00e4 siit\u00e4 siihen sill\u00e4 silt\u00e4 sille sin\u00e4 siksi | it\nn\u00e4m\u00e4 n\u00e4iden n\u00e4it\u00e4 n\u00e4iss\u00e4 n\u00e4ist\u00e4 n\u00e4ihin n\u00e4ill\u00e4 n\u00e4ilt\u00e4 n\u00e4ille n\u00e4in\u00e4 n\u00e4iksi | these\nnuo noiden noita noissa noista noihin noilla noilta noille noina noiksi | those\nne niiden niit\u00e4 niiss\u00e4 niist\u00e4 niihin niill\u00e4 niilt\u00e4 niille niin\u00e4 niiksi | they\n\nkuka kenen kenet ket\u00e4 keness\u00e4 kenest\u00e4 keneen kenell\u00e4 kenelt\u00e4 kenelle kenen\u00e4 keneksi| who\nketk\u00e4 keiden ketk\u00e4 keit\u00e4 keiss\u00e4 keist\u00e4 keihin keill\u00e4 keilt\u00e4 keille kein\u00e4 keiksi | (pl)\nmik\u00e4 mink\u00e4 mink\u00e4 mit\u00e4 miss\u00e4 mist\u00e4 mihin mill\u00e4 milt\u00e4 mille min\u00e4 miksi | which what\nmitk\u00e4 | (pl)\n\njoka jonka jota jossa josta johon jolla jolta jolle jona joksi | who which\njotka joiden joita joissa joista joihin joilla joilta joille joina joiksi | (pl)\n\n| conjunctions\n\nett\u00e4 | that\nja | and\njos | if\nkoska | because\nkuin | than\nmutta | but\nniin | so\nsek\u00e4 | and\nsill\u00e4 | for\ntai | or\nvaan | but\nvai | or\nvaikka | although\n\n\n| prepositions\n\nkanssa | with\nmukaan | according to\nnoin | about\npoikki | across\nyli | over, across\n\n| other\n\nkun | when\nniin | so\nnyt | now\nitse | self\n''')\n\n\nclass SearchFinnish(SearchLanguage):\n lang = 'fi'\n language_name = 'Finnish'\n js_stemmer_rawcode = 'finnish-stemmer.js'\n stopwords = finnish_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('finnish')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/fr.py__French_search_language_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/fr.py__French_search_language_", "embedding": null, "metadata": {"file_path": "sphinx/search/fr.py", "file_name": "fr.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 198, "span_ids": ["impl", "SearchFrench.init", "docstring", "imports", "SearchFrench", "SearchFrench.stem"], "tokens": 1032}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"French search language: includes the JS French stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\nfrench_stopwords = parse_stop_word('''\n| source: http://snowball.tartarus.org/algorithms/french/stop.txt\nau | a + le\naux | a + les\navec | with\nce | this\nces | these\ndans | with\nde | of\ndes | de + les\ndu | de + le\nelle | she\nen | `of them' etc\net | and\neux | them\nil | he\nje | I\nla | the\nle | the\nleur | their\nlui | him\nma | my (fem)\nmais | but\nme | me\nm\u00eame | same; as in moi-m\u00eame (myself) etc\nmes | me (pl)\nmoi | me\nmon | my (masc)\nne | not\nnos | our (pl)\nnotre | our\nnous | we\non | one\nou | where\npar | by\npas | not\npour | for\nqu | que before vowel\nque | that\nqui | who\nsa | his, her (fem)\nse | oneself\nses | his (pl)\nson | his, her (masc)\nsur | on\nta | thy (fem)\nte | thee\ntes | thy (pl)\ntoi | thee\nton | thy (masc)\ntu | thou\nun | a\nune | a\nvos | your (pl)\nvotre | your\nvous | you\n\n | single letter forms\n\nc | c'\nd | d'\nj | j'\nl | l'\n\u00e0 | to, at\nm | m'\nn | n'\ns | s'\nt | t'\ny | there\n\n | forms of \u00eatre (not including the infinitive):\n\u00e9t\u00e9\n\u00e9t\u00e9e\n\u00e9t\u00e9es\n\u00e9t\u00e9s\n\u00e9tant\nsuis\nes\nest\nsommes\n\u00eates\nsont\nserai\nseras\nsera\nserons\nserez\nseront\nserais\nserait\nserions\nseriez\nseraient\n\u00e9tais\n\u00e9tait\n\u00e9tions\n\u00e9tiez\n\u00e9taient\nfus\nfut\nf\u00fbmes\nf\u00fbtes\nfurent\nsois\nsoit\nsoyons\nsoyez\nsoient\nfusse\nfusses\nf\u00fbt\nfussions\nfussiez\nfussent\n\n | forms of avoir (not including the infinitive):\nayant\neu\neue\neues\neus\nai\nas\navons\navez\nont\naurai\nauras\naura\naurons\naurez\nauront\naurais\naurait\naurions\nauriez\nauraient\navais\navait\navions\naviez\navaient\neut\ne\u00fbmes\ne\u00fbtes\neurent\naie\naies\nait\nayons\nayez\naient\neusse\neusses\ne\u00fbt\neussions\neussiez\neussent\n\n | Later additions (from Jean-Christophe Deschamps)\nceci | this\ncela | that (added 11 Apr 2012. Omission reported by Adrien Grand)\ncel\u00e0 | that (incorrect, though common)\ncet | this\ncette | this\nici | here\nils | they\nles | the (pl)\nleurs | their (pl)\nquel | which\nquels | which\nquelle | which\nquelles | which\nsans | without\nsoi | oneself\n''')\n\n\nclass SearchFrench(SearchLanguage):\n lang = 'fr'\n language_name = 'French'\n js_stemmer_rawcode = 'french-stemmer.js'\n stopwords = french_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('french')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/hu.py__Hungarian_search_langu_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/hu.py__Hungarian_search_langu_", "embedding": null, "metadata": {"file_path": "sphinx/search/hu.py", "file_name": "hu.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 225, "span_ids": ["impl", "SearchHungarian.stem", "SearchHungarian.init", "docstring", "imports", "SearchHungarian"], "tokens": 802}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Hungarian search language: includes the JS Hungarian stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\nhungarian_stopwords = parse_stop_word('''\n| source: http://snowball.tartarus.org/algorithms/hungarian/stop.txt\n| prepared by Anna Tordai\na\nahogy\nahol\naki\nakik\nakkor\nalatt\n\u00e1ltal\n\u00e1ltal\u00e1ban\namely\namelyek\namelyekben\namelyeket\namelyet\namelynek\nami\namit\namolyan\nam\u00edg\namikor\n\u00e1t\nabban\nahhoz\nannak\narra\narr\u00f3l\naz\nazok\nazon\nazt\nazzal\naz\u00e9rt\nazt\u00e1n\nazut\u00e1n\nazonban\nb\u00e1r\nbe\nbel\u00fcl\nbenne\ncikk\ncikkek\ncikkeket\ncsak\nde\ne\neddig\neg\u00e9sz\negy\negyes\negyetlen\negy\u00e9b\negyik\negyre\nekkor\nel\nel\u00e9g\nellen\nel\u0151\nel\u0151sz\u00f6r\nel\u0151tt\nels\u0151\n\u00e9n\n\u00e9ppen\nebben\nehhez\nemilyen\nennek\nerre\nez\nezt\nezek\nezen\nezzel\nez\u00e9rt\n\u00e9s\nfel\nfel\u00e9\nhanem\nhiszen\nhogy\nhogyan\nigen\n\u00edgy\nilletve\nill.\nill\nilyen\nilyenkor\nison\nism\u00e9t\nitt\nj\u00f3\nj\u00f3l\njobban\nkell\nkellett\nkereszt\u00fcl\nkeress\u00fcnk\nki\nk\u00edv\u00fcl\nk\u00f6z\u00f6tt\nk\u00f6z\u00fcl\nlegal\u00e1bb\nlehet\nlehetett\nlegyen\nlenne\nlenni\nlesz\nlett\nmaga\nmag\u00e1t\nmajd\nmajd\nm\u00e1r\nm\u00e1s\nm\u00e1sik\nmeg\nm\u00e9g\nmellett\nmert\nmely\nmelyek\nmi\nmit\nm\u00edg\nmi\u00e9rt\nmilyen\nmikor\nminden\nmindent\nmindenki\nmindig\nmint\nmintha\nmivel\nmost\nnagy\nnagyobb\nnagyon\nne\nn\u00e9ha\nnekem\nneki\nnem\nn\u00e9h\u00e1ny\nn\u00e9lk\u00fcl\nnincs\nolyan\nott\n\u00f6ssze\n\u0151\n\u0151k\n\u0151ket\npedig\npersze\nr\u00e1\ns\nsaj\u00e1t\nsem\nsemmi\nsok\nsokat\nsokkal\nsz\u00e1m\u00e1ra\nszemben\nszerint\nszinte\ntal\u00e1n\nteh\u00e1t\nteljes\ntov\u00e1bb\ntov\u00e1bb\u00e1\nt\u00f6bb\n\u00fagy\nugyanis\n\u00faj\n\u00fajabb\n\u00fajra\nut\u00e1n\nut\u00e1na\nutols\u00f3\nvagy\nvagyis\nvalaki\nvalami\nvalamint\nval\u00f3\nvagyok\nvan\nvannak\nvolt\nvoltam\nvoltak\nvoltunk\nvissza\nvele\nviszont\nvolna\n''')\n\n\nclass SearchHungarian(SearchLanguage):\n lang = 'hu'\n language_name = 'Hungarian'\n js_stemmer_rawcode = 'hungarian-stemmer.js'\n stopwords = hungarian_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('hungarian')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/it.py__Italian_search_languag_italian_stopwords": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/it.py__Italian_search_languag_italian_stopwords", "embedding": null, "metadata": {"file_path": "sphinx/search/it.py", "file_name": "it.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 301, "span_ids": ["impl", "docstring", "imports"], "tokens": 44}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Italian search language: includes the JS Italian stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\nitalian_stopwords =\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py__Japanese_search_langua_BaseSplitter.split.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ja.py__Japanese_search_langua_BaseSplitter.split.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "sphinx/search/ja.py", "file_name": "ja.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 43, "span_ids": ["imports:5", "impl", "imports:6", "impl:8", "BaseSplitter", "impl:2", "BaseSplitter.split", "docstring", "imports", "imports:7"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Japanese search language: includes routine to split words.\"\"\"\n\n# Python Version of TinySegmenter\n# (http://chasen.org/~taku/software/TinySegmenter/)\n# TinySegmenter is super compact Japanese tokenizer.\n#\n# TinySegmenter was originally developed by Taku Kudo <taku(at)chasen.org>.\n# Python Version was developed by xnights <programming.magic(at)gmail.com>.\n# For details, see http://programming-magic.com/?id=170\n\nimport os\nimport re\nimport sys\nfrom typing import Any, Dict, List\n\ntry:\n import MeCab\n native_module = True\nexcept ImportError:\n native_module = False\n\ntry:\n import janome.tokenizer\n janome_module = True\nexcept ImportError:\n janome_module = False\n\nfrom sphinx.errors import ExtensionError, SphinxError\nfrom sphinx.search import SearchLanguage\nfrom sphinx.util import import_object\n\n\nclass BaseSplitter:\n def __init__(self, options: Dict) -> None:\n self.options = options\n\n def split(self, input: str) -> List[str]:\n \"\"\"\n :param str input:\n :return:\n :rtype: list[str]\n \"\"\"\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/nl.py__Dutch_search_language__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/nl.py__Dutch_search_language__", "embedding": null, "metadata": {"file_path": "sphinx/search/nl.py", "file_name": "nl.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 126, "span_ids": ["impl", "docstring", "SearchDutch", "imports", "SearchDutch.init", "SearchDutch.stem"], "tokens": 1344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Dutch search language: includes the JS porter stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\ndutch_stopwords = parse_stop_word('''\n| source: http://snowball.tartarus.org/algorithms/dutch/stop.txt\nde | the\nen | and\nvan | of, from\nik | I, the ego\nte | (1) chez, at etc, (2) to, (3) too\ndat | that, which\ndie | that, those, who, which\nin | in, inside\neen | a, an, one\nhij | he\nhet | the, it\nniet | not, nothing, naught\nzijn | (1) to be, being, (2) his, one's, its\nis | is\nwas | (1) was, past tense of all persons sing. of 'zijn' (to be) (2) wax, (3) the washing, (4) rise of river\nop | on, upon, at, in, up, used up\naan | on, upon, to (as dative)\nmet | with, by\nals | like, such as, when\nvoor | (1) before, in front of, (2) furrow\nhad | had, past tense all persons sing. of 'hebben' (have)\ner | there\nmaar | but, only\nom | round, about, for etc\nhem | him\ndan | then\nzou | should/would, past tense all persons sing. of 'zullen'\nof | or, whether, if\nwat | what, something, anything\nmijn | possessive and noun 'mine'\nmen | people, 'one'\ndit | this\nzo | so, thus, in this way\ndoor | through by\nover | over, across\nze | she, her, they, them\nzich | oneself\nbij | (1) a bee, (2) by, near, at\nook | also, too\ntot | till, until\nje | you\nmij | me\nuit | out of, from\nder | Old Dutch form of 'van der' still found in surnames\ndaar | (1) there, (2) because\nhaar | (1) her, their, them, (2) hair\nnaar | (1) unpleasant, unwell etc, (2) towards, (3) as\nheb | present first person sing. of 'to have'\nhoe | how, why\nheeft | present third person sing. of 'to have'\nhebben | 'to have' and various parts thereof\ndeze | this\nu | you\nwant | (1) for, (2) mitten, (3) rigging\nnog | yet, still\nzal | 'shall', first and third person sing. of verb 'zullen' (will)\nme | me\nzij | she, they\nnu | now\nge | 'thou', still used in Belgium and south Netherlands\ngeen | none\nomdat | because\niets | something, somewhat\nworden | to become, grow, get\ntoch | yet, still\nal | all, every, each\nwaren | (1) 'were' (2) to wander, (3) wares, (3)\nveel | much, many\nmeer | (1) more, (2) lake\ndoen | to do, to make\ntoen | then, when\nmoet | noun 'spot/mote' and present form of 'to must'\nben | (1) am, (2) 'are' in interrogative second person singular of 'to be'\nzonder | without\nkan | noun 'can' and present form of 'to be able'\nhun | their, them\ndus | so, consequently\nalles | all, everything, anything\nonder | under, beneath\nja | yes, of course\neens | once, one day\nhier | here\nwie | who\nwerd | imperfect third person sing. of 'become'\naltijd | always\ndoch | yet, but etc\nwordt | present third person sing. of 'become'\nwezen | (1) to be, (2) 'been' as in 'been fishing', (3) orphans\nkunnen | to be able\nons | us/our\nzelf | self\ntegen | against, towards, at\nna | after, near\nreeds | already\nwil | (1) present tense of 'want', (2) 'will', noun, (3) fender\nkon | could; past tense of 'to be able'\nniets | nothing\nuw | your\niemand | somebody\ngeweest | been; past participle of 'be'\nandere | other\n''')\n\n\nclass SearchDutch(SearchLanguage):\n lang = 'nl'\n language_name = 'Dutch'\n js_stemmer_rawcode = 'dutch-stemmer.js'\n stopwords = dutch_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('dutch')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/no.py__Norwegian_search_langu_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/no.py__Norwegian_search_langu_", "embedding": null, "metadata": {"file_path": "sphinx/search/no.py", "file_name": "no.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 201, "span_ids": ["SearchNorwegian.stem", "impl", "docstring", "SearchNorwegian.init", "imports", "SearchNorwegian"], "tokens": 1261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Norwegian search language: includes the JS Norwegian stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\nnorwegian_stopwords = parse_stop_word('''\n| source: http://snowball.tartarus.org/algorithms/norwegian/stop.txt\nog | and\ni | in\njeg | I\ndet | it/this/that\nat | to (w. inf.)\nen | a/an\net | a/an\nden | it/this/that\ntil | to\ner | is/am/are\nsom | who/that\np\u00e5 | on\nde | they / you(formal)\nmed | with\nhan | he\nav | of\nikke | not\nikkje | not *\nder | there\ns\u00e5 | so\nvar | was/were\nmeg | me\nseg | you\nmen | but\nett | one\nhar | have\nom | about\nvi | we\nmin | my\nmitt | my\nha | have\nhadde | had\nhun | she\nn\u00e5 | now\nover | over\nda | when/as\nved | by/know\nfra | from\ndu | you\nut | out\nsin | your\ndem | them\noss | us\nopp | up\nman | you/one\nkan | can\nhans | his\nhvor | where\neller | or\nhva | what\nskal | shall/must\nselv | self (reflective)\nsj\u00f8l | self (reflective)\nher | here\nalle | all\nvil | will\nbli | become\nble | became\nblei | became *\nblitt | have become\nkunne | could\ninn | in\nn\u00e5r | when\nv\u00e6re | be\nkom | come\nnoen | some\nnoe | some\nville | would\ndere | you\nsom | who/which/that\nderes | their/theirs\nkun | only/just\nja | yes\netter | after\nned | down\nskulle | should\ndenne | this\nfor | for/because\ndeg | you\nsi | hers/his\nsine | hers/his\nsitt | hers/his\nmot | against\n\u00e5 | to\nmeget | much\nhvorfor | why\ndette | this\ndisse | these/those\nuten | without\nhvordan | how\ningen | none\ndin | your\nditt | your\nblir | become\nsamme | same\nhvilken | which\nhvilke | which (plural)\ns\u00e5nn | such a\ninni | inside/within\nmellom | between\nv\u00e5r | our\nhver | each\nhvem | who\nvors | us/ours\nhvis | whose\nb\u00e5de | both\nbare | only/just\nenn | than\nfordi | as/because\nf\u00f8r | before\nmange | many\nogs\u00e5 | also\nslik | just\nv\u00e6rt | been\nv\u00e6re | to be\nb\u00e5e | both *\nbegge | both\nsiden | since\ndykk | your *\ndykkar | yours *\ndei | they *\ndeira | them *\ndeires | theirs *\ndeim | them *\ndi | your (fem.) *\nd\u00e5 | as/when *\neg | I *\nein | a/an *\neit | a/an *\neitt | a/an *\nelles | or *\nhonom | he *\nhj\u00e5 | at *\nho | she *\nhoe | she *\nhenne | her\nhennar | her/hers\nhennes | hers\nhoss | how *\nhossen | how *\nikkje | not *\ningi | noone *\ninkje | noone *\nkorleis | how *\nkorso | how *\nkva | what/which *\nkvar | where *\nkvarhelst | where *\nkven | who/whom *\nkvi | why *\nkvifor | why *\nme | we *\nmedan | while *\nmi | my *\nmine | my *\nmykje | much *\nno | now *\nnokon | some (masc./neut.) *\nnoka | some (fem.) *\nnokor | some *\nnoko | some *\nnokre | some *\nsi | his/hers *\nsia | since *\nsidan | since *\nso | so *\nsomt | some *\nsomme | some *\num | about*\nupp | up *\nvere | be *\nvore | was *\nverte | become *\nvort | become *\nvarte | became *\nvart | became *\n''')\n\n\nclass SearchNorwegian(SearchLanguage):\n lang = 'no'\n language_name = 'Norwegian'\n js_stemmer_rawcode = 'norwegian-stemmer.js'\n stopwords = norwegian_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('norwegian')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/pt.py__Portuguese_search_lang_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/pt.py__Portuguese_search_lang_", "embedding": null, "metadata": {"file_path": "sphinx/search/pt.py", "file_name": "pt.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 260, "span_ids": ["impl", "SearchPortuguese.init", "docstring", "imports", "SearchPortuguese.stem", "SearchPortuguese"], "tokens": 1469}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Portuguese search language: includes the JS Portuguese stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\nportuguese_stopwords = parse_stop_word('''\n| source: http://snowball.tartarus.org/algorithms/portuguese/stop.txt\nde | of, from\na | the; to, at; her\no | the; him\nque | who, that\ne | and\ndo | de + o\nda | de + a\nem | in\num | a\npara | for\n | \u00e9 from SER\ncom | with\nn\u00e3o | not, no\numa | a\nos | the; them\nno | em + o\nse | himself etc\nna | em + a\npor | for\nmais | more\nas | the; them\ndos | de + os\ncomo | as, like\nmas | but\n | foi from SER\nao | a + o\nele | he\ndas | de + as\n | tem from TER\n\u00e0 | a + a\nseu | his\nsua | her\nou | or\n | ser from SER\nquando | when\nmuito | much\n | h\u00e1 from HAV\nnos | em + os; us\nj\u00e1 | already, now\n | est\u00e1 from EST\neu | I\ntamb\u00e9m | also\ns\u00f3 | only, just\npelo | per + o\npela | per + a\nat\u00e9 | up to\nisso | that\nela | he\nentre | between\n | era from SER\ndepois | after\nsem | without\nmesmo | same\naos | a + os\n | ter from TER\nseus | his\nquem | whom\nnas | em + as\nme | me\nesse | that\neles | they\n | est\u00e3o from EST\nvoc\u00ea | you\n | tinha from TER\n | foram from SER\nessa | that\nnum | em + um\nnem | nor\nsuas | her\nmeu | my\n\u00e0s | a + as\nminha | my\n | t\u00eam from TER\nnuma | em + uma\npelos | per + os\nelas | they\n | havia from HAV\n | seja from SER\nqual | which\n | ser\u00e1 from SER\nn\u00f3s | we\n | tenho from TER\nlhe | to him, her\ndeles | of them\nessas | those\nesses | those\npelas | per + as\neste | this\n | fosse from SER\ndele | of him\n\n | other words. There are many contractions such as naquele = em+aquele,\n | mo = me+o, but they are rare.\n | Indefinite article plural forms are also rare.\n\ntu | thou\nte | thee\nvoc\u00eas | you (plural)\nvos | you\nlhes | to them\nmeus | my\nminhas\nteu | thy\ntua\nteus\ntuas\nnosso | our\nnossa\nnossos\nnossas\n\ndela | of her\ndelas | of them\n\nesta | this\nestes | these\nestas | these\naquele | that\naquela | that\naqueles | those\naquelas | those\nisto | this\naquilo | that\n\n | forms of estar, to be (not including the infinitive):\nestou\nest\u00e1\nestamos\nest\u00e3o\nestive\nesteve\nestivemos\nestiveram\nestava\nest\u00e1vamos\nestavam\nestivera\nestiv\u00e9ramos\nesteja\nestejamos\nestejam\nestivesse\nestiv\u00e9ssemos\nestivessem\nestiver\nestivermos\nestiverem\n\n | forms of haver, to have (not including the infinitive):\nhei\nh\u00e1\nhavemos\nh\u00e3o\nhouve\nhouvemos\nhouveram\nhouvera\nhouv\u00e9ramos\nhaja\nhajamos\nhajam\nhouvesse\nhouv\u00e9ssemos\nhouvessem\nhouver\nhouvermos\nhouverem\nhouverei\nhouver\u00e1\nhouveremos\nhouver\u00e3o\nhouveria\nhouver\u00edamos\nhouveriam\n\n | forms of ser, to be (not including the infinitive):\nsou\nsomos\ns\u00e3o\nera\n\u00e9ramos\neram\nfui\nfoi\nfomos\nforam\nfora\nf\u00f4ramos\nseja\nsejamos\nsejam\nfosse\nf\u00f4ssemos\nfossem\nfor\nformos\nforem\nserei\nser\u00e1\nseremos\nser\u00e3o\nseria\nser\u00edamos\nseriam\n\n | forms of ter, to have (not including the infinitive):\ntenho\ntem\ntemos\nt\u00e9m\ntinha\nt\u00ednhamos\ntinham\ntive\nteve\ntivemos\ntiveram\ntivera\ntiv\u00e9ramos\ntenha\ntenhamos\ntenham\ntivesse\ntiv\u00e9ssemos\ntivessem\ntiver\ntivermos\ntiverem\nterei\nter\u00e1\nteremos\nter\u00e3o\nteria\nter\u00edamos\nteriam\n''')\n\n\nclass SearchPortuguese(SearchLanguage):\n lang = 'pt'\n language_name = 'Portuguese'\n js_stemmer_rawcode = 'portuguese-stemmer.js'\n stopwords = portuguese_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('portuguese')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ro.py__Romanian_search_langua_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ro.py__Romanian_search_langua_", "embedding": null, "metadata": {"file_path": "sphinx/search/ro.py", "file_name": "ro.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["SearchRomanian", "SearchRomanian.init", "SearchRomanian.stem", "docstring", "imports"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Romanian search language: includes the JS Romanian stemmer.\"\"\"\n\nfrom typing import Dict, Set\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage\n\n\nclass SearchRomanian(SearchLanguage):\n lang = 'ro'\n language_name = 'Romanian'\n js_stemmer_rawcode = 'romanian-stemmer.js'\n stopwords: Set[str] = set()\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('romanian')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ru.py__Russian_search_languag_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/ru.py__Russian_search_languag_", "embedding": null, "metadata": {"file_path": "sphinx/search/ru.py", "file_name": "ru.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 250, "span_ids": ["impl", "docstring", "SearchRussian.init", "imports", "SearchRussian.stem", "SearchRussian"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Russian search language: includes the JS Russian stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\nrussian_stopwords =\n # ... other code\n\n\nclass SearchRussian(SearchLanguage):\n lang = 'ru'\n language_name = 'Russian'\n js_stemmer_rawcode = 'russian-stemmer.js'\n stopwords = russian_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('russian')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/sv.py__Swedish_search_languag_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/sv.py__Swedish_search_languag_", "embedding": null, "metadata": {"file_path": "sphinx/search/sv.py", "file_name": "sv.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 139, "span_ids": ["impl", "SearchSwedish.init", "docstring", "SearchSwedish.stem", "imports", "SearchSwedish"], "tokens": 900}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Swedish search language: includes the JS Swedish stemmer.\"\"\"\n\nfrom typing import Dict\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage, parse_stop_word\n\nswedish_stopwords = parse_stop_word('''\n| source: http://snowball.tartarus.org/algorithms/swedish/stop.txt\noch | and\ndet | it, this/that\natt | to (with infinitive)\ni | in, at\nen | a\njag | I\nhon | she\nsom | who, that\nhan | he\np\u00e5 | on\nden | it, this/that\nmed | with\nvar | where, each\nsig | him(self) etc\nf\u00f6r | for\ns\u00e5 | so (also: seed)\ntill | to\n\u00e4r | is\nmen | but\nett | a\nom | if; around, about\nhade | had\nde | they, these/those\nav | of\nicke | not, no\nmig | me\ndu | you\nhenne | her\nd\u00e5 | then, when\nsin | his\nnu | now\nhar | have\ninte | inte n\u00e5gon = no one\nhans | his\nhonom | him\nskulle | 'sake'\nhennes | her\nd\u00e4r | there\nmin | my\nman | one (pronoun)\nej | nor\nvid | at, by, on (also: vast)\nkunde | could\nn\u00e5got | some etc\nfr\u00e5n | from, off\nut | out\nn\u00e4r | when\nefter | after, behind\nupp | up\nvi | we\ndem | them\nvara | be\nvad | what\n\u00f6ver | over\n\u00e4n | than\ndig | you\nkan | can\nsina | his\nh\u00e4r | here\nha | have\nmot | towards\nalla | all\nunder | under (also: wonder)\nn\u00e5gon | some etc\neller | or (else)\nallt | all\nmycket | much\nsedan | since\nju | why\ndenna | this/that\nsj\u00e4lv | myself, yourself etc\ndetta | this/that\n\u00e5t | to\nutan | without\nvarit | was\nhur | how\ningen | no\nmitt | my\nni | you\nbli | to be, become\nblev | from bli\noss | us\ndin | thy\ndessa | these/those\nn\u00e5gra | some etc\nderas | their\nblir | from bli\nmina | my\nsamma | (the) same\nvilken | who, that\ner | you, your\ns\u00e5dan | such a\nv\u00e5r | our\nblivit | from bli\ndess | its\ninom | within\nmellan | between\ns\u00e5dant | such a\nvarf\u00f6r | why\nvarje | each\nvilka | who, that\nditt | thy\nvem | who\nvilket | who, that\nsitta | his\ns\u00e5dana | such a\nvart | each\ndina | thy\nvars | whose\nv\u00e5rt | our\nv\u00e5ra | our\nert | your\nera | your\nvilkas | whose\n''')\n\n\nclass SearchSwedish(SearchLanguage):\n lang = 'sv'\n language_name = 'Swedish'\n js_stemmer_rawcode = 'swedish-stemmer.js'\n stopwords = swedish_stopwords\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('swedish')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/tr.py__Turkish_search_languag_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/tr.py__Turkish_search_languag_", "embedding": null, "metadata": {"file_path": "sphinx/search/tr.py", "file_name": "tr.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["SearchTurkish", "SearchTurkish.init", "docstring", "SearchTurkish.stem", "imports"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Turkish search language: includes the JS Turkish stemmer.\"\"\"\n\nfrom typing import Dict, Set\n\nimport snowballstemmer\n\nfrom sphinx.search import SearchLanguage\n\n\nclass SearchTurkish(SearchLanguage):\n lang = 'tr'\n language_name = 'Turkish'\n js_stemmer_rawcode = 'turkish-stemmer.js'\n stopwords: Set[str] = set()\n\n def init(self, options: Dict) -> None:\n self.stemmer = snowballstemmer.stemmer('turkish')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word.lower())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py__Chinese_search_languag_english_stopwords.set_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/search/zh.py__Chinese_search_languag_english_stopwords.set_", "embedding": null, "metadata": {"file_path": "sphinx/search/zh.py", "file_name": "zh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 26, "span_ids": ["impl", "imports:6", "impl:2", "docstring", "imports"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Chinese search language: includes routine to split words.\"\"\"\n\nimport os\nimport re\nfrom typing import Dict, List\n\nfrom sphinx.search import SearchLanguage\nfrom sphinx.util.stemmer import get_stemmer\n\ntry:\n import jieba\n JIEBA = True\nexcept ImportError:\n JIEBA = False\n\nenglish_stopwords = set(\"\"\"\na and are as at\nbe but by\nfor\nif in into is it\nnear no not\nof on or\nsuch\nthat the their then there these they this to\nwas will with\n\"\"\".split())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/comparer.py__Sphinx_test_comparer_f_PathComparer.__eq__.return.not_bool_self_ldiff_other": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/comparer.py__Sphinx_test_comparer_f_PathComparer.__eq__.return.not_bool_self_ldiff_other", "embedding": null, "metadata": {"file_path": "sphinx/testing/comparer.py", "file_name": "comparer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 40, "span_ids": ["docstring", "PathComparer.__eq__", "PathComparer.__repr__", "PathComparer", "imports", "PathComparer.__str__"], "tokens": 275}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Sphinx test comparer for pytest\"\"\"\nimport difflib\nimport pathlib\nfrom typing import Any, List, Union\n\n\nclass PathComparer:\n \"\"\"\n OS-independent path comparison.\n\n Windows path sep and posix path sep:\n\n >>> '\\\\to\\\\index' == PathComparer('/to/index')\n True\n >>> '\\\\to\\\\index' == PathComparer('/to/index2')\n False\n\n Windows path with drive letters\n\n >>> 'C:\\\\to\\\\index' == PathComparer('/to/index')\n True\n >>> 'C:\\\\to\\\\index' == PathComparer('C:/to/index')\n True\n >>> 'C:\\\\to\\\\index' == PathComparer('D:/to/index')\n False\n \"\"\"\n def __init__(self, path: Union[str, pathlib.Path]):\n \"\"\"\n :param str path: path string, it will be cast as pathlib.Path.\n \"\"\"\n self.path = pathlib.Path(path)\n\n def __str__(self) -> str:\n return self.path.as_posix()\n\n def __repr__(self) -> str:\n return \"<{0.__class__.__name__}: '{0}'>\".format(self)\n\n def __eq__(self, other: Union[str, pathlib.Path]) -> bool: # type: ignore\n return not bool(self.ldiff(other))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py__Sphinx_test_fixtures_f_rootdir.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/fixtures.py__Sphinx_test_fixtures_f_rootdir.return.None", "embedding": null, "metadata": {"file_path": "sphinx/testing/fixtures.py", "file_name": "fixtures.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["impl", "rootdir", "docstring", "pytest_configure", "imports"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Sphinx test fixtures for pytest\"\"\"\n\nimport subprocess\nimport sys\nfrom collections import namedtuple\nfrom io import StringIO\nfrom subprocess import PIPE\nfrom typing import Any, Callable, Dict, Generator, Tuple\n\nimport pytest\n\nfrom sphinx.testing import util\nfrom sphinx.testing.util import SphinxTestApp, SphinxTestAppWrapperForSkipBuilding\n\nDEFAULT_ENABLED_MARKERS = [\n (\n 'sphinx(builder, testroot=None, freshenv=False, confoverrides=None, tags=None,'\n ' docutilsconf=None, parallel=0): arguments to initialize the sphinx test application.'\n ),\n 'test_params(shared_result=...): test parameters.',\n]\n\n\ndef pytest_configure(config):\n \"\"\"Register custom markers\"\"\"\n for marker in DEFAULT_ENABLED_MARKERS:\n config.addinivalue_line('markers', marker)\n\n\n@pytest.fixture(scope='session')\ndef rootdir() -> str:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_builtins_UMASK.getumask_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_builtins_UMASK.getumask_", "embedding": null, "metadata": {"file_path": "sphinx/testing/path.py", "file_name": "path.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["impl:3", "impl", "imports", "getumask"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import builtins\nimport os\nimport shutil\nimport sys\nimport warnings\nfrom typing import IO, Any, Callable, List\n\nfrom sphinx.deprecation import RemovedInSphinx50Warning\n\nFILESYSTEMENCODING = sys.getfilesystemencoding() or sys.getdefaultencoding()\n\n\ndef getumask() -> int:\n \"\"\"Get current umask value\"\"\"\n umask = os.umask(0) # Note: Change umask value temporarily to obtain it\n os.umask(umask)\n\n return umask\n\n\nUMASK = getumask()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path_path.ismount.return.os_path_ismount_self_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path_path.ismount.return.os_path_ismount_self_", "embedding": null, "metadata": {"file_path": "sphinx/testing/path.py", "file_name": "path.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 73, "span_ids": ["path.parent", "path.abspath", "path.isfile", "path.isdir", "path.islink", "path.basename", "path.ismount", "path", "path.isabs"], "tokens": 269}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class path(str):\n \"\"\"\n Represents a path which behaves like a string.\n \"\"\"\n\n @property\n def parent(self) -> \"path\":\n \"\"\"\n The name of the directory the file or directory is in.\n \"\"\"\n return self.__class__(os.path.dirname(self))\n\n def basename(self) -> str:\n return os.path.basename(self)\n\n def abspath(self) -> \"path\":\n \"\"\"\n Returns the absolute path.\n \"\"\"\n return self.__class__(os.path.abspath(self))\n\n def isabs(self) -> bool:\n \"\"\"\n Returns ``True`` if the path is absolute.\n \"\"\"\n return os.path.isabs(self)\n\n def isdir(self) -> bool:\n \"\"\"\n Returns ``True`` if the path is a directory.\n \"\"\"\n return os.path.isdir(self)\n\n def isfile(self) -> bool:\n \"\"\"\n Returns ``True`` if the path is a file.\n \"\"\"\n return os.path.isfile(self)\n\n def islink(self) -> bool:\n \"\"\"\n Returns ``True`` if the path is a symbolic link.\n \"\"\"\n return os.path.islink(self)\n\n def ismount(self) -> bool:\n \"\"\"\n Returns ``True`` if the path is a mount point.\n \"\"\"\n return os.path.ismount(self)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path.copytree_path.copytree.if_os_environ_get_SPHINX.for_root__dirs_files_in.for_name_in_files_.os_chmod_os_path_join_roo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/path.py_path.copytree_path.copytree.if_os_environ_get_SPHINX.for_root__dirs_files_in.for_name_in_files_.os_chmod_os_path_join_roo", "embedding": null, "metadata": {"file_path": "sphinx/testing/path.py", "file_name": "path.py", "file_type": "text/x-python", "category": "implementation", "start_line": 93, "end_line": 113, "span_ids": ["path.copytree"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class path(str):\n\n def copytree(self, destination: str, symlinks: bool = False) -> None:\n \"\"\"\n Recursively copy a directory to the given `destination`. If the given\n `destination` does not exist it will be created.\n\n :param symlinks:\n If ``True`` symbolic links in the source tree result in symbolic\n links in the destination tree otherwise the contents of the files\n pointed to by the symbolic links are copied.\n \"\"\"\n shutil.copytree(self, destination, symlinks=symlinks)\n if os.environ.get('SPHINX_READONLY_TESTDIR'):\n # If source tree is marked read-only (e.g. because it is on a read-only\n # filesystem), `shutil.copytree` will mark the destination as read-only\n # as well. To avoid failures when adding additional files/directories\n # to the destination tree, ensure destination directories are not marked\n # read-only.\n for root, _dirs, files in os.walk(destination):\n os.chmod(root, 0o755 & ~UMASK)\n for name in files:\n os.chmod(os.path.join(root, name), 0o644 & ~UMASK)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py__Sphinx_test_suite_util_assert_startswith.if_not_thing_startswith_p.assert_False_r_does_no": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/testing/util.py__Sphinx_test_suite_util_assert_startswith.if_not_thing_startswith_p.assert_False_r_does_no", "embedding": null, "metadata": {"file_path": "sphinx/testing/util.py", "file_name": "util.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["impl", "assert_re_search", "assert_startswith", "docstring", "imports", "assert_not_re_search"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Sphinx test suite utilities\"\"\"\nimport functools\nimport os\nimport re\nimport sys\nimport warnings\nfrom io import StringIO\nfrom typing import IO, Any, Dict, Generator, List, Pattern\nfrom xml.etree import ElementTree\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\nfrom docutils.parsers.rst import directives, roles\n\nfrom sphinx import application, locale\nfrom sphinx.pycode import ModuleAnalyzer\nfrom sphinx.testing.path import path\nfrom sphinx.util.osutil import relpath\n\n__all__ = [\n 'Struct', 'SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding',\n]\n\n\ndef assert_re_search(regex: Pattern, text: str, flags: int = 0) -> None:\n if not re.search(regex, text, flags):\n assert False, '%r did not match %r' % (regex, text)\n\n\ndef assert_not_re_search(regex: Pattern, text: str, flags: int = 0) -> None:\n if re.search(regex, text, flags):\n assert False, '%r did match %r' % (regex, text)\n\n\ndef assert_startswith(thing: str, prefix: str) -> None:\n if not thing.startswith(prefix):\n assert False, '%r does not start with %r' % (thing, prefix)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py__Theming_support_for_HT_extract_zip.with_ZipFile_filename_as.for_name_in_archive_namel.with_open_path_join_entry.fp_write_archive_read_nam": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py__Theming_support_for_HT_extract_zip.with_ZipFile_filename_as.for_name_in_archive_namel.with_open_path_join_entry.fp_write_archive_read_nam", "embedding": null, "metadata": {"file_path": "sphinx/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 43, "span_ids": ["impl", "imports:15", "impl:2", "imports:9", "docstring", "extract_zip", "docstring:2", "imports", "impl:3", "imports:8", "impl:4"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Theming support for HTML builders.\"\"\"\n\nimport configparser\nimport os\nimport shutil\nimport tempfile\nfrom os import path\nfrom typing import TYPE_CHECKING, Any, Dict, List\nfrom zipfile import ZipFile\n\ntry: # Python < 3.10 (backport)\n from importlib_metadata import entry_points\nexcept ImportError:\n from importlib.metadata import entry_points\n\nfrom sphinx import package_dir\nfrom sphinx.errors import ThemeError\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.osutil import ensuredir\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nlogger = logging.getLogger(__name__)\n\nNODEFAULT = object()\nTHEMECONF = 'theme.conf'\n\n\ndef extract_zip(filename: str, targetdir: str) -> None:\n \"\"\"Extract zip file to target directory.\"\"\"\n ensuredir(targetdir)\n\n with ZipFile(filename) as archive:\n for name in archive.namelist():\n if name.endswith('/'):\n continue\n entry = path.join(targetdir, name)\n ensuredir(path.dirname(entry))\n with open(path.join(entry), 'wb') as fp:\n fp.write(archive.read(name))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_HTMLThemeFactory_HTMLThemeFactory.load_external_theme.try_.except_KeyError_.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/theming.py_HTMLThemeFactory_HTMLThemeFactory.load_external_theme.try_.except_KeyError_.pass", "embedding": null, "metadata": {"file_path": "sphinx/theming.py", "file_name": "theming.py", "file_type": "text/x-python", "category": "implementation", "start_line": 148, "end_line": 206, "span_ids": ["HTMLThemeFactory.load_alabaster_theme", "HTMLThemeFactory.load_additional_themes", "HTMLThemeFactory.load_extra_theme", "HTMLThemeFactory.load_external_theme", "HTMLThemeFactory.load_builtin_themes", "HTMLThemeFactory", "HTMLThemeFactory.load_sphinx_rtd_theme"], "tokens": 504}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLThemeFactory:\n \"\"\"A factory class for HTML Themes.\"\"\"\n\n def __init__(self, app: \"Sphinx\") -> None:\n self.app = app\n self.themes = app.registry.html_themes\n self.load_builtin_themes()\n if getattr(app.config, 'html_theme_path', None):\n self.load_additional_themes(app.config.html_theme_path)\n\n def load_builtin_themes(self) -> None:\n \"\"\"Load built-in themes.\"\"\"\n themes = self.find_themes(path.join(package_dir, 'themes'))\n for name, theme in themes.items():\n self.themes[name] = theme\n\n def load_additional_themes(self, theme_paths: str) -> None:\n \"\"\"Load additional themes placed at specified directories.\"\"\"\n for theme_path in theme_paths:\n abs_theme_path = path.abspath(path.join(self.app.confdir, theme_path))\n themes = self.find_themes(abs_theme_path)\n for name, theme in themes.items():\n self.themes[name] = theme\n\n def load_extra_theme(self, name: str) -> None:\n \"\"\"Try to load a theme with the specified name.\"\"\"\n if name == 'alabaster':\n self.load_alabaster_theme()\n else:\n self.load_external_theme(name)\n\n def load_alabaster_theme(self) -> None:\n \"\"\"Load alabaster theme.\"\"\"\n import alabaster\n self.themes['alabaster'] = path.join(alabaster.get_path(), 'alabaster')\n\n def load_sphinx_rtd_theme(self) -> None:\n \"\"\"Load sphinx_rtd_theme theme (if installed).\"\"\"\n try:\n import sphinx_rtd_theme\n theme_path = sphinx_rtd_theme.get_html_theme_path()\n self.themes['sphinx_rtd_theme'] = path.join(theme_path, 'sphinx_rtd_theme')\n except ImportError:\n pass\n\n def load_external_theme(self, name: str) -> None:\n \"\"\"Try to load a theme using entry_points.\n\n Sphinx refers to ``sphinx_themes`` entry_points.\n \"\"\"\n # look up for new styled entry_points at first\n theme_entry_points = entry_points(group='sphinx.html_themes')\n try:\n entry_point = theme_entry_points[name]\n self.app.registry.load_extension(self.app, entry_point.module)\n self.app.config.post_init_values()\n return\n except KeyError:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py__Docutils_transforms_us_default_substitutions._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py__Docutils_transforms_us_default_substitutions._", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["impl", "impl:2", "docstring", "imports:20", "imports"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Docutils transforms used by Sphinx when reading documents.\"\"\"\n\nimport re\nimport unicodedata\nimport warnings\nfrom typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Tuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node, Text\nfrom docutils.transforms import Transform, Transformer\nfrom docutils.transforms.parts import ContentsFilter\nfrom docutils.transforms.universal import SmartQuotes\nfrom docutils.utils import normalize_language_tag\nfrom docutils.utils.smartquotes import smartchars\n\nfrom sphinx import addnodes\nfrom sphinx.config import Config\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.locale import _, __\nfrom sphinx.util import docutils, logging\nfrom sphinx.util.docutils import new_document\nfrom sphinx.util.i18n import format_date\nfrom sphinx.util.nodes import NodeMatcher, apply_source_workaround, is_smartquotable\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n from sphinx.domain.std import StandardDomain\n from sphinx.environment import BuildEnvironment\n\n\nlogger = logging.getLogger(__name__)\n\ndefault_substitutions = {\n 'version',\n 'release',\n 'today',\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_MoveModuleTargets_MoveModuleTargets.apply.for_node_in_list_self_doc.if_ismod_in_node_and.node_parent_remove_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_MoveModuleTargets_MoveModuleTargets.apply.for_node_in_list_self_doc.if_ismod_in_node_and.node_parent_remove_node_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 114, "end_line": 132, "span_ids": ["MoveModuleTargets", "MoveModuleTargets.apply"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MoveModuleTargets(SphinxTransform):\n \"\"\"\n Move module targets that are the first thing in a section to the section\n title.\n\n XXX Python specific\n \"\"\"\n default_priority = 210\n\n def apply(self, **kwargs: Any) -> None:\n for node in list(self.document.findall(nodes.target)):\n if not node['ids']:\n continue\n if ('ismod' in node and\n node.parent.__class__ is nodes.section and\n # index 0 is the section title node\n node.parent.index(node) == 1):\n node.parent['ids'][0:0] = node['ids']\n node.parent.remove(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_DoctestTransform_FigureAligner.apply.for_node_in_self_document.node_setdefault_align_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_DoctestTransform_FigureAligner.apply.for_node_in_self_document.node_setdefault_align_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 267, "end_line": 290, "span_ids": ["FigureAligner", "DoctestTransform.apply", "FigureAligner.apply", "DoctestTransform"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DoctestTransform(SphinxTransform):\n \"\"\"Set \"doctest\" style to each doctest_block node\"\"\"\n default_priority = 500\n\n def apply(self, **kwargs: Any) -> None:\n for node in self.document.findall(nodes.doctest_block):\n node['classes'].append('doctest')\n\n\nclass FigureAligner(SphinxTransform):\n \"\"\"\n Align figures to center by default.\n \"\"\"\n default_priority = 700\n\n def __init__(self, *args: Any, **kwargs: Any) -> None:\n warnings.warn('FigureAilgner is deprecated.',\n RemovedInSphinx60Warning)\n super().__init__(*args, **kwargs)\n\n def apply(self, **kwargs: Any) -> None:\n matcher = NodeMatcher(nodes.table, nodes.figure)\n for node in self.document.findall(matcher): # type: Element\n node.setdefault('align', 'default')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_FilterSystemMessages_SphinxContentsFilter.visit_image.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_FilterSystemMessages_SphinxContentsFilter.visit_image.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 293, "end_line": 313, "span_ids": ["SphinxContentsFilter.visit_image", "SphinxContentsFilter", "FilterSystemMessages", "FilterSystemMessages.apply"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FilterSystemMessages(SphinxTransform):\n \"\"\"Filter system messages from a doctree.\"\"\"\n default_priority = 999\n\n def apply(self, **kwargs: Any) -> None:\n filterlevel = 2 if self.config.keep_warnings else 5\n for node in list(self.document.findall(nodes.system_message)):\n if node['level'] < filterlevel:\n logger.debug('%s [filtered system message]', node.astext())\n node.parent.remove(node)\n\n\nclass SphinxContentsFilter(ContentsFilter):\n \"\"\"\n Used with BuildEnvironment.add_toc_from() to discard cross-file links\n within table-of-contents link nodes.\n \"\"\"\n visit_pending_xref = ContentsFilter.ignore_node_but_process_children\n\n def visit_image(self, node: nodes.image) -> None:\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_GlossarySorter_GlossarySorter.apply.for_glossary_in_self_docu.if_glossary_sorted_.definition_list_sort": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/__init__.py_GlossarySorter_GlossarySorter.apply.for_glossary_in_self_docu.if_glossary_sorted_.definition_list_sort", "embedding": null, "metadata": {"file_path": "sphinx/transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 401, "end_line": 416, "span_ids": ["GlossarySorter.apply", "GlossarySorter"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GlossarySorter(SphinxTransform):\n \"\"\"Sort glossaries that have the ``sorted`` flag.\"\"\"\n # This must be done after i18n, therefore not right\n # away in the glossary directive.\n default_priority = 500\n\n def apply(self, **kwargs: Any) -> None:\n for glossary in self.document.findall(addnodes.glossary):\n if glossary[\"sorted\"]:\n definition_list = cast(nodes.definition_list, glossary[0])\n definition_list[:] = sorted(\n definition_list,\n key=lambda item: unicodedata.normalize(\n 'NFD',\n cast(nodes.term, item)[0].astext().lower())\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/compact_bullet_list.py__Docutils_transforms_us_RefOnlyListChecker.invisible_visit.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/compact_bullet_list.py__Docutils_transforms_us_RefOnlyListChecker.invisible_visit.pass", "embedding": null, "metadata": {"file_path": "sphinx/transforms/compact_bullet_list.py", "file_name": "compact_bullet_list.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 44, "span_ids": ["RefOnlyListChecker.visit_list_item", "RefOnlyListChecker", "docstring", "RefOnlyListChecker.invisible_visit", "imports", "RefOnlyListChecker.default_visit", "RefOnlyListChecker.visit_bullet_list"], "tokens": 298}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Docutils transforms used by Sphinx when reading documents.\"\"\"\n\nfrom typing import Any, Dict, List, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\n\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.transforms import SphinxTransform\n\n\nclass RefOnlyListChecker(nodes.GenericNodeVisitor):\n \"\"\"Raise `nodes.NodeFound` if non-simple list item is encountered.\n\n Here 'simple' means a list item containing only a paragraph with a\n single reference in it.\n \"\"\"\n\n def default_visit(self, node: Node) -> None:\n raise nodes.NodeFound\n\n def visit_bullet_list(self, node: nodes.bullet_list) -> None:\n pass\n\n def visit_list_item(self, node: nodes.list_item) -> None:\n children: List[Node] = []\n for child in node.children:\n if not isinstance(child, nodes.Invisible):\n children.append(child)\n if len(children) != 1:\n raise nodes.NodeFound\n if not isinstance(children[0], nodes.paragraph):\n raise nodes.NodeFound\n para = children[0]\n if len(para) != 1:\n raise nodes.NodeFound\n if not isinstance(para[0], addnodes.pending_xref):\n raise nodes.NodeFound\n raise nodes.SkipChildren\n\n def invisible_visit(self, node: Node) -> None:\n \"\"\"Invisible nodes should be ignored.\"\"\"\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py__Docutils_transforms_us_N.TypeVar_N_bound_nodes_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py__Docutils_transforms_us_N.TypeVar_N_bound_nodes_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["impl", "impl:2", "docstring", "imports", "imports:18"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Docutils transforms used by Sphinx when reading documents.\"\"\"\n\nfrom os import path\nfrom re import DOTALL, match\nfrom textwrap import indent\nfrom typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type, TypeVar\n\nfrom docutils import nodes\nfrom docutils.io import StringInput\nfrom docutils.nodes import Element\nfrom docutils.utils import relative_path\n\nfrom sphinx import addnodes\nfrom sphinx.config import Config\nfrom sphinx.domains.std import make_glossary_term, split_term_classifiers\nfrom sphinx.locale import __\nfrom sphinx.locale import init as init_locale\nfrom sphinx.transforms import SphinxTransform\nfrom sphinx.util import get_filetype, logging, split_index_msg\nfrom sphinx.util.i18n import docname_to_domain\nfrom sphinx.util.nodes import (IMAGE_TYPE_NODES, LITERAL_TYPE_NODES, NodeMatcher,\n extract_messages, is_pending_meta, traverse_translatable_index)\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nlogger = logging.getLogger(__name__)\n\n# The attributes not copied to the translated node\n#\n# * refexplict: For allow to give (or not to give) an explicit title\n# to the pending_xref on translation\nEXCLUDED_PENDING_XREF_ATTRIBUTES = ('refexplicit',)\n\n\nN = TypeVar('N', bound=nodes.Node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_parse_noqa_PreserveTranslatableMessages.apply.for_node_in_self_document.node_preserve_original_me": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_parse_noqa_PreserveTranslatableMessages.apply.for_node_in_self_document.node_preserve_original_me", "embedding": null, "metadata": {"file_path": "sphinx/transforms/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 94, "span_ids": ["PreserveTranslatableMessages", "PreserveTranslatableMessages.apply", "parse_noqa"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_noqa(source: str) -> Tuple[str, bool]:\n m = match(r\"(.*)(?<!\\\\)#\\s*noqa\\s*$\", source, DOTALL)\n if m:\n return m.group(1), True\n else:\n return source, False\n\n\nclass PreserveTranslatableMessages(SphinxTransform):\n \"\"\"\n Preserve original translatable messages before translation\n \"\"\"\n default_priority = 10 # this MUST be invoked before Locale transform\n\n def apply(self, **kwargs: Any) -> None:\n for node in self.document.findall(addnodes.translatable):\n node.preserve_original_messages()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale_Locale.apply._phase1_replace_referen": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale_Locale.apply._phase1_replace_referen", "embedding": null, "metadata": {"file_path": "sphinx/transforms/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 97, "end_line": 120, "span_ids": ["Locale", "Locale.apply"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Locale(SphinxTransform):\n \"\"\"\n Replace translatable nodes with their translated doctree.\n \"\"\"\n default_priority = 20\n\n def apply(self, **kwargs: Any) -> None:\n settings, source = self.document.settings, self.document['source']\n msgstr = ''\n\n # XXX check if this is reliable\n assert source.startswith(self.env.srcdir)\n docname = path.splitext(relative_path(path.join(self.env.srcdir, 'dummy'),\n source))[0]\n textdomain = docname_to_domain(docname, self.config.gettext_compact)\n\n # fetch translations\n dirs = [path.join(self.env.srcdir, directory)\n for directory in self.config.locale_dirs]\n catalog, has_catalog = init_locale(dirs, self.config.language, textdomain)\n if not has_catalog:\n return\n\n # phase1: replace reference ids with translated names\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.None_2_Locale.apply.None_2.refname_ids_map._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.None_2_Locale.apply.None_2.refname_ids_map._", "embedding": null, "metadata": {"file_path": "sphinx/transforms/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 236, "end_line": 390, "span_ids": ["Locale.apply"], "tokens": 1618}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Locale(SphinxTransform):\n\n def apply(self, **kwargs: Any) -> None:\n # ... other code\n for node, msg in extract_messages(self.document):\n if node.get('translated', False): # to avoid double translation\n continue # skip if the node is already translated by phase1\n\n msgstr = catalog.gettext(msg)\n\n # See above.\n if not isinstance(node, LITERAL_TYPE_NODES):\n msgstr, noqa = parse_noqa(msgstr)\n\n # XXX add marker to untranslated parts\n if not msgstr or msgstr == msg: # as-of-yet untranslated\n continue\n\n # update translatable nodes\n if isinstance(node, addnodes.translatable):\n node.apply_translated_message(msg, msgstr) # type: ignore\n continue\n\n # update meta nodes\n if isinstance(node, nodes.pending) and is_pending_meta(node):\n # docutils-0.17 or older\n node.details['nodes'][0]['content'] = msgstr\n continue\n elif isinstance(node, addnodes.docutils_meta):\n # docutils-0.18+\n node['content'] = msgstr\n continue\n\n if isinstance(node, nodes.image) and node.get('alt') == msg:\n node['alt'] = msgstr\n continue\n\n # Avoid \"Literal block expected; none found.\" warnings.\n # If msgstr ends with '::' then it cause warning message at\n # parser.parse() processing.\n # literal-block-warning is only appear in avobe case.\n if msgstr.strip().endswith('::'):\n msgstr += '\\n\\n dummy literal'\n # dummy literal node will discard by 'patch = patch[0]'\n\n # literalblock need literal block notation to avoid it become\n # paragraph.\n if isinstance(node, LITERAL_TYPE_NODES):\n msgstr = '::\\n\\n' + indent(msgstr, ' ' * 3)\n\n # Structural Subelements phase1\n # There is a possibility that only the title node is created.\n # see: https://docutils.sourceforge.io/docs/ref/doctree.html#structural-subelements\n if isinstance(node, nodes.title):\n # This generates: <section ...><title>msgstr
\n msgstr = msgstr + '\\n' + '=' * len(msgstr) * 2\n\n patch = publish_msgstr(self.app, msgstr, source,\n node.line, self.config, settings)\n # Structural Subelements phase2\n if isinstance(node, nodes.title):\n # get node that placed as a first child\n patch = patch.next_node()\n\n # ignore unexpected markups in translation message\n unexpected: Tuple[Type[Element], ...] = (\n nodes.paragraph, # expected form of translation\n nodes.title # generated by above \"Subelements phase2\"\n )\n\n # following types are expected if\n # config.gettext_additional_targets is configured\n unexpected += LITERAL_TYPE_NODES\n unexpected += IMAGE_TYPE_NODES\n\n if not isinstance(patch, unexpected):\n continue # skip\n\n # auto-numbered foot note reference should use original 'ids'.\n def list_replace_or_append(lst: List[N], old: N, new: N) -> None:\n if old in lst:\n lst[lst.index(old)] = new\n else:\n lst.append(new)\n\n is_autofootnote_ref = NodeMatcher(nodes.footnote_reference, auto=Any)\n old_foot_refs: List[nodes.footnote_reference] = list(node.findall(is_autofootnote_ref)) # NOQA\n new_foot_refs: List[nodes.footnote_reference] = list(patch.findall(is_autofootnote_ref)) # NOQA\n if not noqa and len(old_foot_refs) != len(new_foot_refs):\n old_foot_ref_rawsources = [ref.rawsource for ref in old_foot_refs]\n new_foot_ref_rawsources = [ref.rawsource for ref in new_foot_refs]\n logger.warning(__('inconsistent footnote references in translated message.' +\n ' original: {0}, translated: {1}')\n .format(old_foot_ref_rawsources, new_foot_ref_rawsources),\n location=node, type='i18n', subtype='inconsistent_references')\n old_foot_namerefs: Dict[str, List[nodes.footnote_reference]] = {}\n for r in old_foot_refs:\n old_foot_namerefs.setdefault(r.get('refname'), []).append(r)\n for newf in new_foot_refs:\n refname = newf.get('refname')\n refs = old_foot_namerefs.get(refname, [])\n if not refs:\n newf.parent.remove(newf)\n continue\n\n oldf = refs.pop(0)\n newf['ids'] = oldf['ids']\n for id in newf['ids']:\n self.document.ids[id] = newf\n\n if newf['auto'] == 1:\n # autofootnote_refs\n list_replace_or_append(self.document.autofootnote_refs, oldf, newf)\n else:\n # symbol_footnote_refs\n list_replace_or_append(self.document.symbol_footnote_refs, oldf, newf)\n\n if refname:\n footnote_refs = self.document.footnote_refs.setdefault(refname, [])\n list_replace_or_append(footnote_refs, oldf, newf)\n\n refnames = self.document.refnames.setdefault(refname, [])\n list_replace_or_append(refnames, oldf, newf)\n\n # reference should use new (translated) 'refname'.\n # * reference target \".. _Python: ...\" is not translatable.\n # * use translated refname for section refname.\n # * inline reference \"`Python <...>`_\" has no 'refname'.\n is_refnamed_ref = NodeMatcher(nodes.reference, refname=Any)\n old_refs: List[nodes.reference] = list(node.findall(is_refnamed_ref))\n new_refs: List[nodes.reference] = list(patch.findall(is_refnamed_ref))\n if not noqa and len(old_refs) != len(new_refs):\n old_ref_rawsources = [ref.rawsource for ref in old_refs]\n new_ref_rawsources = [ref.rawsource for ref in new_refs]\n logger.warning(__('inconsistent references in translated message.' +\n ' original: {0}, translated: {1}')\n .format(old_ref_rawsources, new_ref_rawsources),\n location=node, type='i18n', subtype='inconsistent_references')\n old_ref_names = [r['refname'] for r in old_refs]\n new_ref_names = [r['refname'] for r in new_refs]\n orphans = list(set(old_ref_names) - set(new_ref_names))\n for newr in new_refs:\n if not self.document.has_name(newr['refname']):\n # Maybe refname is translated but target is not translated.\n # Note: multiple translated refnames break link ordering.\n if orphans:\n newr['refname'] = orphans.pop(0)\n else:\n # orphan refnames is already empty!\n # reference number is same in new_refs and old_refs.\n pass\n\n self.document.note_refname(newr)\n\n # refnamed footnote should use original 'ids'.\n is_refnamed_footnote_ref = NodeMatcher(nodes.footnote_reference, refname=Any)\n old_foot_refs = list(node.findall(is_refnamed_footnote_ref))\n new_foot_refs = list(patch.findall(is_refnamed_footnote_ref))\n refname_ids_map: Dict[str, List[str]] = {}\n # ... other code\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.None_2.None_16_Locale.apply.None_2._to_avoid_double_transla": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/i18n.py_Locale.apply.None_2.None_16_Locale.apply.None_2._to_avoid_double_transla", "embedding": null, "metadata": {"file_path": "sphinx/transforms/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 391, "end_line": 473, "span_ids": ["Locale.apply"], "tokens": 999}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Locale(SphinxTransform):\n\n def apply(self, **kwargs: Any) -> None:\n for node, msg in extract_messages(self.document):\n # ... other code\n if not noqa and len(old_foot_refs) != len(new_foot_refs):\n old_foot_ref_rawsources = [ref.rawsource for ref in old_foot_refs]\n new_foot_ref_rawsources = [ref.rawsource for ref in new_foot_refs]\n logger.warning(__('inconsistent footnote references in translated message.' +\n ' original: {0}, translated: {1}')\n .format(old_foot_ref_rawsources, new_foot_ref_rawsources),\n location=node, type='i18n', subtype='inconsistent_references')\n for oldf in old_foot_refs:\n refname_ids_map.setdefault(oldf[\"refname\"], []).append(oldf[\"ids\"])\n for newf in new_foot_refs:\n refname = newf[\"refname\"]\n if refname_ids_map.get(refname):\n newf[\"ids\"] = refname_ids_map[refname].pop(0)\n\n # citation should use original 'ids'.\n is_citation_ref = NodeMatcher(nodes.citation_reference, refname=Any)\n old_cite_refs: List[nodes.citation_reference] = list(node.findall(is_citation_ref))\n new_cite_refs: List[nodes.citation_reference] = list(patch.findall(is_citation_ref)) # NOQA\n refname_ids_map = {}\n if not noqa and len(old_cite_refs) != len(new_cite_refs):\n old_cite_ref_rawsources = [ref.rawsource for ref in old_cite_refs]\n new_cite_ref_rawsources = [ref.rawsource for ref in new_cite_refs]\n logger.warning(__('inconsistent citation references in translated message.' +\n ' original: {0}, translated: {1}')\n .format(old_cite_ref_rawsources, new_cite_ref_rawsources),\n location=node, type='i18n', subtype='inconsistent_references')\n for oldc in old_cite_refs:\n refname_ids_map.setdefault(oldc[\"refname\"], []).append(oldc[\"ids\"])\n for newc in new_cite_refs:\n refname = newc[\"refname\"]\n if refname_ids_map.get(refname):\n newc[\"ids\"] = refname_ids_map[refname].pop()\n\n # Original pending_xref['reftarget'] contain not-translated\n # target name, new pending_xref must use original one.\n # This code restricts to change ref-targets in the translation.\n old_xrefs = list(node.findall(addnodes.pending_xref))\n new_xrefs = list(patch.findall(addnodes.pending_xref))\n xref_reftarget_map = {}\n if not noqa and len(old_xrefs) != len(new_xrefs):\n old_xref_rawsources = [xref.rawsource for xref in old_xrefs]\n new_xref_rawsources = [xref.rawsource for xref in new_xrefs]\n logger.warning(__('inconsistent term references in translated message.' +\n ' original: {0}, translated: {1}')\n .format(old_xref_rawsources, new_xref_rawsources),\n location=node, type='i18n', subtype='inconsistent_references')\n\n def get_ref_key(node: addnodes.pending_xref) -> Optional[Tuple[str, str, str]]:\n case = node[\"refdomain\"], node[\"reftype\"]\n if case == ('std', 'term'):\n return None\n else:\n return (\n node[\"refdomain\"],\n node[\"reftype\"],\n node['reftarget'],)\n\n for old in old_xrefs:\n key = get_ref_key(old)\n if key:\n xref_reftarget_map[key] = old.attributes\n for new in new_xrefs:\n key = get_ref_key(new)\n # Copy attributes to keep original node behavior. Especially\n # copying 'reftarget', 'py:module', 'py:class' are needed.\n for k, v in xref_reftarget_map.get(key, {}).items():\n if k not in EXCLUDED_PENDING_XREF_ATTRIBUTES:\n new[k] = v\n\n # update leaves\n for child in patch.children:\n child.parent = node\n node.children = patch.children\n\n # for highlighting that expects .rawsource and .astext() are same.\n if isinstance(node, LITERAL_TYPE_NODES):\n node.rawsource = node.astext()\n\n if isinstance(node, nodes.image) and node.get('alt') != msg:\n node['uri'] = patch['uri']\n continue # do not mark translated\n\n node['translated'] = True # to avoid double translation\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py__Docutils_transforms_us_logger.logging_getLogger___name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py__Docutils_transforms_us_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["impl", "docstring", "imports"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Docutils transforms used by Sphinx.\"\"\"\n\nimport re\nfrom typing import Any, Dict, List, Optional, Sequence, Tuple, Type, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import pending_xref\nfrom sphinx.application import Sphinx\nfrom sphinx.domains import Domain\nfrom sphinx.errors import NoUri\nfrom sphinx.locale import __\nfrom sphinx.transforms import SphinxTransform\nfrom sphinx.util import logging\nfrom sphinx.util.docutils import SphinxTranslator\nfrom sphinx.util.nodes import find_pending_xref_condition, process_only_nodes\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_ReferencesResolver.warn_missing_reference_ReferencesResolver.find_pending_xref_condition.for_condition_in_conditio.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_ReferencesResolver.warn_missing_reference_ReferencesResolver.find_pending_xref_condition.for_condition_in_conditio.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 164, "end_line": 211, "span_ids": ["ReferencesResolver.warn_missing_reference", "ReferencesResolver.find_pending_xref_condition"], "tokens": 489}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ReferencesResolver(SphinxPostTransform):\n\n def warn_missing_reference(self, refdoc: str, typ: str, target: str,\n node: pending_xref, domain: Optional[Domain]) -> None:\n warn = node.get('refwarn')\n if self.config.nitpicky:\n warn = True\n dtype = '%s:%s' % (domain.name, typ) if domain else typ\n if self.config.nitpick_ignore:\n if (dtype, target) in self.config.nitpick_ignore:\n warn = False\n # for \"std\" types also try without domain name\n if (not domain or domain.name == 'std') and \\\n (typ, target) in self.config.nitpick_ignore:\n warn = False\n if self.config.nitpick_ignore_regex:\n def matches_ignore(entry_type: str, entry_target: str) -> bool:\n for ignore_type, ignore_target in self.config.nitpick_ignore_regex:\n if re.fullmatch(ignore_type, entry_type) and \\\n re.fullmatch(ignore_target, entry_target):\n return True\n return False\n if matches_ignore(dtype, target):\n warn = False\n # for \"std\" types also try without domain name\n if (not domain or domain.name == 'std') and \\\n matches_ignore(typ, target):\n warn = False\n if not warn:\n return\n\n if self.app.emit_firstresult('warn-missing-reference', domain, node):\n return\n elif domain and typ in domain.dangling_warnings:\n msg = domain.dangling_warnings[typ] % {'target': target}\n elif node.get('refdomain', 'std') not in ('', 'std'):\n msg = (__('%s:%s reference target not found: %s') %\n (node['refdomain'], typ, target))\n else:\n msg = __('%r reference target not found: %s') % (typ, target)\n logger.warning(msg, location=node, type='ref', subtype=typ)\n\n def find_pending_xref_condition(self, node: pending_xref, conditions: Sequence[str]\n ) -> Optional[List[Node]]:\n for condition in conditions:\n matched = find_pending_xref_condition(node, condition)\n if matched:\n return matched.children\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_SigElementFallbackTransform_SigElementFallbackTransform.fallback.for_node_in_self_document.node_replace_self_newnode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_SigElementFallbackTransform_SigElementFallbackTransform.fallback.for_node_in_self_document.node_replace_self_newnode", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 225, "end_line": 250, "span_ids": ["SigElementFallbackTransform.fallback", "SigElementFallbackTransform", "SigElementFallbackTransform.run"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SigElementFallbackTransform(SphinxPostTransform):\n \"\"\"Fallback various desc_* nodes to inline if translator does not support them.\"\"\"\n default_priority = 200\n\n def run(self, **kwargs: Any) -> None:\n def has_visitor(translator: Type[nodes.NodeVisitor], node: Type[Element]) -> bool:\n return hasattr(translator, \"visit_%s\" % node.__name__)\n\n translator = self.app.builder.get_translator_class()\n if isinstance(translator, SphinxTranslator):\n # subclass of SphinxTranslator supports desc_sig_element nodes automatically.\n return\n\n # for the leaf elements (desc_sig_element), the translator should support _all_\n if not all(has_visitor(translator, node) for node in addnodes.SIG_ELEMENTS):\n self.fallback(addnodes.desc_sig_element)\n\n if not has_visitor(translator, addnodes.desc_inline):\n self.fallback(addnodes.desc_inline)\n\n def fallback(self, nodeType: Any) -> None:\n for node in self.document.findall(nodeType):\n newnode = nodes.inline()\n newnode.update_all_atts(node)\n newnode.extend(node)\n node.replace_self(newnode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_PropagateDescDomain_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/__init__.py_PropagateDescDomain_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 253, "end_line": 274, "span_ids": ["PropagateDescDomain.run", "setup", "PropagateDescDomain"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PropagateDescDomain(SphinxPostTransform):\n \"\"\"Add the domain name of the parent node as a class in each desc_signature node.\"\"\"\n default_priority = 200\n\n def run(self, **kwargs: Any) -> None:\n for node in self.document.findall(addnodes.desc_signature):\n if node.parent.get('domain'):\n node['classes'].append(node.parent['domain'])\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n app.add_post_transform(ReferencesResolver)\n app.add_post_transform(OnlyNodeTransform)\n app.add_post_transform(SigElementFallbackTransform)\n app.add_post_transform(PropagateDescDomain)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py__transforms_for_code_bl_HighlightLanguageTransform.apply.for_node_in_list_self_doc.node_parent_remove_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/code.py__transforms_for_code_bl_HighlightLanguageTransform.apply.for_node_in_list_self_doc.node_parent_remove_node_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/code.py", "file_name": "code.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["HighlightSetting", "docstring", "HighlightLanguageTransform.apply", "imports", "HighlightLanguageTransform"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"transforms for code-blocks.\"\"\"\n\nimport sys\nfrom typing import Any, Dict, List, NamedTuple\n\nfrom docutils import nodes\nfrom docutils.nodes import Node, TextElement\nfrom pygments.lexers import PythonConsoleLexer, guess_lexer\n\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.ext import doctest\nfrom sphinx.transforms import SphinxTransform\n\n\nclass HighlightSetting(NamedTuple):\n language: str\n force: bool\n lineno_threshold: int\n\n\nclass HighlightLanguageTransform(SphinxTransform):\n \"\"\"\n Apply highlight_language to all literal_block nodes.\n\n This refers both :confval:`highlight_language` setting and\n :rst:dir:`highlightlang` directive. After processing, this transform\n removes ``highlightlang`` node from doctree.\n \"\"\"\n default_priority = 400\n\n def apply(self, **kwargs: Any) -> None:\n visitor = HighlightLanguageVisitor(self.document,\n self.config.highlight_language)\n self.document.walkabout(visitor)\n\n for node in list(self.document.findall(addnodes.highlightlang)):\n node.parent.remove(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py__Docutils_transforms_us_BaseImageConverter.imagedir.return.os_path_join_self_app_doc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/post_transforms/images.py__Docutils_transforms_us_BaseImageConverter.imagedir.return.os_path_join_self_app_doc", "embedding": null, "metadata": {"file_path": "sphinx/transforms/post_transforms/images.py", "file_name": "images.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["impl", "BaseImageConverter", "BaseImageConverter.apply", "BaseImageConverter.imagedir", "docstring", "BaseImageConverter.handle", "imports", "BaseImageConverter.match"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Docutils transforms used by Sphinx.\"\"\"\n\nimport os\nimport re\nfrom math import ceil\nfrom typing import Any, Dict, List, Optional, Tuple\n\nfrom docutils import nodes\n\nfrom sphinx.application import Sphinx\nfrom sphinx.locale import __\nfrom sphinx.transforms import SphinxTransform\nfrom sphinx.util import epoch_to_rfc1123, logging, requests, rfc1123_to_epoch, sha1\nfrom sphinx.util.images import get_image_extension, guess_mimetype, parse_data_uri\nfrom sphinx.util.osutil import ensuredir\n\nlogger = logging.getLogger(__name__)\n\nMAX_FILENAME_LEN = 32\nCRITICAL_PATH_CHAR_RE = re.compile('[:;<>|*\" ]')\n\n\nclass BaseImageConverter(SphinxTransform):\n def apply(self, **kwargs: Any) -> None:\n for node in self.document.findall(nodes.image):\n if self.match(node):\n self.handle(node)\n\n def match(self, node: nodes.image) -> bool:\n return True\n\n def handle(self, node: nodes.image) -> None:\n pass\n\n @property\n def imagedir(self) -> str:\n return os.path.join(self.app.doctreedir, 'images')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/references.py__Docutils_transforms_us_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/transforms/references.py__Docutils_transforms_us_", "embedding": null, "metadata": {"file_path": "sphinx/transforms/references.py", "file_name": "references.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 46, "span_ids": ["SphinxDomains.apply", "impl", "setup", "docstring", "SphinxDomains", "imports:4", "imports", "SphinxDanglingReferences.apply", "SphinxDanglingReferences"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Docutils transforms used by Sphinx.\"\"\"\n\nfrom typing import TYPE_CHECKING, Any, Dict\n\nfrom docutils.transforms.references import DanglingReferences\n\nfrom sphinx.transforms import SphinxTransform\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nclass SphinxDanglingReferences(DanglingReferences):\n \"\"\"DanglingReferences transform which does not output info messages.\"\"\"\n\n def apply(self, **kwargs: Any) -> None:\n try:\n reporter = self.document.reporter\n report_level = reporter.report_level\n\n # suppress INFO level messages for a while\n reporter.report_level = max(reporter.WARNING_LEVEL, reporter.report_level)\n super().apply()\n finally:\n reporter.report_level = report_level\n\n\nclass SphinxDomains(SphinxTransform):\n \"\"\"Collect objects to Sphinx domains for cross references.\"\"\"\n default_priority = 850\n\n def apply(self, **kwargs: Any) -> None:\n for domain in self.env.domains.values():\n domain.process_doc(self.env, self.env.docname, self.document)\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.add_transform(SphinxDanglingReferences)\n app.add_transform(SphinxDomains)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py__Utility_functions_for__path_stabilize.return.unicodedata_normalize_NF": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py__Utility_functions_for__path_stabilize.return.unicodedata_normalize_NF", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 54, "span_ids": ["impl", "path_stabilize", "impl:2", "docstring", "imports:24", "imports", "docname_join"], "tokens": 432}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utility functions for Sphinx.\"\"\"\n\nimport functools\nimport hashlib\nimport os\nimport posixpath\nimport re\nimport sys\nimport tempfile\nimport traceback\nimport unicodedata\nfrom datetime import datetime\nfrom importlib import import_module\nfrom os import path\nfrom time import mktime, strptime\nfrom typing import (IO, TYPE_CHECKING, Any, Callable, Dict, Iterable, Iterator, List, Optional,\n Pattern, Set, Tuple, Type)\nfrom urllib.parse import parse_qsl, quote_plus, urlencode, urlsplit, urlunsplit\n\nfrom sphinx.errors import ExtensionError, FiletypeNotFoundError, SphinxParallelError\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.console import bold, colorize, strip_colors, term_width_line # type: ignore\nfrom sphinx.util.matching import patfilter # noqa\nfrom sphinx.util.nodes import (caption_ref_re, explicit_title_re, # noqa\n nested_parse_with_titles, split_explicit_title)\n# import other utilities; partly for backwards compatibility, so don't\n# prune unused ones indiscriminately\nfrom sphinx.util.osutil import (SEP, copyfile, copytimes, ensuredir, make_filename, # noqa\n mtimes_of_files, os_path, relative_uri)\nfrom sphinx.util.typing import PathMatcher\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nlogger = logging.getLogger(__name__)\n\n# Generally useful regular expressions.\nws_re: Pattern = re.compile(r'\\s+')\nurl_re: Pattern = re.compile(r'(?P<schema>.+)://.*')\n\n\n# High-level utility functions.\n\ndef docname_join(basedocname: str, docname: str) -> str:\n return posixpath.normpath(\n posixpath.join('/' + basedocname, '..', docname))[1:]\n\n\ndef path_stabilize(filepath: str) -> str:\n \"Normalize path separator and unicode string\"\n newpath = filepath.replace(os.path.sep, SEP)\n return unicodedata.normalize('NFC', newpath)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_get_matching_files_get_matching_files.for_root_dirs_files_in_.for__i_filename_in_sorte.yield_filename": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_get_matching_files_get_matching_files.for_root_dirs_files_in_.for__i_filename_in_sorte.yield_filename", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 57, "end_line": 82, "span_ids": ["get_matching_files"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_matching_files(dirname: str,\n exclude_matchers: Tuple[PathMatcher, ...] = ()) -> Iterable[str]: # NOQA\n \"\"\"Get all file names in a directory, recursively.\n\n Exclude files and dirs matching some matcher in *exclude_matchers*.\n \"\"\"\n # dirname is a normalized absolute path.\n dirname = path.normpath(path.abspath(dirname))\n\n for root, dirs, files in os.walk(dirname, followlinks=True):\n relativeroot = path.relpath(root, dirname)\n if relativeroot == \".\":\n relativeroot = \"\" # suppress dirname for files on the target dir\n\n qdirs = enumerate(path_stabilize(path.join(relativeroot, dn))\n for dn in dirs) # type: Iterable[Tuple[int, str]]\n qfiles = enumerate(path_stabilize(path.join(relativeroot, fn))\n for fn in files) # type: Iterable[Tuple[int, str]]\n for matcher in exclude_matchers:\n qdirs = [entry for entry in qdirs if not matcher(entry[1])]\n qfiles = [entry for entry in qfiles if not matcher(entry[1])]\n\n dirs[:] = sorted(dirs[i] for (i, _) in qdirs)\n\n for _i, filename in sorted(qfiles):\n yield filename", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_get_filetype_FilenameUniqDict.add_file.return.uniquename": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_get_filetype_FilenameUniqDict.add_file.return.uniquename", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 85, "end_line": 115, "span_ids": ["get_filetype", "FilenameUniqDict.add_file", "FilenameUniqDict"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_filetype(source_suffix: Dict[str, str], filename: str) -> str:\n for suffix, filetype in source_suffix.items():\n if filename.endswith(suffix):\n # If default filetype (None), considered as restructuredtext.\n return filetype or 'restructuredtext'\n else:\n raise FiletypeNotFoundError\n\n\nclass FilenameUniqDict(dict):\n \"\"\"\n A dictionary that automatically generates unique names for its keys,\n interpreted as filenames, and keeps track of a set of docnames they\n appear in. Used for images and downloadable files in the environment.\n \"\"\"\n def __init__(self) -> None:\n self._existing: Set[str] = set()\n\n def add_file(self, docname: str, newfile: str) -> str:\n if newfile in self:\n self[newfile][0].add(docname)\n return self[newfile][1]\n uniquename = path.basename(newfile)\n base, ext = path.splitext(uniquename)\n i = 0\n while uniquename in self._existing:\n i += 1\n uniquename = '%s%s%s' % (base, i, ext)\n self[newfile] = ({docname}, uniquename)\n self._existing.add(uniquename)\n return uniquename", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_split_into_split_index_msg.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_split_into_split_index_msg.return.result", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 331, "end_line": 357, "span_ids": ["split_index_msg", "split_into"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def split_into(n: int, type: str, value: str) -> List[str]:\n \"\"\"Split an index entry into a given number of parts at semicolons.\"\"\"\n parts = [x.strip() for x in value.split(';', n - 1)]\n if sum(1 for part in parts if part) < n:\n raise ValueError('invalid %s index entry %r' % (type, value))\n return parts\n\n\ndef split_index_msg(type: str, value: str) -> List[str]:\n # new entry types must be listed in directives/other.py!\n if type == 'single':\n try:\n result = split_into(2, 'single', value)\n except ValueError:\n result = split_into(1, 'single', value)\n elif type == 'pair':\n result = split_into(2, 'pair', value)\n elif type == 'triple':\n result = split_into(3, 'triple', value)\n elif type == 'see':\n result = split_into(2, 'see', value)\n elif type == 'seealso':\n result = split_into(2, 'see', value)\n else:\n raise ValueError('invalid %s index entry %r' % (type, value))\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_format_exception_cut_frames_import_object.try_.except_AttributeError_I.if_source_.else_.raise_ExtensionError_Cou": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/__init__.py_format_exception_cut_frames_import_object.try_.except_AttributeError_I.if_source_.else_.raise_ExtensionError_Cou", "embedding": null, "metadata": {"file_path": "sphinx/util/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 360, "end_line": 390, "span_ids": ["format_exception_cut_frames", "import_object"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def format_exception_cut_frames(x: int = 1) -> str:\n \"\"\"Format an exception with traceback, but only the last x frames.\"\"\"\n typ, val, tb = sys.exc_info()\n # res = ['Traceback (most recent call last):\\n']\n res: List[str] = []\n tbres = traceback.format_tb(tb)\n res += tbres[-x:]\n res += traceback.format_exception_only(typ, val)\n return ''.join(res)\n\n\ndef import_object(objname: str, source: str = None) -> Any:\n \"\"\"Import python object by qualname.\"\"\"\n try:\n objpath = objname.split('.')\n modname = objpath.pop(0)\n obj = import_module(modname)\n for name in objpath:\n modname += '.' + name\n try:\n obj = getattr(obj, name)\n except AttributeError:\n obj = import_module(modname)\n\n return obj\n except (AttributeError, ImportError) as exc:\n if source:\n raise ExtensionError('Could not import %s (needed for %s)' %\n (objname, source), exc) from exc\n else:\n raise ExtensionError('Could not import %s' % objname, exc) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py__Utility_functions_comm_integers_literal_suffix_re.re_compile_r_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py__Utility_functions_comm_integers_literal_suffix_re.re_compile_r_x_", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 42, "span_ids": ["impl", "docstring", "imports"], "tokens": 437}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utility functions common to the C and C++ domains.\"\"\"\n\nimport re\nfrom copy import deepcopy\nfrom typing import Any, Callable, List, Match, Optional, Pattern, Tuple, Union\n\nfrom docutils import nodes\nfrom docutils.nodes import TextElement\n\nfrom sphinx import addnodes\nfrom sphinx.config import Config\nfrom sphinx.util import logging\n\nlogger = logging.getLogger(__name__)\n\nStringifyTransform = Callable[[Any], str]\n\n\n_whitespace_re = re.compile(r'(?u)\\s+')\nanon_identifier_re = re.compile(r'(@[a-zA-Z0-9_])[a-zA-Z0-9_]*\\b')\nidentifier_re = re.compile(r'''(?x)\n ( # This 'extends' _anon_identifier_re with the ordinary identifiers,\n # make sure they are in sync.\n (~?\\b[a-zA-Z_]) # ordinary identifiers\n | (@[a-zA-Z0-9_]) # our extension for names of anonymous entities\n )\n [a-zA-Z0-9_]*\\b\n''')\ninteger_literal_re = re.compile(r'[1-9][0-9]*(\\'[0-9]+)*')\noctal_literal_re = re.compile(r'0[0-7]*(\\'[0-7]+)*')\nhex_literal_re = re.compile(r'0[xX][0-9a-fA-F]+(\\'[0-9a-fA-F]+)*')\nbinary_literal_re = re.compile(r'0[bB][01]+(\\'[01]+)*')\nintegers_literal_suffix_re = re.compile(r'''(?x)\n # unsigned and/or (long) long, in any order, but at least one of them\n (\n ([uU] ([lL] | (ll) | (LL))?)\n |\n (([lL] | (ll) | (LL)) [uU]?)\n )\\b\n # the ending word boundary is important for distinguishing\n # between suffixes and UDLs in C++\n''')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_float_literal_re_NoOldIdError.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_float_literal_re_NoOldIdError.pass", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 80, "span_ids": ["impl:23", "impl", "NoOldIdError", "verify_description_mode"], "tokens": 561}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "float_literal_re = re.compile(r'''(?x)\n [+-]?(\n # decimal\n ([0-9]+(\\'[0-9]+)*[eE][+-]?[0-9]+(\\'[0-9]+)*)\n | (([0-9]+(\\'[0-9]+)*)?\\.[0-9]+(\\'[0-9]+)*([eE][+-]?[0-9]+(\\'[0-9]+)*)?)\n | ([0-9]+(\\'[0-9]+)*\\.([eE][+-]?[0-9]+(\\'[0-9]+)*)?)\n # hex\n | (0[xX][0-9a-fA-F]+(\\'[0-9a-fA-F]+)*[pP][+-]?[0-9a-fA-F]+(\\'[0-9a-fA-F]+)*)\n | (0[xX]([0-9a-fA-F]+(\\'[0-9a-fA-F]+)*)?\\.\n [0-9a-fA-F]+(\\'[0-9a-fA-F]+)*([pP][+-]?[0-9a-fA-F]+(\\'[0-9a-fA-F]+)*)?)\n | (0[xX][0-9a-fA-F]+(\\'[0-9a-fA-F]+)*\\.([pP][+-]?[0-9a-fA-F]+(\\'[0-9a-fA-F]+)*)?)\n )\n''')\nfloat_literal_suffix_re = re.compile(r'[fFlL]\\b')\n# the ending word boundary is important for distinguishing between suffixes and UDLs in C++\nchar_literal_re = re.compile(r'''(?x)\n ((?:u8)|u|U|L)?\n '(\n (?:[^\\\\'])\n | (\\\\(\n (?:['\"?\\\\abfnrtv])\n | (?:[0-7]{1,3})\n | (?:x[0-9a-fA-F]{2})\n | (?:u[0-9a-fA-F]{4})\n | (?:U[0-9a-fA-F]{8})\n ))\n )'\n''')\n\n\ndef verify_description_mode(mode: str) -> None:\n if mode not in ('lastIsName', 'noneIsName', 'markType', 'markName', 'param', 'udl'):\n raise Exception(\"Description mode '%s' is invalid.\" % mode)\n\n\nclass NoOldIdError(Exception):\n # Used to avoid implementing unneeded id generation for old id schemes.\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py___ASTCPPAttribute.describe_signature.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py___ASTCPPAttribute.describe_signature.None_2", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 113, "end_line": 132, "span_ids": ["ASTAttribute", "ASTCPPAttribute.describe_signature", "ASTBaseBase.__repr__", "ASTCPPAttribute", "ASTCPPAttribute._stringify", "ASTAttribute.describe_signature"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "################################################################################\n# Attributes\n################################################################################\n\nclass ASTAttribute(ASTBaseBase):\n def describe_signature(self, signode: TextElement) -> None:\n raise NotImplementedError(repr(self))\n\n\nclass ASTCPPAttribute(ASTAttribute):\n def __init__(self, arg: str) -> None:\n self.arg = arg\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return \"[[\" + self.arg + \"]]\"\n\n def describe_signature(self, signode: TextElement) -> None:\n signode.append(addnodes.desc_sig_punctuation('[[', '[['))\n signode.append(nodes.Text(self.arg, self.arg))\n signode.append(addnodes.desc_sig_punctuation(']]', ']]'))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_ASTGnuAttribute_ASTGnuAttributeList.describe_signature.signode_append_nodes_Text": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_ASTGnuAttribute_ASTGnuAttributeList.describe_signature.signode_append_nodes_Text", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 135, "end_line": 164, "span_ids": ["ASTGnuAttribute", "ASTGnuAttributeList._stringify", "ASTGnuAttribute._stringify", "ASTGnuAttributeList", "ASTGnuAttributeList.describe_signature"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTGnuAttribute(ASTBaseBase):\n def __init__(self, name: str, args: Optional[\"ASTBaseParenExprList\"]) -> None:\n self.name = name\n self.args = args\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = [self.name]\n if self.args:\n res.append(transform(self.args))\n return ''.join(res)\n\n\nclass ASTGnuAttributeList(ASTAttribute):\n def __init__(self, attrs: List[ASTGnuAttribute]) -> None:\n self.attrs = attrs\n\n def _stringify(self, transform: StringifyTransform) -> str:\n res = ['__attribute__((']\n first = True\n for attr in self.attrs:\n if not first:\n res.append(', ')\n first = False\n res.append(transform(attr))\n res.append('))')\n return ''.join(res)\n\n def describe_signature(self, signode: TextElement) -> None:\n txt = str(self)\n signode.append(nodes.Text(txt, txt))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_ASTIdAttribute_DefinitionError.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/cfamily.py_ASTIdAttribute_DefinitionError.pass", "embedding": null, "metadata": {"file_path": "sphinx/util/cfamily.py", "file_name": "cfamily.py", "file_type": "text/x-python", "category": "implementation", "start_line": 167, "end_line": 208, "span_ids": ["ASTParenAttribute", "DefinitionError", "ASTIdAttribute.describe_signature", "ASTParenAttribute.describe_signature", "ASTIdAttribute._stringify", "ASTParenAttribute._stringify", "UnsupportedMultiCharacterCharLiteral", "ASTIdAttribute", "ASTBaseParenExprList"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ASTIdAttribute(ASTAttribute):\n \"\"\"For simple attributes defined by the user.\"\"\"\n\n def __init__(self, id: str) -> None:\n self.id = id\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return self.id\n\n def describe_signature(self, signode: TextElement) -> None:\n signode.append(nodes.Text(self.id, self.id))\n\n\nclass ASTParenAttribute(ASTAttribute):\n \"\"\"For paren attributes defined by the user.\"\"\"\n\n def __init__(self, id: str, arg: str) -> None:\n self.id = id\n self.arg = arg\n\n def _stringify(self, transform: StringifyTransform) -> str:\n return self.id + '(' + self.arg + ')'\n\n def describe_signature(self, signode: TextElement) -> None:\n txt = str(self)\n signode.append(nodes.Text(txt, txt))\n\n\n################################################################################\n\nclass ASTBaseParenExprList(ASTBaseBase):\n pass\n\n\n################################################################################\n\nclass UnsupportedMultiCharacterCharLiteral(Exception):\n pass\n\n\nclass DefinitionError(Exception):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/compat.py__modules_for_backward_c_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/compat.py__modules_for_backward_c_", "embedding": null, "metadata": {"file_path": "sphinx/util/compat.py", "file_name": "compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["impl", "setup", "docstring", "register_application_for_autosummary", "imports", "imports:3"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"modules for backward compatibility\"\"\"\n\nimport sys\nfrom typing import TYPE_CHECKING, Any, Dict\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\ndef register_application_for_autosummary(app: \"Sphinx\") -> None:\n \"\"\"Register application object to autosummary module.\n\n Since Sphinx-1.7, documenters and attrgetters are registered into\n application object. As a result, the arguments of\n ``get_documenter()`` has been changed. To keep compatibility,\n this handler registers application object to the module.\n \"\"\"\n if 'sphinx.ext.autosummary' in sys.modules:\n from sphinx.ext import autosummary\n if hasattr(autosummary, '_objects'):\n autosummary._objects['_app'] = app # type: ignore\n else:\n autosummary._app = app # type: ignore\n\n\ndef setup(app: \"Sphinx\") -> Dict[str, Any]:\n app.connect('builder-inited', register_application_for_autosummary, priority=100)\n\n return {\n 'version': 'builtin',\n 'parallel_read_safe': True,\n 'parallel_write_safe': True,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py__Format_colored_console_terminal_safe.return.s_encode_ascii_backsl": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py__Format_colored_console_terminal_safe.return.s_encode_ascii_backsl", "embedding": null, "metadata": {"file_path": "sphinx/util/console.py", "file_name": "console.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["imports:5", "impl", "impl:2", "docstring", "docstring:2", "imports", "terminal_safe"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Format colored console output.\"\"\"\n\nimport os\nimport re\nimport sys\nfrom typing import Dict, Pattern\n\ntry:\n # check if colorama is installed to support color on Windows\n import colorama\nexcept ImportError:\n colorama = None\n\n\n_ansi_re: Pattern = re.compile('\\x1b\\\\[(\\\\d\\\\d;){0,2}\\\\d\\\\dm')\ncodes: Dict[str, str] = {}\n\n\ndef terminal_safe(s: str) -> str:\n \"\"\"Safely encode a string for printing to the terminal.\"\"\"\n return s.encode('ascii', 'backslashreplace').decode('ascii')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_get_terminal_width_term_width_line.if_not_codes_.else_.return.text_ljust__tw_len_text": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_get_terminal_width_term_width_line.if_not_codes_.else_.return.text_ljust__tw_len_text", "embedding": null, "metadata": {"file_path": "sphinx/util/console.py", "file_name": "console.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 48, "span_ids": ["get_terminal_width", "impl:9", "term_width_line"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_terminal_width() -> int:\n \"\"\"Borrowed from the py lib.\"\"\"\n try:\n import fcntl\n import struct\n import termios\n call = fcntl.ioctl(0, termios.TIOCGWINSZ, struct.pack('hhhh', 0, 0, 0, 0))\n height, width = struct.unpack('hhhh', call)[:2]\n terminal_width = width\n except Exception:\n # FALLBACK\n terminal_width = int(os.environ.get('COLUMNS', \"80\")) - 1\n return terminal_width\n\n\n_tw: int = get_terminal_width()\n\n\ndef term_width_line(text: str) -> str:\n if not codes:\n # if no coloring, don't output fancy backspaces\n return text + '\\n'\n else:\n # codes are not displayed, this must be taken into account\n return text.ljust(_tw + len(text) - len(_ansi_re.sub('', text))) + '\\r'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_color_terminal_coloron.codes_update__orig_codes_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/console.py_color_terminal_coloron.codes_update__orig_codes_", "embedding": null, "metadata": {"file_path": "sphinx/util/console.py", "file_name": "console.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 78, "span_ids": ["color_terminal", "coloron", "nocolor"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def color_terminal() -> bool:\n if 'NO_COLOR' in os.environ:\n return False\n if sys.platform == 'win32' and colorama is not None:\n colorama.init()\n return True\n if 'FORCE_COLOR' in os.environ:\n return True\n if not hasattr(sys.stdout, 'isatty'):\n return False\n if not sys.stdout.isatty():\n return False\n if 'COLORTERM' in os.environ:\n return True\n term = os.environ.get('TERM', 'dumb').lower()\n if term in ('xterm', 'linux') or 'color' in term:\n return True\n return False\n\n\ndef nocolor() -> None:\n if sys.platform == 'win32' and colorama is not None:\n colorama.deinit()\n codes.clear()\n\n\ndef coloron() -> None:\n codes.update(_orig_codes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py__Utility_code_for_Doc___is_single_paragraph.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py__Utility_code_for_Doc___is_single_paragraph.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["impl", "imports:10", "impl:2", "_is_single_paragraph", "docstring", "imports"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utility code for \"Doc fields\".\n\n\"Doc fields\" are reST field lists in object descriptions that will\nbe domain-specifically transformed to a more appealing presentation.\n\"\"\"\nfrom typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, Union, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\nfrom docutils.parsers.rst.states import Inliner\n\nfrom sphinx import addnodes\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.typing import TextlikeNode\n\nif TYPE_CHECKING:\n from sphinx.directives import ObjectDescription\n\nlogger = logging.getLogger(__name__)\n\n\ndef _is_single_paragraph(node: nodes.field_body) -> bool:\n \"\"\"True if the node only contains one paragraph (and system messages).\"\"\"\n if len(node) == 0:\n return False\n elif len(node) > 1:\n for subnode in node[1:]: # type: Node\n if not isinstance(subnode, nodes.system_message):\n return False\n if isinstance(node[0], nodes.paragraph):\n return True\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field.make_xref_Field.make_xref.return.nodes_inline_target_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_Field.make_xref_Field.make_xref.return.nodes_inline_target_", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 86, "span_ids": ["Field.make_xref"], "tokens": 357}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Field:\n\n def make_xref(self, rolename: str, domain: str, target: str,\n innernode: Type[TextlikeNode] = addnodes.literal_emphasis,\n contnode: Node = None, env: BuildEnvironment = None,\n inliner: Inliner = None, location: Node = None) -> Node:\n # note: for backwards compatibility env is last, but not optional\n assert env is not None\n assert (inliner is None) == (location is None), (inliner, location)\n if not rolename:\n return contnode or innernode(target, target)\n # The domain is passed from DocFieldTransformer. So it surely exists.\n # So we don't need to take care the env.get_domain() raises an exception.\n role = env.get_domain(domain).role(rolename)\n if role is None or inliner is None:\n if role is None and inliner is not None:\n msg = __(\"Problem in %s domain: field is supposed \"\n \"to use role '%s', but that role is not in the domain.\")\n logger.warning(__(msg), domain, rolename, location=location)\n refnode = addnodes.pending_xref('', refdomain=domain, refexplicit=False,\n reftype=rolename, reftarget=target)\n refnode += contnode or innernode(target, target)\n env.get_domain(domain).process_field_xref(refnode)\n return refnode\n lineno = logging.get_source_line(location)[1]\n ns, messages = role(rolename, target, target, lineno, inliner, {}, [])\n return nodes.inline(target, '', *ns)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_DocFieldTransformer_DocFieldTransformer.transform_all.for_child_in_node_.if_isinstance_child_node.self_transform_child_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_DocFieldTransformer_DocFieldTransformer.transform_all.for_child_in_node_.if_isinstance_child_node.self_transform_child_", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 229, "end_line": 246, "span_ids": ["DocFieldTransformer.transform_all", "DocFieldTransformer"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocFieldTransformer:\n \"\"\"\n Transforms field lists in \"doc field\" syntax into better-looking\n equivalents, using the field type definitions given on a domain.\n \"\"\"\n typemap: Dict[str, Tuple[Field, bool]]\n\n def __init__(self, directive: \"ObjectDescription\") -> None:\n self.directive = directive\n\n self.typemap = directive.get_field_type_map()\n\n def transform_all(self, node: addnodes.desc_content) -> None:\n \"\"\"Transform all field list children of a node.\"\"\"\n # don't traverse, only handle field lists that are immediate children\n for child in node:\n if isinstance(child, nodes.field_list):\n self.transform(child)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_DocFieldTransformer.transform_DocFieldTransformer.transform.for_field_in_cast_List_no.if_typedesc_is_grouped_.else_.entries_append_typedesc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_DocFieldTransformer.transform_DocFieldTransformer.transform.for_field_in_cast_List_no.if_typedesc_is_grouped_.else_.entries_append_typedesc_", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 248, "end_line": 350, "span_ids": ["DocFieldTransformer.transform"], "tokens": 921}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocFieldTransformer:\n\n def transform(self, node: nodes.field_list) -> None:\n \"\"\"Transform a single field list *node*.\"\"\"\n typemap = self.typemap\n\n entries: List[Union[nodes.field, Tuple[Field, Any, Node]]] = []\n groupindices: Dict[str, int] = {}\n types: Dict[str, Dict] = {}\n\n # step 1: traverse all fields and collect field types and content\n for field in cast(List[nodes.field], node):\n assert len(field) == 2\n field_name = cast(nodes.field_name, field[0])\n field_body = cast(nodes.field_body, field[1])\n try:\n # split into field type and argument\n fieldtype_name, fieldarg = field_name.astext().split(None, 1)\n except ValueError:\n # maybe an argument-less field type?\n fieldtype_name, fieldarg = field_name.astext(), ''\n typedesc, is_typefield = typemap.get(fieldtype_name, (None, None))\n\n # collect the content, trying not to keep unnecessary paragraphs\n if _is_single_paragraph(field_body):\n paragraph = cast(nodes.paragraph, field_body[0])\n content = paragraph.children\n else:\n content = field_body.children\n\n # sort out unknown fields\n if typedesc is None or typedesc.has_arg != bool(fieldarg):\n # either the field name is unknown, or the argument doesn't\n # match the spec; capitalize field name and be done with it\n new_fieldname = fieldtype_name[0:1].upper() + fieldtype_name[1:]\n if fieldarg:\n new_fieldname += ' ' + fieldarg\n field_name[0] = nodes.Text(new_fieldname)\n entries.append(field)\n\n # but if this has a type then we can at least link it\n if (typedesc and is_typefield and content and\n len(content) == 1 and isinstance(content[0], nodes.Text)):\n typed_field = cast(TypedField, typedesc)\n target = content[0].astext()\n xrefs = typed_field.make_xrefs(\n typed_field.typerolename,\n self.directive.domain,\n target,\n contnode=content[0],\n env=self.directive.state.document.settings.env\n )\n if _is_single_paragraph(field_body):\n paragraph = cast(nodes.paragraph, field_body[0])\n paragraph.clear()\n paragraph.extend(xrefs)\n else:\n field_body.clear()\n field_body += nodes.paragraph('', '', *xrefs)\n\n continue\n\n typename = typedesc.name\n\n # if the field specifies a type, put it in the types collection\n if is_typefield:\n # filter out only inline nodes; others will result in invalid\n # markup being written out\n content = [n for n in content if isinstance(n, (nodes.Inline, nodes.Text))]\n if content:\n types.setdefault(typename, {})[fieldarg] = content\n continue\n\n # also support syntax like ``:param type name:``\n if typedesc.is_typed:\n try:\n argtype, argname = fieldarg.rsplit(None, 1)\n except ValueError:\n pass\n else:\n types.setdefault(typename, {})[argname] = \\\n [nodes.Text(argtype)]\n fieldarg = argname\n\n translatable_content = nodes.inline(field_body.rawsource,\n translatable=True)\n translatable_content.document = field_body.parent.document\n translatable_content.source = field_body.parent.source\n translatable_content.line = field_body.parent.line\n translatable_content += content\n\n # grouped entries need to be collected in one entry, while others\n # get one entry per field\n if typedesc.is_grouped:\n if typename in groupindices:\n group = cast(Tuple[Field, List, Node], entries[groupindices[typename]])\n else:\n groupindices[typename] = len(entries)\n group = (typedesc, [], field)\n entries.append(group)\n new_entry = typedesc.make_entry(fieldarg, [translatable_content])\n group[1].append(new_entry)\n else:\n new_entry = typedesc.make_entry(fieldarg, [translatable_content])\n entries.append((typedesc, new_entry, field))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_DocFieldTransformer.transform._step_2_all_entries_are_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docfields.py_DocFieldTransformer.transform._step_2_all_entries_are_", "embedding": null, "metadata": {"file_path": "sphinx/util/docfields.py", "file_name": "docfields.py", "file_type": "text/x-python", "category": "implementation", "start_line": 352, "end_line": 367, "span_ids": ["DocFieldTransformer.transform"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocFieldTransformer:\n\n def transform(self, node: nodes.field_list) -> None:\n\n # step 2: all entries are collected, construct the new field list\n new_list = nodes.field_list()\n for entry in entries:\n if isinstance(entry, nodes.field):\n # pass-through old field\n new_list += entry\n else:\n fieldtype, items, location = entry\n fieldtypes = types.get(fieldtype.name, {})\n env = self.directive.state.document.settings.env\n inliner = self.directive.state.inliner\n new_list += fieldtype.make_field(fieldtypes, self.directive.domain, items,\n env=env, inliner=inliner, location=location)\n\n node.replace_self(new_list)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docstrings.py__Utilities_for_docstrin_extract_metadata.return.metadata": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docstrings.py__Utilities_for_docstrin_extract_metadata.return.metadata", "embedding": null, "metadata": {"file_path": "sphinx/util/docstrings.py", "file_name": "docstrings.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 49, "span_ids": ["impl", "docstring", "imports", "separate_metadata", "extract_metadata"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utilities for docstring processing.\"\"\"\n\nimport re\nimport sys\nimport warnings\nfrom typing import Dict, List, Tuple\n\nfrom docutils.parsers.rst.states import Body\n\nfrom sphinx.deprecation import RemovedInSphinx50Warning, RemovedInSphinx60Warning\n\nfield_list_item_re = re.compile(Body.patterns['field_marker'])\n\n\ndef separate_metadata(s: str) -> Tuple[str, Dict[str, str]]:\n \"\"\"Separate docstring into metadata and others.\"\"\"\n in_other_element = False\n metadata: Dict[str, str] = {}\n lines = []\n\n if not s:\n return s, metadata\n\n for line in prepare_docstring(s):\n if line.strip() == '':\n in_other_element = False\n lines.append(line)\n else:\n matched = field_list_item_re.match(line)\n if matched and not in_other_element:\n field_name = matched.group()[1:].split(':', 1)[0]\n if field_name.startswith('meta '):\n name = field_name[5:].strip()\n metadata[name] = line[matched.end():].strip()\n else:\n lines.append(line)\n else:\n in_other_element = True\n lines.append(line)\n\n return '\\n'.join(lines), metadata\n\n\ndef extract_metadata(s: str) -> Dict[str, str]:\n warnings.warn(\"extract_metadata() is deprecated.\",\n RemovedInSphinx60Warning, stacklevel=2)\n\n docstring, metadata = separate_metadata(s)\n return metadata", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py__Utility_functions_for__register_node.if_not_hasattr_nodes_Gene.additional_nodes_add_node": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py__Utility_functions_for__register_node.if_not_hasattr_nodes_Gene.additional_nodes_add_node", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 103, "span_ids": ["unregister_role", "impl", "register_role", "is_node_registered", "impl:6", "docstring", "docutils_namespace", "is_directive_registered", "imports:21", "imports", "register_directive", "is_role_registered", "register_node"], "tokens": 783}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utility functions for docutils.\"\"\"\n\nimport os\nimport re\nfrom contextlib import contextmanager\nfrom copy import copy\nfrom os import path\nfrom types import ModuleType\nfrom typing import (IO, TYPE_CHECKING, Any, Callable, Dict, Generator, List, Optional, Set,\n Tuple, Type, cast)\n\nimport docutils\nfrom docutils import nodes\nfrom docutils.io import FileOutput\nfrom docutils.nodes import Element, Node, system_message\nfrom docutils.parsers.rst import Directive, directives, roles\nfrom docutils.parsers.rst.states import Inliner\nfrom docutils.statemachine import State, StateMachine, StringList\nfrom docutils.utils import Reporter, unescape\nfrom packaging import version\n\nfrom sphinx.errors import SphinxError\nfrom sphinx.locale import _, __\nfrom sphinx.util import logging\nfrom sphinx.util.typing import RoleFunction\n\nlogger = logging.getLogger(__name__)\nreport_re = re.compile('^(.+?:(?:\\\\d+)?): \\\\((DEBUG|INFO|WARNING|ERROR|SEVERE)/(\\\\d+)?\\\\) ')\n\nif TYPE_CHECKING:\n from sphinx.builders import Builder\n from sphinx.config import Config\n from sphinx.environment import BuildEnvironment\n\n\n__version_info__ = version.parse(docutils.__version__).release\nadditional_nodes: Set[Type[Element]] = set()\n\n\n@contextmanager\ndef docutils_namespace() -> Generator[None, None, None]:\n \"\"\"Create namespace for reST parsers.\"\"\"\n try:\n _directives = copy(directives._directives) # type: ignore\n _roles = copy(roles._roles) # type: ignore\n\n yield\n finally:\n directives._directives = _directives # type: ignore\n roles._roles = _roles # type: ignore\n\n for node in list(additional_nodes):\n unregister_node(node)\n additional_nodes.discard(node)\n\n\ndef is_directive_registered(name: str) -> bool:\n \"\"\"Check the *name* directive is already registered.\"\"\"\n return name in directives._directives # type: ignore\n\n\ndef register_directive(name: str, directive: Type[Directive]) -> None:\n \"\"\"Register a directive to docutils.\n\n This modifies global state of docutils. So it is better to use this\n inside ``docutils_namespace()`` to prevent side-effects.\n \"\"\"\n directives.register_directive(name, directive)\n\n\ndef is_role_registered(name: str) -> bool:\n \"\"\"Check the *name* role is already registered.\"\"\"\n return name in roles._roles # type: ignore\n\n\ndef register_role(name: str, role: RoleFunction) -> None:\n \"\"\"Register a role to docutils.\n\n This modifies global state of docutils. So it is better to use this\n inside ``docutils_namespace()`` to prevent side-effects.\n \"\"\"\n roles.register_local_role(name, role)\n\n\ndef unregister_role(name: str) -> None:\n \"\"\"Unregister a role from docutils.\"\"\"\n roles._roles.pop(name, None) # type: ignore\n\n\ndef is_node_registered(node: Type[Element]) -> bool:\n \"\"\"Check the *node* is already registered.\"\"\"\n return hasattr(nodes.GenericNodeVisitor, 'visit_' + node.__name__)\n\n\ndef register_node(node: Type[Element]) -> None:\n \"\"\"Register a node to docutils.\n\n This modifies global state of some visitors. So it is better to use this\n inside ``docutils_namespace()`` to prevent side-effects.\n \"\"\"\n if not hasattr(nodes.GenericNodeVisitor, 'visit_' + node.__name__):\n nodes._add_node_class_names([node.__name__]) # type: ignore\n additional_nodes.add(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_patched_rst_get_language_patched_rst_get_language.try_.finally_.docutils.parsers.rst.languages.get_language.get_language": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_patched_rst_get_language_patched_rst_get_language.try_.finally_.docutils.parsers.rst.languages.get_language.get_language", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 138, "end_line": 159, "span_ids": ["patched_rst_get_language"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef patched_rst_get_language() -> Generator[None, None, None]:\n \"\"\"Patch docutils.parsers.rst.languages.get_language().\n Starting from docutils 0.17, get_language() in ``rst.languages``\n also has a reporter, which needs to be disabled temporarily.\n\n This should also work for old versions of docutils,\n because reporter is none by default.\n\n refs: https://github.com/sphinx-doc/sphinx/issues/10179\n \"\"\"\n from docutils.parsers.rst.languages import get_language\n\n def patched_get_language(language_code: str, reporter: Reporter = None) -> Any:\n return get_language(language_code)\n\n try:\n docutils.parsers.rst.languages.get_language = patched_get_language\n yield\n finally:\n # restore original implementations\n docutils.parsers.rst.languages.get_language = get_language", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_using_user_docutils_conf_patch_docutils.with_patched_get_language.yield": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_using_user_docutils_conf_patch_docutils.with_patched_get_language.yield", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 162, "end_line": 182, "span_ids": ["using_user_docutils_conf", "patch_docutils"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef using_user_docutils_conf(confdir: Optional[str]) -> Generator[None, None, None]:\n \"\"\"Let docutils know the location of ``docutils.conf`` for Sphinx.\"\"\"\n try:\n docutilsconfig = os.environ.get('DOCUTILSCONFIG', None)\n if confdir:\n os.environ['DOCUTILSCONFIG'] = path.join(path.abspath(confdir), 'docutils.conf')\n\n yield\n finally:\n if docutilsconfig is None:\n os.environ.pop('DOCUTILSCONFIG', None)\n else:\n os.environ['DOCUTILSCONFIG'] = docutilsconfig\n\n\n@contextmanager\ndef patch_docutils(confdir: Optional[str] = None) -> Generator[None, None, None]:\n \"\"\"Patch to docutils temporarily.\"\"\"\n with patched_get_language(), patched_rst_get_language(), using_user_docutils_conf(confdir):\n yield", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_CustomReSTDispatcher_CustomReSTDispatcher.role.return.self_role_func_role_name_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_CustomReSTDispatcher_CustomReSTDispatcher.role.return.self_role_func_role_name_", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 185, "end_line": 220, "span_ids": ["CustomReSTDispatcher.__exit__", "CustomReSTDispatcher.__enter__", "CustomReSTDispatcher.role", "CustomReSTDispatcher.directive", "CustomReSTDispatcher", "CustomReSTDispatcher.disable", "CustomReSTDispatcher.enable"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CustomReSTDispatcher:\n \"\"\"Custom reST's mark-up dispatcher.\n\n This replaces docutils's directives and roles dispatch mechanism for reST parser\n by original one temporarily.\n \"\"\"\n\n def __init__(self) -> None:\n self.directive_func: Callable = lambda *args: (None, [])\n self.roles_func: Callable = lambda *args: (None, [])\n\n def __enter__(self) -> None:\n self.enable()\n\n def __exit__(self, exc_type: Type[Exception], exc_value: Exception, traceback: Any) -> None: # NOQA\n self.disable()\n\n def enable(self) -> None:\n self.directive_func = directives.directive\n self.role_func = roles.role\n\n directives.directive = self.directive\n roles.role = self.role\n\n def disable(self) -> None:\n directives.directive = self.directive_func\n roles.role = self.role_func\n\n def directive(self,\n directive_name: str, language_module: ModuleType, document: nodes.document\n ) -> Tuple[Optional[Type[Directive]], List[system_message]]:\n return self.directive_func(directive_name, language_module, document)\n\n def role(self, role_name: str, language_module: ModuleType, lineno: int, reporter: Reporter\n ) -> Tuple[RoleFunction, List[system_message]]:\n return self.role_func(role_name, language_module, lineno, reporter)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_ElementLookupError_sphinx_domains.lookup_domain_element.raise_ElementLookupError": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_ElementLookupError_sphinx_domains.lookup_domain_element.raise_ElementLookupError", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 223, "end_line": 263, "span_ids": ["sphinx_domains", "sphinx_domains.lookup_domain_element", "ElementLookupError"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ElementLookupError(Exception):\n pass\n\n\nclass sphinx_domains(CustomReSTDispatcher):\n \"\"\"Monkey-patch directive and role dispatch, so that domain-specific\n markup takes precedence.\n \"\"\"\n def __init__(self, env: \"BuildEnvironment\") -> None:\n self.env = env\n super().__init__()\n\n def lookup_domain_element(self, type: str, name: str) -> Any:\n \"\"\"Lookup a markup element (directive or role), given its name which can\n be a full name (with domain).\n \"\"\"\n name = name.lower()\n # explicit domain given?\n if ':' in name:\n domain_name, name = name.split(':', 1)\n if domain_name in self.env.domains:\n domain = self.env.get_domain(domain_name)\n element = getattr(domain, type)(name)\n if element is not None:\n return element, []\n else:\n logger.warning(_('unknown directive or role name: %s:%s'), domain_name, name)\n # else look in the default domain\n else:\n def_domain = self.env.temp_data.get('default_domain')\n if def_domain is not None:\n element = getattr(def_domain, type)(name)\n if element is not None:\n return element, []\n\n # always look in the std domain\n element = getattr(self.env.get_domain('std'), type)(name)\n if element is not None:\n return element, []\n\n raise ElementLookupError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_sphinx_domains.directive_WarningStream.write.if_not_matched_.else_.logger_log_type_message_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_sphinx_domains.directive_WarningStream.write.if_not_matched_.else_.logger_log_type_message_", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 265, "end_line": 289, "span_ids": ["WarningStream", "WarningStream.write", "sphinx_domains.directive", "sphinx_domains.role"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class sphinx_domains(CustomReSTDispatcher):\n\n def directive(self,\n directive_name: str, language_module: ModuleType, document: nodes.document\n ) -> Tuple[Optional[Type[Directive]], List[system_message]]:\n try:\n return self.lookup_domain_element('directive', directive_name)\n except ElementLookupError:\n return super().directive(directive_name, language_module, document)\n\n def role(self, role_name: str, language_module: ModuleType, lineno: int, reporter: Reporter\n ) -> Tuple[RoleFunction, List[system_message]]:\n try:\n return self.lookup_domain_element('role', role_name)\n except ElementLookupError:\n return super().role(role_name, language_module, lineno, reporter)\n\n\nclass WarningStream:\n def write(self, text: str) -> None:\n matched = report_re.search(text)\n if not matched:\n logger.warning(text.rstrip(\"\\r\\n\"))\n else:\n location, type, level = matched.groups()\n message = report_re.sub('', text).rstrip()\n logger.log(type, message, location=location)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_LoggingReporter_LoggingReporter.__init__.super___init___source_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_LoggingReporter_LoggingReporter.__init__.super___init___source_", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 292, "end_line": 304, "span_ids": ["LoggingReporter.__init__", "LoggingReporter.from_reporter", "LoggingReporter"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LoggingReporter(Reporter):\n @classmethod\n def from_reporter(cls, reporter: Reporter) -> \"LoggingReporter\":\n \"\"\"Create an instance of LoggingReporter from other reporter object.\"\"\"\n return cls(reporter.source, reporter.report_level, reporter.halt_level,\n reporter.debug_flag, reporter.error_handler)\n\n def __init__(self, source: str, report_level: int = Reporter.WARNING_LEVEL,\n halt_level: int = Reporter.SEVERE_LEVEL, debug: bool = False,\n error_handler: str = 'backslashreplace') -> None:\n stream = cast(IO, WarningStream())\n super().__init__(source, report_level, halt_level,\n stream, debug, error_handler=error_handler)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxDirective_SphinxDirective.get_location.return._join_str_s_for_s_in_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxDirective_SphinxDirective.get_location.return._join_str_s_for_s_in_", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 354, "end_line": 383, "span_ids": ["SphinxDirective", "SphinxDirective.env", "SphinxDirective.get_source_info", "SphinxDirective.config", "SphinxDirective.set_source_info", "SphinxDirective.get_location"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxDirective(Directive):\n \"\"\"A base class for Sphinx directives.\n\n This class provides helper methods for Sphinx directives.\n\n .. note:: The subclasses of this class might not work with docutils.\n This class is strongly coupled with Sphinx.\n \"\"\"\n\n @property\n def env(self) -> \"BuildEnvironment\":\n \"\"\"Reference to the :class:`.BuildEnvironment` object.\"\"\"\n return self.state.document.settings.env\n\n @property\n def config(self) -> \"Config\":\n \"\"\"Reference to the :class:`.Config` object.\"\"\"\n return self.env.config\n\n def get_source_info(self) -> Tuple[str, int]:\n \"\"\"Get source and line number.\"\"\"\n return self.state_machine.get_source_and_line(self.lineno)\n\n def set_source_info(self, node: Node) -> None:\n \"\"\"Set source and line number to the node.\"\"\"\n node.source, node.line = self.get_source_info()\n\n def get_location(self) -> str:\n \"\"\"Get current location info for logging.\"\"\"\n return ':'.join(str(s) for s in self.get_source_info())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxRole.run_SphinxRole.get_location.return._join_str_s_for_s_in_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxRole.run_SphinxRole.get_location.return._join_str_s_for_s_in_", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 426, "end_line": 449, "span_ids": ["SphinxRole.get_source_info", "SphinxRole.run", "SphinxRole.get_location", "SphinxRole.set_source_info", "SphinxRole.env", "SphinxRole.config"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxRole:\n\n def run(self) -> Tuple[List[Node], List[system_message]]:\n raise NotImplementedError\n\n @property\n def env(self) -> \"BuildEnvironment\":\n \"\"\"Reference to the :class:`.BuildEnvironment` object.\"\"\"\n return self.inliner.document.settings.env\n\n @property\n def config(self) -> \"Config\":\n \"\"\"Reference to the :class:`.Config` object.\"\"\"\n return self.env.config\n\n def get_source_info(self, lineno: int = None) -> Tuple[str, int]:\n if lineno is None:\n lineno = self.lineno\n return self.inliner.reporter.get_source_and_line(lineno) # type: ignore\n\n def set_source_info(self, node: Node, lineno: int = None) -> None:\n node.source, node.line = self.get_source_info(lineno)\n\n def get_location(self) -> str:\n \"\"\"Get current location info for logging.\"\"\"\n return ':'.join(str(s) for s in self.get_source_info())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxTranslator.dispatch_departure_SphinxTranslator.unknown_visit.logger_warning____unknow": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_SphinxTranslator.dispatch_departure_SphinxTranslator.unknown_visit.logger_warning____unknow", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 521, "end_line": 539, "span_ids": ["SphinxTranslator.dispatch_departure", "SphinxTranslator.unknown_visit"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SphinxTranslator(nodes.NodeVisitor):\n\n def dispatch_departure(self, node: Node) -> None:\n \"\"\"\n Dispatch node to appropriate departure method.\n The priority of departure method is:\n\n 1. ``self.depart_{node_class}()``\n 2. ``self.depart_{super_node_class}()``\n 3. ``self.unknown_departure()``\n \"\"\"\n for node_class in node.__class__.__mro__:\n method = getattr(self, 'depart_%s' % (node_class.__name__), None)\n if method:\n method(node)\n break\n else:\n super().dispatch_departure(node)\n\n def unknown_visit(self, node: Node) -> None:\n logger.warning(__('unknown node type: %r'), node, location=node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py__Node_findall_is_a_new___document_cache__.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py__Node_findall_is_a_new___document_cache__.None", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 542, "end_line": 554, "span_ids": ["SphinxTranslator.unknown_visit", "impl:10"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Node.findall() is a new interface to traverse a doctree since docutils-0.18.\n# This applies a patch docutils-0.17 or older to be available Node.findall()\n# method to use it from our codebase.\nif __version_info__ < (0, 18):\n def findall(self, *args, **kwargs):\n return iter(self.traverse(*args, **kwargs))\n\n Node.findall = findall # type: ignore\n\n\n# cache a vanilla instance of nodes.document\n# Used in new_document() function\n__document_cache__: Optional[nodes.document] = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_new_document_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/docutils.py_new_document_", "embedding": null, "metadata": {"file_path": "sphinx/util/docutils.py", "file_name": "docutils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 557, "end_line": 577, "span_ids": ["new_document"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def new_document(source_path: str, settings: Any = None) -> nodes.document:\n \"\"\"Return a new empty document object. This is an alternative of docutils'.\n\n This is a simple wrapper for ``docutils.utils.new_document()``. It\n caches the result of docutils' and use it on second call for instantiation.\n This makes an instantiation of document nodes much faster.\n \"\"\"\n global __document_cache__\n if __document_cache__ is None:\n __document_cache__ = docutils.utils.new_document(source_path)\n\n if settings is None:\n # Make a copy of ``settings`` from cache to accelerate instantiation\n settings = copy(__document_cache__.settings)\n\n # Create a new instance of nodes.document using cached reporter\n from sphinx import addnodes\n document = addnodes.document(settings, __document_cache__.reporter, source=source_path)\n document.note_source(source_path, -1)\n return document", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/fileutil.py__File_utility_functions_copy_asset_file.if_source_lower_endswit.else_.copyfile_source_destinat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/fileutil.py__File_utility_functions_copy_asset_file.if_source_lower_endswit.else_.copyfile_source_destinat", "embedding": null, "metadata": {"file_path": "sphinx/util/fileutil.py", "file_name": "fileutil.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 46, "span_ids": ["impl", "copy_asset_file", "docstring", "imports", "imports:7"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"File utility functions for Sphinx.\"\"\"\n\nimport os\nimport posixpath\nfrom typing import TYPE_CHECKING, Callable, Dict\n\nfrom docutils.utils import relative_path\n\nfrom sphinx.util.osutil import copyfile, ensuredir\nfrom sphinx.util.typing import PathMatcher\n\nif TYPE_CHECKING:\n from sphinx.util.template import BaseRenderer\n\n\ndef copy_asset_file(source: str, destination: str,\n context: Dict = None, renderer: \"BaseRenderer\" = None) -> None:\n \"\"\"Copy an asset file to destination.\n\n On copying, it expands the template variables if context argument is given and\n the asset is a template file.\n\n :param source: The path to source file\n :param destination: The path to destination file or directory\n :param context: The template variables. If not given, template files are simply copied\n :param renderer: The template engine. If not given, SphinxRenderer is used by default\n \"\"\"\n if not os.path.exists(source):\n return\n\n if os.path.isdir(destination):\n # Use source filename if destination points a directory\n destination = os.path.join(destination, os.path.basename(source))\n\n if source.lower().endswith('_t') and context is not None:\n if renderer is None:\n from sphinx.util.template import SphinxRenderer\n renderer = SphinxRenderer()\n\n with open(source, encoding='utf-8') as fsrc:\n if destination.lower().endswith('_t'):\n destination = destination[:-2]\n with open(destination, 'w', encoding='utf-8') as fdst:\n fdst.write(renderer.render_string(fsrc.read(), context))\n else:\n copyfile(source, destination)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py__Builder_superclass_for_LocaleFileInfoBase.charset": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py__Builder_superclass_for_LocaleFileInfoBase.charset", "embedding": null, "metadata": {"file_path": "sphinx/util/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["impl", "imports:15", "impl:2", "docstring", "imports", "LocaleFileInfoBase"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Builder superclass for all builders.\"\"\"\n\nimport os\nimport re\nimport warnings\nfrom datetime import datetime, timezone\nfrom os import path\nfrom typing import TYPE_CHECKING, Callable, Generator, List, NamedTuple, Tuple, Union\n\nimport babel.dates\nfrom babel.messages.mofile import write_mo\nfrom babel.messages.pofile import read_po\n\nfrom sphinx.deprecation import RemovedInSphinx70Warning\nfrom sphinx.errors import SphinxError\nfrom sphinx.locale import __\nfrom sphinx.util import logging\nfrom sphinx.util.osutil import SEP, canon_path, relpath\n\nif TYPE_CHECKING:\n from sphinx.environment import BuildEnvironment\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass LocaleFileInfoBase(NamedTuple):\n base_dir: str\n domain: str\n charset: str", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogRepository_CatalogRepository.locale_dirs.for_locale_dir_in_self__l.if_path_exists_locale_pat.else_.logger_verbose____locale": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogRepository_CatalogRepository.locale_dirs.for_locale_dir_in_self__l.if_path_exists_locale_pat.else_.logger_verbose____locale", "embedding": null, "metadata": {"file_path": "sphinx/util/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 71, "end_line": 92, "span_ids": ["CatalogRepository.locale_dirs", "CatalogRepository"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CatalogRepository:\n \"\"\"A repository for message catalogs.\"\"\"\n\n def __init__(self, basedir: str, locale_dirs: List[str],\n language: str, encoding: str) -> None:\n self.basedir = basedir\n self._locale_dirs = locale_dirs\n self.language = language\n self.encoding = encoding\n\n @property\n def locale_dirs(self) -> Generator[str, None, None]:\n if not self.language:\n return\n\n for locale_dir in self._locale_dirs:\n locale_dir = path.join(self.basedir, locale_dir)\n locale_path = path.join(locale_dir, self.language, 'LC_MESSAGES')\n if path.exists(locale_path):\n yield locale_dir\n else:\n logger.verbose(__('locale_dir %s does not exists'), locale_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogRepository.pofiles__date_format_mappings_u": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_CatalogRepository.pofiles__date_format_mappings_u", "embedding": null, "metadata": {"file_path": "sphinx/util/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 94, "end_line": 126, "span_ids": ["CatalogRepository.catalogs", "docname_to_domain", "CatalogRepository.pofiles"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CatalogRepository:\n\n @property\n def pofiles(self) -> Generator[Tuple[str, str], None, None]:\n for locale_dir in self.locale_dirs:\n basedir = path.join(locale_dir, self.language, 'LC_MESSAGES')\n for root, dirnames, filenames in os.walk(basedir):\n # skip dot-directories\n for dirname in dirnames:\n if dirname.startswith('.'):\n dirnames.remove(dirname)\n\n for filename in filenames:\n if filename.endswith('.po'):\n fullpath = path.join(root, filename)\n yield basedir, relpath(fullpath, basedir)\n\n @property\n def catalogs(self) -> Generator[CatalogInfo, None, None]:\n for basedir, filename in self.pofiles:\n domain = canon_path(path.splitext(filename)[0])\n yield CatalogInfo(basedir, domain, self.encoding)\n\n\ndef docname_to_domain(docname: str, compaction: Union[bool, str]) -> str:\n \"\"\"Convert docname to domain for catalogs.\"\"\"\n if isinstance(compaction, str):\n return compaction\n if compaction:\n return docname.split(SEP, 1)[0]\n else:\n return docname\n\n\n# date_format mappings: ustrftime() to babel.dates.format_datetime()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_date_format_mappings_date_format_re.re_compile_s_j": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_date_format_mappings_date_format_re.re_compile_s_j", "embedding": null, "metadata": {"file_path": "sphinx/util/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 127, "end_line": 167, "span_ids": ["impl:6", "impl:4"], "tokens": 742}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "date_format_mappings = {\n '%a': 'EEE', # Weekday as locale\u2019s abbreviated name.\n '%A': 'EEEE', # Weekday as locale\u2019s full name.\n '%b': 'MMM', # Month as locale\u2019s abbreviated name.\n '%B': 'MMMM', # Month as locale\u2019s full name.\n '%c': 'medium', # Locale\u2019s appropriate date and time representation.\n '%-d': 'd', # Day of the month as a decimal number.\n '%d': 'dd', # Day of the month as a zero-padded decimal number.\n '%-H': 'H', # Hour (24-hour clock) as a decimal number [0,23].\n '%H': 'HH', # Hour (24-hour clock) as a zero-padded decimal number [00,23].\n '%-I': 'h', # Hour (12-hour clock) as a decimal number [1,12].\n '%I': 'hh', # Hour (12-hour clock) as a zero-padded decimal number [01,12].\n '%-j': 'D', # Day of the year as a decimal number.\n '%j': 'DDD', # Day of the year as a zero-padded decimal number.\n '%-m': 'M', # Month as a decimal number.\n '%m': 'MM', # Month as a zero-padded decimal number.\n '%-M': 'm', # Minute as a decimal number [0,59].\n '%M': 'mm', # Minute as a zero-padded decimal number [00,59].\n '%p': 'a', # Locale\u2019s equivalent of either AM or PM.\n '%-S': 's', # Second as a decimal number.\n '%S': 'ss', # Second as a zero-padded decimal number.\n '%U': 'WW', # Week number of the year (Sunday as the first day of the week)\n # as a zero padded decimal number. All days in a new year preceding\n # the first Sunday are considered to be in week 0.\n '%w': 'e', # Weekday as a decimal number, where 0 is Sunday and 6 is Saturday.\n '%-W': 'W', # Week number of the year (Monday as the first day of the week)\n # as a decimal number. All days in a new year preceding the first\n # Monday are considered to be in week 0.\n '%W': 'WW', # Week number of the year (Monday as the first day of the week)\n # as a zero-padded decimal number.\n '%x': 'medium', # Locale\u2019s appropriate date representation.\n '%X': 'medium', # Locale\u2019s appropriate time representation.\n '%y': 'YY', # Year without century as a zero-padded decimal number.\n '%Y': 'yyyy', # Year with century as a decimal number.\n '%Z': 'zzz', # Time zone name (no characters if no time zone exists).\n '%z': 'ZZZ', # UTC offset in the form \u00b1HHMM[SS[.ffffff]]\n # (empty string if the object is naive).\n '%%': '%',\n}\n\ndate_format_re = re.compile('(%s)' % '|'.join(date_format_mappings))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_babel_format_date_babel_format_date.try_.except_AttributeError_.return.format": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/i18n.py_babel_format_date_babel_format_date.try_.except_AttributeError_.return.format", "embedding": null, "metadata": {"file_path": "sphinx/util/i18n.py", "file_name": "i18n.py", "file_type": "text/x-python", "category": "implementation", "start_line": 170, "end_line": 190, "span_ids": ["babel_format_date"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def babel_format_date(date: datetime, format: str, locale: str,\n formatter: Callable = babel.dates.format_date) -> str:\n if locale is None:\n warnings.warn('The locale argument for babel_format_date() becomes required.',\n RemovedInSphinx70Warning)\n locale = 'en'\n\n # Check if we have the tzinfo attribute. If not we cannot do any time\n # related formats.\n if not hasattr(date, 'tzinfo'):\n formatter = babel.dates.format_date\n\n try:\n return formatter(date, format, locale=locale)\n except (ValueError, babel.core.UnknownLocaleError):\n # fallback to English\n return formatter(date, format, locale='en')\n except AttributeError:\n logger.warning(__('Invalid date format. Quote the string by single quote '\n 'if you want to output it directly: %s'), format)\n return format", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/images.py__Image_utility_function_get_image_extension.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/images.py__Image_utility_function_get_image_extension.return.None", "embedding": null, "metadata": {"file_path": "sphinx/util/images.py", "file_name": "images.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 74, "span_ids": ["impl", "guess_mimetype", "impl:2", "DataURI", "docstring", "imports", "imports:7", "get_image_size", "get_image_extension", "guess_mimetype_for_stream"], "tokens": 445}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Image utility functions for Sphinx.\"\"\"\n\nimport base64\nimport imghdr\nfrom collections import OrderedDict\nfrom os import path\nfrom typing import IO, BinaryIO, NamedTuple, Optional, Tuple\n\nimport imagesize\n\ntry:\n from PIL import Image\nexcept ImportError:\n Image = None\n\nmime_suffixes = OrderedDict([\n ('.gif', 'image/gif'),\n ('.jpg', 'image/jpeg'),\n ('.png', 'image/png'),\n ('.pdf', 'application/pdf'),\n ('.svg', 'image/svg+xml'),\n ('.svgz', 'image/svg+xml'),\n ('.ai', 'application/illustrator'),\n])\n\n\nclass DataURI(NamedTuple):\n mimetype: str\n charset: str\n data: bytes\n\n\ndef get_image_size(filename: str) -> Optional[Tuple[int, int]]:\n try:\n size = imagesize.get(filename)\n if size[0] == -1:\n size = None\n elif isinstance(size[0], float) or isinstance(size[1], float):\n size = (int(size[0]), int(size[1]))\n\n if size is None and Image: # fallback to Pillow\n with Image.open(filename) as im:\n size = im.size\n\n return size\n except Exception:\n return None\n\n\ndef guess_mimetype_for_stream(stream: IO, default: Optional[str] = None) -> Optional[str]:\n imgtype = imghdr.what(stream)\n if imgtype:\n return 'image/' + imgtype\n else:\n return default\n\n\ndef guess_mimetype(filename: str = '', default: Optional[str] = None) -> Optional[str]:\n _, ext = path.splitext(filename.lower())\n if ext in mime_suffixes:\n return mime_suffixes[ext]\n elif path.exists(filename):\n with open(filename, 'rb') as f:\n return guess_mimetype_for_stream(f, default=default)\n\n return default\n\n\ndef get_image_extension(mimetype: str) -> Optional[str]:\n for ext, _mimetype in mime_suffixes.items():\n if mimetype == _mimetype:\n return ext\n\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/images.py_parse_data_uri_parse_data_uri.return.DataURI_mimetype_charset": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/images.py_parse_data_uri_parse_data_uri.return.DataURI_mimetype_charset", "embedding": null, "metadata": {"file_path": "sphinx/util/images.py", "file_name": "images.py", "file_type": "text/x-python", "category": "implementation", "start_line": 77, "end_line": 95, "span_ids": ["parse_data_uri"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_data_uri(uri: str) -> Optional[DataURI]:\n if not uri.startswith('data:'):\n return None\n\n # data:[<MIME-type>][;charset=<encoding>][;base64],<data>\n mimetype = 'text/plain'\n charset = 'US-ASCII'\n\n properties, data = uri[5:].split(',', 1)\n for prop in properties.split(';'):\n if prop == 'base64':\n pass # skip\n elif prop.startswith('charset='):\n charset = prop[8:]\n elif prop:\n mimetype = prop\n\n image_data = base64.b64decode(data)\n return DataURI(mimetype, charset, image_data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/images.py_test_svg_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/images.py_test_svg_", "embedding": null, "metadata": {"file_path": "sphinx/util/images.py", "file_name": "images.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 112, "span_ids": ["impl:7", "test_svg"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_svg(h: bytes, f: Optional[BinaryIO]) -> Optional[str]:\n \"\"\"An additional imghdr library helper; test the header is SVG's or not.\"\"\"\n try:\n if '<svg' in h.decode().lower():\n return 'svg+xml'\n except UnicodeDecodeError:\n pass\n\n return None\n\n\n# install test_svg() to imghdr\n# refs: https://docs.python.org/3.6/library/imghdr.html#imghdr.tests\nimghdr.tests.append(test_svg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py__Helpers_for_inspecting_unwrap.try_.except_ValueError_.return.obj": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py__Helpers_for_inspecting_unwrap.try_.except_ValueError_.return.obj", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 50, "span_ids": ["impl", "impl:2", "docstring", "unwrap", "imports:20", "imports:21", "imports", "docstring:2", "impl:10"], "tokens": 364}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Helpers for inspecting Python modules.\"\"\"\n\nimport builtins\nimport contextlib\nimport enum\nimport inspect\nimport re\nimport sys\nimport types\nimport typing\nfrom functools import partial, partialmethod\nfrom importlib import import_module\nfrom inspect import Parameter, isclass, ismethod, ismethoddescriptor, ismodule # NOQA\nfrom io import StringIO\nfrom types import MethodType, ModuleType\nfrom typing import Any, Callable, Dict, Mapping, Optional, Sequence, Tuple, Type, cast\n\nfrom sphinx.pycode.ast import ast # for py36-37\nfrom sphinx.pycode.ast import unparse as ast_unparse\nfrom sphinx.util import logging\nfrom sphinx.util.typing import ForwardRef\nfrom sphinx.util.typing import stringify as stringify_annotation\n\nif sys.version_info > (3, 7):\n from types import ClassMethodDescriptorType, MethodDescriptorType, WrapperDescriptorType\nelse:\n ClassMethodDescriptorType = type(object.__init__)\n MethodDescriptorType = type(str.join)\n WrapperDescriptorType = type(dict.__dict__['fromkeys'])\n\nif False:\n # For type annotation\n from typing import Type # NOQA\n\nlogger = logging.getLogger(__name__)\n\nmemory_address_re = re.compile(r' at 0x[0-9a-f]{8,16}(?=>)', re.IGNORECASE)\n\n\ndef unwrap(obj: Any) -> Any:\n \"\"\"Get an original object from wrapped object (wrapped functions).\"\"\"\n try:\n if hasattr(obj, '__sphinx_mock__'):\n # Skip unwrapping mock object to avoid RecursionError\n return obj\n else:\n return inspect.unwrap(obj)\n except ValueError:\n # might be a mock object\n return obj", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_unwrap_all_unwrap_all.while_True_.if_stop_and_stop_obj_.else_.return.obj": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_unwrap_all_unwrap_all.while_True_.if_stop_and_stop_obj_.else_.return.obj", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 53, "end_line": 70, "span_ids": ["unwrap_all"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def unwrap_all(obj: Any, *, stop: Callable = None) -> Any:\n \"\"\"\n Get an original object from wrapped object (unwrapping partials, wrapped\n functions, and other decorators).\n \"\"\"\n while True:\n if stop and stop(obj):\n return obj\n elif ispartial(obj):\n obj = obj.func\n elif inspect.isroutine(obj) and hasattr(obj, '__wrapped__'):\n obj = obj.__wrapped__ # type: ignore\n elif isclassmethod(obj):\n obj = obj.__func__\n elif isstaticmethod(obj):\n obj = obj.__func__\n else:\n return obj", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getorigbases_getorigbases.if_isinstance___orig_base.else_.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_getorigbases_getorigbases.if_isinstance___orig_base.else_.return.None", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 116, "end_line": 128, "span_ids": ["getorigbases"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getorigbases(obj: Any) -> Optional[Tuple[Any, ...]]:\n \"\"\"Get __orig_bases__ from *obj* safely.\"\"\"\n if not inspect.isclass(obj):\n return None\n\n # Get __orig_bases__ from obj.__dict__ to avoid accessing the parent's __orig_bases__.\n # refs: https://github.com/sphinx-doc/sphinx/issues/9607\n __dict__ = safe_getattr(obj, '__dict__', {})\n __orig_bases__ = __dict__.get('__orig_bases__')\n if isinstance(__orig_bases__, tuple) and len(__orig_bases__) > 0:\n return __orig_bases__\n else:\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isNewType_isNewType.if_sys_version_info_3.else_.if___module___typing_.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isNewType_isNewType.if_sys_version_info_3.else_.if___module___typing_.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 154, "end_line": 164, "span_ids": ["isNewType"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def isNewType(obj: Any) -> bool:\n \"\"\"Check the if object is a kind of NewType.\"\"\"\n if sys.version_info >= (3, 10):\n return isinstance(obj, typing.NewType)\n else:\n __module__ = safe_getattr(obj, '__module__', None)\n __qualname__ = safe_getattr(obj, '__qualname__', None)\n if __module__ == 'typing' and __qualname__ == 'NewType.<locals>.new_type':\n return True\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isenumclass_ispartial.return.isinstance_obj_partial_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isenumclass_ispartial.return.isinstance_obj_partial_", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 167, "end_line": 190, "span_ids": ["unpartial", "ispartial", "isenumattribute", "isenumclass"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def isenumclass(x: Any) -> bool:\n \"\"\"Check if the object is subclass of enum.\"\"\"\n return inspect.isclass(x) and issubclass(x, enum.Enum)\n\n\ndef isenumattribute(x: Any) -> bool:\n \"\"\"Check if the object is attribute of enum.\"\"\"\n return isinstance(x, enum.Enum)\n\n\ndef unpartial(obj: Any) -> Any:\n \"\"\"Get an original object from partial object.\n\n This returns given object itself if not partial.\n \"\"\"\n while ispartial(obj):\n obj = obj.func\n\n return obj\n\n\ndef ispartial(obj: Any) -> bool:\n \"\"\"Check if the object is partial.\"\"\"\n return isinstance(obj, (partial, partialmethod))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isclassmethod_isclassmethod.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isclassmethod_isclassmethod.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 193, "end_line": 206, "span_ids": ["isclassmethod"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def isclassmethod(obj: Any, cls: Any = None, name: str = None) -> bool:\n \"\"\"Check if the object is classmethod.\"\"\"\n if isinstance(obj, classmethod):\n return True\n elif inspect.ismethod(obj) and obj.__self__ is not None and isclass(obj.__self__):\n return True\n elif cls and name:\n placeholder = object()\n for basecls in getmro(cls):\n meth = basecls.__dict__.get(name, placeholder)\n if meth is not placeholder:\n return isclassmethod(meth)\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_iscoroutinefunction_iscoroutinefunction.if_hasattr_obj___code__.else_.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_iscoroutinefunction_iscoroutinefunction.if_hasattr_obj___code__.else_.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 320, "end_line": 339, "span_ids": ["iscoroutinefunction"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def iscoroutinefunction(obj: Any) -> bool:\n \"\"\"Check if the object is coroutine-function.\"\"\"\n def iswrappedcoroutine(obj: Any) -> bool:\n \"\"\"Check if the object is wrapped coroutine-function.\"\"\"\n if isstaticmethod(obj) or isclassmethod(obj) or ispartial(obj):\n # staticmethod, classmethod and partial method are not a wrapped coroutine-function\n # Note: Since 3.10, staticmethod and classmethod becomes a kind of wrappers\n return False\n elif hasattr(obj, '__wrapped__'):\n return True\n else:\n return False\n\n obj = unwrap_all(obj, stop=iswrappedcoroutine)\n if hasattr(obj, '__code__') and inspect.iscoroutinefunction(obj):\n # check obj.__code__ because iscoroutinefunction() crashes for custom method-like\n # objects (see https://github.com/sphinx-doc/sphinx/issues/6605)\n return True\n else:\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isasyncgenfunction_isproperty.return.isinstance_obj_property_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_isasyncgenfunction_isproperty.return.isinstance_obj_property_", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 342, "end_line": 359, "span_ids": ["isasyncgenfunction", "isproperty"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def isasyncgenfunction(obj: Any) -> bool:\n \"\"\"Check if the object is async-gen function.\"\"\"\n if hasattr(obj, '__code__') and inspect.isasyncgenfunction(obj):\n # check obj.__code__ because isasyncgenfunction() crashes for custom method-like\n # objects on python3.7 (see https://github.com/sphinx-doc/sphinx/issues/9838)\n return True\n else:\n return False\n\n\ndef isproperty(obj: Any) -> bool:\n \"\"\"Check if the object is property.\"\"\"\n if sys.version_info >= (3, 8):\n from functools import cached_property # cached_property is available since py3.8\n if isinstance(obj, cached_property):\n return True\n\n return isinstance(obj, property)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_DefaultValue_TypeAliasForwardRef.__eq__.return.self_name_other": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_DefaultValue_TypeAliasForwardRef.__eq__.return.self_name_other", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 462, "end_line": 488, "span_ids": ["DefaultValue.__eq__", "TypeAliasForwardRef.__eq__", "TypeAliasForwardRef", "TypeAliasForwardRef.__call__", "DefaultValue.__repr__", "DefaultValue"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DefaultValue:\n \"\"\"A simple wrapper for default value of the parameters of overload functions.\"\"\"\n\n def __init__(self, value: str) -> None:\n self.value = value\n\n def __eq__(self, other: object) -> bool:\n return self.value == other\n\n def __repr__(self) -> str:\n return self.value\n\n\nclass TypeAliasForwardRef:\n \"\"\"Pseudo typing class for autodoc_type_aliases.\n\n This avoids the error on evaluating the type inside `get_type_hints()`.\n \"\"\"\n def __init__(self, name: str) -> None:\n self.name = name\n\n def __call__(self) -> None:\n # Dummy method to imitate special typing classes\n pass\n\n def __eq__(self, other: Any) -> bool:\n return self.name == other", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_TypeAliasModule_TypeAliasModule.__getattr__.if_fullname_in_self___map.else_.if_nested_.else_.try_.except_ImportError_.return.getattr_self___module_na": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_TypeAliasModule_TypeAliasModule.__getattr__.if_fullname_in_self___map.else_.if_nested_.else_.try_.except_ImportError_.return.getattr_self___module_na", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 491, "end_line": 521, "span_ids": ["TypeAliasModule.__getattr__", "TypeAliasModule"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TypeAliasModule:\n \"\"\"Pseudo module class for autodoc_type_aliases.\"\"\"\n\n def __init__(self, modname: str, mapping: Dict[str, str]) -> None:\n self.__modname = modname\n self.__mapping = mapping\n\n self.__module: Optional[ModuleType] = None\n\n def __getattr__(self, name: str) -> Any:\n fullname = '.'.join(filter(None, [self.__modname, name]))\n if fullname in self.__mapping:\n # exactly matched\n return TypeAliasForwardRef(self.__mapping[fullname])\n else:\n prefix = fullname + '.'\n nested = {k: v for k, v in self.__mapping.items() if k.startswith(prefix)}\n if nested:\n # sub modules or classes found\n return TypeAliasModule(fullname, nested)\n else:\n # no sub modules or classes found.\n try:\n # return the real submodule if exists\n return import_module(fullname)\n except ImportError:\n # return the real class\n if self.__module is None:\n self.__module = import_module(self.__modname)\n\n return getattr(self.__module, name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_TypeAliasNamespace__should_unwrap.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inspect.py_TypeAliasNamespace__should_unwrap.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/inspect.py", "file_name": "inspect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 524, "end_line": 555, "span_ids": ["TypeAliasNamespace.__getitem__", "TypeAliasNamespace", "_should_unwrap"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TypeAliasNamespace(Dict[str, Any]):\n \"\"\"Pseudo namespace class for autodoc_type_aliases.\n\n This enables to look up nested modules and classes like `mod1.mod2.Class`.\n \"\"\"\n\n def __init__(self, mapping: Dict[str, str]) -> None:\n self.__mapping = mapping\n\n def __getitem__(self, key: str) -> Any:\n if key in self.__mapping:\n # exactly matched\n return TypeAliasForwardRef(self.__mapping[key])\n else:\n prefix = key + '.'\n nested = {k: v for k, v in self.__mapping.items() if k.startswith(prefix)}\n if nested:\n # sub modules or classes found\n return TypeAliasModule(key, nested)\n else:\n raise KeyError\n\n\ndef _should_unwrap(subject: Callable) -> bool:\n \"\"\"Check the function should be unwrapped on getting signature.\"\"\"\n __globals__ = getglobals(subject)\n if (__globals__.get('__name__') == 'contextlib' and\n __globals__.get('__file__') == contextlib.__file__):\n # contextmanger should be unwrapped\n return True\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py__Inventory_utility_func_InventoryFileReader.read_compressed_lines.for_chunk_in_self_read_co.while_pos_1_.pos.buf_find_b_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/inventory.py__Inventory_utility_func_InventoryFileReader.read_compressed_lines.for_chunk_in_self_read_co.while_pos_1_.pos.buf_find_b_n_", "embedding": null, "metadata": {"file_path": "sphinx/util/inventory.py", "file_name": "inventory.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 71, "span_ids": ["impl", "InventoryFileReader.read_compressed_lines", "InventoryFileReader.read_buffer", "docstring", "InventoryFileReader", "imports", "imports:7", "InventoryFileReader.readlines", "InventoryFileReader.readline", "InventoryFileReader.read_compressed_chunks"], "tokens": 422}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Inventory utility functions for Sphinx.\"\"\"\nimport os\nimport re\nimport zlib\nfrom typing import IO, TYPE_CHECKING, Callable, Iterator\n\nfrom sphinx.util import logging\nfrom sphinx.util.typing import Inventory\n\nBUFSIZE = 16 * 1024\nlogger = logging.getLogger(__name__)\n\nif TYPE_CHECKING:\n from sphinx.builders import Builder\n from sphinx.environment import BuildEnvironment\n\n\nclass InventoryFileReader:\n \"\"\"A file reader for an inventory file.\n\n This reader supports mixture of texts and compressed texts.\n \"\"\"\n\n def __init__(self, stream: IO) -> None:\n self.stream = stream\n self.buffer = b''\n self.eof = False\n\n def read_buffer(self) -> None:\n chunk = self.stream.read(BUFSIZE)\n if chunk == b'':\n self.eof = True\n self.buffer += chunk\n\n def readline(self) -> str:\n pos = self.buffer.find(b'\\n')\n if pos != -1:\n line = self.buffer[:pos].decode()\n self.buffer = self.buffer[pos + 1:]\n elif self.eof:\n line = self.buffer.decode()\n self.buffer = b''\n else:\n self.read_buffer()\n line = self.readline()\n\n return line\n\n def readlines(self) -> Iterator[str]:\n while not self.eof:\n line = self.readline()\n if line:\n yield line\n\n def read_compressed_chunks(self) -> Iterator[bytes]:\n decompressor = zlib.decompressobj()\n while not self.eof:\n self.read_buffer()\n yield decompressor.decompress(self.buffer)\n self.buffer = b''\n yield decompressor.flush()\n\n def read_compressed_lines(self) -> Iterator[str]:\n buf = b''\n for chunk in self.read_compressed_chunks():\n buf += chunk\n pos = buf.find(b'\\n')\n while pos != -1:\n yield buf[:pos].decode()\n buf = buf[pos + 1:]\n pos = buf.find(b'\\n')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py__This_module_implements_ESCAPED.re_compile_r_u_4_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/jsdump.py__This_module_implements_ESCAPED.re_compile_r_u_4_", "embedding": null, "metadata": {"file_path": "sphinx/util/jsdump.py", "file_name": "jsdump.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 26, "span_ids": ["impl", "docstring", "imports"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"This module implements a simple JavaScript serializer.\n\nUses the basestring encode function from simplejson by Bob Ippolito.\n\"\"\"\n\nimport re\nfrom typing import IO, Any, Dict, List, Match, Union\n\n_str_re = re.compile(r'\"(\\\\\\\\|\\\\\"|[^\"])*\"')\n_int_re = re.compile(r'\\d+')\n_name_re = re.compile(r'[a-zA-Z_]\\w*')\n_nameonly_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*$')\n\n# escape \\, \", control characters and everything outside ASCII\nESCAPE_ASCII = re.compile(r'([\\\\\"]|[^\\ -~])')\nESCAPE_DICT = {\n '\\\\': '\\\\\\\\',\n '\"': '\\\\\"',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n}\n\nESCAPED = re.compile(r'\\\\u.{4}|\\\\.')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py__Logging_utility_functi_COLOR_MAP.defaultdict_lambda_blue": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py__Logging_utility_functi_COLOR_MAP.defaultdict_lambda_blue", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 46, "span_ids": ["impl", "impl:2", "docstring", "imports:11", "imports"], "tokens": 269}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Logging utility functions for Sphinx.\"\"\"\n\nimport logging\nimport logging.handlers\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom typing import IO, TYPE_CHECKING, Any, Dict, Generator, List, Optional, Tuple, Type, Union\n\nfrom docutils import nodes\nfrom docutils.nodes import Node\nfrom docutils.utils import get_source_line\n\nfrom sphinx.errors import SphinxWarning\nfrom sphinx.util.console import colorize\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\n\nNAMESPACE = 'sphinx'\nVERBOSE = 15\n\nLEVEL_NAMES: Dict[str, int] = defaultdict(lambda: logging.WARNING)\nLEVEL_NAMES.update({\n 'CRITICAL': logging.CRITICAL,\n 'SEVERE': logging.CRITICAL,\n 'ERROR': logging.ERROR,\n 'WARNING': logging.WARNING,\n 'INFO': logging.INFO,\n 'VERBOSE': VERBOSE,\n 'DEBUG': logging.DEBUG,\n})\n\nVERBOSITY_MAP: Dict[int, int] = defaultdict(lambda: 0)\nVERBOSITY_MAP.update({\n 0: logging.INFO,\n 1: VERBOSE,\n 2: logging.DEBUG,\n})\n\nCOLOR_MAP = defaultdict(lambda: 'blue',\n {\n logging.ERROR: 'darkred',\n logging.WARNING: 'red',\n logging.DEBUG: 'darkgray'\n })", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_convert_serializable_SphinxWarningLogRecord.prefix.if_self_levelno_loggin.else_.return._WARNING_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_convert_serializable_SphinxWarningLogRecord.prefix.if_self_levelno_loggin.else_.return._WARNING_", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 71, "end_line": 113, "span_ids": ["convert_serializable", "SphinxLogRecord", "SphinxWarningLogRecord", "SphinxLogRecord.getMessage", "SphinxInfoLogRecord", "SphinxWarningLogRecord.prefix"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def convert_serializable(records: List[logging.LogRecord]) -> None:\n \"\"\"Convert LogRecord serializable.\"\"\"\n for r in records:\n # extract arguments to a message and clear them\n r.msg = r.getMessage()\n r.args = ()\n\n location = getattr(r, 'location', None)\n if isinstance(location, nodes.Node):\n r.location = get_node_location(location) # type: ignore\n\n\nclass SphinxLogRecord(logging.LogRecord):\n \"\"\"Log record class supporting location\"\"\"\n prefix = ''\n location: Any = None\n\n def getMessage(self) -> str:\n message = super().getMessage()\n location = getattr(self, 'location', None)\n if location:\n message = '%s: %s%s' % (location, self.prefix, message)\n elif self.prefix not in message:\n message = self.prefix + message\n\n return message\n\n\nclass SphinxInfoLogRecord(SphinxLogRecord):\n \"\"\"Info log record class supporting location\"\"\"\n prefix = '' # do not show any prefix for INFO messages\n\n\nclass SphinxWarningLogRecord(SphinxLogRecord):\n \"\"\"Warning log record class supporting location\"\"\"\n @property\n def prefix(self) -> str: # type: ignore\n if self.levelno >= logging.CRITICAL:\n return 'CRITICAL: '\n elif self.levelno >= logging.ERROR:\n return 'ERROR: '\n else:\n return 'WARNING: '", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_LogCollector_is_suppressed_warning.return.False": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/logging.py_LogCollector_is_suppressed_warning.return.False", "embedding": null, "metadata": {"file_path": "sphinx/util/logging.py", "file_name": "logging.py", "file_type": "text/x-python", "category": "implementation", "start_line": 335, "end_line": 373, "span_ids": ["InfoFilter.filter", "LogCollector.collect", "is_suppressed_warning", "LogCollector", "InfoFilter"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LogCollector:\n def __init__(self) -> None:\n self.logs: List[logging.LogRecord] = []\n\n @contextmanager\n def collect(self) -> Generator[None, None, None]:\n with pending_logging() as memhandler:\n yield\n\n self.logs = memhandler.clear()\n\n\nclass InfoFilter(logging.Filter):\n \"\"\"Filter error and warning messages.\"\"\"\n\n def filter(self, record: logging.LogRecord) -> bool:\n if record.levelno < logging.WARNING:\n return True\n else:\n return False\n\n\ndef is_suppressed_warning(type: str, subtype: str, suppress_warnings: List[str]) -> bool:\n \"\"\"Check whether the warning is suppressed or not.\"\"\"\n if type is None:\n return False\n\n subtarget: Optional[str]\n\n for warning_type in suppress_warnings:\n if '.' in warning_type:\n target, subtarget = warning_type.split('.', 1)\n else:\n target, subtarget = warning_type, None\n\n if target == type and subtarget in (None, subtype, \"*\"):\n return True\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/matching.py__Pattern_matching_utili__translate_pattern.return.res_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/matching.py__Pattern_matching_utili__translate_pattern.return.res_", "embedding": null, "metadata": {"file_path": "sphinx/util/matching.py", "file_name": "matching.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 52, "span_ids": ["docstring", "imports", "_translate_pattern"], "tokens": 386}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Pattern-matching utility functions for Sphinx.\"\"\"\n\nimport re\nfrom typing import Callable, Dict, Iterable, List, Match, Optional, Pattern\n\nfrom sphinx.util.osutil import canon_path\n\n\ndef _translate_pattern(pat: str) -> str:\n \"\"\"Translate a shell-style glob pattern to a regular expression.\n\n Adapted from the fnmatch module, but enhanced so that single stars don't\n match slashes.\n \"\"\"\n i, n = 0, len(pat)\n res = ''\n while i < n:\n c = pat[i]\n i += 1\n if c == '*':\n if i < n and pat[i] == '*':\n # double star matches slashes too\n i += 1\n res = res + '.*'\n else:\n # single star doesn't match slashes\n res = res + '[^/]*'\n elif c == '?':\n # question mark doesn't match slashes too\n res = res + '[^/]'\n elif c == '[':\n j = i\n if j < n and pat[j] == '!':\n j += 1\n if j < n and pat[j] == ']':\n j += 1\n while j < n and pat[j] != ']':\n j += 1\n if j >= n:\n res = res + '\\\\['\n else:\n stuff = pat[i:j].replace('\\\\', '\\\\\\\\')\n i = j + 1\n if stuff[0] == '!':\n # negative pattern mustn't match slashes too\n stuff = '^/' + stuff[1:]\n elif stuff[0] == '^':\n stuff = '\\\\' + stuff\n res = '%s[%s]' % (res, stuff)\n else:\n res += re.escape(c)\n return res + '$'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/math.py__Utility_functions_for__get_node_equation_number.if_writer_builder_config_.else_.return.node_number_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/math.py__Utility_functions_for__get_node_equation_number.if_writer_builder_config_.else_.return.node_number_", "embedding": null, "metadata": {"file_path": "sphinx/util/math.py", "file_name": "math.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["get_node_equation_number", "docstring", "imports"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utility functions for math.\"\"\"\n\nfrom docutils import nodes\n\nfrom sphinx.builders.html import HTMLTranslator\n\n\ndef get_node_equation_number(writer: HTMLTranslator, node: nodes.math_block) -> str:\n if writer.builder.config.math_numfig and writer.builder.config.numfig:\n figtype = 'displaymath'\n if writer.builder.name == 'singlehtml':\n key = \"%s/%s\" % (writer.docnames[-1], figtype)\n else:\n key = figtype\n\n id = node['ids'][0]\n number = writer.builder.fignumbers.get(key, {}).get(id, ())\n return '.'.join(map(str, number))\n else:\n return node['number']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__Docutils_node_related__caption_ref_re.explicit_title_re": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__Docutils_node_related__caption_ref_re.explicit_title_re", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["imports:12", "impl", "impl:2", "docstring", "imports"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Docutils node-related utility functions for Sphinx.\"\"\"\n\nimport re\nimport unicodedata\nfrom typing import (TYPE_CHECKING, Any, Callable, Iterable, List, Optional, Set, Tuple, Type,\n Union, cast)\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node\nfrom docutils.parsers.rst import Directive\nfrom docutils.parsers.rst.states import Inliner\nfrom docutils.statemachine import StringList\n\nfrom sphinx import addnodes\nfrom sphinx.locale import __\nfrom sphinx.util import logging\n\nif TYPE_CHECKING:\n from sphinx.builders import Builder\n from sphinx.domain import IndexEntry\n from sphinx.environment import BuildEnvironment\n from sphinx.util.tags import Tags\n\nlogger = logging.getLogger(__name__)\n\n\n# \\x00 means the \"<\" was backslash-escaped\nexplicit_title_re = re.compile(r'^(.+?)\\s*(?<!\\x00)<([^<]*?)>$', re.DOTALL)\ncaption_ref_re = explicit_title_re", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_LITERAL_TYPE_NODES_extract_messages.for_node_in_doctree_finda.if_msg_.yield_node_msg": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_LITERAL_TYPE_NODES_extract_messages.for_node_in_doctree_finda.if_msg_.yield_node_msg", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 238, "end_line": 284, "span_ids": ["extract_messages", "impl:10"], "tokens": 338}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "LITERAL_TYPE_NODES = (\n nodes.literal_block,\n nodes.doctest_block,\n nodes.math_block,\n nodes.raw,\n)\nIMAGE_TYPE_NODES = (\n nodes.image,\n)\nMETA_TYPE_NODES = (\n addnodes.meta,\n)\n\n\ndef extract_messages(doctree: Element) -> Iterable[Tuple[Element, str]]:\n \"\"\"Extract translatable messages from a document tree.\"\"\"\n for node in doctree.findall(is_translatable): # type: Element\n if isinstance(node, addnodes.translatable):\n for msg in node.extract_original_messages():\n yield node, msg\n continue\n if isinstance(node, LITERAL_TYPE_NODES):\n msg = node.rawsource\n if not msg:\n msg = node.astext()\n elif isinstance(node, nodes.image):\n if node.get('alt'):\n yield node, node['alt']\n if node.get('translatable'):\n msg = '.. image:: %s' % node['uri']\n else:\n msg = ''\n elif isinstance(node, META_TYPE_NODES):\n # docutils-0.17 or older\n msg = node.rawcontent\n elif isinstance(node, nodes.pending) and is_pending_meta(node):\n # docutils-0.17 or older\n msg = node.details['nodes'][0].rawcontent\n elif isinstance(node, addnodes.docutils_meta):\n # docutils-0.18+\n msg = node[\"content\"]\n else:\n msg = node.rawsource.replace('\\n', ' ').strip()\n\n # XXX nodes rendering empty are likely a bug in sphinx.addnodes\n if msg:\n yield node, msg", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_get_node_source_traverse_translatable_index.for_node_in_doctree_finda.yield_node_entries": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_get_node_source_traverse_translatable_index.for_node_in_doctree_finda.yield_node_entries", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 287, "end_line": 324, "span_ids": ["get_node_line", "traverse_translatable_index", "traverse_parent", "get_prev_node", "get_node_source"], "tokens": 267}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_node_source(node: Element) -> Optional[str]:\n for pnode in traverse_parent(node):\n if pnode.source:\n return pnode.source\n return None\n\n\ndef get_node_line(node: Element) -> Optional[int]:\n for pnode in traverse_parent(node):\n if pnode.line:\n return pnode.line\n return None\n\n\ndef traverse_parent(node: Element, cls: Any = None) -> Iterable[Element]:\n while node:\n if cls is None or isinstance(node, cls):\n yield node\n node = node.parent\n\n\ndef get_prev_node(node: Node) -> Optional[Node]:\n pos = node.parent.index(node)\n if pos > 0:\n return node.parent[pos - 1]\n else:\n return None\n\n\ndef traverse_translatable_index(doctree: Element) -> Iterable[Tuple[Element, List[\"IndexEntry\"]]]: # NOQA\n \"\"\"Traverse translatable index node from a document tree.\"\"\"\n matcher = NodeMatcher(addnodes.index, inline=False)\n for node in doctree.findall(matcher): # type: addnodes.index\n if 'raw_entries' in node:\n entries = node['raw_entries']\n else:\n entries = node['entries']\n yield node, entries", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_find_pending_xref_condition_make_refnode.return.node": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_find_pending_xref_condition_make_refnode.return.node", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 541, "end_line": 567, "span_ids": ["find_pending_xref_condition", "make_refnode"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def find_pending_xref_condition(node: addnodes.pending_xref, condition: str\n ) -> Optional[Element]:\n \"\"\"Pick matched pending_xref_condition node up from the pending_xref.\"\"\"\n for subnode in node:\n if (isinstance(subnode, addnodes.pending_xref_condition) and\n subnode.get('condition') == condition):\n return subnode\n else:\n return None\n\n\ndef make_refnode(builder: \"Builder\", fromdocname: str, todocname: str, targetid: str,\n child: Union[Node, List[Node]], title: str = None) -> nodes.reference:\n \"\"\"Shortcut to create a reference node.\"\"\"\n node = nodes.reference('', '', internal=True)\n if fromdocname == todocname and targetid:\n node['refid'] = targetid\n else:\n if targetid:\n node['refuri'] = (builder.get_relative_uri(fromdocname, todocname) +\n '#' + targetid)\n else:\n node['refuri'] = builder.get_relative_uri(fromdocname, todocname)\n if title:\n node['reftitle'] = title\n node += child\n return node", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_set_source_info_is_smartquotable.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_set_source_info_is_smartquotable.return.True", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 570, "end_line": 606, "span_ids": ["is_smartquotable", "copy_source_info", "set_role_source_info", "set_source_info", "impl:26"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def set_source_info(directive: Directive, node: Node) -> None:\n node.source, node.line = \\\n directive.state_machine.get_source_and_line(directive.lineno)\n\n\ndef set_role_source_info(inliner: Inliner, lineno: int, node: Node) -> None:\n node.source, node.line = inliner.reporter.get_source_and_line(lineno) # type: ignore\n\n\ndef copy_source_info(src: Element, dst: Element) -> None:\n dst.source = get_node_source(src)\n dst.line = get_node_line(src)\n\n\nNON_SMARTQUOTABLE_PARENT_NODES = (\n nodes.FixedTextElement,\n nodes.literal,\n nodes.math,\n nodes.image,\n nodes.raw,\n nodes.problematic,\n addnodes.not_smartquotable,\n)\n\n\ndef is_smartquotable(node: Node) -> bool:\n \"\"\"Check whether the node is smart-quotable or not.\"\"\"\n for pnode in traverse_parent(node.parent):\n if isinstance(pnode, NON_SMARTQUOTABLE_PARENT_NODES):\n return False\n elif pnode.get('support_smartquotes', None) is False:\n return False\n\n if getattr(node, 'support_smartquotes', None) is False:\n return False\n\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_process_only_nodes_process_only_nodes.for_node_in_document_find.try_.else_.if_ret_.else_.node_replace_self_nodes_c": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py_process_only_nodes_process_only_nodes.for_node_in_document_find.try_.else_.if_ret_.else_.node_replace_self_nodes_c", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 609, "end_line": 626, "span_ids": ["process_only_nodes"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def process_only_nodes(document: Node, tags: \"Tags\") -> None:\n \"\"\"Filter ``only`` nodes which do not match *tags*.\"\"\"\n for node in document.findall(addnodes.only):\n try:\n ret = tags.eval_condition(node['expr'])\n except Exception as err:\n logger.warning(__('exception while evaluating only directive expression: %s'), err,\n location=node)\n node.replace_self(node.children or nodes.comment())\n else:\n if ret:\n node.replace_self(node.children or nodes.comment())\n else:\n # A comment on the comment() nodes being inserted: replacing by [] would\n # result in a \"Losing ids\" exception if there is a target node before\n # the only node, so we make sure docutils can transfer the id to\n # something, even if it's just a comment and will lose the id anyway...\n node.replace_self(nodes.comment())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__new_copy_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/nodes.py__new_copy_", "embedding": null, "metadata": {"file_path": "sphinx/util/nodes.py", "file_name": "nodes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 629, "end_line": 643, "span_ids": ["impl:28", "_new_copy"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _new_copy(self: Element) -> Element:\n \"\"\"monkey-patch Element.copy to copy the rawsource and line\n for docutils-0.16 or older versions.\n\n refs: https://sourceforge.net/p/docutils/patches/165/\n \"\"\"\n newnode = self.__class__(self.rawsource, **self.attributes)\n if isinstance(self, nodes.Element):\n newnode.source = self.source\n newnode.line = self.line\n return newnode\n\n\nnodes.Element.copy = _new_copy # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py__Operating_system_relat_canon_path.return.nativepath_replace_path_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py__Operating_system_relat_canon_path.return.nativepath_replace_path_s", "embedding": null, "metadata": {"file_path": "sphinx/util/osutil.py", "file_name": "osutil.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["impl", "imports:10", "impl:2", "os_path", "docstring", "docstring:2", "imports", "canon_path"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Operating system-related utility functions for Sphinx.\"\"\"\n\nimport contextlib\nimport filecmp\nimport os\nimport re\nimport shutil\nimport sys\nfrom io import StringIO\nfrom os import path\nfrom typing import Any, Generator, Iterator, List, Optional, Type\n\ntry:\n # for ALT Linux (#6712)\n from sphinx.testing.path import path as Path\nexcept ImportError:\n Path = None # type: ignore\n\n\n# SEP separates path elements in the canonical file names\n#\n# Define SEP as a manifest constant, not so much because we expect it to change\n# in the future as to avoid the suspicion that a stray \"/\" in the code is a\n# hangover from more *nix-oriented origins.\nSEP = \"/\"\n\n\ndef os_path(canonicalpath: str) -> str:\n return canonicalpath.replace(SEP, path.sep)\n\n\ndef canon_path(nativepath: str) -> str:\n \"\"\"Return path in OS-independent form\"\"\"\n return nativepath.replace(path.sep, SEP)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_ensuredir_cd.try_.finally_.os_chdir_cwd_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_ensuredir_cd.try_.finally_.os_chdir_cwd_", "embedding": null, "metadata": {"file_path": "sphinx/util/osutil.py", "file_name": "osutil.py", "file_type": "text/x-python", "category": "implementation", "start_line": 60, "end_line": 147, "span_ids": ["mtimes_of_files", "cd", "impl:7", "ensuredir", "relpath", "copytimes", "impl:11", "make_filename", "copyfile", "make_filename_from_project", "abspath"], "tokens": 623}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def ensuredir(path: str) -> None:\n \"\"\"Ensure that a path exists.\"\"\"\n os.makedirs(path, exist_ok=True)\n\n\ndef mtimes_of_files(dirnames: List[str], suffix: str) -> Iterator[float]:\n for dirname in dirnames:\n for root, _dirs, files in os.walk(dirname):\n for sfile in files:\n if sfile.endswith(suffix):\n try:\n yield path.getmtime(path.join(root, sfile))\n except OSError:\n pass\n\n\ndef copytimes(source: str, dest: str) -> None:\n \"\"\"Copy a file's modification times.\"\"\"\n st = os.stat(source)\n if hasattr(os, 'utime'):\n os.utime(dest, (st.st_atime, st.st_mtime))\n\n\ndef copyfile(source: str, dest: str) -> None:\n \"\"\"Copy a file and its modification times, if possible.\n\n Note: ``copyfile`` skips copying if the file has not been changed\"\"\"\n if not path.exists(dest) or not filecmp.cmp(source, dest):\n shutil.copyfile(source, dest)\n try:\n # don't do full copystat because the source may be read-only\n copytimes(source, dest)\n except OSError:\n pass\n\n\nno_fn_re = re.compile(r'[^a-zA-Z0-9_-]')\nproject_suffix_re = re.compile(' Documentation$')\n\n\ndef make_filename(string: str) -> str:\n return no_fn_re.sub('', string) or 'sphinx'\n\n\ndef make_filename_from_project(project: str) -> str:\n return make_filename(project_suffix_re.sub('', project)).lower()\n\n\ndef relpath(path: str, start: str = os.curdir) -> str:\n \"\"\"Return a relative filepath to *path* either from the current directory or\n from an optional *start* directory.\n\n This is an alternative of ``os.path.relpath()``. This returns original path\n if *path* and *start* are on different drives (for Windows platform).\n \"\"\"\n try:\n return os.path.relpath(path, start)\n except ValueError:\n return path\n\n\nsafe_relpath = relpath # for compatibility\nfs_encoding = sys.getfilesystemencoding() or sys.getdefaultencoding()\n\n\ndef abspath(pathdir: str) -> str:\n if Path is not None and isinstance(pathdir, Path):\n return pathdir.abspath()\n else:\n pathdir = path.abspath(pathdir)\n if isinstance(pathdir, bytes):\n try:\n pathdir = pathdir.decode(fs_encoding)\n except UnicodeDecodeError as exc:\n raise UnicodeDecodeError('multibyte filename not supported on '\n 'this filesystem encoding '\n '(%r)' % fs_encoding) from exc\n return pathdir\n\n\n@contextlib.contextmanager\ndef cd(target_dir: str) -> Generator[None, None, None]:\n cwd = os.getcwd()\n try:\n os.chdir(target_dir)\n yield\n finally:\n os.chdir(cwd)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_FileAvoidWrite_FileAvoidWrite.write.self__io_write_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/osutil.py_FileAvoidWrite_FileAvoidWrite.write.self__io_write_data_", "embedding": null, "metadata": {"file_path": "sphinx/util/osutil.py", "file_name": "osutil.py", "file_type": "text/x-python", "category": "implementation", "start_line": 150, "end_line": 169, "span_ids": ["FileAvoidWrite.write", "FileAvoidWrite"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FileAvoidWrite:\n \"\"\"File-like object that buffers output and only writes if content changed.\n\n Use this class like when writing to a file to avoid touching the original\n file if the content hasn't changed. This is useful in scenarios where file\n mtime is used to invalidate caches or trigger new behavior.\n\n When writing to this file handle, all writes are buffered until the object\n is closed.\n\n Objects can be used as context managers.\n \"\"\"\n def __init__(self, path: str) -> None:\n self._path = path\n self._io: Optional[StringIO] = None\n\n def write(self, data: str) -> None:\n if not self._io:\n self._io = StringIO()\n self._io.write(data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py__Parallel_building_util_SerialTasks.join.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py__Parallel_building_util_SerialTasks.join.pass", "embedding": null, "metadata": {"file_path": "sphinx/util/parallel.py", "file_name": "parallel.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 39, "span_ids": ["impl", "imports:6", "impl:2", "docstring", "SerialTasks", "SerialTasks.join", "SerialTasks.add_task", "imports", "imports:7", "impl:5"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Parallel building utilities.\"\"\"\n\nimport os\nimport time\nimport traceback\nfrom math import sqrt\nfrom typing import Any, Callable, Dict, List, Optional, Sequence\n\ntry:\n import multiprocessing\nexcept ImportError:\n multiprocessing = None\n\nfrom sphinx.errors import SphinxParallelError\nfrom sphinx.util import logging\n\nlogger = logging.getLogger(__name__)\n\n\n# our parallel functionality only works for the forking Process\nparallel_available = multiprocessing and os.name == 'posix'\n\n\nclass SerialTasks:\n \"\"\"Has the same interface as ParallelTasks, but executes tasks directly.\"\"\"\n\n def __init__(self, nproc: int = 1) -> None:\n pass\n\n def add_task(self, task_func: Callable, arg: Any = None, result_func: Callable = None) -> None: # NOQA\n if arg is not None:\n res = task_func(arg)\n else:\n res = task_func()\n if result_func:\n result_func(res)\n\n def join(self) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks.add_task_ParallelTasks.terminate.for_tid_in_list_self__pre.self__pworking_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks.add_task_ParallelTasks.terminate.for_tid_in_list_self__pre.self__pworking_1", "embedding": null, "metadata": {"file_path": "sphinx/util/parallel.py", "file_name": "parallel.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 106, "span_ids": ["ParallelTasks.add_task", "ParallelTasks.join", "ParallelTasks.terminate"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ParallelTasks:\n\n def add_task(self, task_func: Callable, arg: Any = None, result_func: Callable = None) -> None: # NOQA\n tid = self._taskid\n self._taskid += 1\n self._result_funcs[tid] = result_func or (lambda arg, result: None)\n self._args[tid] = arg\n precv, psend = multiprocessing.Pipe(False)\n context = multiprocessing.get_context('fork')\n proc = context.Process(target=self._process, args=(psend, task_func, arg))\n self._procs[tid] = proc\n self._precvsWaiting[tid] = precv\n self._join_one()\n\n def join(self) -> None:\n try:\n while self._pworking:\n if not self._join_one():\n time.sleep(0.02)\n except Exception:\n # shutdown other child processes on failure\n self.terminate()\n raise\n\n def terminate(self) -> None:\n for tid in list(self._precvs):\n self._procs[tid].terminate()\n self._result_funcs.pop(tid)\n self._procs.pop(tid)\n self._precvs.pop(tid)\n self._pworking -= 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks._join_one_ParallelTasks._join_one.return.joined_any": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/parallel.py_ParallelTasks._join_one_ParallelTasks._join_one.return.joined_any", "embedding": null, "metadata": {"file_path": "sphinx/util/parallel.py", "file_name": "parallel.py", "file_type": "text/x-python", "category": "implementation", "start_line": 108, "end_line": 130, "span_ids": ["ParallelTasks._join_one"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ParallelTasks:\n\n def _join_one(self) -> bool:\n joined_any = False\n for tid, pipe in self._precvs.items():\n if pipe.poll():\n exc, logs, result = pipe.recv()\n if exc:\n raise SphinxParallelError(*result)\n for log in logs:\n logger.handle(log)\n self._result_funcs.pop(tid)(self._args.pop(tid), result)\n self._procs[tid].join()\n self._precvs.pop(tid)\n self._pworking -= 1\n joined_any = True\n break\n\n while self._precvsWaiting and self._pworking < self.nproc:\n newtid, newprecv = self._precvsWaiting.popitem()\n self._precvs[newtid] = newprecv\n self._procs[newtid].start()\n self._pworking += 1\n\n return joined_any", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/png.py__PNG_image_manipulation_read_png_depth.with_open_filename_rb_.if_not_depthchunk_startsw.else_.return.struct_unpack_i_depth": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/png.py__PNG_image_manipulation_read_png_depth.with_open_filename_rb_.if_not_depthchunk_startsw.else_.return.struct_unpack_i_depth", "embedding": null, "metadata": {"file_path": "sphinx/util/png.py", "file_name": "png.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["read_png_depth", "impl", "docstring", "imports"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"PNG image manipulation helpers.\"\"\"\n\nimport binascii\nimport struct\nfrom typing import Optional\n\nLEN_IEND = 12\nLEN_DEPTH = 22\n\nDEPTH_CHUNK_LEN = struct.pack('!i', 10)\nDEPTH_CHUNK_START = b'tEXtDepth\\x00'\nIEND_CHUNK = b'\\x00\\x00\\x00\\x00IEND\\xAE\\x42\\x60\\x82'\n\n\ndef read_png_depth(filename: str) -> Optional[int]:\n \"\"\"Read the special tEXt chunk indicating the depth from a PNG file.\"\"\"\n with open(filename, 'rb') as f:\n f.seek(- (LEN_IEND + LEN_DEPTH), 2)\n depthchunk = f.read(LEN_DEPTH)\n if not depthchunk.startswith(DEPTH_CHUNK_LEN + DEPTH_CHUNK_START):\n # either not a PNG file or not containing the depth chunk\n return None\n else:\n return struct.unpack('!i', depthchunk[14:18])[0]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/pycompat.py__Stuff_for_Python_versi_convert_with_2to3.return.str_tree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/pycompat.py__Stuff_for_Python_versi_convert_with_2to3.return.str_tree_", "embedding": null, "metadata": {"file_path": "sphinx/util/pycompat.py", "file_name": "pycompat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["convert_with_2to3", "docstring", "imports"], "tokens": 335}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Stuff for Python version compatibility.\"\"\"\n\nimport warnings\nfrom typing import Any, Callable\n\nfrom sphinx.deprecation import RemovedInSphinx60Warning\n\n# ------------------------------------------------------------------------------\n# Python 2/3 compatibility\n\n\n# convert_with_2to3():\n# support for running 2to3 over config files\ndef convert_with_2to3(filepath: str) -> str:\n warnings.warn('convert_with_2to3() is deprecated',\n RemovedInSphinx60Warning, stacklevel=2)\n\n try:\n from lib2to3.pgen2.parse import ParseError\n from lib2to3.refactor import RefactoringTool, get_fixers_from_package\n except ImportError as exc:\n # python 3.9.0a6+ emits PendingDeprecationWarning for lib2to3.\n # Additionally, removal of the module is still discussed at PEP-594.\n # To support future python, this catches ImportError for lib2to3.\n raise SyntaxError from exc\n\n fixers = get_fixers_from_package('lib2to3.fixes')\n refactoring_tool = RefactoringTool(fixers)\n source = refactoring_tool._read_python_source(filepath)[0]\n try:\n tree = refactoring_tool.refactor_string(source, 'conf.py')\n except ParseError as err:\n # do not propagate lib2to3 exceptions\n lineno, offset = err.context[1]\n # try to match ParseError details with SyntaxError details\n\n raise SyntaxError(err.msg, (filepath, lineno, offset, err.value)) from err\n return str(tree)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/pycompat.py_execfile__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/pycompat.py_execfile__", "embedding": null, "metadata": {"file_path": "sphinx/util/pycompat.py", "file_name": "pycompat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 52, "span_ids": ["execfile_"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def execfile_(filepath: str, _globals: Any, open: Callable = open) -> None:\n warnings.warn('execfile_() is deprecated',\n RemovedInSphinx60Warning, stacklevel=2)\n from sphinx.util.osutil import fs_encoding\n with open(filepath, 'rb') as f:\n source = f.read()\n\n # compile to a code object, handle syntax errors\n filepath_enc = filepath.encode(fs_encoding)\n code = compile(source, filepath_enc, 'exec')\n exec(code, _globals)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py__Simple_requests_packag_ignore_insecure_warning.with_warnings_catch_warni.yield": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/requests.py__Simple_requests_packag_ignore_insecure_warning.with_warnings_catch_warni.yield", "embedding": null, "metadata": {"file_path": "sphinx/util/requests.py", "file_name": "requests.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["impl", "ignore_insecure_warning", "imports:9", "impl:2", "imports:10", "docstring", "imports", "impl:4"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Simple requests package loader\"\"\"\n\nimport sys\nimport warnings\nfrom contextlib import contextmanager\nfrom typing import Any, Generator, Union\nfrom urllib.parse import urlsplit\n\nimport requests\n\nimport sphinx\nfrom sphinx.config import Config\n\ntry:\n from requests.packages.urllib3.exceptions import InsecureRequestWarning\nexcept ImportError:\n try:\n # for Debian-jessie\n from urllib3.exceptions import InsecureRequestWarning\n except ImportError:\n # for requests < 2.4.0\n InsecureRequestWarning = None\n\n\nuseragent_header = [('User-Agent',\n 'Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0')]\n\n\n@contextmanager\ndef ignore_insecure_warning(**kwargs: Any) -> Generator[None, None, None]:\n with warnings.catch_warnings():\n if not kwargs.get('verify') and InsecureRequestWarning:\n # ignore InsecureRequestWarning if verify=False\n warnings.filterwarnings(\"ignore\", category=InsecureRequestWarning)\n yield", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/rst.py__reST_helper_functions__default_role.docutils_unregister_role_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/rst.py__reST_helper_functions__default_role.docutils_unregister_role_", "embedding": null, "metadata": {"file_path": "sphinx/util/rst.py", "file_name": "rst.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 73, "span_ids": ["impl", "escape", "textwidth", "impl:2", "docstring", "heading", "imports:14", "imports", "impl:3", "imports:13", "default_role"], "tokens": 562}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"reST helper functions.\"\"\"\n\nimport re\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom typing import Dict, Generator\nfrom unicodedata import east_asian_width\n\nfrom docutils.parsers.rst import roles\nfrom docutils.parsers.rst.languages import en as english\nfrom docutils.statemachine import StringList\nfrom docutils.utils import Reporter\nfrom jinja2 import Environment\n\nfrom sphinx.locale import __\nfrom sphinx.util import docutils, logging\n\ntry:\n from jinja2.utils import pass_environment\nexcept ImportError:\n from jinja2 import environmentfilter as pass_environment\n\n\nlogger = logging.getLogger(__name__)\n\ndocinfo_re = re.compile(':\\\\w+:.*?')\nsymbols_re = re.compile(r'([!-\\-/:-@\\[-`{-~])') # symbols without dot(0x2e)\nSECTIONING_CHARS = ['=', '-', '~']\n\n# width of characters\nWIDECHARS: Dict[str, str] = defaultdict(lambda: \"WF\") # WF: Wide + Full-width\nWIDECHARS[\"ja\"] = \"WFA\" # In Japanese, Ambiguous characters also have double width\n\n\ndef escape(text: str) -> str:\n text = symbols_re.sub(r'\\\\\\1', text)\n text = re.sub(r'^\\.', r'\\.', text) # escape a dot at top\n return text\n\n\ndef textwidth(text: str, widechars: str = 'WF') -> int:\n \"\"\"Get width of text.\"\"\"\n def charwidth(char: str, widechars: str) -> int:\n if east_asian_width(char) in widechars:\n return 2\n else:\n return 1\n\n return sum(charwidth(c, widechars) for c in text)\n\n\n@pass_environment\ndef heading(env: Environment, text: str, level: int = 1) -> str:\n \"\"\"Create a heading for *level*.\"\"\"\n assert level <= 3\n width = textwidth(text, WIDECHARS[env.language])\n sectioning_char = SECTIONING_CHARS[level - 1]\n return '%s\\n%s' % (text, sectioning_char * width)\n\n\n@contextmanager\ndef default_role(docname: str, name: str) -> Generator[None, None, None]:\n if name:\n dummy_reporter = Reporter('', 4, 4)\n role_fn, _ = roles.role(name, english, 0, dummy_reporter)\n if role_fn:\n docutils.register_role('', role_fn)\n else:\n logger.warning(__('default role %s not found'), name, location=docname)\n\n yield\n\n docutils.unregister_role('')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/__init__.py__Word_stemming_utilitie_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/stemmer/__init__.py__Word_stemming_utilitie_", "embedding": null, "metadata": {"file_path": "sphinx/util/stemmer/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["impl", "BaseStemmer.stem", "impl:2", "BaseStemmer", "docstring", "PyStemmer.stem", "imports", "get_stemmer", "StandardStemmer.stem", "imports:2", "StandardStemmer", "PyStemmer"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Word stemming utilities for Sphinx.\"\"\"\n\nfrom sphinx.util.stemmer.porter import PorterStemmer\n\ntry:\n from Stemmer import Stemmer as _PyStemmer\n PYSTEMMER = True\nexcept ImportError:\n PYSTEMMER = False\n\n\nclass BaseStemmer:\n def stem(self, word: str) -> str:\n raise NotImplementedError()\n\n\nclass PyStemmer(BaseStemmer):\n def __init__(self) -> None:\n self.stemmer = _PyStemmer('porter')\n\n def stem(self, word: str) -> str:\n return self.stemmer.stemWord(word)\n\n\nclass StandardStemmer(PorterStemmer, BaseStemmer):\n \"\"\"All those porter stemmer implementations look hideous;\n make at least the stem method nicer.\n \"\"\"\n def stem(self, word: str) -> str: # type: ignore\n return super().stem(word, 0, len(word) - 1)\n\n\ndef get_stemmer() -> BaseStemmer:\n if PYSTEMMER:\n return PyStemmer()\n else:\n return StandardStemmer()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py__Templates_utility_func_BaseRenderer.render_string.return.self_env_from_string_sour": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/template.py__Templates_utility_func_BaseRenderer.render_string.return.self_env_from_string_sour", "embedding": null, "metadata": {"file_path": "sphinx/util/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["BaseRenderer", "docstring", "imports", "BaseRenderer.render", "BaseRenderer.render_string"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Templates utility functions for Sphinx.\"\"\"\n\nimport os\nfrom functools import partial\nfrom os import path\nfrom typing import Callable, Dict, List, Tuple, Union\n\nfrom jinja2 import TemplateNotFound\nfrom jinja2.environment import Environment\nfrom jinja2.loaders import BaseLoader\nfrom jinja2.sandbox import SandboxedEnvironment\n\nfrom sphinx import package_dir\nfrom sphinx.jinja2glue import SphinxFileSystemLoader\nfrom sphinx.locale import get_translator\nfrom sphinx.util import rst, texescape\n\n\nclass BaseRenderer:\n def __init__(self, loader: BaseLoader = None) -> None:\n self.env = SandboxedEnvironment(loader=loader, extensions=['jinja2.ext.i18n'])\n self.env.filters['repr'] = repr\n self.env.install_gettext_translations(get_translator())\n\n def render(self, template_name: str, context: Dict) -> str:\n return self.env.get_template(template_name).render(context)\n\n def render_string(self, source: str, context: Dict) -> str:\n return self.env.from_string(source).render(context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/texescape.py__TeX_escaping_helper___for_LaTeX_engines_whic": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/texescape.py__TeX_escaping_helper___for_LaTeX_engines_whic", "embedding": null, "metadata": {"file_path": "sphinx/util/texescape.py", "file_name": "texescape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 55, "span_ids": ["impl", "docstring", "imports"], "tokens": 637}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"TeX escaping helper.\"\"\"\n\nimport re\nfrom typing import Dict\n\ntex_replacements = [\n # map TeX special chars\n ('$', r'\\$'),\n ('%', r'\\%'),\n ('&', r'\\&'),\n ('#', r'\\#'),\n ('_', r'\\_'),\n ('{', r'\\{'),\n ('}', r'\\}'),\n ('\\\\', r'\\textbackslash{}'),\n ('~', r'\\textasciitilde{}'),\n ('^', r'\\textasciicircum{}'),\n # map chars to avoid mis-interpretation in LaTeX\n ('[', r'{[}'),\n (']', r'{]}'),\n # map special Unicode characters to TeX commands\n ('\u2713', r'\\(\\checkmark\\)'),\n ('\u2714', r'\\(\\pmb{\\checkmark}\\)'),\n ('\u2715', r'\\(\\times\\)'),\n ('\u2716', r'\\(\\pmb{\\times}\\)'),\n # used to separate -- in options\n ('\ufeff', r'{}'),\n # map some special Unicode characters to similar ASCII ones\n # (even for Unicode LaTeX as may not be supported by OpenType font)\n ('\u23bd', r'\\_'),\n ('\u212f', r'e'),\n ('\u2148', r'i'),\n # Greek alphabet not escaped: pdflatex handles it via textalpha and inputenc\n # OHM SIGN U+2126 is handled by LaTeX textcomp package\n]\n\n# A map to avoid TeX ligatures or character replacements in PDF output\n# xelatex/lualatex/uplatex are handled differently (#5790, #6888)\nascii_tex_replacements = [\n # Note: the \" renders curly in OT1 encoding but straight in T1, T2A, LY1...\n # escaping it to \\textquotedbl would break documents using OT1\n # Sphinx does \\shorthandoff{\"} to avoid problems with some languages\n # There is no \\text... LaTeX escape for the hyphen character -\n ('-', r'\\sphinxhyphen{}'), # -- and --- are TeX ligatures\n # ,, is a TeX ligature in T1 encoding, but escaping the comma adds\n # complications (whether by {}, or a macro) and is not done\n # the next two require textcomp package\n (\"'\", r'\\textquotesingle{}'), # else ' renders curly, and '' is a ligature\n ('`', r'\\textasciigrave{}'), # else \\` and \\`\\` render curly\n ('<', r'\\textless{}'), # < is inv. exclam in OT1, << is a T1-ligature\n ('>', r'\\textgreater{}'), # > is inv. quest. mark in 0T1, >> a T1-ligature\n]\n\n# A map Unicode characters to LaTeX representation\n# (for LaTeX engines which don't support unicode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/texescape.py_unicode_tex_replacements_hlescape.if_latex_engine_in_lual.else_.return.s_translate__tex_hlescape": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/texescape.py_unicode_tex_replacements_hlescape.if_latex_engine_in_lual.else_.return.s_translate__tex_hlescape", "embedding": null, "metadata": {"file_path": "sphinx/util/texescape.py", "file_name": "texescape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 56, "end_line": 118, "span_ids": ["impl:7", "hlescape", "escape", "impl:5"], "tokens": 727}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "unicode_tex_replacements = [\n # map some more common Unicode characters to TeX commands\n ('\u00b6', r'\\P{}'),\n ('\u00a7', r'\\S{}'),\n ('\u20ac', r'\\texteuro{}'),\n ('\u221e', r'\\(\\infty\\)'),\n ('\u00b1', r'\\(\\pm\\)'),\n ('\u2192', r'\\(\\rightarrow\\)'),\n ('\u2023', r'\\(\\rightarrow\\)'),\n ('\u2013', r'\\textendash{}'),\n # superscript\n ('\u2070', r'\\(\\sp{\\text{0}}\\)'),\n ('\u00b9', r'\\(\\sp{\\text{1}}\\)'),\n ('\u00b2', r'\\(\\sp{\\text{2}}\\)'),\n ('\u00b3', r'\\(\\sp{\\text{3}}\\)'),\n ('\u2074', r'\\(\\sp{\\text{4}}\\)'),\n ('\u2075', r'\\(\\sp{\\text{5}}\\)'),\n ('\u2076', r'\\(\\sp{\\text{6}}\\)'),\n ('\u2077', r'\\(\\sp{\\text{7}}\\)'),\n ('\u2078', r'\\(\\sp{\\text{8}}\\)'),\n ('\u2079', r'\\(\\sp{\\text{9}}\\)'),\n # subscript\n ('\u2080', r'\\(\\sb{\\text{0}}\\)'),\n ('\u2081', r'\\(\\sb{\\text{1}}\\)'),\n ('\u2082', r'\\(\\sb{\\text{2}}\\)'),\n ('\u2083', r'\\(\\sb{\\text{3}}\\)'),\n ('\u2084', r'\\(\\sb{\\text{4}}\\)'),\n ('\u2085', r'\\(\\sb{\\text{5}}\\)'),\n ('\u2086', r'\\(\\sb{\\text{6}}\\)'),\n ('\u2087', r'\\(\\sb{\\text{7}}\\)'),\n ('\u2088', r'\\(\\sb{\\text{8}}\\)'),\n ('\u2089', r'\\(\\sb{\\text{9}}\\)'),\n]\n\n# TODO: this should be called tex_idescape_map because its only use is in\n# sphinx.writers.latex.LaTeXTranslator.idescape()\n# %, {, }, \\, #, and ~ are the only ones which must be replaced by _ character\n# It would be simpler to define it entirely here rather than in init().\n# Unicode replacements are superfluous, as idescape() uses backslashreplace\ntex_replace_map: Dict[int, str] = {}\n\n_tex_escape_map: Dict[int, str] = {}\n_tex_escape_map_without_unicode: Dict[int, str] = {}\n_tex_hlescape_map: Dict[int, str] = {}\n_tex_hlescape_map_without_unicode: Dict[int, str] = {}\n\n\ndef escape(s: str, latex_engine: str = None) -> str:\n \"\"\"Escape text for LaTeX output.\"\"\"\n if latex_engine in ('lualatex', 'xelatex'):\n # unicode based LaTeX engine\n return s.translate(_tex_escape_map_without_unicode)\n else:\n return s.translate(_tex_escape_map)\n\n\ndef hlescape(s: str, latex_engine: str = None) -> str:\n \"\"\"Escape text for LaTeX highlighter.\"\"\"\n if latex_engine in ('lualatex', 'xelatex'):\n # unicode based LaTeX engine\n return s.translate(_tex_hlescape_map_without_unicode)\n else:\n return s.translate(_tex_hlescape_map)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/texescape.py_escape_abbr_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/texescape.py_escape_abbr_", "embedding": null, "metadata": {"file_path": "sphinx/util/texescape.py", "file_name": "texescape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 153, "span_ids": ["init", "escape_abbr"], "tokens": 305}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def escape_abbr(text: str) -> str:\n \"\"\"Adjust spacing after abbreviations. Works with @ letter or other.\"\"\"\n return re.sub(r'\\.(?=\\s|$)', r'.\\@{}', text)\n\n\ndef init() -> None:\n for a, b in tex_replacements:\n _tex_escape_map[ord(a)] = b\n _tex_escape_map_without_unicode[ord(a)] = b\n tex_replace_map[ord(a)] = '_'\n\n # no reason to do this for _tex_escape_map_without_unicode\n for a, b in ascii_tex_replacements:\n _tex_escape_map[ord(a)] = b\n\n # but the hyphen has a specific PDF bookmark problem\n # https://github.com/latex3/hyperref/issues/112\n _tex_escape_map_without_unicode[ord('-')] = r'\\sphinxhyphen{}'\n\n for a, b in unicode_tex_replacements:\n _tex_escape_map[ord(a)] = b\n # This is actually unneeded:\n tex_replace_map[ord(a)] = '_'\n\n for a, b in tex_replacements:\n if a in '[]{}\\\\':\n continue\n _tex_hlescape_map[ord(a)] = b\n _tex_hlescape_map_without_unicode[ord(a)] = b\n\n for a, b in unicode_tex_replacements:\n _tex_hlescape_map[ord(a)] = b", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__The_composite_types_fo_Inventory.Dict_str_Dict_str_Inven": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__The_composite_types_fo_Inventory.Dict_str_Dict_str_Inven", "embedding": null, "metadata": {"file_path": "sphinx/util/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 74, "span_ids": ["if_sys_version_info_3_.else_.ForwardRef:docstring", "if_sys_version_info_3_.else_.ForwardRef.__init__", "impl", "imports:12", "impl:8", "imports:9", "impl:2", "imports:10", "docstring:3", "docstring", "docstring:4", "is_invalid_builtin_class", "imports:11", "if_sys_version_info_3_.else_.ForwardRef", "imports", "docstring:2", "impl:10", "impl:4"], "tokens": 518}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The composite types for Sphinx.\"\"\"\n\nimport sys\nimport typing\nfrom struct import Struct\nfrom types import TracebackType\nfrom typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Type, TypeVar, Union\n\nfrom docutils import nodes\nfrom docutils.parsers.rst.states import Inliner\n\nfrom sphinx.deprecation import RemovedInSphinx60Warning, deprecated_alias\n\nif sys.version_info > (3, 7):\n from typing import ForwardRef\nelse:\n from typing import _ForwardRef # type: ignore\n\n class ForwardRef:\n \"\"\"A pseudo ForwardRef class for py36.\"\"\"\n def __init__(self, arg: Any, is_argument: bool = True) -> None:\n self.arg = arg\n\n def _evaluate(self, globalns: Dict, localns: Dict) -> Any:\n ref = _ForwardRef(self.arg)\n return ref._eval_type(globalns, localns)\n\ntry:\n from types import UnionType # type: ignore # python 3.10 or above\nexcept ImportError:\n UnionType = None\n\nif False:\n # For type annotation\n from typing import Type # NOQA # for python3.5.1\n\n\n# builtin classes that have incorrect __module__\nINVALID_BUILTIN_CLASSES = {\n Struct: 'struct.Struct', # Before Python 3.9\n TracebackType: 'types.TracebackType',\n}\n\n\ndef is_invalid_builtin_class(obj: Any) -> bool:\n \"\"\"Check *obj* is an invalid built-in class.\"\"\"\n try:\n return obj in INVALID_BUILTIN_CLASSES\n except TypeError: # unhashable type\n return False\n\n\n# Text like nodes which are initialized with text and rawsource\nTextlikeNode = Union[nodes.Text, nodes.TextElement]\n\n# type of None\nNoneType = type(None)\n\n# path matcher\nPathMatcher = Callable[[str], bool]\n\n# common role functions\nRoleFunction = Callable[[str, str, str, int, Inliner, Dict[str, Any], List[str]],\n Tuple[List[nodes.Node], List[nodes.system_message]]]\n\n# A option spec for directive\nOptionSpec = Dict[str, Callable[[str], Any]]\n\n# title getter functions for enumerable nodes (see sphinx.domains.std)\nTitleGetter = Callable[[nodes.Node], str]\n\n# inventory data on memory\nInventoryItem = Tuple[str, str, str, str]\nInventory = Dict[str, Dict[str, InventoryItem]]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py_get_type_hints_is_system_TypeVar.return.modname_typing_and_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py_get_type_hints_is_system_TypeVar.return.modname_typing_and_i", "embedding": null, "metadata": {"file_path": "sphinx/util/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 77, "end_line": 105, "span_ids": ["is_system_TypeVar", "get_type_hints"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_type_hints(obj: Any, globalns: Dict = None, localns: Dict = None) -> Dict[str, Any]:\n \"\"\"Return a dictionary containing type hints for a function, method, module or class object.\n\n This is a simple wrapper of `typing.get_type_hints()` that does not raise an error on\n runtime.\n \"\"\"\n from sphinx.util.inspect import safe_getattr # lazy loading\n\n try:\n return typing.get_type_hints(obj, globalns, localns)\n except NameError:\n # Failed to evaluate ForwardRef (maybe TYPE_CHECKING)\n return safe_getattr(obj, '__annotations__', {})\n except AttributeError:\n # Failed to evaluate ForwardRef (maybe not runtime checkable)\n return safe_getattr(obj, '__annotations__', {})\n except TypeError:\n # Invalid object is given. But try to get __annotations__ as a fallback for\n # the code using type union operator (PEP 604) in python 3.9 or below.\n return safe_getattr(obj, '__annotations__', {})\n except KeyError:\n # a broken class found (refs: https://github.com/sphinx-doc/sphinx/issues/8084)\n return {}\n\n\ndef is_system_TypeVar(typ: Any) -> bool:\n \"\"\"Check *typ* is system defined TypeVar.\"\"\"\n modname = getattr(typ, '__module__', '')\n return modname == 'typing' and isinstance(typ, TypeVar)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py_restify_restify.try_.except_AttributeError_T.return.inspect_object_descriptio": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py_restify_restify.try_.except_AttributeError_T.return.inspect_object_descriptio", "embedding": null, "metadata": {"file_path": "sphinx/util/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 108, "end_line": 166, "span_ids": ["restify"], "tokens": 592}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def restify(cls: Optional[Type], mode: str = 'fully-qualified-except-typing') -> str:\n \"\"\"Convert python class to a reST reference.\n\n :param mode: Specify a method how annotations will be stringified.\n\n 'fully-qualified-except-typing'\n Show the module name and qualified name of the annotation except\n the \"typing\" module.\n 'smart'\n Show the name of the annotation.\n \"\"\"\n from sphinx.ext.autodoc.mock import ismock, ismockmodule # lazy loading\n from sphinx.util import inspect # lazy loading\n\n if mode == 'smart':\n modprefix = '~'\n else:\n modprefix = ''\n\n try:\n if cls is None or cls is NoneType:\n return ':py:obj:`None`'\n elif cls is Ellipsis:\n return '...'\n elif isinstance(cls, str):\n return cls\n elif ismockmodule(cls):\n return ':py:class:`%s%s`' % (modprefix, cls.__name__)\n elif ismock(cls):\n return ':py:class:`%s%s.%s`' % (modprefix, cls.__module__, cls.__name__)\n elif is_invalid_builtin_class(cls):\n return ':py:class:`%s%s`' % (modprefix, INVALID_BUILTIN_CLASSES[cls])\n elif inspect.isNewType(cls):\n if sys.version_info > (3, 10):\n # newtypes have correct module info since Python 3.10+\n return ':py:class:`%s%s.%s`' % (modprefix, cls.__module__, cls.__name__)\n else:\n return ':py:class:`%s`' % cls.__name__\n elif UnionType and isinstance(cls, UnionType):\n if len(cls.__args__) > 1 and None in cls.__args__:\n args = ' | '.join(restify(a, mode) for a in cls.__args__ if a)\n return 'Optional[%s]' % args\n else:\n return ' | '.join(restify(a, mode) for a in cls.__args__)\n elif cls.__module__ in ('__builtin__', 'builtins'):\n if hasattr(cls, '__args__'):\n return ':py:class:`%s`\\\\ [%s]' % (\n cls.__name__,\n ', '.join(restify(arg, mode) for arg in cls.__args__),\n )\n else:\n return ':py:class:`%s`' % cls.__name__\n else:\n if sys.version_info >= (3, 7): # py37+\n return _restify_py37(cls, mode)\n else:\n return _restify_py36(cls, mode)\n except (AttributeError, TypeError):\n return inspect.object_description(cls)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__restify_py37__restify_py37.if_inspect_isgenericalia.else_.if_cls___module___typ.else_.return._py_obj_s_s_s_mo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__restify_py37__restify_py37.if_inspect_isgenericalia.else_.if_cls___module___typ.else_.return._py_obj_s_s_s_mo", "embedding": null, "metadata": {"file_path": "sphinx/util/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 169, "end_line": 230, "span_ids": ["_restify_py37"], "tokens": 799}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _restify_py37(cls: Optional[Type], mode: str = 'fully-qualified-except-typing') -> str:\n \"\"\"Convert python class to a reST reference.\"\"\"\n from sphinx.util import inspect # lazy loading\n\n if mode == 'smart':\n modprefix = '~'\n else:\n modprefix = ''\n\n if (inspect.isgenericalias(cls) and\n cls.__module__ == 'typing' and cls.__origin__ is Union):\n # Union\n if len(cls.__args__) > 1 and cls.__args__[-1] is NoneType:\n if len(cls.__args__) > 2:\n args = ', '.join(restify(a, mode) for a in cls.__args__[:-1])\n return ':py:obj:`~typing.Optional`\\\\ [:obj:`~typing.Union`\\\\ [%s]]' % args\n else:\n return ':py:obj:`~typing.Optional`\\\\ [%s]' % restify(cls.__args__[0], mode)\n else:\n args = ', '.join(restify(a, mode) for a in cls.__args__)\n return ':py:obj:`~typing.Union`\\\\ [%s]' % args\n elif inspect.isgenericalias(cls):\n if isinstance(cls.__origin__, typing._SpecialForm):\n text = restify(cls.__origin__, mode) # type: ignore\n elif getattr(cls, '_name', None):\n if cls.__module__ == 'typing':\n text = ':py:class:`~%s.%s`' % (cls.__module__, cls._name)\n else:\n text = ':py:class:`%s%s.%s`' % (modprefix, cls.__module__, cls._name)\n else:\n text = restify(cls.__origin__, mode)\n\n origin = getattr(cls, '__origin__', None)\n if not hasattr(cls, '__args__'):\n pass\n elif all(is_system_TypeVar(a) for a in cls.__args__):\n # Suppress arguments if all system defined TypeVars (ex. Dict[KT, VT])\n pass\n elif cls.__module__ == 'typing' and cls._name == 'Callable':\n args = ', '.join(restify(a, mode) for a in cls.__args__[:-1])\n text += r\"\\ [[%s], %s]\" % (args, restify(cls.__args__[-1], mode))\n elif cls.__module__ == 'typing' and getattr(origin, '_name', None) == 'Literal':\n text += r\"\\ [%s]\" % ', '.join(repr(a) for a in cls.__args__)\n elif cls.__args__:\n text += r\"\\ [%s]\" % \", \".join(restify(a, mode) for a in cls.__args__)\n\n return text\n elif isinstance(cls, typing._SpecialForm):\n return ':py:obj:`~%s.%s`' % (cls.__module__, cls._name)\n elif hasattr(cls, '__qualname__'):\n if cls.__module__ == 'typing':\n return ':py:class:`~%s.%s`' % (cls.__module__, cls.__qualname__)\n else:\n return ':py:class:`%s%s.%s`' % (modprefix, cls.__module__, cls.__qualname__)\n elif isinstance(cls, ForwardRef):\n return ':py:class:`%s`' % cls.__forward_arg__\n else:\n # not a class (ex. TypeVar)\n if cls.__module__ == 'typing':\n return ':py:obj:`~%s.%s`' % (cls.__module__, cls.__name__)\n else:\n return ':py:obj:`%s%s.%s`' % (modprefix, cls.__module__, cls.__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__restify_py36.if_isinstance_cls_typin__restify_py36.if_isinstance_cls_typin.else_.if_cls___module___typ.else_.return._py_obj_s_s_s_mo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__restify_py36.if_isinstance_cls_typin__restify_py36.if_isinstance_cls_typin.else_.if_cls___module___typ.else_.return._py_obj_s_s_s_mo", "embedding": null, "metadata": {"file_path": "sphinx/util/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 256, "end_line": 327, "span_ids": ["_restify_py36"], "tokens": 876}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _restify_py36(cls: Optional[Type], mode: str = 'fully-qualified-except-typing') -> str:\n # ... other code\n\n if (isinstance(cls, typing.TupleMeta) and # type: ignore\n not hasattr(cls, '__tuple_params__')):\n if module == 'typing':\n reftext = ':py:class:`~typing.%s`' % qualname\n else:\n reftext = ':py:class:`%s%s`' % (modprefix, qualname)\n\n params = cls.__args__\n if params:\n param_str = ', '.join(restify(p, mode) for p in params)\n return reftext + '\\\\ [%s]' % param_str\n else:\n return reftext\n elif isinstance(cls, typing.GenericMeta):\n if module == 'typing':\n reftext = ':py:class:`~typing.%s`' % qualname\n else:\n reftext = ':py:class:`%s%s`' % (modprefix, qualname)\n\n if cls.__args__ is None or len(cls.__args__) <= 2:\n params = cls.__args__\n elif cls.__origin__ == Generator:\n params = cls.__args__\n else: # typing.Callable\n args = ', '.join(restify(arg, mode) for arg in cls.__args__[:-1])\n result = restify(cls.__args__[-1], mode)\n return reftext + '\\\\ [[%s], %s]' % (args, result)\n\n if params:\n param_str = ', '.join(restify(p, mode) for p in params)\n return reftext + '\\\\ [%s]' % (param_str)\n else:\n return reftext\n elif (hasattr(cls, '__origin__') and\n cls.__origin__ is typing.Union):\n params = cls.__args__\n if params is not None:\n if len(params) > 1 and params[-1] is NoneType:\n if len(params) > 2:\n param_str = \", \".join(restify(p, mode) for p in params[:-1])\n return (':py:obj:`~typing.Optional`\\\\ '\n '[:py:obj:`~typing.Union`\\\\ [%s]]' % param_str)\n else:\n return ':py:obj:`~typing.Optional`\\\\ [%s]' % restify(params[0], mode)\n else:\n param_str = ', '.join(restify(p, mode) for p in params)\n return ':py:obj:`~typing.Union`\\\\ [%s]' % param_str\n else:\n return ':py:obj:`Union`'\n elif hasattr(cls, '__qualname__'):\n if cls.__module__ == 'typing':\n return ':py:class:`~%s.%s`' % (cls.__module__, cls.__qualname__)\n else:\n return ':py:class:`%s%s.%s`' % (modprefix, cls.__module__, cls.__qualname__)\n elif hasattr(cls, '_name'):\n # SpecialForm\n if cls.__module__ == 'typing':\n return ':py:obj:`~%s.%s`' % (cls.__module__, cls._name)\n else:\n return ':py:obj:`%s%s.%s`' % (modprefix, cls.__module__, cls._name)\n elif hasattr(cls, '__name__'):\n # not a class (ex. TypeVar)\n if cls.__module__ == 'typing':\n return ':py:obj:`~%s.%s`' % (cls.__module__, cls.__name__)\n else:\n return ':py:obj:`%s%s.%s`' % (modprefix, cls.__module__, cls.__name__)\n else:\n # others (ex. Any)\n if cls.__module__ == 'typing':\n return ':py:obj:`~%s.%s`' % (cls.__module__, qualname)\n else:\n return ':py:obj:`%s%s.%s`' % (modprefix, cls.__module__, qualname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__stringify_py37__stringify_py37.if_module_typing_and.else_.return.repr_annotation_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__stringify_py37__stringify_py37.if_module_typing_and.else_.return.repr_annotation_", "embedding": null, "metadata": {"file_path": "sphinx/util/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 396, "end_line": 428, "span_ids": ["_stringify_py37"], "tokens": 333}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _stringify_py37(annotation: Any, mode: str = 'fully-qualified-except-typing') -> str:\n \"\"\"stringify() for py37+.\"\"\"\n module = getattr(annotation, '__module__', None)\n modprefix = ''\n if module == 'typing' and getattr(annotation, '__forward_arg__', None):\n qualname = annotation.__forward_arg__\n elif module == 'typing':\n if getattr(annotation, '_name', None):\n qualname = annotation._name\n elif getattr(annotation, '__qualname__', None):\n qualname = annotation.__qualname__\n else:\n qualname = stringify(annotation.__origin__).replace('typing.', '') # ex. Union\n\n if mode == 'smart':\n modprefix = '~%s.' % module\n elif mode == 'fully-qualified':\n modprefix = '%s.' % module\n elif hasattr(annotation, '__qualname__'):\n if mode == 'smart':\n modprefix = '~%s.' % module\n else:\n modprefix = '%s.' % module\n qualname = annotation.__qualname__\n elif hasattr(annotation, '__origin__'):\n # instantiated generic provided by a user\n qualname = stringify(annotation.__origin__, mode)\n elif UnionType and isinstance(annotation, UnionType): # types.Union (for py3.10+)\n qualname = 'types.Union'\n else:\n # we weren't able to extract the base type, appending arguments would\n # only make them appear twice\n return repr(annotation)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__stringify_py37.if_getattr_annotation____stringify_py37.return.modprefix_qualname": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__stringify_py37.if_getattr_annotation____stringify_py37.return.modprefix_qualname", "embedding": null, "metadata": {"file_path": "sphinx/util/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 430, "end_line": 467, "span_ids": ["_stringify_py37"], "tokens": 531}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _stringify_py37(annotation: Any, mode: str = 'fully-qualified-except-typing') -> str:\n # ... other code\n\n if getattr(annotation, '__args__', None):\n if not isinstance(annotation.__args__, (list, tuple)):\n # broken __args__ found\n pass\n elif qualname in ('Optional', 'Union'):\n if len(annotation.__args__) > 1 and annotation.__args__[-1] is NoneType:\n if len(annotation.__args__) > 2:\n args = ', '.join(stringify(a, mode) for a in annotation.__args__[:-1])\n return '%sOptional[%sUnion[%s]]' % (modprefix, modprefix, args)\n else:\n return '%sOptional[%s]' % (modprefix,\n stringify(annotation.__args__[0], mode))\n else:\n args = ', '.join(stringify(a, mode) for a in annotation.__args__)\n return '%sUnion[%s]' % (modprefix, args)\n elif qualname == 'types.Union':\n if len(annotation.__args__) > 1 and None in annotation.__args__:\n args = ' | '.join(stringify(a) for a in annotation.__args__ if a)\n return '%sOptional[%s]' % (modprefix, args)\n else:\n return ' | '.join(stringify(a) for a in annotation.__args__)\n elif qualname == 'Callable':\n args = ', '.join(stringify(a, mode) for a in annotation.__args__[:-1])\n returns = stringify(annotation.__args__[-1], mode)\n return '%s%s[[%s], %s]' % (modprefix, qualname, args, returns)\n elif qualname == 'Literal':\n args = ', '.join(repr(a) for a in annotation.__args__)\n return '%s%s[%s]' % (modprefix, qualname, args)\n elif str(annotation).startswith('typing.Annotated'): # for py39+\n return stringify(annotation.__args__[0], mode)\n elif all(is_system_TypeVar(a) for a in annotation.__args__):\n # Suppress arguments if all system defined TypeVars (ex. Dict[KT, VT])\n return modprefix + qualname\n else:\n args = ', '.join(stringify(a, mode) for a in annotation.__args__)\n return '%s%s[%s]' % (modprefix, qualname, args)\n\n return modprefix + qualname", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__stringify_py36_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/util/typing.py__stringify_py36_", "embedding": null, "metadata": {"file_path": "sphinx/util/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 470, "end_line": 543, "span_ids": ["impl:26", "_stringify_py36"], "tokens": 771}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _stringify_py36(annotation: Any, mode: str = 'fully-qualified-except-typing') -> str:\n \"\"\"stringify() for py36.\"\"\"\n module = getattr(annotation, '__module__', None)\n modprefix = ''\n if module == 'typing' and getattr(annotation, '__forward_arg__', None):\n qualname = annotation.__forward_arg__\n elif module == 'typing':\n if getattr(annotation, '_name', None):\n qualname = annotation._name\n elif getattr(annotation, '__qualname__', None):\n qualname = annotation.__qualname__\n elif getattr(annotation, '__origin__', None):\n qualname = stringify(annotation.__origin__) # ex. Union\n else:\n qualname = repr(annotation).replace('typing.', '')\n\n if mode == 'smart':\n modprefix = '~%s.' % module\n elif mode == 'fully-qualified':\n modprefix = '%s.' % module\n elif hasattr(annotation, '__qualname__'):\n if mode == 'smart':\n modprefix = '~%s.' % module\n else:\n modprefix = '%s.' % module\n qualname = annotation.__qualname__\n else:\n qualname = repr(annotation)\n\n if (isinstance(annotation, typing.TupleMeta) and # type: ignore\n not hasattr(annotation, '__tuple_params__')): # for Python 3.6\n params = annotation.__args__\n if params:\n param_str = ', '.join(stringify(p, mode) for p in params)\n return '%s%s[%s]' % (modprefix, qualname, param_str)\n else:\n return modprefix + qualname\n elif isinstance(annotation, typing.GenericMeta):\n params = None\n if annotation.__args__ is None or len(annotation.__args__) <= 2: # type: ignore # NOQA\n params = annotation.__args__ # type: ignore\n elif annotation.__origin__ == Generator: # type: ignore\n params = annotation.__args__ # type: ignore\n else: # typing.Callable\n args = ', '.join(stringify(arg, mode) for arg\n in annotation.__args__[:-1]) # type: ignore\n result = stringify(annotation.__args__[-1]) # type: ignore\n return '%s%s[[%s], %s]' % (modprefix, qualname, args, result)\n if params is not None:\n param_str = ', '.join(stringify(p, mode) for p in params)\n return '%s%s[%s]' % (modprefix, qualname, param_str)\n elif (hasattr(annotation, '__origin__') and\n annotation.__origin__ is typing.Union):\n params = annotation.__args__\n if params is not None:\n if len(params) > 1 and params[-1] is NoneType:\n if len(params) > 2:\n param_str = \", \".join(stringify(p, mode) for p in params[:-1])\n return '%sOptional[%sUnion[%s]]' % (modprefix, modprefix, param_str)\n else:\n return '%sOptional[%s]' % (modprefix, stringify(params[0], mode))\n else:\n param_str = ', '.join(stringify(p, mode) for p in params)\n return '%sUnion[%s]' % (modprefix, param_str)\n\n return modprefix + qualname\n\n\ndeprecated_alias('sphinx.util.typing',\n {\n 'DirectiveOption': Callable[[str], Any],\n },\n RemovedInSphinx60Warning)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py__Implements_the_low_lev_VERSIONING_RATIO.65": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py__Implements_the_low_lev_VERSIONING_RATIO.65", "embedding": null, "metadata": {"file_path": "sphinx/versioning.py", "file_name": "versioning.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["impl", "imports:9", "impl:2", "imports:10", "docstring", "imports", "impl:3"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Implements the low-level algorithms Sphinx uses for versioning doctrees.\"\"\"\nimport pickle\nfrom itertools import product, zip_longest\nfrom operator import itemgetter\nfrom os import path\nfrom typing import TYPE_CHECKING, Any, Dict, Iterator\nfrom uuid import uuid4\n\nfrom docutils.nodes import Node\n\nfrom sphinx.transforms import SphinxTransform\n\nif TYPE_CHECKING:\n from sphinx.application import Sphinx\n\ntry:\n import Levenshtein\n IS_SPEEDUP = True\nexcept ImportError:\n IS_SPEEDUP = False\n\n# anything below that ratio is considered equal/changed\nVERSIONING_RATIO = 65", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_add_uids_add_uids.for_node_in_doctree_finda.yield_node": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/versioning.py_add_uids_add_uids.for_node_in_doctree_finda.yield_node", "embedding": null, "metadata": {"file_path": "sphinx/versioning.py", "file_name": "versioning.py", "file_type": "text/x-python", "category": "implementation", "start_line": 26, "end_line": 38, "span_ids": ["add_uids"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_uids(doctree: Node, condition: Any) -> Iterator[Node]:\n \"\"\"Add a unique id to every node in the `doctree` which matches the\n condition and yield the nodes.\n\n :param doctree:\n A :class:`docutils.nodes.document` instance.\n\n :param condition:\n A callable which returns either ``True`` or ``False`` for a given node.\n \"\"\"\n for node in doctree.findall(condition):\n node.uid = uuid4().hex\n yield node", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py__docutils_writers_handl_multiply_length.if_not_matched_.else_.return._s_s_int_result_un": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py__docutils_writers_handl_multiply_length.if_not_matched_.else_.return._s_s_int_result_un", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 43, "span_ids": ["multiply_length", "impl", "impl:2", "docstring", "imports", "imports:18"], "tokens": 323}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"docutils writers handling Sphinx' custom nodes.\"\"\"\n\nimport os\nimport posixpath\nimport re\nimport urllib.parse\nimport warnings\nfrom typing import TYPE_CHECKING, Iterable, Optional, Tuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node, Text\nfrom docutils.writers.html4css1 import HTMLTranslator as BaseTranslator\nfrom docutils.writers.html4css1 import Writer\n\nfrom sphinx import addnodes\nfrom sphinx.builders import Builder\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.locale import _, __, admonitionlabels\nfrom sphinx.util import logging\nfrom sphinx.util.docutils import SphinxTranslator\nfrom sphinx.util.images import get_image_size\n\nif TYPE_CHECKING:\n from sphinx.builders.html import StandaloneHTMLBuilder\n\n\nlogger = logging.getLogger(__name__)\n\n# A good overview of the purpose behind these classes can be found here:\n# http://www.arnebrodowski.de/blog/write-your-own-restructuredtext-writer.html\n\n\ndef multiply_length(length: str, scale: int) -> str:\n \"\"\"Multiply *length* (width or height) by *scale*.\"\"\"\n matched = re.match(r'^(\\d*\\.?\\d*)\\s*(\\S*)$', length)\n if not matched:\n return length\n elif scale == 100:\n return length\n else:\n amount, unit = matched.groups()\n result = float(amount) * scale / 100\n return \"%s%s\" % (int(result), unit)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator_HTMLTranslator.depart_desc_returns.self_body_append_span_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator_HTMLTranslator.depart_desc_returns.self_body_append_span_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 70, "end_line": 171, "span_ids": ["HTMLTranslator.depart_desc_addname", "HTMLTranslator.visit_desc", "HTMLTranslator.visit_desc_returns", "HTMLTranslator.visit_desc_type", "HTMLTranslator.visit_start_of_file", "HTMLTranslator.depart_desc", "HTMLTranslator.depart_desc_signature", "HTMLTranslator.visit_desc_name", "HTMLTranslator.depart_desc_content", "HTMLTranslator.visit_desc_inline", "HTMLTranslator.visit_desc_signature_line", "HTMLTranslator.depart_desc_signature_line", "HTMLTranslator.depart_desc_inline", "HTMLTranslator.depart_start_of_file", "HTMLTranslator.visit_desc_signature", "HTMLTranslator.depart_desc_returns", "HTMLTranslator.depart_desc_name", "HTMLTranslator.depart_desc_type", "HTMLTranslator.visit_desc_content", "HTMLTranslator.visit_desc_addname", "HTMLTranslator"], "tokens": 830}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n \"\"\"\n Our custom HTML translator.\n \"\"\"\n\n builder: \"StandaloneHTMLBuilder\" = None\n\n def __init__(self, document: nodes.document, builder: Builder) -> None:\n super().__init__(document, builder)\n\n self.highlighter = self.builder.highlighter\n self.docnames = [self.builder.current_docname] # for singlehtml builder\n self.manpages_url = self.config.manpages_url\n self.protect_literal_text = 0\n self.secnumber_suffix = self.config.html_secnumber_suffix\n self.param_separator = ''\n self.optional_param_level = 0\n self._table_row_indices = [0]\n self._fieldlist_row_indices = [0]\n self.required_params_left = 0\n\n def visit_start_of_file(self, node: Element) -> None:\n # only occurs in the single-file builder\n self.docnames.append(node['docname'])\n self.body.append('<span id=\"document-%s\"></span>' % node['docname'])\n\n def depart_start_of_file(self, node: Element) -> None:\n self.docnames.pop()\n\n #############################################################\n # Domain-specific object descriptions\n #############################################################\n\n # Top-level nodes for descriptions\n ##################################\n\n def visit_desc(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'dl'))\n\n def depart_desc(self, node: Element) -> None:\n self.body.append('</dl>\\n\\n')\n\n def visit_desc_signature(self, node: Element) -> None:\n # the id is set automatically\n self.body.append(self.starttag(node, 'dt'))\n self.protect_literal_text += 1\n\n def depart_desc_signature(self, node: Element) -> None:\n self.protect_literal_text -= 1\n if not node.get('is_multiline'):\n self.add_permalink_ref(node, _('Permalink to this definition'))\n self.body.append('</dt>\\n')\n\n def visit_desc_signature_line(self, node: Element) -> None:\n pass\n\n def depart_desc_signature_line(self, node: Element) -> None:\n if node.get('add_permalink'):\n # the permalink info is on the parent desc_signature node\n self.add_permalink_ref(node.parent, _('Permalink to this definition'))\n self.body.append('<br />')\n\n def visit_desc_content(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'dd', ''))\n\n def depart_desc_content(self, node: Element) -> None:\n self.body.append('</dd>')\n\n def visit_desc_inline(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'span', ''))\n\n def depart_desc_inline(self, node: Element) -> None:\n self.body.append('</span>')\n\n # Nodes for high-level structure in signatures\n ##############################################\n\n def visit_desc_name(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'code', ''))\n\n def depart_desc_name(self, node: Element) -> None:\n self.body.append('</code>')\n\n def visit_desc_addname(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'code', ''))\n\n def depart_desc_addname(self, node: Element) -> None:\n self.body.append('</code>')\n\n def visit_desc_type(self, node: Element) -> None:\n pass\n\n def depart_desc_type(self, node: Element) -> None:\n pass\n\n def visit_desc_returns(self, node: Element) -> None:\n self.body.append(' <span class=\"sig-return\">')\n self.body.append('<span class=\"sig-return-icon\">→</span>')\n self.body.append(' <span class=\"sig-return-typehint\">')\n\n def depart_desc_returns(self, node: Element) -> None:\n self.body.append('</span></span>')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_desc_parameterlist_HTMLTranslator._overwritten": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_desc_parameterlist_HTMLTranslator._overwritten", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 173, "end_line": 229, "span_ids": ["HTMLTranslator.visit_desc_parameterlist", "HTMLTranslator.depart_desc_parameterlist", "HTMLTranslator.visit_desc_parameter", "HTMLTranslator.visit_desc_optional", "HTMLTranslator.depart_desc_parameter", "HTMLTranslator.depart_desc_optional", "HTMLTranslator.depart_versionmodified", "HTMLTranslator.visit_desc_annotation", "HTMLTranslator.visit_versionmodified", "HTMLTranslator.depart_desc_annotation"], "tokens": 516}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_desc_parameterlist(self, node: Element) -> None:\n self.body.append('<span class=\"sig-paren\">(</span>')\n self.first_param = 1\n self.optional_param_level = 0\n # How many required parameters are left.\n self.required_params_left = sum([isinstance(c, addnodes.desc_parameter)\n for c in node.children])\n self.param_separator = node.child_text_separator\n\n def depart_desc_parameterlist(self, node: Element) -> None:\n self.body.append('<span class=\"sig-paren\">)</span>')\n\n # If required parameters are still to come, then put the comma after\n # the parameter. Otherwise, put the comma before. This ensures that\n # signatures like the following render correctly (see issue #1001):\n #\n # foo([a, ]b, c[, d])\n #\n def visit_desc_parameter(self, node: Element) -> None:\n if self.first_param:\n self.first_param = 0\n elif not self.required_params_left:\n self.body.append(self.param_separator)\n if self.optional_param_level == 0:\n self.required_params_left -= 1\n if not node.hasattr('noemph'):\n self.body.append('<em>')\n\n def depart_desc_parameter(self, node: Element) -> None:\n if not node.hasattr('noemph'):\n self.body.append('</em>')\n if self.required_params_left:\n self.body.append(self.param_separator)\n\n def visit_desc_optional(self, node: Element) -> None:\n self.optional_param_level += 1\n self.body.append('<span class=\"optional\">[</span>')\n\n def depart_desc_optional(self, node: Element) -> None:\n self.optional_param_level -= 1\n self.body.append('<span class=\"optional\">]</span>')\n\n def visit_desc_annotation(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'em', '', CLASS='property'))\n\n def depart_desc_annotation(self, node: Element) -> None:\n self.body.append('</em>')\n\n ##############################################\n\n def visit_versionmodified(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'div', CLASS=node['type']))\n\n def depart_versionmodified(self, node: Element) -> None:\n self.body.append('</div>\\n')\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.None_18_HTMLTranslator.None_25": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.None_18_HTMLTranslator.None_25", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 356, "end_line": 395, "span_ids": ["HTMLTranslator.depart_classifier", "HTMLTranslator.visit_term", "HTMLTranslator.visit_bullet_list", "HTMLTranslator.visit_classifier", "HTMLTranslator.visit_definition", "HTMLTranslator.depart_definition", "HTMLTranslator.generate_targets_for_listing", "HTMLTranslator.visit_enumerated_list"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n # overwritten\n def visit_bullet_list(self, node: Element) -> None:\n if len(node) == 1 and isinstance(node[0], addnodes.toctree):\n # avoid emitting empty <ul></ul>\n raise nodes.SkipNode\n self.generate_targets_for_listing(node)\n super().visit_bullet_list(node)\n\n # overwritten\n def visit_enumerated_list(self, node: Element) -> None:\n self.generate_targets_for_listing(node)\n super().visit_enumerated_list(node)\n\n # overwritten\n def visit_definition(self, node: Element) -> None:\n # don't insert </dt> here.\n self.body.append(self.starttag(node, 'dd', ''))\n\n # overwritten\n def depart_definition(self, node: Element) -> None:\n self.body.append('</dd>\\n')\n\n # overwritten\n def visit_classifier(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'span', '', CLASS='classifier'))\n\n # overwritten\n def depart_classifier(self, node: Element) -> None:\n self.body.append('</span>')\n\n next_node: Node = node.next_node(descend=False, siblings=True)\n if not isinstance(next_node, nodes.classifier):\n # close `<dt>` tag at the tail of classifiers\n self.body.append('</dt>')\n\n # overwritten\n def visit_term(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'dt', ''))\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.depart_term_HTMLTranslator.None_26": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.depart_term_HTMLTranslator.None_26", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 396, "end_line": 409, "span_ids": ["HTMLTranslator.depart_term"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n def depart_term(self, node: Element) -> None:\n next_node: Node = node.next_node(descend=False, siblings=True)\n if isinstance(next_node, nodes.classifier):\n # Leave the end tag to `self.depart_classifier()`, in case\n # there's a classifier.\n pass\n else:\n if isinstance(node.parent.parent.parent, addnodes.glossary):\n # add permalink if glossary terms\n self.add_permalink_ref(node, _('Permalink to this term'))\n\n self.body.append('</dt>')\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_title_HTMLTranslator.visit_title.None_1.self_body_append_span_c": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_title_HTMLTranslator.visit_title.None_1.self_body_append_span_c", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 410, "end_line": 420, "span_ids": ["HTMLTranslator.visit_title"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n def visit_title(self, node: Element) -> None:\n if isinstance(node.parent, addnodes.compact_paragraph) and node.parent.get('toctree'):\n self.body.append(self.starttag(node, 'p', '', CLASS='caption', ROLE='heading'))\n self.body.append('<span class=\"caption-text\">')\n self.context.append('</span></p>\\n')\n else:\n super().visit_title(node)\n self.add_secnumber(node)\n self.add_fignumber(node.parent)\n if isinstance(node.parent, nodes.table):\n self.body.append('<span class=\"caption-text\">')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.depart_title_HTMLTranslator.None_27": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.depart_title_HTMLTranslator.None_27", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 422, "end_line": 443, "span_ids": ["HTMLTranslator.depart_title"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def depart_title(self, node: Element) -> None:\n close_tag = self.context[-1]\n if (self.config.html_permalinks and self.builder.add_permalinks and\n node.parent.hasattr('ids') and node.parent['ids']):\n # add permalink anchor\n if close_tag.startswith('</h'):\n self.add_permalink_ref(node.parent, _('Permalink to this heading'))\n elif close_tag.startswith('</a></h'):\n self.body.append('</a><a class=\"headerlink\" href=\"#%s\" ' %\n node.parent['ids'][0] +\n 'title=\"%s\">%s' % (\n _('Permalink to this heading'),\n self.config.html_permalinks_icon))\n elif isinstance(node.parent, nodes.table):\n self.body.append('</span>')\n self.add_permalink_ref(node.parent, _('Permalink to this table'))\n elif isinstance(node.parent, nodes.table):\n self.body.append('</span>')\n\n super().depart_title(node)\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_download_reference_HTMLTranslator.None_32": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_download_reference_HTMLTranslator.None_32", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 571, "end_line": 601, "span_ids": ["HTMLTranslator.visit_figure", "HTMLTranslator.visit_download_reference", "HTMLTranslator.depart_download_reference"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_download_reference(self, node: Element) -> None:\n atts = {'class': 'reference download',\n 'download': ''}\n\n if not self.builder.download_support:\n self.context.append('')\n elif 'refuri' in node:\n atts['class'] += ' external'\n atts['href'] = node['refuri']\n self.body.append(self.starttag(node, 'a', '', **atts))\n self.context.append('</a>')\n elif 'filename' in node:\n atts['class'] += ' internal'\n atts['href'] = posixpath.join(self.builder.dlpath,\n urllib.parse.quote(node['filename']))\n self.body.append(self.starttag(node, 'a', '', **atts))\n self.context.append('</a>')\n else:\n self.context.append('')\n\n def depart_download_reference(self, node: Element) -> None:\n self.body.append(self.context.pop())\n\n # overwritten\n def visit_figure(self, node: Element) -> None:\n # set align=default if align not specified to give a default style\n node.setdefault('align', 'default')\n\n return super().visit_figure(node)\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.None_33_HTMLTranslator.None_34": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.None_33_HTMLTranslator.None_34", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 644, "end_line": 690, "span_ids": ["HTMLTranslator.visit_index", "HTMLTranslator.depart_glossary", "HTMLTranslator.visit_acks", "HTMLTranslator.visit_tabular_col_spec", "HTMLTranslator.visit_toctree", "HTMLTranslator.visit_image", "HTMLTranslator.depart_acks", "HTMLTranslator.visit_hlist", "HTMLTranslator.depart_hlist", "HTMLTranslator.visit_glossary", "HTMLTranslator.visit_hlistcol", "HTMLTranslator.visit_option_group", "HTMLTranslator.depart_image", "HTMLTranslator.depart_hlistcol"], "tokens": 362}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n # overwritten\n def depart_image(self, node: Element) -> None:\n if node['uri'].lower().endswith(('svg', 'svgz')):\n pass\n else:\n super().depart_image(node)\n\n def visit_toctree(self, node: Element) -> None:\n # this only happens when formatting a toc from env.tocs -- in this\n # case we don't want to include the subtree\n raise nodes.SkipNode\n\n def visit_index(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_tabular_col_spec(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_glossary(self, node: Element) -> None:\n pass\n\n def depart_glossary(self, node: Element) -> None:\n pass\n\n def visit_acks(self, node: Element) -> None:\n pass\n\n def depart_acks(self, node: Element) -> None:\n pass\n\n def visit_hlist(self, node: Element) -> None:\n self.body.append('<table class=\"hlist\"><tr>')\n\n def depart_hlist(self, node: Element) -> None:\n self.body.append('</tr></table>\\n')\n\n def visit_hlistcol(self, node: Element) -> None:\n self.body.append('<td>')\n\n def depart_hlistcol(self, node: Element) -> None:\n self.body.append('</td>')\n\n def visit_option_group(self, node: Element) -> None:\n super().visit_option_group(node)\n self.context[-2] = self.context[-2].replace(' ', ' ')\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_note_HTMLTranslator.depart_table.super_depart_table_node": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_note_HTMLTranslator.depart_table.super_depart_table_node", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 712, "end_line": 810, "span_ids": ["HTMLTranslator.visit_danger", "HTMLTranslator.depart_error", "HTMLTranslator.depart_tip", "HTMLTranslator.depart_hint", "HTMLTranslator.depart_literal_strong", "HTMLTranslator.depart_caution", "HTMLTranslator.depart_note", "HTMLTranslator.visit_manpage", "HTMLTranslator.visit_note", "HTMLTranslator.depart_attention", "HTMLTranslator.visit_literal_strong", "HTMLTranslator.depart_warning", "HTMLTranslator.visit_abbreviation", "HTMLTranslator.depart_abbreviation", "HTMLTranslator.depart_manpage", "HTMLTranslator.depart_important", "HTMLTranslator.depart_table", "HTMLTranslator.visit_important", "HTMLTranslator.depart_literal_emphasis", "HTMLTranslator.visit_table", "HTMLTranslator.depart_danger", "HTMLTranslator.visit_attention", "HTMLTranslator.visit_caution", "HTMLTranslator.visit_tip", "HTMLTranslator.visit_warning", "HTMLTranslator.visit_hint", "HTMLTranslator.visit_error", "HTMLTranslator.visit_literal_emphasis"], "tokens": 769}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_note(self, node: Element) -> None:\n self.visit_admonition(node, 'note')\n\n def depart_note(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_warning(self, node: Element) -> None:\n self.visit_admonition(node, 'warning')\n\n def depart_warning(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_attention(self, node: Element) -> None:\n self.visit_admonition(node, 'attention')\n\n def depart_attention(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_caution(self, node: Element) -> None:\n self.visit_admonition(node, 'caution')\n\n def depart_caution(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_danger(self, node: Element) -> None:\n self.visit_admonition(node, 'danger')\n\n def depart_danger(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_error(self, node: Element) -> None:\n self.visit_admonition(node, 'error')\n\n def depart_error(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_hint(self, node: Element) -> None:\n self.visit_admonition(node, 'hint')\n\n def depart_hint(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_important(self, node: Element) -> None:\n self.visit_admonition(node, 'important')\n\n def depart_important(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_tip(self, node: Element) -> None:\n self.visit_admonition(node, 'tip')\n\n def depart_tip(self, node: Element) -> None:\n self.depart_admonition(node)\n\n def visit_literal_emphasis(self, node: Element) -> None:\n return self.visit_emphasis(node)\n\n def depart_literal_emphasis(self, node: Element) -> None:\n return self.depart_emphasis(node)\n\n def visit_literal_strong(self, node: Element) -> None:\n return self.visit_strong(node)\n\n def depart_literal_strong(self, node: Element) -> None:\n return self.depart_strong(node)\n\n def visit_abbreviation(self, node: Element) -> None:\n attrs = {}\n if node.hasattr('explanation'):\n attrs['title'] = node['explanation']\n self.body.append(self.starttag(node, 'abbr', '', **attrs))\n\n def depart_abbreviation(self, node: Element) -> None:\n self.body.append('</abbr>')\n\n def visit_manpage(self, node: Element) -> None:\n self.visit_literal_emphasis(node)\n if self.manpages_url:\n node['refuri'] = self.manpages_url.format(**node.attributes)\n self.visit_reference(node)\n\n def depart_manpage(self, node: Element) -> None:\n if self.manpages_url:\n self.depart_reference(node)\n self.depart_literal_emphasis(node)\n\n # overwritten to add even/odd classes\n\n def visit_table(self, node: Element) -> None:\n self._table_row_indices.append(0)\n\n # set align=default if align not specified to give a default style\n node.setdefault('align', 'default')\n\n return super().visit_table(node)\n\n def depart_table(self, node: Element) -> None:\n self._table_row_indices.pop()\n super().depart_table(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_row_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html.py_HTMLTranslator.visit_row_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html.py", "file_name": "html.py", "file_type": "text/x-python", "category": "implementation", "start_line": 812, "end_line": 881, "span_ids": ["HTMLTranslator._table_row_index", "HTMLTranslator.visit_field", "HTMLTranslator.depart_math", "HTMLTranslator.visit_math", "HTMLTranslator.visit_field_name", "HTMLTranslator.depart_field_list", "HTMLTranslator.visit_math_block", "HTMLTranslator.depart_math_block", "HTMLTranslator._fieldlist_row_index", "HTMLTranslator.visit_field_list", "HTMLTranslator.visit_row", "HTMLTranslator.visit_entry"], "tokens": 658}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTMLTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_row(self, node: Element) -> None:\n self._table_row_indices[-1] += 1\n if self._table_row_indices[-1] % 2 == 0:\n node['classes'].append('row-even')\n else:\n node['classes'].append('row-odd')\n self.body.append(self.starttag(node, 'tr', ''))\n node.column = 0 # type: ignore\n\n def visit_entry(self, node: Element) -> None:\n super().visit_entry(node)\n if self.body[-1] == ' ':\n self.body[-1] = ' '\n\n def visit_field_list(self, node: Element) -> None:\n self._fieldlist_row_indices.append(0)\n return super().visit_field_list(node)\n\n def depart_field_list(self, node: Element) -> None:\n self._fieldlist_row_indices.pop()\n return super().depart_field_list(node)\n\n def visit_field(self, node: Element) -> None:\n self._fieldlist_row_indices[-1] += 1\n if self._fieldlist_row_indices[-1] % 2 == 0:\n node['classes'].append('field-even')\n else:\n node['classes'].append('field-odd')\n self.body.append(self.starttag(node, 'tr', '', CLASS='field'))\n\n def visit_field_name(self, node: Element) -> None:\n context_count = len(self.context)\n super().visit_field_name(node)\n if context_count != len(self.context):\n self.context[-1] = self.context[-1].replace(' ', ' ')\n\n def visit_math(self, node: Element, math_env: str = '') -> None:\n name = self.builder.math_renderer_name\n visit, _ = self.builder.app.registry.html_inline_math_renderers[name]\n visit(self, node)\n\n def depart_math(self, node: Element, math_env: str = '') -> None:\n name = self.builder.math_renderer_name\n _, depart = self.builder.app.registry.html_inline_math_renderers[name]\n if depart:\n depart(self, node)\n\n def visit_math_block(self, node: Element, math_env: str = '') -> None:\n name = self.builder.math_renderer_name\n visit, _ = self.builder.app.registry.html_block_math_renderers[name]\n visit(self, node)\n\n def depart_math_block(self, node: Element, math_env: str = '') -> None:\n name = self.builder.math_renderer_name\n _, depart = self.builder.app.registry.html_block_math_renderers[name]\n if depart:\n depart(self, node)\n\n @property\n def _fieldlist_row_index(self):\n warnings.warn('_fieldlist_row_index is deprecated',\n RemovedInSphinx60Warning, stacklevel=2)\n return self._fieldlist_row_indices[-1]\n\n @property\n def _table_row_index(self):\n warnings.warn('_table_row_index is deprecated',\n RemovedInSphinx60Warning, stacklevel=2)\n return self._table_row_indices[-1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py__Experimental_docutils__multiply_length.if_not_matched_.else_.return._s_s_int_result_un": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py__Experimental_docutils__multiply_length.if_not_matched_.else_.return._s_s_int_result_un", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 42, "span_ids": ["multiply_length", "impl", "impl:2", "docstring", "imports", "imports:17"], "tokens": 318}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Experimental docutils writers for HTML5 handling Sphinx's custom nodes.\"\"\"\n\nimport os\nimport posixpath\nimport re\nimport urllib.parse\nimport warnings\nfrom typing import TYPE_CHECKING, Iterable, Optional, Set, Tuple, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, Node, Text\nfrom docutils.writers.html5_polyglot import HTMLTranslator as BaseTranslator\n\nfrom sphinx import addnodes\nfrom sphinx.builders import Builder\nfrom sphinx.deprecation import RemovedInSphinx60Warning\nfrom sphinx.locale import _, __, admonitionlabels\nfrom sphinx.util import logging\nfrom sphinx.util.docutils import SphinxTranslator\nfrom sphinx.util.images import get_image_size\n\nif TYPE_CHECKING:\n from sphinx.builders.html import StandaloneHTMLBuilder\n\n\nlogger = logging.getLogger(__name__)\n\n# A good overview of the purpose behind these classes can be found here:\n# http://www.arnebrodowski.de/blog/write-your-own-restructuredtext-writer.html\n\n\ndef multiply_length(length: str, scale: int) -> str:\n \"\"\"Multiply *length* (width or height) by *scale*.\"\"\"\n matched = re.match(r'^(\\d*\\.?\\d*)\\s*(\\S*)$', length)\n if not matched:\n return length\n elif scale == 100:\n return length\n else:\n amount, unit = matched.groups()\n result = float(amount) * scale / 100\n return \"%s%s\" % (int(result), unit)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator_HTML5Translator.depart_desc_type.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator_HTML5Translator.depart_desc_type.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 45, "end_line": 142, "span_ids": ["HTML5Translator.visit_desc_type", "HTML5Translator.visit_desc_content", "HTML5Translator.depart_desc_addname", "HTML5Translator.depart_desc_inline", "HTML5Translator.visit_start_of_file", "HTML5Translator.depart_desc", "HTML5Translator.visit_desc_signature_line", "HTML5Translator.visit_desc_signature", "HTML5Translator.visit_desc_addname", "HTML5Translator.depart_start_of_file", "HTML5Translator.visit_desc_inline", "HTML5Translator.depart_desc_signature_line", "HTML5Translator", "HTML5Translator.depart_desc_type", "HTML5Translator.depart_desc_content", "HTML5Translator.visit_desc", "HTML5Translator.depart_desc_name", "HTML5Translator.depart_desc_signature", "HTML5Translator.visit_desc_name"], "tokens": 807}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n \"\"\"\n Our custom HTML translator.\n \"\"\"\n\n builder: \"StandaloneHTMLBuilder\" = None\n # Override docutils.writers.html5_polyglot:HTMLTranslator\n # otherwise, nodes like <inline classes=\"s\">...</inline> will be\n # converted to <s>...</s> by `visit_inline`.\n supported_inline_tags: Set[str] = set()\n\n def __init__(self, document: nodes.document, builder: Builder) -> None:\n super().__init__(document, builder)\n\n self.highlighter = self.builder.highlighter\n self.docnames = [self.builder.current_docname] # for singlehtml builder\n self.manpages_url = self.config.manpages_url\n self.protect_literal_text = 0\n self.secnumber_suffix = self.config.html_secnumber_suffix\n self.param_separator = ''\n self.optional_param_level = 0\n self._table_row_indices = [0]\n self._fieldlist_row_indices = [0]\n self.required_params_left = 0\n\n def visit_start_of_file(self, node: Element) -> None:\n # only occurs in the single-file builder\n self.docnames.append(node['docname'])\n self.body.append('<span id=\"document-%s\"></span>' % node['docname'])\n\n def depart_start_of_file(self, node: Element) -> None:\n self.docnames.pop()\n\n #############################################################\n # Domain-specific object descriptions\n #############################################################\n\n # Top-level nodes for descriptions\n ##################################\n\n def visit_desc(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'dl'))\n\n def depart_desc(self, node: Element) -> None:\n self.body.append('</dl>\\n\\n')\n\n def visit_desc_signature(self, node: Element) -> None:\n # the id is set automatically\n self.body.append(self.starttag(node, 'dt'))\n self.protect_literal_text += 1\n\n def depart_desc_signature(self, node: Element) -> None:\n self.protect_literal_text -= 1\n if not node.get('is_multiline'):\n self.add_permalink_ref(node, _('Permalink to this definition'))\n self.body.append('</dt>\\n')\n\n def visit_desc_signature_line(self, node: Element) -> None:\n pass\n\n def depart_desc_signature_line(self, node: Element) -> None:\n if node.get('add_permalink'):\n # the permalink info is on the parent desc_signature node\n self.add_permalink_ref(node.parent, _('Permalink to this definition'))\n self.body.append('<br />')\n\n def visit_desc_content(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'dd', ''))\n\n def depart_desc_content(self, node: Element) -> None:\n self.body.append('</dd>')\n\n def visit_desc_inline(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'span', ''))\n\n def depart_desc_inline(self, node: Element) -> None:\n self.body.append('</span>')\n\n # Nodes for high-level structure in signatures\n ##############################################\n\n def visit_desc_name(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'span', ''))\n\n def depart_desc_name(self, node: Element) -> None:\n self.body.append('</span>')\n\n def visit_desc_addname(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'span', ''))\n\n def depart_desc_addname(self, node: Element) -> None:\n self.body.append('</span>')\n\n def visit_desc_type(self, node: Element) -> None:\n pass\n\n def depart_desc_type(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_desc_returns_HTML5Translator._overwritten": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_desc_returns_HTML5Translator._overwritten", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 144, "end_line": 208, "span_ids": ["HTML5Translator.visit_desc_parameter", "HTML5Translator.depart_desc_optional", "HTML5Translator.visit_desc_parameterlist", "HTML5Translator.visit_versionmodified", "HTML5Translator.depart_desc_returns", "HTML5Translator.depart_versionmodified", "HTML5Translator.visit_desc_annotation", "HTML5Translator.visit_desc_optional", "HTML5Translator.visit_desc_returns", "HTML5Translator.depart_desc_parameterlist", "HTML5Translator.depart_desc_parameter", "HTML5Translator.depart_desc_annotation"], "tokens": 605}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def visit_desc_returns(self, node: Element) -> None:\n self.body.append(' <span class=\"sig-return\">')\n self.body.append('<span class=\"sig-return-icon\">→</span>')\n self.body.append(' <span class=\"sig-return-typehint\">')\n\n def depart_desc_returns(self, node: Element) -> None:\n self.body.append('</span></span>')\n\n def visit_desc_parameterlist(self, node: Element) -> None:\n self.body.append('<span class=\"sig-paren\">(</span>')\n self.first_param = 1\n self.optional_param_level = 0\n # How many required parameters are left.\n self.required_params_left = sum([isinstance(c, addnodes.desc_parameter)\n for c in node.children])\n self.param_separator = node.child_text_separator\n\n def depart_desc_parameterlist(self, node: Element) -> None:\n self.body.append('<span class=\"sig-paren\">)</span>')\n\n # If required parameters are still to come, then put the comma after\n # the parameter. Otherwise, put the comma before. This ensures that\n # signatures like the following render correctly (see issue #1001):\n #\n # foo([a, ]b, c[, d])\n #\n def visit_desc_parameter(self, node: Element) -> None:\n if self.first_param:\n self.first_param = 0\n elif not self.required_params_left:\n self.body.append(self.param_separator)\n if self.optional_param_level == 0:\n self.required_params_left -= 1\n if not node.hasattr('noemph'):\n self.body.append('<em class=\"sig-param\">')\n\n def depart_desc_parameter(self, node: Element) -> None:\n if not node.hasattr('noemph'):\n self.body.append('</em>')\n if self.required_params_left:\n self.body.append(self.param_separator)\n\n def visit_desc_optional(self, node: Element) -> None:\n self.optional_param_level += 1\n self.body.append('<span class=\"optional\">[</span>')\n\n def depart_desc_optional(self, node: Element) -> None:\n self.optional_param_level -= 1\n self.body.append('<span class=\"optional\">]</span>')\n\n def visit_desc_annotation(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'em', '', CLASS='property'))\n\n def depart_desc_annotation(self, node: Element) -> None:\n self.body.append('</em>')\n\n ##############################################\n\n def visit_versionmodified(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'div', CLASS=node['type']))\n\n def depart_versionmodified(self, node: Element) -> None:\n self.body.append('</div>\\n')\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.add_permalink_ref_HTML5Translator.None_27": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.add_permalink_ref_HTML5Translator.None_27", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 315, "end_line": 354, "span_ids": ["HTML5Translator.visit_classifier", "HTML5Translator.visit_definition", "HTML5Translator.visit_term", "HTML5Translator.visit_bullet_list", "HTML5Translator.depart_classifier", "HTML5Translator.depart_definition", "HTML5Translator.add_permalink_ref"], "tokens": 367}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def add_permalink_ref(self, node: Element, title: str) -> None:\n if node['ids'] and self.config.html_permalinks and self.builder.add_permalinks:\n format = '<a class=\"headerlink\" href=\"#%s\" title=\"%s\">%s</a>'\n self.body.append(format % (node['ids'][0], title,\n self.config.html_permalinks_icon))\n\n # overwritten\n def visit_bullet_list(self, node: Element) -> None:\n if len(node) == 1 and isinstance(node[0], addnodes.toctree):\n # avoid emitting empty <ul></ul>\n raise nodes.SkipNode\n super().visit_bullet_list(node)\n\n # overwritten\n def visit_definition(self, node: Element) -> None:\n # don't insert </dt> here.\n self.body.append(self.starttag(node, 'dd', ''))\n\n # overwritten\n def depart_definition(self, node: Element) -> None:\n self.body.append('</dd>\\n')\n\n # overwritten\n def visit_classifier(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'span', '', CLASS='classifier'))\n\n # overwritten\n def depart_classifier(self, node: Element) -> None:\n self.body.append('</span>')\n\n next_node: Node = node.next_node(descend=False, siblings=True)\n if not isinstance(next_node, nodes.classifier):\n # close `<dt>` tag at the tail of classifiers\n self.body.append('</dt>')\n\n # overwritten\n def visit_term(self, node: Element) -> None:\n self.body.append(self.starttag(node, 'dt', ''))\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_term_HTML5Translator.None_28": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_term_HTML5Translator.None_28", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 355, "end_line": 368, "span_ids": ["HTML5Translator.depart_term"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n def depart_term(self, node: Element) -> None:\n next_node: Node = node.next_node(descend=False, siblings=True)\n if isinstance(next_node, nodes.classifier):\n # Leave the end tag to `self.depart_classifier()`, in case\n # there's a classifier.\n pass\n else:\n if isinstance(node.parent.parent.parent, addnodes.glossary):\n # add permalink if glossary terms\n self.add_permalink_ref(node, _('Permalink to this term'))\n\n self.body.append('</dt>')\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_title_HTML5Translator.visit_title.None_1.self_body_append_span_c": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_title_HTML5Translator.visit_title.None_1.self_body_append_span_c", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 369, "end_line": 379, "span_ids": ["HTML5Translator.visit_title"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n def visit_title(self, node: Element) -> None:\n if isinstance(node.parent, addnodes.compact_paragraph) and node.parent.get('toctree'):\n self.body.append(self.starttag(node, 'p', '', CLASS='caption', ROLE='heading'))\n self.body.append('<span class=\"caption-text\">')\n self.context.append('</span></p>\\n')\n else:\n super().visit_title(node)\n self.add_secnumber(node)\n self.add_fignumber(node.parent)\n if isinstance(node.parent, nodes.table):\n self.body.append('<span class=\"caption-text\">')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_title_HTML5Translator.None_29": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_title_HTML5Translator.None_29", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 381, "end_line": 402, "span_ids": ["HTML5Translator.depart_title"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def depart_title(self, node: Element) -> None:\n close_tag = self.context[-1]\n if (self.config.html_permalinks and self.builder.add_permalinks and\n node.parent.hasattr('ids') and node.parent['ids']):\n # add permalink anchor\n if close_tag.startswith('</h'):\n self.add_permalink_ref(node.parent, _('Permalink to this heading'))\n elif close_tag.startswith('</a></h'):\n self.body.append('</a><a class=\"headerlink\" href=\"#%s\" ' %\n node.parent['ids'][0] +\n 'title=\"%s\">%s' % (\n _('Permalink to this heading'),\n self.config.html_permalinks_icon))\n elif isinstance(node.parent, nodes.table):\n self.body.append('</span>')\n self.add_permalink_ref(node.parent, _('Permalink to this table'))\n elif isinstance(node.parent, nodes.table):\n self.body.append('</span>')\n\n super().depart_title(node)\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_download_reference_HTML5Translator.None_33": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.visit_download_reference_HTML5Translator.None_33", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 519, "end_line": 549, "span_ids": ["HTML5Translator.visit_figure", "HTML5Translator.visit_download_reference", "HTML5Translator.depart_download_reference"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def visit_download_reference(self, node: Element) -> None:\n atts = {'class': 'reference download',\n 'download': ''}\n\n if not self.builder.download_support:\n self.context.append('')\n elif 'refuri' in node:\n atts['class'] += ' external'\n atts['href'] = node['refuri']\n self.body.append(self.starttag(node, 'a', '', **atts))\n self.context.append('</a>')\n elif 'filename' in node:\n atts['class'] += ' internal'\n atts['href'] = posixpath.join(self.builder.dlpath,\n urllib.parse.quote(node['filename']))\n self.body.append(self.starttag(node, 'a', '', **atts))\n self.context.append('</a>')\n else:\n self.context.append('')\n\n def depart_download_reference(self, node: Element) -> None:\n self.body.append(self.context.pop())\n\n # overwritten\n def visit_figure(self, node: Element) -> None:\n # set align=default if align not specified to give a default style\n node.setdefault('align', 'default')\n\n return super().visit_figure(node)\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.None_34_HTML5Translator.None_35": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.None_34_HTML5Translator.None_35", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 592, "end_line": 634, "span_ids": ["HTML5Translator.depart_hlistcol", "HTML5Translator.visit_image", "HTML5Translator.depart_image", "HTML5Translator.visit_index", "HTML5Translator.visit_hlistcol", "HTML5Translator.visit_hlist", "HTML5Translator.visit_tabular_col_spec", "HTML5Translator.visit_glossary", "HTML5Translator.depart_glossary", "HTML5Translator.depart_hlist", "HTML5Translator.visit_toctree", "HTML5Translator.depart_acks", "HTML5Translator.visit_acks"], "tokens": 321}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n # overwritten\n def depart_image(self, node: Element) -> None:\n if node['uri'].lower().endswith(('svg', 'svgz')):\n pass\n else:\n super().depart_image(node)\n\n def visit_toctree(self, node: Element) -> None:\n # this only happens when formatting a toc from env.tocs -- in this\n # case we don't want to include the subtree\n raise nodes.SkipNode\n\n def visit_index(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_tabular_col_spec(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_glossary(self, node: Element) -> None:\n pass\n\n def depart_glossary(self, node: Element) -> None:\n pass\n\n def visit_acks(self, node: Element) -> None:\n pass\n\n def depart_acks(self, node: Element) -> None:\n pass\n\n def visit_hlist(self, node: Element) -> None:\n self.body.append('<table class=\"hlist\"><tr>')\n\n def depart_hlist(self, node: Element) -> None:\n self.body.append('</tr></table>\\n')\n\n def visit_hlistcol(self, node: Element) -> None:\n self.body.append('<td>')\n\n def depart_hlistcol(self, node: Element) -> None:\n self.body.append('</td>')\n\n # overwritten", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_table_HTML5Translator.depart_math_block.if_depart_.depart_self_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.depart_table_HTML5Translator.depart_math_block.if_depart_.depart_self_node_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 759, "end_line": 807, "span_ids": ["HTML5Translator.visit_field", "HTML5Translator.visit_field_list", "HTML5Translator.depart_field_list", "HTML5Translator.depart_math", "HTML5Translator.visit_math", "HTML5Translator.depart_table", "HTML5Translator.visit_row", "HTML5Translator.depart_math_block", "HTML5Translator.visit_math_block"], "tokens": 475}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def depart_table(self, node: Element) -> None:\n self._table_row_indices.pop()\n super().depart_table(node)\n\n def visit_row(self, node: Element) -> None:\n self._table_row_indices[-1] += 1\n if self._table_row_indices[-1] % 2 == 0:\n node['classes'].append('row-even')\n else:\n node['classes'].append('row-odd')\n self.body.append(self.starttag(node, 'tr', ''))\n node.column = 0 # type: ignore\n\n def visit_field_list(self, node: Element) -> None:\n self._fieldlist_row_indices.append(0)\n return super().visit_field_list(node)\n\n def depart_field_list(self, node: Element) -> None:\n self._fieldlist_row_indices.pop()\n return super().depart_field_list(node)\n\n def visit_field(self, node: Element) -> None:\n self._fieldlist_row_indices[-1] += 1\n if self._fieldlist_row_indices[-1] % 2 == 0:\n node['classes'].append('field-even')\n else:\n node['classes'].append('field-odd')\n\n def visit_math(self, node: Element, math_env: str = '') -> None:\n name = self.builder.math_renderer_name\n visit, _ = self.builder.app.registry.html_inline_math_renderers[name]\n visit(self, node)\n\n def depart_math(self, node: Element, math_env: str = '') -> None:\n name = self.builder.math_renderer_name\n _, depart = self.builder.app.registry.html_inline_math_renderers[name]\n if depart:\n depart(self, node)\n\n def visit_math_block(self, node: Element, math_env: str = '') -> None:\n name = self.builder.math_renderer_name\n visit, _ = self.builder.app.registry.html_block_math_renderers[name]\n visit(self, node)\n\n def depart_math_block(self, node: Element, math_env: str = '') -> None:\n name = self.builder.math_renderer_name\n _, depart = self.builder.app.registry.html_block_math_renderers[name]\n if depart:\n depart(self, node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.generate_targets_for_table_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/html5.py_HTML5Translator.generate_targets_for_table_", "embedding": null, "metadata": {"file_path": "sphinx/writers/html5.py", "file_name": "html5.py", "file_type": "text/x-python", "category": "implementation", "start_line": 809, "end_line": 835, "span_ids": ["HTML5Translator._table_row_index", "HTML5Translator.generate_targets_for_table", "HTML5Translator._fieldlist_row_index"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTML5Translator(SphinxTranslator, BaseTranslator):\n\n def generate_targets_for_table(self, node: Element) -> None:\n \"\"\"Generate hyperlink targets for tables.\n\n Original visit_table() generates hyperlink targets inside table tags\n (<table>) if multiple IDs are assigned to listings.\n That is invalid DOM structure. (This is a bug of docutils <= 0.13.1)\n\n This exports hyperlink targets before tables to make valid DOM structure.\n \"\"\"\n warnings.warn('generate_targets_for_table() is deprecated',\n RemovedInSphinx60Warning, stacklevel=2)\n for id in node['ids'][1:]:\n self.body.append('<span id=\"%s\"></span>' % id)\n node['ids'].remove(id)\n\n @property\n def _fieldlist_row_index(self):\n warnings.warn('_fieldlist_row_index is deprecated',\n RemovedInSphinx60Warning, stacklevel=2)\n return self._fieldlist_row_indices[-1]\n\n @property\n def _table_row_index(self):\n warnings.warn('_table_row_index is deprecated',\n RemovedInSphinx60Warning, stacklevel=2)\n return self._table_row_indices[-1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py__Custom_docutils_writer_UnsupportedError.category._Markup_is_unsupported_in": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py__Custom_docutils_writer_UnsupportedError.category._Markup_is_unsupported_in", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 63, "span_ids": ["impl", "impl:2", "docstring", "UnsupportedError", "imports:20", "imports:21", "imports", "docstring:2", "impl:3", "collected_footnote", "imports:19", "impl:4"], "tokens": 474}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Custom docutils writer for LaTeX.\n\nMuch of this code is adapted from Dave Kuhlman's \"docpy\" writer from his\ndocutils sandbox.\n\"\"\"\n\nimport re\nimport warnings\nfrom collections import defaultdict\nfrom os import path\nfrom typing import TYPE_CHECKING, Any, Dict, Iterable, List, Set, Tuple, cast\n\nfrom docutils import nodes, writers\nfrom docutils.nodes import Element, Node, Text\n\nfrom sphinx import addnodes, highlighting\nfrom sphinx.deprecation import RemovedInSphinx70Warning\nfrom sphinx.domains import IndexEntry\nfrom sphinx.domains.std import StandardDomain\nfrom sphinx.errors import SphinxError\nfrom sphinx.locale import _, __, admonitionlabels\nfrom sphinx.util import logging, split_into, texescape\nfrom sphinx.util.docutils import SphinxTranslator\nfrom sphinx.util.nodes import clean_astext, get_prev_node\nfrom sphinx.util.template import LaTeXRenderer\nfrom sphinx.util.texescape import tex_replace_map\n\ntry:\n from docutils.utils.roman import toRoman\nexcept ImportError:\n # In Debian/Ubuntu, roman package is provided as roman, not as docutils.utils.roman\n from roman import toRoman # type: ignore\n\nif TYPE_CHECKING:\n from sphinx.builders.latex import LaTeXBuilder\n from sphinx.builders.latex.theming import Theme\n\n\nlogger = logging.getLogger(__name__)\n\nMAX_CITATION_LABEL_LENGTH = 8\nLATEXSECTIONNAMES = [\"part\", \"chapter\", \"section\", \"subsection\",\n \"subsubsection\", \"paragraph\", \"subparagraph\"]\nENUMERATE_LIST_STYLE = defaultdict(lambda: r'\\arabic',\n {\n 'arabic': r'\\arabic',\n 'loweralpha': r'\\alph',\n 'upperalpha': r'\\Alph',\n 'lowerroman': r'\\roman',\n 'upperroman': r'\\Roman',\n })\n\nCR = '\\n'\nBLANKLINE = '\\n\\n'\nEXTRA_RE = re.compile(r'^(.*\\S)\\s+\\(([^()]*)\\)\\s*$')\n\n\nclass collected_footnote(nodes.footnote):\n \"\"\"Footnotes that are collected are assigned this class.\"\"\"\n\n\nclass UnsupportedError(SphinxError):\n category = 'Markup is unsupported in LaTeX'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator_LaTeXTranslator.__init__.self.handled_abbrs.set_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator_LaTeXTranslator.__init__.self.handled_abbrs.set_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 259, "end_line": 395, "span_ids": ["LaTeXTranslator"], "tokens": 1504}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n builder: \"LaTeXBuilder\" = None\n\n secnumdepth = 2 # legacy sphinxhowto.cls uses this, whereas article.cls\n # default is originally 3. For book/report, 2 is already LaTeX default.\n ignore_missing_images = False\n\n def __init__(self, document: nodes.document, builder: \"LaTeXBuilder\",\n theme: \"Theme\") -> None:\n super().__init__(document, builder)\n self.body: List[str] = []\n self.theme = theme\n\n # flags\n self.in_title = 0\n self.in_production_list = 0\n self.in_footnote = 0\n self.in_caption = 0\n self.in_term = 0\n self.needs_linetrimming = 0\n self.in_minipage = 0\n self.no_latex_floats = 0\n self.first_document = 1\n self.this_is_the_title = 1\n self.literal_whitespace = 0\n self.in_parsed_literal = 0\n self.compact_list = 0\n self.first_param = 0\n self.in_desc_signature = False\n\n sphinxpkgoptions = []\n\n # sort out some elements\n self.elements = self.builder.context.copy()\n\n # initial section names\n self.sectionnames = LATEXSECTIONNAMES[:]\n if self.theme.toplevel_sectioning == 'section':\n self.sectionnames.remove('chapter')\n\n # determine top section level\n self.top_sectionlevel = 1\n if self.config.latex_toplevel_sectioning:\n try:\n self.top_sectionlevel = \\\n self.sectionnames.index(self.config.latex_toplevel_sectioning)\n except ValueError:\n logger.warning(__('unknown %r toplevel_sectioning for class %r') %\n (self.config.latex_toplevel_sectioning, self.theme.docclass))\n\n if self.config.numfig:\n self.numfig_secnum_depth = self.config.numfig_secnum_depth\n if self.numfig_secnum_depth > 0: # default is 1\n # numfig_secnum_depth as passed to sphinx.sty indices same names as in\n # LATEXSECTIONNAMES but with -1 for part, 0 for chapter, 1 for section...\n if len(self.sectionnames) < len(LATEXSECTIONNAMES) and \\\n self.top_sectionlevel > 0:\n self.numfig_secnum_depth += self.top_sectionlevel\n else:\n self.numfig_secnum_depth += self.top_sectionlevel - 1\n # this (minus one) will serve as minimum to LaTeX's secnumdepth\n self.numfig_secnum_depth = min(self.numfig_secnum_depth,\n len(LATEXSECTIONNAMES) - 1)\n # if passed key value is < 1 LaTeX will act as if 0; see sphinx.sty\n sphinxpkgoptions.append('numfigreset=%s' % self.numfig_secnum_depth)\n else:\n sphinxpkgoptions.append('nonumfigreset')\n\n if self.config.numfig and self.config.math_numfig:\n sphinxpkgoptions.append('mathnumfig')\n\n if (self.config.language not in {'en', 'ja'} and\n 'fncychap' not in self.config.latex_elements):\n # use Sonny style if any language specified (except English)\n self.elements['fncychap'] = (r'\\usepackage[Sonny]{fncychap}' + CR +\n r'\\ChNameVar{\\Large\\normalfont\\sffamily}' + CR +\n r'\\ChTitleVar{\\Large\\normalfont\\sffamily}')\n\n self.babel = self.builder.babel\n if not self.babel.is_supported_language():\n # emit warning if specified language is invalid\n # (only emitting, nothing changed to processing)\n logger.warning(__('no Babel option known for language %r'),\n self.config.language)\n\n minsecnumdepth = self.secnumdepth # 2 from legacy sphinx manual/howto\n if self.document.get('tocdepth'):\n # reduce tocdepth if `part` or `chapter` is used for top_sectionlevel\n # tocdepth = -1: show only parts\n # tocdepth = 0: show parts and chapters\n # tocdepth = 1: show parts, chapters and sections\n # tocdepth = 2: show parts, chapters, sections and subsections\n # ...\n tocdepth = self.document.get('tocdepth', 999) + self.top_sectionlevel - 2\n if len(self.sectionnames) < len(LATEXSECTIONNAMES) and \\\n self.top_sectionlevel > 0:\n tocdepth += 1 # because top_sectionlevel is shifted by -1\n if tocdepth > len(LATEXSECTIONNAMES) - 2: # default is 5 <-> subparagraph\n logger.warning(__('too large :maxdepth:, ignored.'))\n tocdepth = len(LATEXSECTIONNAMES) - 2\n\n self.elements['tocdepth'] = r'\\setcounter{tocdepth}{%d}' % tocdepth\n minsecnumdepth = max(minsecnumdepth, tocdepth)\n\n if self.config.numfig and (self.config.numfig_secnum_depth > 0):\n minsecnumdepth = max(minsecnumdepth, self.numfig_secnum_depth - 1)\n\n if minsecnumdepth > self.secnumdepth:\n self.elements['secnumdepth'] = r'\\setcounter{secnumdepth}{%d}' %\\\n minsecnumdepth\n\n contentsname = document.get('contentsname')\n if contentsname:\n self.elements['contentsname'] = self.babel_renewcommand(r'\\contentsname',\n contentsname)\n\n if self.elements['maxlistdepth']:\n sphinxpkgoptions.append('maxlistdepth=%s' % self.elements['maxlistdepth'])\n if sphinxpkgoptions:\n self.elements['sphinxpkgoptions'] = '[,%s]' % ','.join(sphinxpkgoptions)\n if self.elements['sphinxsetup']:\n self.elements['sphinxsetup'] = (r'\\sphinxsetup{%s}' % self.elements['sphinxsetup'])\n if self.elements['extraclassoptions']:\n self.elements['classoptions'] += ',' + \\\n self.elements['extraclassoptions']\n\n self.highlighter = highlighting.PygmentsBridge('latex', self.config.pygments_style,\n latex_engine=self.config.latex_engine)\n self.context: List[Any] = []\n self.descstack: List[str] = []\n self.tables: List[Table] = []\n self.next_table_colspec: str = None\n self.bodystack: List[List[str]] = []\n self.footnote_restricted: Element = None\n self.pending_footnotes: List[nodes.footnote_reference] = []\n self.curfilestack: List[str] = []\n self.handled_abbrs: Set[str] = set()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.pushbody_LaTeXTranslator.babel_renewcommand.return.r_s_renewcommand_s_s_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.pushbody_LaTeXTranslator.babel_renewcommand.return.r_s_renewcommand_s_s_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 397, "end_line": 447, "span_ids": ["LaTeXTranslator.babel_renewcommand", "LaTeXTranslator.hyperpageref", "LaTeXTranslator.astext", "LaTeXTranslator.hypertarget_to", "LaTeXTranslator.hypertarget", "LaTeXTranslator.popbody", "LaTeXTranslator.hyperlink", "LaTeXTranslator.idescape", "LaTeXTranslator.escape", "LaTeXTranslator.pushbody"], "tokens": 493}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def pushbody(self, newbody: List[str]) -> None:\n self.bodystack.append(self.body)\n self.body = newbody\n\n def popbody(self) -> List[str]:\n body = self.body\n self.body = self.bodystack.pop()\n return body\n\n def astext(self) -> str:\n self.elements.update({\n 'body': ''.join(self.body),\n 'indices': self.generate_indices()\n })\n return self.render('latex.tex_t', self.elements)\n\n def hypertarget(self, id: str, withdoc: bool = True, anchor: bool = True) -> str:\n if withdoc:\n id = self.curfilestack[-1] + ':' + id\n return (r'\\phantomsection' if anchor else '') + r'\\label{%s}' % self.idescape(id)\n\n def hypertarget_to(self, node: Element, anchor: bool = False) -> str:\n labels = ''.join(self.hypertarget(node_id, anchor=False) for node_id in node['ids'])\n if anchor:\n return r'\\phantomsection' + labels\n else:\n return labels\n\n def hyperlink(self, id: str) -> str:\n return r'{\\hyperref[%s]{' % self.idescape(id)\n\n def hyperpageref(self, id: str) -> str:\n return r'\\autopageref*{%s}' % self.idescape(id)\n\n def escape(self, s: str) -> str:\n return texescape.escape(s, self.config.latex_engine)\n\n def idescape(self, id: str) -> str:\n return r'\\detokenize{%s}' % str(id).translate(tex_replace_map).\\\n encode('ascii', 'backslashreplace').decode('ascii').\\\n replace('\\\\', '_')\n\n def babel_renewcommand(self, command: str, definition: str) -> str:\n if self.elements['multilingual']:\n prefix = r'\\addto\\captions%s{' % self.babel.get_language()\n suffix = '}'\n else: # babel is disabled (mainly for Japanese environment)\n prefix = ''\n suffix = ''\n\n return r'%s\\renewcommand{%s}{%s}%s' % (prefix, command, definition, suffix) + CR", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.generate_indices_LaTeXTranslator.generate_indices.generate.ret_append_r_end_sphinxt": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.generate_indices_LaTeXTranslator.generate_indices.generate.ret_append_r_end_sphinxt", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 449, "end_line": 467, "span_ids": ["LaTeXTranslator.generate_indices"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def generate_indices(self) -> str:\n def generate(content: List[Tuple[str, List[IndexEntry]]], collapsed: bool) -> None:\n ret.append(r'\\begin{sphinxtheindex}' + CR)\n ret.append(r'\\let\\bigletter\\sphinxstyleindexlettergroup' + CR)\n for i, (letter, entries) in enumerate(content):\n if i > 0:\n ret.append(r'\\indexspace' + CR)\n ret.append(r'\\bigletter{%s}' % self.escape(letter) + CR)\n for entry in entries:\n if not entry[3]:\n continue\n ret.append(r'\\item\\relax\\sphinxstyleindexentry{%s}' %\n self.encode(entry[0]))\n if entry[4]:\n # add \"extra\" info\n ret.append(r'\\sphinxstyleindexextra{%s}' % self.encode(entry[4]))\n ret.append(r'\\sphinxstyleindexpageref{%s:%s}' %\n (entry[2], self.idescape(entry[3])) + CR)\n ret.append(r'\\end{sphinxtheindex}' + CR)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_title_LaTeXTranslator._depart_signature_line.self_body_append_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_title_LaTeXTranslator._depart_signature_line.self_body_append_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 635, "end_line": 687, "span_ids": ["LaTeXTranslator.depart_subtitle", "LaTeXTranslator.depart_desc", "LaTeXTranslator.visit_desc", "LaTeXTranslator._depart_signature_line", "LaTeXTranslator.visit_subtitle", "LaTeXTranslator._visit_signature_line", "LaTeXTranslator.depart_title"], "tokens": 452}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_title(self, node: Element) -> None:\n self.in_title = 0\n if isinstance(node.parent, nodes.table):\n self.table.caption = self.popbody()\n else:\n self.body.append(self.context.pop())\n\n def visit_subtitle(self, node: Element) -> None:\n if isinstance(node.parent, nodes.sidebar):\n self.body.append(r'\\sphinxstylesidebarsubtitle{')\n self.context.append('}' + CR)\n else:\n self.context.append('')\n\n def depart_subtitle(self, node: Element) -> None:\n self.body.append(self.context.pop())\n\n #############################################################\n # Domain-specific object descriptions\n #############################################################\n\n # Top-level nodes for descriptions\n ##################################\n\n def visit_desc(self, node: Element) -> None:\n if self.config.latex_show_urls == 'footnote':\n self.body.append(BLANKLINE)\n self.body.append(r'\\begin{savenotes}\\begin{fulllineitems}' + CR)\n else:\n self.body.append(BLANKLINE)\n self.body.append(r'\\begin{fulllineitems}' + CR)\n if self.table:\n self.table.has_problematic = True\n\n def depart_desc(self, node: Element) -> None:\n if self.in_desc_signature:\n self.body.append(CR + r'\\pysigstopsignatures')\n self.in_desc_signature = False\n if self.config.latex_show_urls == 'footnote':\n self.body.append(CR + r'\\end{fulllineitems}\\end{savenotes}' + BLANKLINE)\n else:\n self.body.append(CR + r'\\end{fulllineitems}' + BLANKLINE)\n\n def _visit_signature_line(self, node: Element) -> None:\n for child in node:\n if isinstance(child, addnodes.desc_parameterlist):\n self.body.append(CR + r'\\pysiglinewithargsret{')\n break\n else:\n self.body.append(CR + r'\\pysigline{')\n\n def _depart_signature_line(self, node: Element) -> None:\n self.body.append('}')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_desc_signature_LaTeXTranslator.visit_desc_signature.if_not_node_get_is_multi.else_.self_body_append_CR_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_desc_signature_LaTeXTranslator.visit_desc_signature.if_not_node_get_is_multi.else_.self_body_append_CR_r_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 689, "end_line": 701, "span_ids": ["LaTeXTranslator.visit_desc_signature"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_desc_signature(self, node: Element) -> None:\n if node.parent['objtype'] != 'describe' and node['ids']:\n hyper = self.hypertarget(node['ids'][0])\n else:\n hyper = ''\n self.body.append(hyper)\n if not self.in_desc_signature:\n self.in_desc_signature = True\n self.body.append(CR + r'\\pysigstartsignatures')\n if not node.get('is_multiline'):\n self._visit_signature_line(node)\n else:\n self.body.append(CR + r'\\pysigstartmultiline')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_desc_signature_LaTeXTranslator.depart_seealso.self_body_append_BLANKLIN": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_desc_signature_LaTeXTranslator.depart_seealso.self_body_append_BLANKLIN", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 703, "end_line": 801, "span_ids": ["LaTeXTranslator.depart_desc_addname", "LaTeXTranslator.visit_desc_inline", "LaTeXTranslator.depart_desc_parameter", "LaTeXTranslator.depart_desc_type", "LaTeXTranslator.visit_desc_content", "LaTeXTranslator.depart_desc_optional", "LaTeXTranslator.visit_desc_signature_line", "LaTeXTranslator.depart_seealso", "LaTeXTranslator.depart_desc_signature", "LaTeXTranslator.depart_desc_content", "LaTeXTranslator.visit_desc_optional", "LaTeXTranslator.visit_desc_annotation", "LaTeXTranslator.depart_desc_parameterlist", "LaTeXTranslator.depart_desc_name", "LaTeXTranslator.visit_desc_name", "LaTeXTranslator.visit_desc_parameterlist", "LaTeXTranslator.depart_desc_annotation", "LaTeXTranslator.visit_desc_addname", "LaTeXTranslator.visit_seealso", "LaTeXTranslator.depart_desc_returns", "LaTeXTranslator.visit_desc_type", "LaTeXTranslator.visit_desc_returns", "LaTeXTranslator.depart_desc_signature_line", "LaTeXTranslator.depart_desc_inline", "LaTeXTranslator.visit_desc_parameter"], "tokens": 794}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_desc_signature(self, node: Element) -> None:\n if not node.get('is_multiline'):\n self._depart_signature_line(node)\n else:\n self.body.append(CR + r'\\pysigstopmultiline')\n\n def visit_desc_signature_line(self, node: Element) -> None:\n self._visit_signature_line(node)\n\n def depart_desc_signature_line(self, node: Element) -> None:\n self._depart_signature_line(node)\n\n def visit_desc_content(self, node: Element) -> None:\n assert self.in_desc_signature\n self.body.append(CR + r'\\pysigstopsignatures')\n self.in_desc_signature = False\n\n def depart_desc_content(self, node: Element) -> None:\n pass\n\n def visit_desc_inline(self, node: Element) -> None:\n self.body.append(r'\\sphinxcode{\\sphinxupquote{')\n\n def depart_desc_inline(self, node: Element) -> None:\n self.body.append('}}')\n\n # Nodes for high-level structure in signatures\n ##############################################\n\n def visit_desc_name(self, node: Element) -> None:\n self.body.append(r'\\sphinxbfcode{\\sphinxupquote{')\n self.literal_whitespace += 1\n\n def depart_desc_name(self, node: Element) -> None:\n self.body.append('}}')\n self.literal_whitespace -= 1\n\n def visit_desc_addname(self, node: Element) -> None:\n self.body.append(r'\\sphinxcode{\\sphinxupquote{')\n self.literal_whitespace += 1\n\n def depart_desc_addname(self, node: Element) -> None:\n self.body.append('}}')\n self.literal_whitespace -= 1\n\n def visit_desc_type(self, node: Element) -> None:\n pass\n\n def depart_desc_type(self, node: Element) -> None:\n pass\n\n def visit_desc_returns(self, node: Element) -> None:\n self.body.append(r'{ $\\rightarrow$ ')\n\n def depart_desc_returns(self, node: Element) -> None:\n self.body.append(r'}')\n\n def visit_desc_parameterlist(self, node: Element) -> None:\n # close name, open parameterlist\n self.body.append('}{')\n self.first_param = 1\n\n def depart_desc_parameterlist(self, node: Element) -> None:\n # close parameterlist, open return annotation\n self.body.append('}{')\n\n def visit_desc_parameter(self, node: Element) -> None:\n if not self.first_param:\n self.body.append(', ')\n else:\n self.first_param = 0\n if not node.hasattr('noemph'):\n self.body.append(r'\\emph{')\n\n def depart_desc_parameter(self, node: Element) -> None:\n if not node.hasattr('noemph'):\n self.body.append('}')\n\n def visit_desc_optional(self, node: Element) -> None:\n self.body.append(r'\\sphinxoptional{')\n\n def depart_desc_optional(self, node: Element) -> None:\n self.body.append('}')\n\n def visit_desc_annotation(self, node: Element) -> None:\n self.body.append(r'\\sphinxbfcode{\\sphinxupquote{')\n\n def depart_desc_annotation(self, node: Element) -> None:\n self.body.append('}}')\n\n ##############################################\n\n def visit_seealso(self, node: Element) -> None:\n self.body.append(BLANKLINE)\n self.body.append(r'\\sphinxstrong{%s:}' % admonitionlabels['seealso'] + CR)\n self.body.append(r'\\nopagebreak' + BLANKLINE)\n\n def depart_seealso(self, node: Element) -> None:\n self.body.append(BLANKLINE)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_rubric_LaTeXTranslator.visit_footnote.self_body_append_r_sphin": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_rubric_LaTeXTranslator.visit_footnote.self_body_append_r_sphin", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 803, "end_line": 827, "span_ids": ["LaTeXTranslator.visit_footnote", "LaTeXTranslator.visit_rubric", "LaTeXTranslator.depart_rubric"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_rubric(self, node: Element) -> None:\n if len(node) == 1 and node.astext() in ('Footnotes', _('Footnotes')):\n raise nodes.SkipNode\n self.body.append(r'\\subsubsection*{')\n self.context.append('}' + CR)\n self.in_title = 1\n\n def depart_rubric(self, node: Element) -> None:\n self.in_title = 0\n self.body.append(self.context.pop())\n\n def visit_footnote(self, node: Element) -> None:\n self.in_footnote += 1\n label = cast(nodes.label, node[0])\n if 'referred' in node:\n self.body.append(r'\\sphinxstepexplicit ')\n if self.in_parsed_literal:\n self.body.append(r'\\begin{footnote}[%s]' % label.astext())\n else:\n self.body.append('%' + CR)\n self.body.append(r'\\begin{footnote}[%s]' % label.astext())\n if 'referred' in node:\n self.body.append(r'\\phantomsection'\n r'\\label{\\thesphinxscope.%s}%%' % label.astext() + CR)\n self.body.append(r'\\sphinxAtStartFootnote' + CR)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_footnote_LaTeXTranslator.visit_tabular_col_spec.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_footnote_LaTeXTranslator.visit_tabular_col_spec.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 829, "end_line": 842, "span_ids": ["LaTeXTranslator.visit_tabular_col_spec", "LaTeXTranslator.visit_label", "LaTeXTranslator.depart_footnote"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_footnote(self, node: Element) -> None:\n if self.in_parsed_literal:\n self.body.append(r'\\end{footnote}')\n else:\n self.body.append('%' + CR)\n self.body.append(r'\\end{footnote}')\n self.in_footnote -= 1\n\n def visit_label(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_tabular_col_spec(self, node: Element) -> None:\n self.next_table_colspec = node['spec']\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_row_LaTeXTranslator.visit_row.while_True_.if_cell_is_None_not_a.else_a_bottom_of_mult.if_cell_width_1_.else_use_multicolumn.self_body_append_r_multi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_row_LaTeXTranslator.visit_row.while_True_.if_cell_is_None_not_a.else_a_bottom_of_mult.if_cell_width_1_.else_use_multicolumn.self_body_append_r_multi", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 908, "end_line": 925, "span_ids": ["LaTeXTranslator.visit_row"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_row(self, node: Element) -> None:\n self.table.col = 0\n\n # fill columns if the row starts with the bottom of multirow cell\n while True:\n cell = self.table.cell(self.table.row, self.table.col)\n if cell is None: # not a bottom of multirow cell\n break\n else: # a bottom of multirow cell\n self.table.col += cell.width\n if cell.col:\n self.body.append('&')\n if cell.width == 1:\n # insert suitable strut for equalizing row heights in given multirow\n self.body.append(r'\\sphinxtablestrut{%d}' % cell.cell_id)\n else: # use \\multicolumn for wide multirow cell\n self.body.append(r'\\multicolumn{%d}{|l|}{\\sphinxtablestrut{%d}}' %\n (cell.width, cell.cell_id))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_entry_LaTeXTranslator.depart_entry.while_True_.if_nextcell_is_None_n.else_a_bottom_part_of.if_nextcell_width_1_.else_.self_body_append_r_multi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_entry_LaTeXTranslator.depart_entry.while_True_.if_nextcell_is_None_n.else_a_bottom_part_of.if_nextcell_width_1_.else_.self_body_append_r_multi", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 981, "end_line": 1011, "span_ids": ["LaTeXTranslator.depart_entry"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_entry(self, node: Element) -> None:\n if self.needs_linetrimming:\n self.needs_linetrimming = 0\n body = self.popbody()\n\n # Remove empty lines from top of merged cell\n while body and body[0] == CR:\n body.pop(0)\n self.body.extend(body)\n\n self.body.append(self.context.pop())\n\n cell = self.table.cell()\n self.table.col += cell.width\n\n # fill columns if next ones are a bottom of wide-multirow cell\n while True:\n nextcell = self.table.cell()\n if nextcell is None: # not a bottom of multirow cell\n break\n else: # a bottom part of multirow cell\n self.table.col += nextcell.width\n self.body.append('&')\n if nextcell.width == 1:\n # insert suitable strut for equalizing row heights in multirow\n # they also serve to clear colour panels which would hide the text\n self.body.append(r'\\sphinxtablestrut{%d}' % nextcell.cell_id)\n else:\n # use \\multicolumn for wide multirow cell\n self.body.append(r'\\multicolumn{%d}{l|}{\\sphinxtablestrut{%d}}' %\n (nextcell.width, nextcell.cell_id))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_acks_LaTeXTranslator.depart_bullet_list.if_not_self_compact_list_.self_body_append_r_end_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_acks_LaTeXTranslator.depart_bullet_list.if_not_self_compact_list_.self_body_append_r_end_i", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1013, "end_line": 1031, "span_ids": ["LaTeXTranslator.visit_bullet_list", "LaTeXTranslator.depart_bullet_list", "LaTeXTranslator.visit_acks"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_acks(self, node: Element) -> None:\n # this is a list in the source, but should be rendered as a\n # comma-separated list here\n bullet_list = cast(nodes.bullet_list, node[0])\n list_items = cast(Iterable[nodes.list_item], bullet_list)\n self.body.append(BLANKLINE)\n self.body.append(', '.join(n.astext() for n in list_items) + '.')\n self.body.append(BLANKLINE)\n raise nodes.SkipNode\n\n def visit_bullet_list(self, node: Element) -> None:\n if not self.compact_list:\n self.body.append(r'\\begin{itemize}' + CR)\n if self.table:\n self.table.has_problematic = True\n\n def depart_bullet_list(self, node: Element) -> None:\n if not self.compact_list:\n self.body.append(r'\\end{itemize}' + CR)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_paragraph_LaTeXTranslator.visit_paragraph.if_index_0_and_isinsta.else_.self_body_extend_CR_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_paragraph_LaTeXTranslator.visit_paragraph.if_index_0_and_isinsta.else_.self_body_extend_CR_r_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1136, "end_line": 1151, "span_ids": ["LaTeXTranslator.visit_paragraph"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_paragraph(self, node: Element) -> None:\n index = node.parent.index(node)\n if (index > 0 and isinstance(node.parent, nodes.compound) and\n not isinstance(node.parent[index - 1], nodes.paragraph) and\n not isinstance(node.parent[index - 1], nodes.compound)):\n # insert blank line, if the paragraph follows a non-paragraph node in a compound\n self.body.append(r'\\noindent' + CR)\n elif index == 1 and isinstance(node.parent, (nodes.footnote, footnotetext)):\n # don't insert blank line, if the paragraph is second child of a footnote\n # (first one is label node)\n pass\n else:\n # the \\sphinxAtStartPar is to allow hyphenation of first word of\n # a paragraph in narrow contexts such as in a table cell\n # added as two items (cf. line trimming in depart_entry())\n self.body.extend([CR, r'\\sphinxAtStartPar' + CR])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_image_LaTeXTranslator.visit_image.self_body_extend_post_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_image_LaTeXTranslator.visit_image.self_body_extend_post_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1201, "end_line": 1278, "span_ids": ["LaTeXTranslator.visit_image"], "tokens": 798}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_image(self, node: Element) -> None:\n pre: List[str] = [] # in reverse order\n post: List[str] = []\n include_graphics_options = []\n has_hyperlink = isinstance(node.parent, nodes.reference)\n if has_hyperlink:\n is_inline = self.is_inline(node.parent)\n else:\n is_inline = self.is_inline(node)\n if 'width' in node:\n if 'scale' in node:\n w = self.latex_image_length(node['width'], node['scale'])\n else:\n w = self.latex_image_length(node['width'])\n if w:\n include_graphics_options.append('width=%s' % w)\n if 'height' in node:\n if 'scale' in node:\n h = self.latex_image_length(node['height'], node['scale'])\n else:\n h = self.latex_image_length(node['height'])\n if h:\n include_graphics_options.append('height=%s' % h)\n if 'scale' in node:\n if not include_graphics_options:\n # if no \"width\" nor \"height\", \\sphinxincludegraphics will fit\n # to the available text width if oversized after rescaling.\n include_graphics_options.append('scale=%s'\n % (float(node['scale']) / 100.0))\n if 'align' in node:\n align_prepost = {\n # By default latex aligns the top of an image.\n (1, 'top'): ('', ''),\n (1, 'middle'): (r'\\raisebox{-0.5\\height}{', '}'),\n (1, 'bottom'): (r'\\raisebox{-\\height}{', '}'),\n (0, 'center'): (r'{\\hspace*{\\fill}', r'\\hspace*{\\fill}}'),\n # These 2 don't exactly do the right thing. The image should\n # be floated alongside the paragraph. See\n # https://www.w3.org/TR/html4/struct/objects.html#adef-align-IMG\n (0, 'left'): ('{', r'\\hspace*{\\fill}}'),\n (0, 'right'): (r'{\\hspace*{\\fill}', '}'),\n }\n try:\n pre.append(align_prepost[is_inline, node['align']][0])\n post.append(align_prepost[is_inline, node['align']][1])\n except KeyError:\n pass\n if self.in_parsed_literal:\n pre.append(r'{\\sphinxunactivateextrasandspace ')\n post.append('}')\n if not is_inline and not has_hyperlink:\n pre.append(CR + r'\\noindent')\n post.append(CR)\n pre.reverse()\n if node['uri'] in self.builder.images:\n uri = self.builder.images[node['uri']]\n else:\n # missing image!\n if self.ignore_missing_images:\n return\n uri = node['uri']\n if uri.find('://') != -1:\n # ignore remote images\n return\n self.body.extend(pre)\n options = ''\n if include_graphics_options:\n options = '[%s]' % ','.join(include_graphics_options)\n base, ext = path.splitext(uri)\n if self.in_title and base:\n # Lowercase tokens forcely because some fncychap themes capitalize\n # the options of \\sphinxincludegraphics unexpectedly (ex. WIDTH=...).\n self.body.append(r'\\lowercase{\\sphinxincludegraphics%s}{{%s}%s}' %\n (options, base, ext))\n else:\n self.body.append(r'\\sphinxincludegraphics%s{{%s}%s}' %\n (options, base, ext))\n self.body.extend(post)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_image_LaTeXTranslator.visit_figure.if_self_table_.else_.self_context_append_r_en": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_image_LaTeXTranslator.visit_figure.if_self_table_.else_.self_context_append_r_en", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1280, "end_line": 1320, "span_ids": ["LaTeXTranslator.visit_figure", "LaTeXTranslator.depart_image"], "tokens": 488}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_image(self, node: Element) -> None:\n pass\n\n def visit_figure(self, node: Element) -> None:\n align = self.elements['figure_align']\n if self.no_latex_floats:\n align = \"H\"\n if self.table:\n # TODO: support align option\n if 'width' in node:\n length = self.latex_image_length(node['width'])\n if length:\n self.body.append(r'\\begin{sphinxfigure-in-table}[%s]' % length + CR)\n self.body.append(r'\\centering' + CR)\n else:\n self.body.append(r'\\begin{sphinxfigure-in-table}' + CR)\n self.body.append(r'\\centering' + CR)\n if any(isinstance(child, nodes.caption) for child in node):\n self.body.append(r'\\capstart')\n self.context.append(r'\\end{sphinxfigure-in-table}\\relax' + CR)\n elif node.get('align', '') in ('left', 'right'):\n length = None\n if 'width' in node:\n length = self.latex_image_length(node['width'])\n elif isinstance(node[0], nodes.image) and 'width' in node[0]:\n length = self.latex_image_length(node[0]['width'])\n self.body.append(BLANKLINE) # Insert a blank line to prevent infinite loop\n # https://github.com/sphinx-doc/sphinx/issues/7059\n self.body.append(r'\\begin{wrapfigure}{%s}{%s}' %\n ('r' if node['align'] == 'right' else 'l', length or '0pt') + CR)\n self.body.append(r'\\centering')\n self.context.append(r'\\end{wrapfigure}' + CR)\n elif self.in_minipage:\n self.body.append(CR + r'\\begin{center}')\n self.context.append(r'\\end{center}' + CR)\n else:\n self.body.append(CR + r'\\begin{figure}[%s]' % align + CR)\n self.body.append(r'\\centering' + CR)\n if any(isinstance(child, nodes.caption) for child in node):\n self.body.append(r'\\capstart' + CR)\n self.context.append(r'\\end{figure}' + CR)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_target._skip_if_visitor_for_nex_LaTeXTranslator.depart_attribution.self_body_append_CR_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_target._skip_if_visitor_for_nex_LaTeXTranslator.depart_attribution.self_body_append_CR_r_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1413, "end_line": 1446, "span_ids": ["LaTeXTranslator.depart_target", "LaTeXTranslator.visit_target", "LaTeXTranslator.depart_attribution", "LaTeXTranslator.visit_attribution"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_target(self, node: Element) -> None:\n\n # skip if visitor for next node supports hyperlink\n next_node: Node = node\n while isinstance(next_node, nodes.target):\n next_node = next_node.next_node(ascend=True)\n\n domain = cast(StandardDomain, self.builder.env.get_domain('std'))\n if isinstance(next_node, HYPERLINK_SUPPORT_NODES):\n return\n elif domain.get_enumerable_node_type(next_node) and domain.get_numfig_title(next_node):\n return\n\n if 'refuri' in node:\n return\n if 'anonymous' in node:\n return\n if node.get('refid'):\n prev_node = get_prev_node(node)\n if isinstance(prev_node, nodes.reference) and node['refid'] == prev_node['refid']:\n # a target for a hyperlink reference having alias\n pass\n else:\n add_target(node['refid'])\n for id in node['ids']:\n add_target(id)\n\n def depart_target(self, node: Element) -> None:\n pass\n\n def visit_attribution(self, node: Element) -> None:\n self.body.append(CR + r'\\begin{flushright}' + CR)\n self.body.append('---')\n\n def depart_attribution(self, node: Element) -> None:\n self.body.append(CR + r'\\end{flushright}' + CR)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_index.for_type_string__tid_i_LaTeXTranslator.visit_index.raise_nodes_SkipNode": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_index.for_type_string__tid_i_LaTeXTranslator.visit_index.raise_nodes_SkipNode", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1469, "end_line": 1512, "span_ids": ["LaTeXTranslator.visit_index"], "tokens": 691}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_index(self, node: Element) -> None:\n # ... other code\n for type, string, _tid, ismain, _key in entries:\n m = ''\n if ismain:\n m = '|spxpagem'\n try:\n if type == 'single':\n try:\n p1, p2 = [escape(x) for x in split_into(2, 'single', string)]\n P1, P2 = style(p1), style(p2)\n self.body.append(r'\\index{%s@%s!%s@%s%s}' % (p1, P1, p2, P2, m))\n except ValueError:\n p = escape(split_into(1, 'single', string)[0])\n P = style(p)\n self.body.append(r'\\index{%s@%s%s}' % (p, P, m))\n elif type == 'pair':\n p1, p2 = [escape(x) for x in split_into(2, 'pair', string)]\n P1, P2 = style(p1), style(p2)\n self.body.append(r'\\index{%s@%s!%s@%s%s}\\index{%s@%s!%s@%s%s}' %\n (p1, P1, p2, P2, m, p2, P2, p1, P1, m))\n elif type == 'triple':\n p1, p2, p3 = [escape(x) for x in split_into(3, 'triple', string)]\n P1, P2, P3 = style(p1), style(p2), style(p3)\n self.body.append(\n r'\\index{%s@%s!%s %s@%s %s%s}'\n r'\\index{%s@%s!%s, %s@%s, %s%s}'\n r'\\index{%s@%s!%s %s@%s %s%s}' %\n (p1, P1, p2, p3, P2, P3, m,\n p2, P2, p3, p1, P3, P1, m,\n p3, P3, p1, p2, P1, P2, m))\n elif type == 'see':\n p1, p2 = [escape(x) for x in split_into(2, 'see', string)]\n P1 = style(p1)\n self.body.append(r'\\index{%s@%s|see{%s}}' % (p1, P1, p2))\n elif type == 'seealso':\n p1, p2 = [escape(x) for x in split_into(2, 'seealso', string)]\n P1 = style(p1)\n self.body.append(r'\\index{%s@%s|see{%s}}' % (p1, P1, p2))\n else:\n logger.warning(__('unknown index entry type %s found'), type)\n except ValueError as err:\n logger.warning(str(err))\n if not node.get('inline', True):\n self.body.append(r'\\ignorespaces ')\n raise nodes.SkipNode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_thebibliography_LaTeXTranslator.visit_thebibliography.self_body_append_CR_r_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_thebibliography_LaTeXTranslator.visit_thebibliography.self_body_append_CR_r_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1665, "end_line": 1674, "span_ids": ["LaTeXTranslator.visit_thebibliography"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_thebibliography(self, node: Element) -> None:\n citations = cast(Iterable[nodes.citation], node)\n labels = (cast(nodes.label, citation[0]) for citation in citations)\n longest_label = max((label.astext() for label in labels), key=len)\n if len(longest_label) > MAX_CITATION_LABEL_LENGTH:\n # adjust max width of citation labels not to break the layout\n longest_label = longest_label[:MAX_CITATION_LABEL_LENGTH]\n\n self.body.append(CR + r'\\begin{sphinxthebibliography}{%s}' %\n self.encode(longest_label) + CR)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_literal_block_LaTeXTranslator.depart_line_block.self_body_append_r_end_D": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.depart_literal_block_LaTeXTranslator.depart_line_block.self_body_append_r_end_D", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1787, "end_line": 1809, "span_ids": ["LaTeXTranslator:56", "LaTeXTranslator.depart_literal_block", "LaTeXTranslator.visit_line", "LaTeXTranslator.depart_line", "LaTeXTranslator.depart_line_block", "LaTeXTranslator.visit_line_block"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def depart_literal_block(self, node: Element) -> None:\n self.body.append(CR + r'\\end{sphinxalltt}' + CR)\n self.in_parsed_literal -= 1\n visit_doctest_block = visit_literal_block\n depart_doctest_block = depart_literal_block\n\n def visit_line(self, node: Element) -> None:\n self.body.append(r'\\item[] ')\n\n def depart_line(self, node: Element) -> None:\n self.body.append(CR)\n\n def visit_line_block(self, node: Element) -> None:\n if isinstance(node.parent, nodes.line_block):\n self.body.append(r'\\item[]' + CR)\n self.body.append(r'\\begin{DUlineblock}{\\DUlineblockindent}' + CR)\n else:\n self.body.append(CR + r'\\begin{DUlineblock}{0em}' + CR)\n if self.table:\n self.table.has_problematic = True\n\n def depart_line_block(self, node: Element) -> None:\n self.body.append(r'\\end{DUlineblock}' + CR)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_math_reference_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/latex.py_LaTeXTranslator.visit_math_reference_", "embedding": null, "metadata": {"file_path": "sphinx/writers/latex.py", "file_name": "latex.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2019, "end_line": 2049, "span_ids": ["LaTeXTranslator.depart_math_reference", "LaTeXTranslator.visit_math_reference", "impl:18", "LaTeXTranslator.docclasses"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LaTeXTranslator(SphinxTranslator):\n\n def visit_math_reference(self, node: Element) -> None:\n label = \"equation:%s:%s\" % (node['docname'], node['target'])\n eqref_format = self.config.math_eqref_format\n if eqref_format:\n try:\n ref = r'\\ref{%s}' % label\n self.body.append(eqref_format.format(number=ref))\n except KeyError as exc:\n logger.warning(__('Invalid math_eqref_format: %r'), exc,\n location=node)\n self.body.append(r'\\eqref{%s}' % label)\n else:\n self.body.append(r'\\eqref{%s}' % label)\n\n def depart_math_reference(self, node: Element) -> None:\n pass\n\n @property\n def docclasses(self) -> Tuple[str, str]:\n \"\"\"Prepends prefix to sphinx document classes\"\"\"\n warnings.warn('LaTeXWriter.docclasses() is deprecated.',\n RemovedInSphinx70Warning, stacklevel=2)\n return ('howto', 'manual')\n\n\n# FIXME: Workaround to avoid circular import\n# refs: https://github.com/sphinx-doc/sphinx/issues/5433\nfrom sphinx.builders.latex.nodes import ( # NOQA isort:skip\n HYPERLINK_SUPPORT_NODES, captioned_literal_block, footnotetext,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py__Manual_page_writer_ex_ManualPageWriter.translate.self.output.self_visitor_astext_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py__Manual_page_writer_ex_ManualPageWriter.translate.self.output.self_visitor_astext_", "embedding": null, "metadata": {"file_path": "sphinx/writers/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["impl", "docstring", "imports", "ManualPageWriter.translate", "ManualPageWriter"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manual page writer, extended for Sphinx custom nodes.\"\"\"\n\nfrom typing import Any, Dict, Iterable, cast\n\nfrom docutils import nodes\nfrom docutils.nodes import Element, TextElement\nfrom docutils.writers.manpage import Translator as BaseTranslator\nfrom docutils.writers.manpage import Writer\n\nfrom sphinx import addnodes\nfrom sphinx.builders import Builder\nfrom sphinx.locale import _, admonitionlabels\nfrom sphinx.util import logging\nfrom sphinx.util.docutils import SphinxTranslator\nfrom sphinx.util.i18n import format_date\nfrom sphinx.util.nodes import NodeMatcher\n\nlogger = logging.getLogger(__name__)\n\n\nclass ManualPageWriter(Writer):\n def __init__(self, builder: Builder) -> None:\n super().__init__()\n self.builder = builder\n\n def translate(self) -> None:\n transform = NestedInlineTransform(self.document)\n transform.apply()\n visitor = self.builder.create_translator(self.document, self.builder)\n self.visitor = cast(ManualPageTranslator, visitor)\n self.document.walkabout(visitor)\n self.output = self.visitor.astext()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_NestedInlineTransform_NestedInlineTransform.apply.for_node_in_list_self_doc.if_any_matcher_subnode_f.if_not_len_node_.node_parent_remove_node_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_NestedInlineTransform_NestedInlineTransform.apply.for_node_in_list_self_doc.if_any_matcher_subnode_f.if_not_len_node_.node_parent_remove_node_", "embedding": null, "metadata": {"file_path": "sphinx/writers/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 35, "end_line": 63, "span_ids": ["NestedInlineTransform", "NestedInlineTransform.apply"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NestedInlineTransform:\n \"\"\"\n Flatten nested inline nodes:\n\n Before:\n <strong>foo=<emphasis>1</emphasis>\n &bar=<emphasis>2</emphasis></strong>\n After:\n <strong>foo=</strong><emphasis>var</emphasis>\n <strong>&bar=</strong><emphasis>2</emphasis>\n \"\"\"\n def __init__(self, document: nodes.document) -> None:\n self.document = document\n\n def apply(self, **kwargs: Any) -> None:\n matcher = NodeMatcher(nodes.literal, nodes.emphasis, nodes.strong)\n for node in list(self.document.findall(matcher)): # type: TextElement\n if any(matcher(subnode) for subnode in node):\n pos = node.parent.index(node)\n for subnode in reversed(list(node)):\n node.remove(subnode)\n if matcher(subnode):\n node.parent.insert(pos + 1, subnode)\n else:\n newnode = node.__class__('', '', subnode, **node.attributes)\n node.parent.insert(pos + 1, newnode)\n # move node if all children became siblings of the node\n if not len(node):\n node.parent.remove(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator_ManualPageTranslator.depart_desc_returns.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator_ManualPageTranslator.depart_desc_returns.pass", "embedding": null, "metadata": {"file_path": "sphinx/writers/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 66, "end_line": 182, "span_ids": ["ManualPageTranslator.depart_desc_inline", "ManualPageTranslator.depart_desc_content", "ManualPageTranslator.visit_desc_returns", "ManualPageTranslator.depart_desc_signature_line", "ManualPageTranslator.visit_desc_content", "ManualPageTranslator.visit_desc_name", "ManualPageTranslator.depart_desc_returns", "ManualPageTranslator.visit_desc", "ManualPageTranslator.visit_start_of_file", "ManualPageTranslator.visit_desc_signature", "ManualPageTranslator.header", "ManualPageTranslator.visit_desc_type", "ManualPageTranslator", "ManualPageTranslator.depart_start_of_file", "ManualPageTranslator.depart_desc_name", "ManualPageTranslator.visit_desc_signature_line", "ManualPageTranslator.depart_desc_addname", "ManualPageTranslator.depart_desc", "ManualPageTranslator.depart_desc_signature", "ManualPageTranslator.visit_desc_inline", "ManualPageTranslator.depart_desc_type", "ManualPageTranslator.visit_desc_addname"], "tokens": 846}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ManualPageTranslator(SphinxTranslator, BaseTranslator):\n \"\"\"\n Custom man page translator.\n \"\"\"\n\n _docinfo: Dict[str, Any] = {}\n\n def __init__(self, document: nodes.document, builder: Builder) -> None:\n super().__init__(document, builder)\n\n self.in_productionlist = 0\n\n # first title is the manpage title\n self.section_level = -1\n\n # docinfo set by man_pages config value\n self._docinfo['title'] = self.settings.title\n self._docinfo['subtitle'] = self.settings.subtitle\n if self.settings.authors:\n # don't set it if no author given\n self._docinfo['author'] = self.settings.authors\n self._docinfo['manual_section'] = self.settings.section\n\n # docinfo set by other config values\n self._docinfo['title_upper'] = self._docinfo['title'].upper()\n if self.config.today:\n self._docinfo['date'] = self.config.today\n else:\n self._docinfo['date'] = format_date(self.config.today_fmt or _('%b %d, %Y'),\n language=self.config.language)\n self._docinfo['copyright'] = self.config.copyright\n self._docinfo['version'] = self.config.version\n self._docinfo['manual_group'] = self.config.project\n\n # Overwrite admonition label translations with our own\n for label, translation in admonitionlabels.items():\n self.language.labels[label] = self.deunicode(translation)\n\n # overwritten -- added quotes around all .TH arguments\n def header(self) -> str:\n tmpl = (\".TH \\\"%(title_upper)s\\\" \\\"%(manual_section)s\\\"\"\n \" \\\"%(date)s\\\" \\\"%(version)s\\\" \\\"%(manual_group)s\\\"\\n\")\n if self._docinfo['subtitle']:\n tmpl += (\".SH NAME\\n\"\n \"%(title)s \\\\- %(subtitle)s\\n\")\n return tmpl % self._docinfo\n\n def visit_start_of_file(self, node: Element) -> None:\n pass\n\n def depart_start_of_file(self, node: Element) -> None:\n pass\n\n #############################################################\n # Domain-specific object descriptions\n #############################################################\n\n # Top-level nodes for descriptions\n ##################################\n\n def visit_desc(self, node: Element) -> None:\n self.visit_definition_list(node)\n\n def depart_desc(self, node: Element) -> None:\n self.depart_definition_list(node)\n\n def visit_desc_signature(self, node: Element) -> None:\n self.visit_definition_list_item(node)\n self.visit_term(node)\n\n def depart_desc_signature(self, node: Element) -> None:\n self.depart_term(node)\n\n def visit_desc_signature_line(self, node: Element) -> None:\n pass\n\n def depart_desc_signature_line(self, node: Element) -> None:\n self.body.append(' ')\n\n def visit_desc_content(self, node: Element) -> None:\n self.visit_definition(node)\n\n def depart_desc_content(self, node: Element) -> None:\n self.depart_definition(node)\n\n def visit_desc_inline(self, node: Element) -> None:\n pass\n\n def depart_desc_inline(self, node: Element) -> None:\n pass\n\n # Nodes for high-level structure in signatures\n ##############################################\n\n def visit_desc_name(self, node: Element) -> None:\n pass\n\n def depart_desc_name(self, node: Element) -> None:\n pass\n\n def visit_desc_addname(self, node: Element) -> None:\n pass\n\n def depart_desc_addname(self, node: Element) -> None:\n pass\n\n def visit_desc_type(self, node: Element) -> None:\n pass\n\n def depart_desc_type(self, node: Element) -> None:\n pass\n\n def visit_desc_returns(self, node: Element) -> None:\n self.body.append(' -> ')\n\n def depart_desc_returns(self, node: Element) -> None:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_desc_parameterlist_ManualPageTranslator.depart_seealso.self_depart_admonition_no": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_desc_parameterlist_ManualPageTranslator.depart_seealso.self_depart_admonition_no", "embedding": null, "metadata": {"file_path": "sphinx/writers/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 184, "end_line": 252, "span_ids": ["ManualPageTranslator.visit_seealso", "ManualPageTranslator.depart_versionmodified", "ManualPageTranslator.visit_comment", "ManualPageTranslator.visit_desc_annotation", "ManualPageTranslator.visit_rubric", "ManualPageTranslator.visit_desc_parameter", "ManualPageTranslator.visit_term", "ManualPageTranslator.depart_desc_optional", "ManualPageTranslator.depart_desc_annotation", "ManualPageTranslator.visit_desc_optional", "ManualPageTranslator.visit_desc_parameterlist", "ManualPageTranslator.depart_desc_parameter", "ManualPageTranslator.depart_seealso", "ManualPageTranslator.depart_rubric", "ManualPageTranslator.visit_versionmodified", "ManualPageTranslator.visit_footnote", "ManualPageTranslator.depart_desc_parameterlist"], "tokens": 531}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ManualPageTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_desc_parameterlist(self, node: Element) -> None:\n self.body.append('(')\n self.first_param = 1\n\n def depart_desc_parameterlist(self, node: Element) -> None:\n self.body.append(')')\n\n def visit_desc_parameter(self, node: Element) -> None:\n if not self.first_param:\n self.body.append(', ')\n else:\n self.first_param = 0\n\n def depart_desc_parameter(self, node: Element) -> None:\n pass\n\n def visit_desc_optional(self, node: Element) -> None:\n self.body.append('[')\n\n def depart_desc_optional(self, node: Element) -> None:\n self.body.append(']')\n\n def visit_desc_annotation(self, node: Element) -> None:\n pass\n\n def depart_desc_annotation(self, node: Element) -> None:\n pass\n\n ##############################################\n\n def visit_versionmodified(self, node: Element) -> None:\n self.visit_paragraph(node)\n\n def depart_versionmodified(self, node: Element) -> None:\n self.depart_paragraph(node)\n\n # overwritten -- don't make whole of term bold if it includes strong node\n def visit_term(self, node: Element) -> None:\n if any(node.findall(nodes.strong)):\n self.body.append('\\n')\n else:\n super().visit_term(node)\n\n # overwritten -- we don't want source comments to show up\n def visit_comment(self, node: Element) -> None: # type: ignore\n raise nodes.SkipNode\n\n # overwritten -- added ensure_eol()\n def visit_footnote(self, node: Element) -> None:\n self.ensure_eol()\n super().visit_footnote(node)\n\n # overwritten -- handle footnotes rubric\n def visit_rubric(self, node: Element) -> None:\n self.ensure_eol()\n if len(node) == 1 and node.astext() in ('Footnotes', _('Footnotes')):\n self.body.append('.SH ' + self.deunicode(node.astext()).upper() + '\\n')\n raise nodes.SkipNode\n else:\n self.body.append('.sp\\n')\n\n def depart_rubric(self, node: Element) -> None:\n self.body.append('\\n')\n\n def visit_seealso(self, node: Element) -> None:\n self.visit_admonition(node, 'seealso')\n\n def depart_seealso(self, node: Element) -> None:\n self.depart_admonition(node)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_number_reference_ManualPageTranslator.None_17": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/manpage.py_ManualPageTranslator.visit_number_reference_ManualPageTranslator.None_17", "embedding": null, "metadata": {"file_path": "sphinx/writers/manpage.py", "file_name": "manpage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 313, "end_line": 411, "span_ids": ["ManualPageTranslator.visit_hlist", "ManualPageTranslator.visit_centered", "ManualPageTranslator.visit_compact_paragraph", "ManualPageTranslator.depart_manpage", "ManualPageTranslator.visit_hlistcol", "ManualPageTranslator.visit_literal_emphasis", "ManualPageTranslator.visit_number_reference", "ManualPageTranslator.visit_glossary", "ManualPageTranslator.visit_caption", "ManualPageTranslator.depart_download_reference", "ManualPageTranslator.depart_centered", "ManualPageTranslator.visit_tabular_col_spec", "ManualPageTranslator.visit_acks", "ManualPageTranslator.visit_index", "ManualPageTranslator.depart_abbreviation", "ManualPageTranslator.visit_abbreviation", "ManualPageTranslator.visit_literal_strong", "ManualPageTranslator.depart_literal_strong", "ManualPageTranslator.depart_glossary", "ManualPageTranslator.depart_hlistcol", "ManualPageTranslator.depart_literal_emphasis", "ManualPageTranslator.visit_manpage", "ManualPageTranslator.depart_hlist", "ManualPageTranslator.visit_download_reference", "ManualPageTranslator.depart_compact_paragraph", "ManualPageTranslator.visit_toctree", "ManualPageTranslator.depart_caption"], "tokens": 757}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ManualPageTranslator(SphinxTranslator, BaseTranslator):\n\n def visit_number_reference(self, node: Element) -> None:\n text = nodes.Text(node.get('title', '#'))\n self.visit_Text(text)\n raise nodes.SkipNode\n\n def visit_centered(self, node: Element) -> None:\n self.ensure_eol()\n self.body.append('.sp\\n.ce\\n')\n\n def depart_centered(self, node: Element) -> None:\n self.body.append('\\n.ce 0\\n')\n\n def visit_compact_paragraph(self, node: Element) -> None:\n pass\n\n def depart_compact_paragraph(self, node: Element) -> None:\n pass\n\n def visit_download_reference(self, node: Element) -> None:\n pass\n\n def depart_download_reference(self, node: Element) -> None:\n pass\n\n def visit_toctree(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_index(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_tabular_col_spec(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_glossary(self, node: Element) -> None:\n pass\n\n def depart_glossary(self, node: Element) -> None:\n pass\n\n def visit_acks(self, node: Element) -> None:\n bullet_list = cast(nodes.bullet_list, node[0])\n list_items = cast(Iterable[nodes.list_item], bullet_list)\n self.ensure_eol()\n bullet_list = cast(nodes.bullet_list, node[0])\n list_items = cast(Iterable[nodes.list_item], bullet_list)\n self.body.append(', '.join(n.astext() for n in list_items) + '.')\n self.body.append('\\n')\n raise nodes.SkipNode\n\n def visit_hlist(self, node: Element) -> None:\n self.visit_bullet_list(node)\n\n def depart_hlist(self, node: Element) -> None:\n self.depart_bullet_list(node)\n\n def visit_hlistcol(self, node: Element) -> None:\n pass\n\n def depart_hlistcol(self, node: Element) -> None:\n pass\n\n def visit_literal_emphasis(self, node: Element) -> None:\n return self.visit_emphasis(node)\n\n def depart_literal_emphasis(self, node: Element) -> None:\n return self.depart_emphasis(node)\n\n def visit_literal_strong(self, node: Element) -> None:\n return self.visit_strong(node)\n\n def depart_literal_strong(self, node: Element) -> None:\n return self.depart_strong(node)\n\n def visit_abbreviation(self, node: Element) -> None:\n pass\n\n def depart_abbreviation(self, node: Element) -> None:\n pass\n\n def visit_manpage(self, node: Element) -> None:\n return self.visit_strong(node)\n\n def depart_manpage(self, node: Element) -> None:\n return self.depart_strong(node)\n\n # overwritten: handle section titles better than in 0.6 release\n def visit_caption(self, node: Element) -> None:\n if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):\n self.body.append('.sp\\n')\n else:\n super().visit_caption(node)\n\n def depart_caption(self, node: Element) -> None:\n if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):\n self.body.append('\\n')\n else:\n super().depart_caption(node)\n\n # overwritten: handle section titles better than in 0.6 release", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py__Custom_docutils_writer_smart_capwords.return._sep_or_join_words_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py__Custom_docutils_writer_smart_capwords.return._sep_or_join_words_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 101, "span_ids": ["impl", "impl:2", "smart_capwords", "docstring", "imports", "find_subsections", "imports:16"], "tokens": 585}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Custom docutils writer for Texinfo.\"\"\"\n\nimport re\nimport textwrap\nfrom os import path\nfrom typing import (TYPE_CHECKING, Any, Dict, Iterable, Iterator, List, Pattern, Set, Tuple,\n Union, cast)\n\nfrom docutils import nodes, writers\nfrom docutils.nodes import Element, Node, Text\n\nfrom sphinx import __display_version__, addnodes\nfrom sphinx.domains import IndexEntry\nfrom sphinx.domains.index import IndexDomain\nfrom sphinx.errors import ExtensionError\nfrom sphinx.locale import _, __, admonitionlabels\nfrom sphinx.util import logging\nfrom sphinx.util.docutils import SphinxTranslator\nfrom sphinx.util.i18n import format_date\nfrom sphinx.writers.latex import collected_footnote\n\nif TYPE_CHECKING:\n from sphinx.builders.texinfo import TexinfoBuilder\n\n\nlogger = logging.getLogger(__name__)\n\n\nCOPYING = \"\"\"\\\n@quotation\n%(project)s %(release)s, %(date)s\n\n%(author)s\n\nCopyright @copyright{} %(copyright)s\n@end quotation\n\"\"\"\n\nTEMPLATE = \"\"\"\\\n\\\\input texinfo @c -*-texinfo-*-\n@c %%**start of header\n@setfilename %(filename)s\n@documentencoding UTF-8\n@ifinfo\n@*Generated by Sphinx \"\"\" + __display_version__ + \"\"\".@*\n@end ifinfo\n@settitle %(title)s\n@defindex ge\n@paragraphindent %(paragraphindent)s\n@exampleindent %(exampleindent)s\n@finalout\n%(direntry)s\n@c %%**end of header\n\n@copying\n%(copying)s\n@end copying\n\n@titlepage\n@title %(title)s\n@insertcopying\n@end titlepage\n@contents\n\n@c %%** start of user preamble\n%(preamble)s\n@c %%** end of user preamble\n\n@ifnottex\n@node Top\n@top %(title)s\n@insertcopying\n@end ifnottex\n\n@c %%**start of body\n%(body)s\n@c %%**end of body\n@bye\n\"\"\"\n\n\ndef find_subsections(section: Element) -> List[nodes.section]:\n \"\"\"Return a list of subsections for the given ``section``.\"\"\"\n result = []\n for child in section:\n if isinstance(child, nodes.section):\n result.append(child)\n continue\n elif isinstance(child, nodes.Element):\n result.extend(find_subsections(child))\n return result\n\n\ndef smart_capwords(s: str, sep: str = None) -> str:\n \"\"\"Like string.capwords() but does not capitalize words that already\n contain a capital letter.\"\"\"\n words = s.split(sep)\n for i, word in enumerate(words):\n if all(x.islower() for x in word):\n words[i] = word.capitalize()\n return (sep or ' ').join(words)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator_TexinfoTranslator.__init__.self.colwidths.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator_TexinfoTranslator.__init__.self.colwidths.None", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 135, "end_line": 187, "span_ids": ["TexinfoTranslator"], "tokens": 495}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n builder: \"TexinfoBuilder\" = None\n ignore_missing_images = False\n\n default_elements = {\n 'author': '',\n 'body': '',\n 'copying': '',\n 'date': '',\n 'direntry': '',\n 'exampleindent': 4,\n 'filename': '',\n 'paragraphindent': 0,\n 'preamble': '',\n 'project': '',\n 'release': '',\n 'title': '',\n }\n\n def __init__(self, document: nodes.document, builder: \"TexinfoBuilder\") -> None:\n super().__init__(document, builder)\n self.init_settings()\n\n self.written_ids: Set[str] = set() # node names and anchors in output\n # node names and anchors that should be in output\n self.referenced_ids: Set[str] = set()\n self.indices: List[Tuple[str, str]] = [] # (node name, content)\n self.short_ids: Dict[str, str] = {} # anchors --> short ids\n self.node_names: Dict[str, str] = {} # node name --> node's name to display\n self.node_menus: Dict[str, List[str]] = {} # node name --> node's menu entries\n self.rellinks: Dict[str, List[str]] = {} # node name --> (next, previous, up)\n\n self.collect_indices()\n self.collect_node_names()\n self.collect_node_menus()\n self.collect_rellinks()\n\n self.body: List[str] = []\n self.context: List[str] = []\n self.descs: List[addnodes.desc] = []\n self.previous_section: nodes.section = None\n self.section_level = 0\n self.seen_title = False\n self.next_section_ids: Set[str] = set()\n self.escape_newlines = 0\n self.escape_hyphens = 0\n self.curfilestack: List[str] = []\n self.footnotestack: List[Dict[str, List[Union[collected_footnote, bool]]]] = [] # NOQA\n self.in_footnote = 0\n self.in_samp = 0\n self.handled_abbrs: Set[str] = set()\n self.colwidths: List[int] = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_node_menus_TexinfoTranslator.collect_node_menus.for_name__content_in_sel.node_menus_Top_append_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.collect_node_menus_TexinfoTranslator.collect_node_menus.for_name__content_in_sel.node_menus_Top_append_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 282, "end_line": 305, "span_ids": ["TexinfoTranslator.collect_node_menus"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def collect_node_menus(self) -> None:\n \"\"\"Collect the menu entries for each \"node\" section.\"\"\"\n node_menus = self.node_menus\n targets: List[Element] = [self.document]\n targets.extend(self.document.findall(nodes.section))\n for node in targets:\n assert 'node_name' in node and node['node_name']\n entries = [s['node_name'] for s in find_subsections(node)]\n node_menus[node['node_name']] = entries\n # try to find a suitable \"Top\" node\n title = self.document.next_node(nodes.title)\n top = title.parent if title else self.document\n if not isinstance(top, (nodes.document, nodes.section)):\n top = self.document\n if top is not self.document:\n entries = node_menus[top['node_name']]\n entries += node_menus['Top'][1:]\n node_menus['Top'] = entries\n del node_menus[top['node_name']]\n top['node_name'] = 'Top'\n # handle the indices\n for name, _content in self.indices:\n node_menus[name] = []\n node_menus['Top'].append(name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_reference_TexinfoTranslator.depart_collected_footnote.self_in_footnote_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.depart_reference_TexinfoTranslator.depart_collected_footnote.self_in_footnote_1", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 740, "end_line": 850, "span_ids": ["TexinfoTranslator:12", "TexinfoTranslator.visit_collected_footnote", "TexinfoTranslator.visit_literal_block", "TexinfoTranslator.visit_block_quote", "TexinfoTranslator.depart_line_block", "TexinfoTranslator.depart_strong", "TexinfoTranslator.depart_block_quote", "TexinfoTranslator.visit_superscript", "TexinfoTranslator.depart_line", "TexinfoTranslator.visit_strong", "TexinfoTranslator.depart_literal", "TexinfoTranslator.visit_emphasis", "TexinfoTranslator.depart_collected_footnote", "TexinfoTranslator.visit_title_reference", "TexinfoTranslator.visit_paragraph", "TexinfoTranslator.visit_line", "TexinfoTranslator.visit_number_reference", "TexinfoTranslator.depart_subscript", "TexinfoTranslator.visit_footnote", "TexinfoTranslator.visit_literal", "TexinfoTranslator.depart_superscript", "TexinfoTranslator.visit_line_block", "TexinfoTranslator.depart_literal_block", "TexinfoTranslator.is_samp", "TexinfoTranslator.depart_emphasis", "TexinfoTranslator.visit_subscript", "TexinfoTranslator.depart_reference", "TexinfoTranslator.depart_paragraph"], "tokens": 808}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def depart_reference(self, node: Element) -> None:\n pass\n\n def visit_number_reference(self, node: Element) -> None:\n text = nodes.Text(node.get('title', '#'))\n self.visit_Text(text)\n raise nodes.SkipNode\n\n def visit_title_reference(self, node: Element) -> None:\n text = node.astext()\n self.body.append('@cite{%s}' % self.escape_arg(text))\n raise nodes.SkipNode\n\n # -- Blocks\n\n def visit_paragraph(self, node: Element) -> None:\n self.body.append('\\n')\n\n def depart_paragraph(self, node: Element) -> None:\n self.body.append('\\n')\n\n def visit_block_quote(self, node: Element) -> None:\n self.body.append('\\n@quotation\\n')\n\n def depart_block_quote(self, node: Element) -> None:\n self.ensure_eol()\n self.body.append('@end quotation\\n')\n\n def visit_literal_block(self, node: Element) -> None:\n self.body.append('\\n@example\\n')\n\n def depart_literal_block(self, node: Element) -> None:\n self.ensure_eol()\n self.body.append('@end example\\n')\n\n visit_doctest_block = visit_literal_block\n depart_doctest_block = depart_literal_block\n\n def visit_line_block(self, node: Element) -> None:\n if not isinstance(node.parent, nodes.line_block):\n self.body.append('\\n\\n')\n self.body.append('@display\\n')\n\n def depart_line_block(self, node: Element) -> None:\n self.body.append('@end display\\n')\n if not isinstance(node.parent, nodes.line_block):\n self.body.append('\\n\\n')\n\n def visit_line(self, node: Element) -> None:\n self.escape_newlines += 1\n\n def depart_line(self, node: Element) -> None:\n self.body.append('@w{ }\\n')\n self.escape_newlines -= 1\n\n # -- Inline\n\n def visit_strong(self, node: Element) -> None:\n self.body.append('`')\n\n def depart_strong(self, node: Element) -> None:\n self.body.append(\"'\")\n\n def visit_emphasis(self, node: Element) -> None:\n if self.in_samp:\n self.body.append('@var{')\n self.context.append('}')\n else:\n self.body.append('`')\n self.context.append(\"'\")\n\n def depart_emphasis(self, node: Element) -> None:\n self.body.append(self.context.pop())\n\n def is_samp(self, node: Element) -> bool:\n return 'samp' in node['classes']\n\n def visit_literal(self, node: Element) -> None:\n if self.is_samp(node):\n self.in_samp += 1\n self.body.append('@code{')\n\n def depart_literal(self, node: Element) -> None:\n if self.is_samp(node):\n self.in_samp -= 1\n self.body.append('}')\n\n def visit_superscript(self, node: Element) -> None:\n self.body.append('@w{^')\n\n def depart_superscript(self, node: Element) -> None:\n self.body.append('}')\n\n def visit_subscript(self, node: Element) -> None:\n self.body.append('@w{[')\n\n def depart_subscript(self, node: Element) -> None:\n self.body.append(']}')\n\n # -- Footnotes\n\n def visit_footnote(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_collected_footnote(self, node: Element) -> None:\n self.in_footnote += 1\n self.body.append('@footnote{')\n\n def depart_collected_footnote(self, node: Element) -> None:\n self.body.append('}')\n self.in_footnote -= 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_footnote_reference_TexinfoTranslator.depart_definition_list.self_body_append_end_ta": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_footnote_reference_TexinfoTranslator.depart_definition_list.self_body_append_end_ta", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 852, "end_line": 960, "span_ids": ["TexinfoTranslator.depart_bullet_list", "TexinfoTranslator.visit_option_argument", "TexinfoTranslator.visit_enumerated_list", "TexinfoTranslator.depart_citation", "TexinfoTranslator.visit_option_list", "TexinfoTranslator.visit_footnote_reference", "TexinfoTranslator.visit_option", "TexinfoTranslator.visit_option_string", "TexinfoTranslator.visit_bullet_list", "TexinfoTranslator.visit_definition_list", "TexinfoTranslator.visit_citation", "TexinfoTranslator.depart_description", "TexinfoTranslator.visit_description", "TexinfoTranslator.depart_option", "TexinfoTranslator.visit_citation_reference", "TexinfoTranslator.depart_option_list", "TexinfoTranslator.visit_list_item", "TexinfoTranslator.depart_list_item", "TexinfoTranslator.visit_option_group", "TexinfoTranslator.depart_citation_reference", "TexinfoTranslator.visit_option_list_item", "TexinfoTranslator.depart_option_list_item", "TexinfoTranslator.depart_enumerated_list", "TexinfoTranslator.depart_option_argument", "TexinfoTranslator.depart_definition_list", "TexinfoTranslator.depart_option_group", "TexinfoTranslator.depart_option_string"], "tokens": 839}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_footnote_reference(self, node: Element) -> None:\n num = node.astext().strip()\n try:\n footnode, used = self.footnotestack[-1][num]\n except (KeyError, IndexError) as exc:\n raise nodes.SkipNode from exc\n # footnotes are repeated for each reference\n footnode.walkabout(self) # type: ignore\n raise nodes.SkipChildren\n\n def visit_citation(self, node: Element) -> None:\n self.body.append('\\n')\n for id in node.get('ids'):\n self.add_anchor(id, node)\n self.escape_newlines += 1\n\n def depart_citation(self, node: Element) -> None:\n self.escape_newlines -= 1\n\n def visit_citation_reference(self, node: Element) -> None:\n self.body.append('@w{[')\n\n def depart_citation_reference(self, node: Element) -> None:\n self.body.append(']}')\n\n # -- Lists\n\n def visit_bullet_list(self, node: Element) -> None:\n bullet = node.get('bullet', '*')\n self.body.append('\\n\\n@itemize %s\\n' % bullet)\n\n def depart_bullet_list(self, node: Element) -> None:\n self.ensure_eol()\n self.body.append('@end itemize\\n')\n\n def visit_enumerated_list(self, node: Element) -> None:\n # doesn't support Roman numerals\n enum = node.get('enumtype', 'arabic')\n starters = {'arabic': '',\n 'loweralpha': 'a',\n 'upperalpha': 'A'}\n start = node.get('start', starters.get(enum, ''))\n self.body.append('\\n\\n@enumerate %s\\n' % start)\n\n def depart_enumerated_list(self, node: Element) -> None:\n self.ensure_eol()\n self.body.append('@end enumerate\\n')\n\n def visit_list_item(self, node: Element) -> None:\n self.body.append('\\n@item ')\n\n def depart_list_item(self, node: Element) -> None:\n pass\n\n # -- Option List\n\n def visit_option_list(self, node: Element) -> None:\n self.body.append('\\n\\n@table @option\\n')\n\n def depart_option_list(self, node: Element) -> None:\n self.ensure_eol()\n self.body.append('@end table\\n')\n\n def visit_option_list_item(self, node: Element) -> None:\n pass\n\n def depart_option_list_item(self, node: Element) -> None:\n pass\n\n def visit_option_group(self, node: Element) -> None:\n self.at_item_x = '@item'\n\n def depart_option_group(self, node: Element) -> None:\n pass\n\n def visit_option(self, node: Element) -> None:\n self.escape_hyphens += 1\n self.body.append('\\n%s ' % self.at_item_x)\n self.at_item_x = '@itemx'\n\n def depart_option(self, node: Element) -> None:\n self.escape_hyphens -= 1\n\n def visit_option_string(self, node: Element) -> None:\n pass\n\n def depart_option_string(self, node: Element) -> None:\n pass\n\n def visit_option_argument(self, node: Element) -> None:\n self.body.append(node.get('delimiter', ' '))\n\n def depart_option_argument(self, node: Element) -> None:\n pass\n\n def visit_description(self, node: Element) -> None:\n self.body.append('\\n')\n\n def depart_description(self, node: Element) -> None:\n pass\n\n # -- Definitions\n\n def visit_definition_list(self, node: Element) -> None:\n self.body.append('\\n\\n@table @asis\\n')\n\n def depart_definition_list(self, node: Element) -> None:\n self.ensure_eol()\n self.body.append('@end table\\n')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_definition_list_item_TexinfoTranslator._Admonitions": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_definition_list_item_TexinfoTranslator._Admonitions", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 962, "end_line": 1079, "span_ids": ["TexinfoTranslator.visit_definition_list_item", "TexinfoTranslator.depart_tbody", "TexinfoTranslator.depart_field_list", "TexinfoTranslator.depart_colspec", "TexinfoTranslator.depart_definition_list_item", "TexinfoTranslator.visit_field_name", "TexinfoTranslator.depart_field_name", "TexinfoTranslator.visit_tbody", "TexinfoTranslator.visit_thead", "TexinfoTranslator.depart_table", "TexinfoTranslator.visit_definition", "TexinfoTranslator.visit_classifier", "TexinfoTranslator.visit_tabular_col_spec", "TexinfoTranslator.visit_table", "TexinfoTranslator.visit_row", "TexinfoTranslator.depart_thead", "TexinfoTranslator.visit_entry", "TexinfoTranslator.visit_field_list", "TexinfoTranslator.visit_tgroup", "TexinfoTranslator.depart_tgroup", "TexinfoTranslator.depart_definition", "TexinfoTranslator.depart_tabular_col_spec", "TexinfoTranslator.depart_term", "TexinfoTranslator.depart_field_body", "TexinfoTranslator.visit_term", "TexinfoTranslator.visit_field", "TexinfoTranslator.depart_classifier", "TexinfoTranslator.visit_colspec", "TexinfoTranslator.depart_field", "TexinfoTranslator.depart_row", "TexinfoTranslator.visit_field_body", "TexinfoTranslator.depart_entry"], "tokens": 820}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_definition_list_item(self, node: Element) -> None:\n self.at_item_x = '@item'\n\n def depart_definition_list_item(self, node: Element) -> None:\n pass\n\n def visit_term(self, node: Element) -> None:\n for id in node.get('ids'):\n self.add_anchor(id, node)\n # anchors and indexes need to go in front\n for n in node[::]:\n if isinstance(n, (addnodes.index, nodes.target)):\n n.walkabout(self)\n node.remove(n)\n self.body.append('\\n%s ' % self.at_item_x)\n self.at_item_x = '@itemx'\n\n def depart_term(self, node: Element) -> None:\n pass\n\n def visit_classifier(self, node: Element) -> None:\n self.body.append(' : ')\n\n def depart_classifier(self, node: Element) -> None:\n pass\n\n def visit_definition(self, node: Element) -> None:\n self.body.append('\\n')\n\n def depart_definition(self, node: Element) -> None:\n pass\n\n # -- Tables\n\n def visit_table(self, node: Element) -> None:\n self.entry_sep = '@item'\n\n def depart_table(self, node: Element) -> None:\n self.body.append('\\n@end multitable\\n\\n')\n\n def visit_tabular_col_spec(self, node: Element) -> None:\n pass\n\n def depart_tabular_col_spec(self, node: Element) -> None:\n pass\n\n def visit_colspec(self, node: Element) -> None:\n self.colwidths.append(node['colwidth'])\n if len(self.colwidths) != self.n_cols:\n return\n self.body.append('\\n\\n@multitable ')\n for n in self.colwidths:\n self.body.append('{%s} ' % ('x' * (n + 2)))\n\n def depart_colspec(self, node: Element) -> None:\n pass\n\n def visit_tgroup(self, node: Element) -> None:\n self.colwidths = []\n self.n_cols = node['cols']\n\n def depart_tgroup(self, node: Element) -> None:\n pass\n\n def visit_thead(self, node: Element) -> None:\n self.entry_sep = '@headitem'\n\n def depart_thead(self, node: Element) -> None:\n pass\n\n def visit_tbody(self, node: Element) -> None:\n pass\n\n def depart_tbody(self, node: Element) -> None:\n pass\n\n def visit_row(self, node: Element) -> None:\n pass\n\n def depart_row(self, node: Element) -> None:\n self.entry_sep = '@item'\n\n def visit_entry(self, node: Element) -> None:\n self.body.append('\\n%s\\n' % self.entry_sep)\n self.entry_sep = '@tab'\n\n def depart_entry(self, node: Element) -> None:\n for _i in range(node.get('morecols', 0)):\n self.body.append('\\n@tab\\n')\n\n # -- Field Lists\n\n def visit_field_list(self, node: Element) -> None:\n pass\n\n def depart_field_list(self, node: Element) -> None:\n pass\n\n def visit_field(self, node: Element) -> None:\n self.body.append('\\n')\n\n def depart_field(self, node: Element) -> None:\n self.body.append('\\n')\n\n def visit_field_name(self, node: Element) -> None:\n self.ensure_eol()\n self.body.append('@*')\n\n def depart_field_name(self, node: Element) -> None:\n self.body.append(': ')\n\n def visit_field_body(self, node: Element) -> None:\n pass\n\n def depart_field_body(self, node: Element) -> None:\n pass\n\n # -- Admonitions", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_admonition_TexinfoTranslator.depart_figure.self_body_append_n_end_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_admonition_TexinfoTranslator.depart_figure.self_body_append_n_end_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1081, "end_line": 1177, "span_ids": ["TexinfoTranslator._visit_named_admonition", "TexinfoTranslator.visit_transition", "TexinfoTranslator.visit_generated", "TexinfoTranslator.depart_decoration", "TexinfoTranslator.depart_container", "TexinfoTranslator:16", "TexinfoTranslator.visit_footer", "TexinfoTranslator.visit_admonition", "TexinfoTranslator.depart_attribution", "TexinfoTranslator.visit_figure", "TexinfoTranslator.visit_header", "TexinfoTranslator.visit_topic", "TexinfoTranslator.visit_attribution", "TexinfoTranslator.depart_topic", "TexinfoTranslator.visit_docinfo", "TexinfoTranslator.depart_admonition", "TexinfoTranslator.visit_container", "TexinfoTranslator.visit_raw", "TexinfoTranslator.depart_figure", "TexinfoTranslator.visit_decoration", "TexinfoTranslator.depart_transition"], "tokens": 830}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_admonition(self, node: Element, name: str = '') -> None:\n if not name:\n title = cast(nodes.title, node[0])\n name = self.escape(title.astext())\n self.body.append('\\n@cartouche\\n@quotation %s ' % name)\n\n def _visit_named_admonition(self, node: Element) -> None:\n label = admonitionlabels[node.tagname]\n self.body.append('\\n@cartouche\\n@quotation %s ' % label)\n\n def depart_admonition(self, node: Element) -> None:\n self.ensure_eol()\n self.body.append('@end quotation\\n'\n '@end cartouche\\n')\n\n visit_attention = _visit_named_admonition\n depart_attention = depart_admonition\n visit_caution = _visit_named_admonition\n depart_caution = depart_admonition\n visit_danger = _visit_named_admonition\n depart_danger = depart_admonition\n visit_error = _visit_named_admonition\n depart_error = depart_admonition\n visit_hint = _visit_named_admonition\n depart_hint = depart_admonition\n visit_important = _visit_named_admonition\n depart_important = depart_admonition\n visit_note = _visit_named_admonition\n depart_note = depart_admonition\n visit_tip = _visit_named_admonition\n depart_tip = depart_admonition\n visit_warning = _visit_named_admonition\n depart_warning = depart_admonition\n\n # -- Misc\n\n def visit_docinfo(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_generated(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_header(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_footer(self, node: Element) -> None:\n raise nodes.SkipNode\n\n def visit_container(self, node: Element) -> None:\n if node.get('literal_block'):\n self.body.append('\\n\\n@float LiteralBlock\\n')\n\n def depart_container(self, node: Element) -> None:\n if node.get('literal_block'):\n self.body.append('\\n@end float\\n\\n')\n\n def visit_decoration(self, node: Element) -> None:\n pass\n\n def depart_decoration(self, node: Element) -> None:\n pass\n\n def visit_topic(self, node: Element) -> None:\n # ignore TOC's since we have to have a \"menu\" anyway\n if 'contents' in node.get('classes', []):\n raise nodes.SkipNode\n title = cast(nodes.title, node[0])\n self.visit_rubric(title)\n self.body.append('%s\\n' % self.escape(title.astext()))\n self.depart_rubric(title)\n\n def depart_topic(self, node: Element) -> None:\n pass\n\n def visit_transition(self, node: Element) -> None:\n self.body.append('\\n\\n%s\\n\\n' % ('_' * 66))\n\n def depart_transition(self, node: Element) -> None:\n pass\n\n def visit_attribution(self, node: Element) -> None:\n self.body.append('\\n\\n@center --- ')\n\n def depart_attribution(self, node: Element) -> None:\n self.body.append('\\n\\n')\n\n def visit_raw(self, node: Element) -> None:\n format = node.get('format', '').split()\n if 'texinfo' in format or 'texi' in format:\n self.body.append(node.astext())\n raise nodes.SkipNode\n\n def visit_figure(self, node: Element) -> None:\n self.body.append('\\n\\n@float Figure\\n')\n\n def depart_figure(self, node: Element) -> None:\n self.body.append('\\n@end float\\n\\n')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_caption_TexinfoTranslator.depart_caption.if_isinstance_node_paren.self_body_append_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_caption_TexinfoTranslator.depart_caption.if_isinstance_node_paren.self_body_append_n_", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1179, "end_line": 1192, "span_ids": ["TexinfoTranslator.visit_caption", "TexinfoTranslator.depart_caption"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_caption(self, node: Element) -> None:\n if (isinstance(node.parent, nodes.figure) or\n (isinstance(node.parent, nodes.container) and\n node.parent.get('literal_block'))):\n self.body.append('\\n@caption{')\n else:\n logger.warning(__('caption not inside a figure.'),\n location=node)\n\n def depart_caption(self, node: Element) -> None:\n if (isinstance(node.parent, nodes.figure) or\n (isinstance(node.parent, nodes.container) and\n node.parent.get('literal_block'))):\n self.body.append('}\\n')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_image_TexinfoTranslator.visit_image.self_body_append_n_imag": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/texinfo.py_TexinfoTranslator.visit_image_TexinfoTranslator.visit_image.self_body_append_n_imag", "embedding": null, "metadata": {"file_path": "sphinx/writers/texinfo.py", "file_name": "texinfo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1194, "end_line": 1212, "span_ids": ["TexinfoTranslator.visit_image"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TexinfoTranslator(SphinxTranslator):\n\n def visit_image(self, node: Element) -> None:\n if node['uri'] in self.builder.images:\n uri = self.builder.images[node['uri']]\n else:\n # missing image!\n if self.ignore_missing_images:\n return\n uri = node['uri']\n if uri.find('://') != -1:\n # ignore remote images\n return\n name, ext = path.splitext(uri)\n # width and height ignored in non-tex output\n width = self.tex_image_length(node.get('width', ''))\n height = self.tex_image_length(node.get('height', ''))\n alt = self.escape_arg(node.get('alt', ''))\n filename = \"%s-figures/%s\" % (self.elements['filename'][:-5], name) # type: ignore\n self.body.append('\\n@image{%s,%s,%s,%s,%s}\\n' %\n (filename, width, height, alt, ext[1:]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py__Custom_docutils_writer_if_TYPE_CHECKING_.from_sphinx_builders_text": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py__Custom_docutils_writer_if_TYPE_CHECKING_.from_sphinx_builders_text", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["impl", "docstring", "imports", "imports:13"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Custom docutils writer for plain text.\"\"\"\nimport math\nimport os\nimport re\nimport textwrap\nfrom itertools import chain, groupby\nfrom typing import (TYPE_CHECKING, Any, Dict, Generator, Iterable, List, Optional, Set, Tuple,\n Union, cast)\n\nfrom docutils import nodes, writers\nfrom docutils.nodes import Element, Text\nfrom docutils.utils import column_width\n\nfrom sphinx import addnodes\nfrom sphinx.locale import _, admonitionlabels\nfrom sphinx.util.docutils import SphinxTranslator\n\nif TYPE_CHECKING:\n from sphinx.builders.text import TextBuilder", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.__getitem___Table.cells.for_line_in_self_lines_.for_cell_in_line_.if_cell_and_cell_not_in_s.seen_add_cell_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/text.py_Table.__getitem___Table.cells.for_line_in_self_lines_.for_cell_in_line_.if_cell_and_cell_not_in_s.seen_add_cell_", "embedding": null, "metadata": {"file_path": "sphinx/writers/text.py", "file_name": "text.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 166, "span_ids": ["Table._ensure_has_line", "Table.cell_width", "Table.__setitem__", "Table.__repr__", "Table._ensure_has_column", "Table.__getitem__", "Table.cells"], "tokens": 414}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Table:\n\n def __getitem__(self, pos: Tuple[int, int]) -> Cell:\n line, col = pos\n self._ensure_has_line(line + 1)\n self._ensure_has_column(col + 1)\n return self.lines[line][col]\n\n def __setitem__(self, pos: Tuple[int, int], cell: Cell) -> None:\n line, col = pos\n self._ensure_has_line(line + cell.rowspan)\n self._ensure_has_column(col + cell.colspan)\n for dline in range(cell.rowspan):\n for dcol in range(cell.colspan):\n self.lines[line + dline][col + dcol] = cell\n cell.row = line\n cell.col = col\n\n def _ensure_has_line(self, line: int) -> None:\n while len(self.lines) < line:\n self.lines.append([])\n\n def _ensure_has_column(self, col: int) -> None:\n for line in self.lines:\n while len(line) < col:\n line.append(None)\n\n def __repr__(self) -> str:\n return \"\\n\".join(repr(line) for line in self.lines)\n\n def cell_width(self, cell: Cell, source: List[int]) -> int:\n \"\"\"Give the cell width, according to the given source (either\n ``self.colwidth`` or ``self.measured_widths``).\n This takes into account cells spanning multiple columns.\n \"\"\"\n width = 0\n for i in range(self[cell.row, cell.col].colspan):\n width += source[cell.col + i]\n return width + (cell.colspan - 1) * 3\n\n @property\n def cells(self) -> Generator[Cell, None, None]:\n seen: Set[Cell] = set()\n for line in self.lines:\n for cell in line:\n if cell and cell not in seen:\n yield cell\n seen.add(cell)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/xml.py__Docutils_native_XML_an_XMLWriter.translate.return.super_translate_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/sphinx/writers/xml.py__Docutils_native_XML_an_XMLWriter.translate.return.super_translate_", "embedding": null, "metadata": {"file_path": "sphinx/writers/xml.py", "file_name": "xml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["XMLWriter.translate", "XMLWriter", "docstring", "imports"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Docutils-native XML and pseudo-XML writers.\"\"\"\n\nfrom typing import Any\n\nfrom docutils.writers.docutils_xml import Writer as BaseXMLWriter\n\nfrom sphinx.builders import Builder\n\n\nclass XMLWriter(BaseXMLWriter):\n def __init__(self, builder: Builder) -> None:\n super().__init__()\n self.builder = builder\n\n # A lambda function to generate translator lazily\n self.translator_class = lambda document: self.builder.create_translator(document)\n\n def translate(self, *args: Any, **kwargs: Any) -> None:\n self.document.settings.newlines = \\\n self.document.settings.indents = \\\n self.builder.env.config.xml_pretty\n self.document.settings.xml_declaration = True\n self.document.settings.doctype_declaration = True\n return super().translate()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-py-python_use_unqualified_type_names/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-domain-py-python_use_unqualified_type_names/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-domain-py-python_use_unqualified_type_names/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 8}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "python_use_unqualified_type_names = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_CustomDict_DocstringSig.prop2.return.456": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_CustomDict_DocstringSig.prop2.return.456", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 88, "end_line": 157, "span_ids": ["DocstringSig.__init__", "Outer.Inner.meth", "function", "Outer.Inner", "DocstringSig.prop2", "InnerChild", "Outer", "Outer:3", "DocstringSig.meth2", "DocstringSig.prop1", "DocstringSig.__new__", "DocstringSig", "DocstringSig.meth", "CustomDict"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CustomDict(dict):\n \"\"\"Docstring.\"\"\"\n\n\ndef function(foo, *args, **kwds):\n \"\"\"\n Return spam.\n \"\"\"\n pass\n\n\nclass Outer(object):\n \"\"\"Foo\"\"\"\n\n class Inner(object):\n \"\"\"Foo\"\"\"\n\n def meth(self):\n \"\"\"Foo\"\"\"\n\n # should be documented as an alias\n factory = dict\n\n\nclass InnerChild(Outer.Inner):\n \"\"\"InnerChild docstring\"\"\"\n\n\nclass DocstringSig(object):\n def __new__(cls, *new_args, **new_kwargs):\n \"\"\"__new__(cls, d, e=1) -> DocstringSig\nFirst line of docstring\n\n rest of docstring\n \"\"\"\n\n def __init__(self, *init_args, **init_kwargs):\n \"\"\"__init__(self, a, b=1) -> None\nFirst line of docstring\n\n rest of docstring\n \"\"\"\n\n def meth(self):\n \"\"\"meth(FOO, BAR=1) -> BAZ\nFirst line of docstring\n\n rest of docstring\n \"\"\"\n\n def meth2(self):\n \"\"\"First line, no signature\n Second line followed by indentation::\n\n indented line\n \"\"\"\n\n @property\n def prop1(self):\n \"\"\"DocstringSig.prop1(self)\n First line of docstring\n \"\"\"\n return 123\n\n @property\n def prop2(self):\n \"\"\"First line of docstring\n Second line of docstring\n \"\"\"\n return 456", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_StrRepr_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/__init__.py_StrRepr_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 160, "end_line": 205, "span_ids": ["CustomIter.__iter__", "CustomIter.snafucate", "StrRepr", "CustomIter", "InstAttCls", "AttCls", "StrRepr.__repr__"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StrRepr(str):\n \"\"\"docstring\"\"\"\n\n def __repr__(self):\n return self\n\n\nclass AttCls(object):\n a1 = StrRepr('hello\\nworld')\n a2 = None\n\n\nclass InstAttCls(object):\n \"\"\"Class with documented class and instance attributes.\"\"\"\n\n #: Doc comment for class attribute InstAttCls.ca1.\n #: It can have multiple lines.\n ca1 = 'a'\n\n ca2 = 'b' #: Doc comment for InstAttCls.ca2. One line only.\n\n ca3 = 'c'\n \"\"\"Docstring for class attribute InstAttCls.ca3.\"\"\"\n\n def __init__(self):\n #: Doc comment for instance attribute InstAttCls.ia1\n self.ia1 = 'd'\n\n self.ia2 = 'e'\n \"\"\"Docstring for instance attribute InstAttCls.ia2.\"\"\"\n\n\nclass CustomIter(object):\n def __init__(self):\n \"\"\"Create a new `CustomIter`.\"\"\"\n self.values = range(10)\n\n def __iter__(self):\n \"\"\"Iterate squares of each value.\"\"\"\n for i in self.values:\n yield i ** 2\n\n def snafucate(self):\n \"\"\"Makes this snafucated.\"\"\"\n print(\"snafucated\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/autodoc_type_aliases.py_from___future___import_an_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/autodoc_type_aliases.py_from___future___import_an_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/autodoc_type_aliases.py", "file_name": "autodoc_type_aliases.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 47, "span_ids": ["impl", "mult_4", "mult_3", "sum", "mult", "Foo", "imports", "read"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\n\nimport io\nfrom typing import overload\n\nmyint = int\n\n#: docstring\nvariable: myint\n\n#: docstring\nvariable2 = None # type: myint\n\n\ndef read(r: io.BytesIO) -> io.StringIO:\n \"\"\"docstring\"\"\"\n\n\ndef sum(x: myint, y: myint) -> myint:\n \"\"\"docstring\"\"\"\n return x + y\n\n\n@overload\ndef mult(x: myint, y: myint) -> myint:\n ...\n\n\n@overload\ndef mult(x: float, y: float) -> float:\n ...\n\n\ndef mult(x, y):\n \"\"\"docstring\"\"\"\n return x, y\n\n\nclass Foo:\n \"\"\"docstring\"\"\"\n\n #: docstring\n attr1: myint\n\n def __init__(self):\n self.attr2: myint = None #: docstring", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/canonical/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/canonical/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/canonical/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["imports"], "tokens": 9}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from target.canonical.original import Bar, Foo", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/canonical/original.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/canonical/original.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/canonical/original.py", "file_name": "original.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["bar", "impl", "bar.Bar:2", "Foo", "Foo.meth", "bar.Bar"], "tokens": 38}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Foo:\n \"\"\"docstring\"\"\"\n\n def meth(self):\n \"\"\"docstring\"\"\"\n\n\ndef bar():\n class Bar:\n \"\"\"docstring\"\"\"\n\n return Bar\n\n\nBar = bar()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/metadata.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/metadata.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/metadata.py", "file_name": "metadata.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["foo"], "tokens": 13}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def foo():\n \"\"\":meta metadata-only-docstring:\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/module.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/module.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/module.py", "file_name": "module.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["impl"], "tokens": 52}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "undocumented = 1\n\n#: docstring\ndocumented = 1\n\nundoc_annotated: int\n\n#: docstring\nannotated: int\n\n__special__ = 1\n\n#: docstring\n__documented_special__ = 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/pep604.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/pep604.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/pep604.py", "file_name": "pep604.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["impl", "sum", "docstring", "Foo", "imports", "Foo.meth"], "tokens": 87}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\n\nattr: int | str #: docstring\n\n\ndef sum(x: int | str, y: int | str) -> int | str:\n \"\"\"docstring\"\"\"\n\n\nclass Foo:\n \"\"\"docstring\"\"\"\n\n attr: int | str #: docstring\n\n def meth(self, x: int | str, y: int | str) -> int | str:\n \"\"\"docstring\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/preserve_defaults.py_from_datetime_import_date_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/preserve_defaults.py_from_datetime_import_date_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/preserve_defaults.py", "file_name": "preserve_defaults.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 25, "span_ids": ["impl", "Class.meth", "imports", "Class", "foo"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from datetime import datetime\nfrom typing import Any\n\nCONSTANT = 'foo'\nSENTINEL = object()\n\n\ndef foo(name: str = CONSTANT,\n sentinel: Any = SENTINEL,\n now: datetime = datetime.now(),\n color: int = 0xFFFFFF,\n *,\n kwarg1,\n kwarg2 = 0xFFFFFF) -> None:\n \"\"\"docstring\"\"\"\n\n\nclass Class:\n \"\"\"docstring\"\"\"\n\n def meth(self, name: str = CONSTANT, sentinel: Any = SENTINEL,\n now: datetime = datetime.now(), color: int = 0xFFFFFF,\n *, kwarg1, kwarg2 = 0xFFFFFF) -> None:\n \"\"\"docstring\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/properties.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/properties.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 12, "span_ids": ["Foo.prop1", "Foo.prop2", "Foo"], "tokens": 48}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Foo:\n \"\"\"docstring\"\"\"\n\n @property\n def prop1(self) -> int:\n \"\"\"docstring\"\"\"\n\n @classmethod\n @property\n def prop2(self) -> int:\n \"\"\"docstring\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typehints.py_from_typing_import_Any_T_Math.prop.return.0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typehints.py_from_typing_import_Any_T_Math.prop.return.0", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/typehints.py", "file_name": "typehints.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 43, "span_ids": ["impl", "decr", "Math", "Math.nothing", "Math.horse", "Math.incr", "imports", "Math.prop", "incr", "Math.decr"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from typing import Any, Tuple, Union\n\nCONST1: int\nCONST2: int = 1\n\n\ndef incr(a: int, b: int = 1) -> int:\n return a + b\n\n\ndef decr(a, b = 1):\n # type: (int, int) -> int\n return a - b\n\n\nclass Math:\n CONST1: int\n CONST2: int = 1\n\n def __init__(self, s: str, o: Any = None) -> None:\n pass\n\n def incr(self, a: int, b: int = 1) -> int:\n return a + b\n\n def decr(self, a, b = 1):\n # type: (int, int) -> int\n return a - b\n\n def nothing(self):\n # type: () -> None\n pass\n\n def horse(self,\n a, # type: str\n b, # type: int\n ):\n # type: (...) -> None\n return\n\n @property\n def prop(self) -> int:\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typevar.py_from_datetime_import_date_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/typevar.py_from_datetime_import_date_", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/typevar.py", "file_name": "typevar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["impl", "Class", "imports"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from datetime import date\nfrom typing import NewType, TypeVar\n\n#: T1\nT1 = TypeVar(\"T1\")\n\nT2 = TypeVar(\"T2\") # A TypeVar not having doc comment\n\n#: T3\nT3 = TypeVar(\"T3\", int, str)\n\n#: T4\nT4 = TypeVar(\"T4\", covariant=True)\n\n#: T5\nT5 = TypeVar(\"T5\", contravariant=True)\n\n#: T6\nT6 = NewType(\"T6\", date)\n\n#: T7\nT7 = TypeVar(\"T7\", bound=int)\n\n\nclass Class:\n #: T1\n T1 = TypeVar(\"T1\")\n\n #: T6\n T6 = NewType(\"T6\", date)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/uninitialized_attributes.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-autodoc/target/uninitialized_attributes.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-autodoc/target/uninitialized_attributes.py", "file_name": "uninitialized_attributes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["Derived", "Base"], "tokens": 38}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Base:\n attr1: int #: docstring\n attr2: str\n\n\nclass Derived(Base):\n attr3: int #: docstring\n attr4: str", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-extlinks-hardcoded-urls/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-extlinks-hardcoded-urls/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-extlinks-hardcoded-urls/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl"], "tokens": 42}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.extlinks']\nextlinks = {'issue': ('https://github.com/sphinx-doc/sphinx/issues/%s', 'issue %s')}\nextlinks_detect_hardcoded_links = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-extlinks-hardcoded-urls-multiple-replacements/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-extlinks-hardcoded-urls-multiple-replacements/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-extlinks-hardcoded-urls-multiple-replacements/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["impl"], "tokens": 55}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.extlinks']\nextlinks = {\n 'user': ('https://github.com/%s', '@%s'),\n 'repo': ('https://github.com/%s', 'project %s'),\n}\nextlinks_detect_hardcoded_links = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-intersphinx-role/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-ext-intersphinx-role/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-ext-intersphinx-role/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 4, "span_ids": ["impl"], "tokens": 30}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.intersphinx']\n# the role should not honor this conf var\nintersphinx_disabled_reftypes = ['*']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_signaturereturn_icon/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-html_signaturereturn_icon/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-html_signaturereturn_icon/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 10}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "extensions = ['sphinx.ext.autodoc']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-includegraphics/conf.py_exclude_patterns_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-latex-includegraphics/conf.py_exclude_patterns_", "embedding": null, "metadata": {"file_path": "tests/roots/test-latex-includegraphics/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 48, "span_ids": ["impl"], "tokens": 552}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\n\nlatex_elements = {\n 'preamble': r'''\n\\makeatletter\n\\def\\dividetwolengths#1#2{\\the\\dimexpr\n \\numexpr65536*\\dimexpr#1\\relax/\\dimexpr#2\\relax sp}%\n\\newwrite\\out\n\\immediate\\openout\\out=\\jobname-dimensions.txt\n\\def\\toout{\\immediate\\write\\out}\n\\def\\getWfromoptions #1width=#2,#3\\relax{\\def\\WidthFromOption{#2}}%\n\\def\\getHfromoptions #1height=#2,#3\\relax{\\def\\HeightFromOption{#2}}%\n\\def\\tempincludegraphics[#1]#2{%\n \\sphinxsafeincludegraphics[#1]{#2}%\n \\edef\\obtainedratio\n {\\dividetwolengths\\spx@image@requiredheight\\spx@image@requiredwidth}%\n \\getWfromoptions#1,width=,\\relax\n \\getHfromoptions#1,height=,\\relax\n \\def\\ratiocheck{}%\n \\ifx\\WidthFromOption\\empty\\else\n \\ifx\\HeightFromOption\\empty\\else\n \\edef\\askedforratio{\\dividetwolengths\\HeightFromOption\\WidthFromOption}%\n \\edef\\ratiocheck{\\dividetwolengths\\obtainedratio\\askedforratio}%\n \\fi\\fi\n \\toout{original options = #1^^J%\n width = \\the\\dimexpr\\spx@image@requiredwidth,\n linewidth = \\the\\linewidth^^J%\n height = \\the\\dimexpr\\spx@image@requiredheight,\n maxheight = \\the\\spx@image@maxheight^^J%\n obtained H/W = \\obtainedratio^^J%\n \\ifx\\ratiocheck\\empty\n \\else\n asked for H/W = \\askedforratio^^J%\n ratio of ratios = \\ratiocheck^^J%\n \\fi\n }%\n \\ifx\\ratiocheck\\empty\n \\else\n \\ifpdfabsdim\\dimexpr\\ratiocheck-1pt\\relax > 0.01pt\n \\ASPECTRATIOERROR\n \\fi\n \\fi\n}\n\\def\\sphinxincludegraphics#1#{\\tempincludegraphics#1}\n\\makeatother\n''',\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-documents_exclude/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-documents_exclude/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-linkcheck-documents_exclude/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["impl"], "tokens": 31}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']\nlinkcheck_exclude_documents = [\n '^broken_link$',\n 'br[0-9]ken_link',\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver-warn-redirects/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-linkcheck-localserver-warn-redirects/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-linkcheck-localserver-warn-redirects/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 7}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "exclude_patterns = ['_build']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-local-logo/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-local-logo/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-local-logo/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl"], "tokens": 36}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "latex_documents = [\n ('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')\n]\nhtml_logo = \"images/img.png\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-nitpicky-warnings/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-nitpicky-warnings/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-nitpicky-warnings/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 5}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "nitpicky = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-remote-logo/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-remote-logo/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-remote-logo/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["impl"], "tokens": 57}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "latex_documents = [\n ('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')\n]\nhtml_logo = \"https://www.python.org/static/img/python-logo.png\"\nhtml_favicon = \"https://www.python.org/static/favicon.ico\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-transforms-post_transforms-missing-reference/conf.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/roots/test-transforms-post_transforms-missing-reference/conf.py__", "embedding": null, "metadata": {"file_path": "tests/roots/test-transforms-post_transforms-missing-reference/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 5}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "nitpicky = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_api_translator.py__Test_the_Sphinx_API_fo_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_api_translator.py__Test_the_Sphinx_API_fo_", "embedding": null, "metadata": {"file_path": "tests/test_api_translator.py", "file_name": "test_api_translator.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 98, "span_ids": ["test_html_with_set_translator_for_man", "test_html_with_set_translator_for_html_", "docstring", "test_html_with_set_translator_for_xml", "test_html_with_set_translator_for_texinfo", "test_html_with_set_translator_for_text", "test_pickle_set_translator_for_pickle", "setup_module", "imports", "test_html_translator", "test_singlehtml_set_translator_for_singlehtml", "test_html_with_set_translator_for_latex", "test_json_set_translator_for_json", "test_html_with_set_translator_for_pseudoxml"], "tokens": 767}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the Sphinx API for translator.\"\"\"\n\nimport sys\n\nimport pytest\n\nfrom sphinx.util import docutils\n\n\n@pytest.fixture(scope='module', autouse=True)\ndef setup_module(rootdir):\n p = rootdir / 'test-api-set-translator'\n sys.path.insert(0, p)\n yield\n sys.path.remove(p)\n\n\n@pytest.mark.sphinx('html')\ndef test_html_translator(app, status, warning):\n # no set_translator()\n translator_class = app.builder.get_translator_class()\n assert translator_class\n if docutils.__version_info__ < (0, 13):\n assert translator_class.__name__ == 'HTMLTranslator'\n else:\n assert translator_class.__name__ == 'HTML5Translator'\n\n\n@pytest.mark.sphinx('html', testroot='api-set-translator')\ndef test_html_with_set_translator_for_html_(app, status, warning):\n # use set_translator()\n translator_class = app.builder.get_translator_class()\n assert translator_class\n assert translator_class.__name__ == 'ConfHTMLTranslator'\n\n\n@pytest.mark.sphinx('singlehtml', testroot='api-set-translator')\ndef test_singlehtml_set_translator_for_singlehtml(app, status, warning):\n translator_class = app.builder.get_translator_class()\n assert translator_class\n assert translator_class.__name__ == 'ConfSingleHTMLTranslator'\n\n\n@pytest.mark.sphinx('pickle', testroot='api-set-translator')\ndef test_pickle_set_translator_for_pickle(app, status, warning):\n translator_class = app.builder.get_translator_class()\n assert translator_class\n assert translator_class.__name__ == 'ConfPickleTranslator'\n\n\n@pytest.mark.sphinx('json', testroot='api-set-translator')\ndef test_json_set_translator_for_json(app, status, warning):\n translator_class = app.builder.get_translator_class()\n assert translator_class\n assert translator_class.__name__ == 'ConfJsonTranslator'\n\n\n@pytest.mark.sphinx('latex', testroot='api-set-translator')\ndef test_html_with_set_translator_for_latex(app, status, warning):\n translator_class = app.builder.get_translator_class()\n assert translator_class\n assert translator_class.__name__ == 'ConfLaTeXTranslator'\n\n\n@pytest.mark.sphinx('man', testroot='api-set-translator')\ndef test_html_with_set_translator_for_man(app, status, warning):\n translator_class = app.builder.get_translator_class()\n assert translator_class\n assert translator_class.__name__ == 'ConfManualPageTranslator'\n\n\n@pytest.mark.sphinx('texinfo', testroot='api-set-translator')\ndef test_html_with_set_translator_for_texinfo(app, status, warning):\n translator_class = app.builder.get_translator_class()\n assert translator_class\n assert translator_class.__name__ == 'ConfTexinfoTranslator'\n\n\n@pytest.mark.sphinx('text', testroot='api-set-translator')\ndef test_html_with_set_translator_for_text(app, status, warning):\n translator_class = app.builder.get_translator_class()\n assert translator_class\n assert translator_class.__name__ == 'ConfTextTranslator'\n\n\n@pytest.mark.sphinx('xml', testroot='api-set-translator')\ndef test_html_with_set_translator_for_xml(app, status, warning):\n translator_class = app.builder.get_translator_class()\n assert translator_class\n assert translator_class.__name__ == 'ConfXMLTranslator'\n\n\n@pytest.mark.sphinx('pseudoxml', testroot='api-set-translator')\ndef test_html_with_set_translator_for_pseudoxml(app, status, warning):\n translator_class = app.builder.get_translator_class()\n assert translator_class\n assert translator_class.__name__ == 'ConfPseudoXMLTranslator'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py__Test_the_Sphinx_class__test_events.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_application.py__Test_the_Sphinx_class__test_events.None_3", "embedding": null, "metadata": {"file_path": "tests/test_application.py", "file_name": "test_application.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 35, "span_ids": ["test_events", "docstring", "imports"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the Sphinx class.\"\"\"\n\nfrom unittest.mock import Mock\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx.errors import ExtensionError\nfrom sphinx.testing.util import strip_escseq\nfrom sphinx.util import logging\n\n\ndef test_events(app, status, warning):\n def empty():\n pass\n with pytest.raises(ExtensionError) as excinfo:\n app.connect(\"invalid\", empty)\n assert \"Unknown event name: invalid\" in str(excinfo.value)\n\n app.add_event(\"my_event\")\n with pytest.raises(ExtensionError) as excinfo:\n app.add_event(\"my_event\")\n assert \"Event 'my_event' already present\" in str(excinfo.value)\n\n def mock_callback(a_app, *args):\n assert a_app is app\n assert emit_args == args\n return \"ret\"\n emit_args = (1, 3, \"string\")\n listener_id = app.connect(\"my_event\", mock_callback)\n assert app.emit(\"my_event\", *emit_args) == [\"ret\"], \"Callback not called\"\n\n app.disconnect(listener_id)\n assert app.emit(\"my_event\", *emit_args) == [], \\\n \"Callback called when disconnected\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py__Test_all_builders__nonascii_srcdir.return.srcdir": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py__Test_all_builders__nonascii_srcdir.return.srcdir", "embedding": null, "metadata": {"file_path": "tests/test_build.py", "file_name": "test_build.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 48, "span_ids": ["nonascii_srcdir", "request_session_head", "docstring", "imports"], "tokens": 360}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test all builders.\"\"\"\n\nimport sys\nfrom textwrap import dedent\nfrom unittest import mock\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx.errors import SphinxError\n\n\ndef request_session_head(url, **kwargs):\n response = mock.Mock()\n response.status_code = 200\n response.url = url\n return response\n\n\n@pytest.fixture\ndef nonascii_srcdir(request, rootdir, sphinx_test_tempdir):\n # If supported, build in a non-ASCII source dir\n test_name = '\\u65e5\\u672c\\u8a9e'\n basedir = sphinx_test_tempdir / request.node.originalname\n try:\n srcdir = basedir / test_name\n if not srcdir.exists():\n (rootdir / 'test-root').copytree(srcdir)\n except UnicodeEncodeError:\n # Now Python 3.7+ follows PEP-540 and uses utf-8 encoding for filesystem by default.\n # So this error handling will be no longer used (after dropping python 3.6 support).\n srcdir = basedir / 'all'\n if not srcdir.exists():\n (rootdir / 'test-root').copytree(srcdir)\n else:\n # add a doc with a non-ASCII file name to the source dir\n (srcdir / (test_name + '.txt')).write_text(dedent(\"\"\"\n nonascii file name page\n =======================\n \"\"\"))\n\n root_doc = srcdir / 'index.txt'\n root_doc.write_text(root_doc.read_text() + dedent(\"\"\"\n .. toctree::\n\n %(test_name)s/%(test_name)s\n \"\"\" % {'test_name': test_name}))\n return srcdir", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py_test_root_doc_not_found_test_numbered_circular_toctree.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build.py_test_root_doc_not_found_test_numbered_circular_toctree.None_1", "embedding": null, "metadata": {"file_path": "tests/test_build.py", "file_name": "test_build.py", "file_type": "text/x-python", "category": "test", "start_line": 65, "end_line": 95, "span_ids": ["test_root_doc_not_found", "test_numbered_circular_toctree", "test_circular_toctree"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_root_doc_not_found(tempdir, make_app):\n (tempdir / 'conf.py').write_text('')\n assert tempdir.listdir() == ['conf.py']\n\n app = make_app('dummy', srcdir=tempdir)\n with pytest.raises(SphinxError):\n app.builder.build_all() # no index.rst\n\n\n@pytest.mark.sphinx(buildername='text', testroot='circular')\ndef test_circular_toctree(app, status, warning):\n app.builder.build_all()\n warnings = warning.getvalue()\n assert (\n 'circular toctree references detected, ignoring: '\n 'sub <- index <- sub') in warnings\n assert (\n 'circular toctree references detected, ignoring: '\n 'index <- sub <- index') in warnings\n\n\n@pytest.mark.sphinx(buildername='text', testroot='numbered-circular')\ndef test_numbered_circular_toctree(app, status, warning):\n app.builder.build_all()\n warnings = warning.getvalue()\n assert (\n 'circular toctree references detected, ignoring: '\n 'sub <- index <- sub') in warnings\n assert (\n 'circular toctree references detected, ignoring: '\n 'index <- sub <- index') in warnings", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_changes.py__Test_the_ChangesBuilde_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_changes.py__Test_the_ChangesBuilde_", "embedding": null, "metadata": {"file_path": "tests/test_build_changes.py", "file_name": "test_build_changes.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 35, "span_ids": ["docstring", "imports", "test_no_changes", "test_build"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the ChangesBuilder class.\"\"\"\n\nimport pytest\n\n\n@pytest.mark.sphinx('changes', testroot='changes')\ndef test_build(app):\n app.build()\n\n # TODO: Use better checking of html content\n htmltext = (app.outdir / 'changes.html').read_text()\n assert 'New in version 0.6: Some funny stuff.' in htmltext\n assert 'Changed in version 0.6: Even more funny stuff.' in htmltext\n assert 'Deprecated since version 0.6: Boring stuff.' in htmltext\n\n path_html = (\n '<b>Path</b>: <i>deprecated:</i> Deprecated since version 0.6:'\n ' So, that was a bad idea it turns out.')\n assert path_html in htmltext\n\n malloc_html = (\n '<b>void *Test_Malloc(size_t n)</b>: <i>changed:</i> Changed in version 0.6:'\n ' Can now be replaced with a different allocator.</a>')\n assert malloc_html in htmltext\n\n\n@pytest.mark.sphinx(\n 'changes', testroot='changes', srcdir='changes-none',\n confoverrides={'version': '0.7', 'release': '0.7b1'})\ndef test_no_changes(app, status):\n app.build()\n\n assert 'no changes in version 0.7.' in status.getvalue()\n assert not (app.outdir / 'changes.html').exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_dirhtml.py__Test_dirhtml_builder__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_dirhtml.py__Test_dirhtml_builder__", "embedding": null, "metadata": {"file_path": "tests/test_build_dirhtml.py", "file_name": "test_build_dirhtml.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 41, "span_ids": ["docstring", "imports", "test_dirhtml"], "tokens": 390}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test dirhtml builder.\"\"\"\n\nimport posixpath\n\nimport pytest\n\nfrom sphinx.util.inventory import InventoryFile\n\n\n@pytest.mark.sphinx(buildername='dirhtml', testroot='builder-dirhtml')\ndef test_dirhtml(app, status, warning):\n app.build()\n\n assert (app.outdir / 'index.html').exists()\n assert (app.outdir / 'foo/index.html').exists()\n assert (app.outdir / 'foo/foo_1/index.html').exists()\n assert (app.outdir / 'foo/foo_2/index.html').exists()\n assert (app.outdir / 'bar/index.html').exists()\n\n content = (app.outdir / 'index.html').read_text()\n assert 'href=\"foo/\"' in content\n assert 'href=\"foo/foo_1/\"' in content\n assert 'href=\"foo/foo_2/\"' in content\n assert 'href=\"bar/\"' in content\n\n # objects.inv (refs: #7095)\n with (app.outdir / 'objects.inv').open('rb') as f:\n invdata = InventoryFile.load(f, 'path/to', posixpath.join)\n\n assert 'index' in invdata.get('std:doc')\n assert ('Python', '', 'path/to/', '-') == invdata['std:doc']['index']\n\n assert 'foo/index' in invdata.get('std:doc')\n assert ('Python', '', 'path/to/foo/', '-') == invdata['std:doc']['foo/index']\n\n assert 'index' in invdata.get('std:label')\n assert ('Python', '', 'path/to/#index', '-') == invdata['std:label']['index']\n\n assert 'foo' in invdata.get('std:label')\n assert ('Python', '', 'path/to/foo/#foo', 'foo/index') == invdata['std:label']['foo']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py__Test_the_HTML_builder__EPUBElementTree.__iter__.for_child_in_self_tree_.yield_self___class___chil": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_epub.py__Test_the_HTML_builder__EPUBElementTree.__iter__.for_child_in_self_tree_.yield_self___class___chil", "embedding": null, "metadata": {"file_path": "tests/test_build_epub.py", "file_name": "test_build_epub.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 54, "span_ids": ["runnable", "docstring", "EPUBElementTree.find", "EPUBElementTree", "EPUBElementTree.findall", "EPUBElementTree.__getattr__", "imports", "EPUBElementTree.__iter__", "EPUBElementTree.fromstring"], "tokens": 393}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the HTML builder and check output against XPath.\"\"\"\n\nimport os\nimport subprocess\nfrom subprocess import PIPE, CalledProcessError\nfrom xml.etree import ElementTree\n\nimport pytest\n\n\n# check given command is runnable\ndef runnable(command):\n try:\n subprocess.run(command, stdout=PIPE, stderr=PIPE, check=True)\n return True\n except (OSError, CalledProcessError):\n return False # command not found or exit with non-zero\n\n\nclass EPUBElementTree:\n \"\"\"Test helper for content.opf and toc.ncx\"\"\"\n namespaces = {\n 'idpf': 'http://www.idpf.org/2007/opf',\n 'dc': 'http://purl.org/dc/elements/1.1/',\n 'ibooks': 'http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/',\n 'ncx': 'http://www.daisy.org/z3986/2005/ncx/',\n 'xhtml': 'http://www.w3.org/1999/xhtml',\n 'epub': 'http://www.idpf.org/2007/ops'\n }\n\n def __init__(self, tree):\n self.tree = tree\n\n @classmethod\n def fromstring(cls, string):\n return cls(ElementTree.fromstring(string))\n\n def find(self, match):\n ret = self.tree.find(match, namespaces=self.namespaces)\n if ret is not None:\n return self.__class__(ret)\n else:\n return ret\n\n def findall(self, match):\n ret = self.tree.findall(match, namespaces=self.namespaces)\n return [self.__class__(e) for e in ret]\n\n def __getattr__(self, name):\n return getattr(self.tree, name)\n\n def __iter__(self):\n for child in self.tree:\n yield self.__class__(child)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py__Test_the_build_process_test_build_gettext.assert_msgid_something_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_gettext.py__Test_the_build_process_test_build_gettext.assert_msgid_something_", "embedding": null, "metadata": {"file_path": "tests/test_build_gettext.py", "file_name": "test_build_gettext.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 27, "span_ids": ["test_build_gettext", "docstring", "imports"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the build process with gettext builder with the test root.\"\"\"\n\nimport gettext\nimport os\nimport re\nimport subprocess\nfrom subprocess import PIPE, CalledProcessError\n\nimport pytest\n\nfrom sphinx.util.osutil import cd\n\n\n@pytest.mark.sphinx('gettext', srcdir='root-gettext')\ndef test_build_gettext(app):\n # Generic build; should fail only when the builder is horribly broken.\n app.builder.build_all()\n\n # Do messages end up in the correct location?\n # top-level documents end up in a message catalog\n assert (app.outdir / 'extapi.pot').isfile()\n # directory items are grouped into sections\n assert (app.outdir / 'subdir.pot').isfile()\n\n # regression test for issue #960\n catalog = (app.outdir / 'markup.pot').read_text()\n assert 'msgid \"something, something else, something more\"' in catalog", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py__Test_the_HTML_builder__tail_check.return.checker": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py__Test_the_HTML_builder__tail_check.return.checker", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 82, "span_ids": ["flat_dict", "impl", "docstring", "cached_etree_parse", "imports", "tail_check"], "tokens": 648}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the HTML builder and check output against XPath.\"\"\"\n\nimport os\nimport re\nfrom itertools import chain, cycle\nfrom unittest.mock import ANY, call, patch\n\nimport pygments\nimport pytest\nfrom html5lib import HTMLParser\nfrom packaging import version\n\nfrom sphinx.builders.html import validate_html_extra_path, validate_html_static_path\nfrom sphinx.errors import ConfigError\nfrom sphinx.testing.util import strip_escseq\nfrom sphinx.util import docutils, md5\nfrom sphinx.util.inventory import InventoryFile\n\nif docutils.__version_info__ < (0, 17):\n FIGURE_CAPTION = \".//div[@class='figure align-default']/p[@class='caption']\"\nelse:\n FIGURE_CAPTION = \".//figure/figcaption/p\"\n\n\nPYGMENTS_VERSION = version.parse(pygments.__version__).release\n\n\nENV_WARNINGS = \"\"\"\\\n%(root)s/autodoc_fodder.py:docstring of autodoc_fodder.MarkupError:\\\\d+: \\\nWARNING: Explicit markup ends without a blank line; unexpected unindent.\n%(root)s/index.rst:\\\\d+: WARNING: Encoding 'utf-8-sig' used for reading included \\\nfile '%(root)s/wrongenc.inc' seems to be wrong, try giving an :encoding: option\n%(root)s/index.rst:\\\\d+: WARNING: invalid single index entry ''\n%(root)s/index.rst:\\\\d+: WARNING: image file not readable: foo.png\n%(root)s/index.rst:\\\\d+: WARNING: download file not readable: %(root)s/nonexisting.png\n%(root)s/undecodable.rst:\\\\d+: WARNING: undecodable source characters, replacing \\\nwith \"\\\\?\": b?'here: >>>(\\\\\\\\|/)xbb<<<((\\\\\\\\|/)r)?'\n\"\"\"\n\nHTML_WARNINGS = ENV_WARNINGS + \"\"\"\\\n%(root)s/index.rst:\\\\d+: WARNING: unknown option: &option\n%(root)s/index.rst:\\\\d+: WARNING: citation not found: missing\n%(root)s/index.rst:\\\\d+: WARNING: a suitable image for html builder not found: foo.\\\\*\n%(root)s/index.rst:\\\\d+: WARNING: Could not lex literal_block as \"c\". Highlighting skipped.\n\"\"\"\n\n\netree_cache = {}\n\n\n@pytest.fixture(scope='module')\ndef cached_etree_parse():\n def parse(fname):\n if fname in etree_cache:\n return etree_cache[fname]\n with (fname).open('rb') as fp:\n etree = HTMLParser(namespaceHTMLElements=False).parse(fp)\n etree_cache.clear()\n etree_cache[fname] = etree\n return etree\n yield parse\n etree_cache.clear()\n\n\ndef flat_dict(d):\n return chain.from_iterable(\n [\n zip(cycle([fname]), values)\n for fname, values in d.items()\n ]\n )\n\n\ndef tail_check(check):\n rex = re.compile(check)\n\n def checker(nodes):\n for node in nodes:\n if node.tail and rex.search(node.tail):\n return True\n assert False, '%r not found in tail of any nodes %s' % (check, nodes)\n return checker", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_check_xpath_check_xpath.if_callable_check_.else_.assert_False_r_not_fo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_check_xpath_check_xpath.if_callable_check_.else_.assert_False_r_not_fo", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 85, "end_line": 118, "span_ids": ["check_xpath"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check_xpath(etree, fname, path, check, be_found=True):\n nodes = list(etree.findall(path))\n if check is None:\n assert nodes == [], ('found any nodes matching xpath '\n '%r in file %s' % (path, fname))\n return\n else:\n assert nodes != [], ('did not find any node matching xpath '\n '%r in file %s' % (path, fname))\n if callable(check):\n check(nodes)\n elif not check:\n # only check for node presence\n pass\n else:\n def get_text(node):\n if node.text is not None:\n # the node has only one text\n return node.text\n else:\n # the node has tags and text; gather texts just under the node\n return ''.join(n.tail or '' for n in node)\n\n rex = re.compile(check)\n if be_found:\n if any(rex.search(get_text(node)) for node in nodes):\n return\n else:\n if all(not rex.search(get_text(node)) for node in nodes):\n return\n\n assert False, ('%r not found in any node matching '\n 'path %s in %s: %r' % (check, path, fname,\n [node.text for node in nodes]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_warnings_test_html4_output.app_build_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_warnings_test_html4_output.app_build_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 121, "end_line": 135, "span_ids": ["test_html_warnings", "test_html4_output"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='warnings')\ndef test_html_warnings(app, warning):\n app.build()\n html_warnings = strip_escseq(re.sub(re.escape(os.sep) + '{1,2}', '/', warning.getvalue()))\n html_warnings_exp = HTML_WARNINGS % {\n 'root': re.escape(app.srcdir.replace(os.sep, '/'))}\n assert re.match(html_warnings_exp + '$', html_warnings), \\\n 'Warnings don\\'t match:\\n' + \\\n '--- Expected (regex):\\n' + html_warnings_exp + \\\n '--- Got:\\n' + html_warnings\n\n\n@pytest.mark.sphinx('html', confoverrides={'html4_writer': True})\ndef test_html4_output(app, status, warning):\n app.build()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_docutils17_output_test_docutils17_output.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_docutils17_output_test_docutils17_output.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 407, "end_line": 436, "span_ids": ["test_docutils17_output"], "tokens": 550}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(docutils.__version_info__ >= (0, 18), reason='docutils-0.17 or below is required.')\n@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (\".//dt[@class='label']/span[@class='brackets']\", r'Ref1'),\n (\".//dt[@class='label']\", ''),\n ],\n 'footnote.html': [\n (\".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']\", r\"1\"),\n (\".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']\", r\"2\"),\n (\".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']\", r\"3\"),\n (\".//a[@class='reference internal'][@href='#bar'][@id='id4']/span\", r\"\\[bar\\]\"),\n (\".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']/span\", r\"\\[baz_qux\\]\"),\n (\".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']\", r\"4\"),\n (\".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']\", r\"5\"),\n (\".//a[@class='fn-backref'][@href='#id1']\", r\"1\"),\n (\".//a[@class='fn-backref'][@href='#id2']\", r\"2\"),\n (\".//a[@class='fn-backref'][@href='#id3']\", r\"3\"),\n (\".//a[@class='fn-backref'][@href='#id4']\", r\"bar\"),\n (\".//a[@class='fn-backref'][@href='#id5']\", r\"baz_qux\"),\n (\".//a[@class='fn-backref'][@href='#id6']\", r\"4\"),\n (\".//a[@class='fn-backref'][@href='#id7']\", r\"5\"),\n (\".//a[@class='fn-backref'][@href='#id8']\", r\"6\"),\n ],\n}))\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_build_html_output_docutils17')\ndef test_docutils17_output(app, cached_etree_parse, fname, expect):\n app.build()\n print(app.outdir / fname)\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_docutils18_output_test_docutils18_output.check_xpath_cached_etree_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_docutils18_output_test_docutils18_output.check_xpath_cached_etree_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 439, "end_line": 468, "span_ids": ["test_docutils18_output"], "tokens": 563}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(docutils.__version_info__ < (0, 18), reason='docutils-0.18+ is required.')\n@pytest.mark.parametrize(\"fname,expect\", flat_dict({\n 'index.html': [\n (\".//div[@class='citation']/span\", r'Ref1'),\n (\".//div[@class='citation']/span\", r'Ref_1'),\n ],\n 'footnote.html': [\n (\".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']\", r\"1\"),\n (\".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']\", r\"2\"),\n (\".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']\", r\"3\"),\n (\".//a[@class='reference internal'][@href='#bar'][@id='id4']/span\", r\"\\[bar\\]\"),\n (\".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']/span\", r\"\\[baz_qux\\]\"),\n (\".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']\", r\"4\"),\n (\".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']\", r\"5\"),\n (\".//aside[@class='footnote brackets']/span/a[@href='#id1']\", r\"1\"),\n (\".//aside[@class='footnote brackets']/span/a[@href='#id2']\", r\"2\"),\n (\".//aside[@class='footnote brackets']/span/a[@href='#id3']\", r\"3\"),\n (\".//div[@class='citation']/span/a[@href='#id4']\", r\"bar\"),\n (\".//div[@class='citation']/span/a[@href='#id5']\", r\"baz_qux\"),\n (\".//aside[@class='footnote brackets']/span/a[@href='#id6']\", r\"4\"),\n (\".//aside[@class='footnote brackets']/span/a[@href='#id7']\", r\"5\"),\n (\".//aside[@class='footnote brackets']/span/a[@href='#id8']\", r\"6\"),\n ],\n}))\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_build_html_output_docutils18')\ndef test_docutils18_output(app, cached_etree_parse, fname, expect):\n app.build()\n print(app.outdir / fname)\n check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_parallel_test_html_download.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_parallel_test_html_download.None_6", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 471, "end_line": 503, "span_ids": ["test_html_parallel", "test_html_download"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', parallel=2)\ndef test_html_parallel(app):\n app.build()\n\n\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_build_html_output')\ndef test_html_download(app):\n app.build()\n\n # subdir/includes.html\n result = (app.outdir / 'subdir' / 'includes.html').read_text()\n pattern = ('<a class=\"reference download internal\" download=\"\" '\n 'href=\"../(_downloads/.*/img.png)\">')\n matched = re.search(pattern, result)\n assert matched\n assert (app.outdir / matched.group(1)).exists()\n filename = matched.group(1)\n\n # includes.html\n result = (app.outdir / 'includes.html').read_text()\n pattern = ('<a class=\"reference download internal\" download=\"\" '\n 'href=\"(_downloads/.*/img.png)\">')\n matched = re.search(pattern, result)\n assert matched\n assert (app.outdir / matched.group(1)).exists()\n assert matched.group(1) == filename\n\n pattern = ('<a class=\"reference download internal\" download=\"\" '\n 'href=\"(_downloads/.*/)(file_with_special_%23_chars.xyz)\">')\n matched = re.search(pattern, result)\n assert matched\n assert (app.outdir / matched.group(1) / \"file_with_special_#_chars.xyz\").exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_javscript_loading_method_test_javscript_loading_method.assert_script_defer_de": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_javscript_loading_method_test_javscript_loading_method.assert_script_defer_de", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1235, "end_line": 1246, "span_ids": ["test_javscript_loading_method"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='html_assets')\ndef test_javscript_loading_method(app):\n app.add_js_file('normal.js')\n app.add_js_file('early.js', loading_method='async')\n app.add_js_file('late.js', loading_method='defer')\n\n app.builder.build_all()\n content = (app.outdir / 'index.html').read_text()\n\n assert '<script src=\"_static/normal.js\"></script>' in content\n assert '<script async=\"async\" src=\"_static/early.js\"></script>' in content\n assert '<script defer=\"defer\" src=\"_static/late.js\"></script>' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_anchor_for_figure_test_html_anchor_for_figure.if_docutils___version_inf.else_.assert_figcaption_n_p": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_anchor_for_figure_test_html_anchor_for_figure.if_docutils___version_inf.else_.assert_figcaption_n_p", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1316, "end_line": 1327, "span_ids": ["test_html_anchor_for_figure"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='images', confoverrides={'html_sourcelink_suffix': ''})\ndef test_html_anchor_for_figure(app):\n app.builder.build_all()\n content = (app.outdir / 'index.html').read_text()\n if docutils.__version_info__ < (0, 17):\n assert ('<p class=\"caption\"><span class=\"caption-text\">The caption of pic</span>'\n '<a class=\"headerlink\" href=\"#id1\" title=\"Permalink to this image\">\u00b6</a></p>'\n in content)\n else:\n assert ('<figcaption>\\n<p><span class=\"caption-text\">The caption of pic</span>'\n '<a class=\"headerlink\" href=\"#id1\" title=\"Permalink to this image\">\u00b6</a></p>\\n</figcaption>'\n in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_remote_logo_test_html_local_logo.assert_app_outdir__st": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_remote_logo_test_html_local_logo.assert_app_outdir__st", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1393, "end_line": 1409, "span_ids": ["test_html_remote_logo", "test_html_local_logo"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='remote-logo')\ndef test_html_remote_logo(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'index.html').read_text()\n assert ('<img class=\"logo\" src=\"https://www.python.org/static/img/python-logo.png\" alt=\"Logo\"/>' in result)\n assert ('<link rel=\"shortcut icon\" href=\"https://www.python.org/static/favicon.ico\"/>' in result)\n assert not (app.outdir / 'python-logo.png').exists()\n\n\n@pytest.mark.sphinx('html', testroot='local-logo')\ndef test_html_local_logo(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'index.html').read_text()\n assert ('<img class=\"logo\" src=\"_static/img.png\" alt=\"Logo\"/>' in result)\n assert (app.outdir / '_static/img.png').exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_codeblock_linenos_style_table_test_html_codeblock_linenos_style_table.if_PYGMENTS_VERSION_2.else_.assert_div_class_linen": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_codeblock_linenos_style_table_test_html_codeblock_linenos_style_table.if_PYGMENTS_VERSION_2.else_.assert_div_class_linen", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1627, "end_line": 1639, "span_ids": ["test_html_codeblock_linenos_style_table"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='reST-code-block',\n confoverrides={'html_codeblock_linenos_style': 'table'})\ndef test_html_codeblock_linenos_style_table(app):\n app.build()\n content = (app.outdir / 'index.html').read_text()\n\n if PYGMENTS_VERSION >= (2, 8):\n assert ('<div class=\"linenodiv\"><pre><span class=\"normal\">1</span>\\n'\n '<span class=\"normal\">2</span>\\n'\n '<span class=\"normal\">3</span>\\n'\n '<span class=\"normal\">4</span></pre></div>') in content\n else:\n assert '<div class=\"linenodiv\"><pre>1\\n2\\n3\\n4</pre></div>' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_codeblock_linenos_style_inline_test_html_codeblock_linenos_style_inline.if_PYGMENTS_VERSION_2_.else_.assert_span_class_line": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_codeblock_linenos_style_inline_test_html_codeblock_linenos_style_inline.if_PYGMENTS_VERSION_2_.else_.assert_span_class_line", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1642, "end_line": 1651, "span_ids": ["test_html_codeblock_linenos_style_inline"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='reST-code-block',\n confoverrides={'html_codeblock_linenos_style': 'inline'})\ndef test_html_codeblock_linenos_style_inline(app):\n app.build()\n content = (app.outdir / 'index.html').read_text()\n\n if PYGMENTS_VERSION > (2, 7):\n assert '<span class=\"linenos\">1</span>' in content\n else:\n assert '<span class=\"lineno\">1 </span>' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_highlight_options_old_test_html_permalink_disable.assert_h1_The_basic_Sph": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_highlight_options_old_test_html_permalink_disable.assert_h1_The_basic_Sph", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1670, "end_line": 1693, "span_ids": ["test_highlight_options_old", "test_html_permalink_disable"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='highlight_options',\n confoverrides={'highlight_options': {'default_option': True}})\ndef test_highlight_options_old(app):\n subject = app.builder.highlighter\n with patch.object(subject, 'highlight_block', wraps=subject.highlight_block) as highlight:\n app.build()\n\n call_args = highlight.call_args_list\n assert len(call_args) == 3\n assert call_args[0] == call(ANY, 'default', force=False, linenos=False,\n location=ANY, opts={'default_option': True})\n assert call_args[1] == call(ANY, 'python', force=False, linenos=False,\n location=ANY, opts={})\n assert call_args[2] == call(ANY, 'java', force=False, linenos=False,\n location=ANY, opts={})\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'html_permalinks': False})\ndef test_html_permalink_disable(app):\n app.build()\n content = (app.outdir / 'index.html').read_text()\n\n assert '<h1>The basic Sphinx documentation for testing</h1>' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_permalink_icon_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_html.py_test_html_permalink_icon_", "embedding": null, "metadata": {"file_path": "tests/test_build_html.py", "file_name": "test_build_html.py", "file_type": "text/x-python", "category": "test", "start_line": 1696, "end_line": 1713, "span_ids": ["test_html_signaturereturn_icon", "test_html_permalink_icon"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'html_permalinks_icon': '<span>[PERMALINK]</span>'})\ndef test_html_permalink_icon(app):\n app.build()\n content = (app.outdir / 'index.html').read_text()\n\n assert ('<h1>The basic Sphinx documentation for testing<a class=\"headerlink\" '\n 'href=\"#the-basic-sphinx-documentation-for-testing\" '\n 'title=\"Permalink to this heading\"><span>[PERMALINK]</span></a></h1>' in content)\n\n\n@pytest.mark.sphinx('html', testroot='html_signaturereturn_icon')\ndef test_html_signaturereturn_icon(app):\n app.build()\n content = (app.outdir / 'index.html').read_text()\n\n assert ('<span class=\"sig-return-icon\">→</span>' in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py__Test_the_build_process_kpsetest.try_.except_OSError_CalledPr._command_not_found_or_ex": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py__Test_the_build_process_kpsetest.try_.except_OSError_CalledPr._command_not_found_or_ex", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 41, "span_ids": ["impl", "docstring", "imports", "kpsetest"], "tokens": 388}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the build process with LaTeX builder with the test root.\"\"\"\n\nimport os\nimport re\nimport subprocess\nfrom itertools import product\nfrom shutil import copyfile\nfrom subprocess import PIPE, CalledProcessError\n\nimport pytest\n\nfrom sphinx.builders.latex import default_latex_documents\nfrom sphinx.config import Config\nfrom sphinx.errors import SphinxError\nfrom sphinx.testing.util import strip_escseq\nfrom sphinx.util.osutil import cd, ensuredir\nfrom sphinx.writers.latex import LaTeXTranslator\n\nfrom .test_build_html import ENV_WARNINGS\n\nLATEX_ENGINES = ['pdflatex', 'lualatex', 'xelatex']\nDOCCLASSES = ['howto', 'manual']\nSTYLEFILES = ['article.cls', 'fancyhdr.sty', 'titlesec.sty', 'amsmath.sty',\n 'framed.sty', 'color.sty', 'fancyvrb.sty',\n 'fncychap.sty', 'geometry.sty', 'kvoptions.sty', 'hyperref.sty']\n\nLATEX_WARNINGS = ENV_WARNINGS + \"\"\"\\\n%(root)s/index.rst:\\\\d+: WARNING: unknown option: &option\n%(root)s/index.rst:\\\\d+: WARNING: citation not found: missing\n%(root)s/index.rst:\\\\d+: WARNING: a suitable image for latex builder not found: foo.\\\\*\n%(root)s/index.rst:\\\\d+: WARNING: Could not lex literal_block as \"c\". Highlighting skipped.\n\"\"\"\n\n\n# only run latex if all needed packages are there\ndef kpsetest(*filenames):\n try:\n subprocess.run(['kpsewhich'] + list(filenames), stdout=PIPE, stderr=PIPE, check=True)\n return True\n except (OSError, CalledProcessError):\n return False # command not found or exit with non-zero", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_footnote_referred_multiple_times_test_footnote_referred_multiple_times.assert_Named_footnote_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_footnote_referred_multiple_times_test_footnote_referred_multiple_times.assert_Named_footnote_", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 790, "end_line": 807, "span_ids": ["test_footnote_referred_multiple_times"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='footnotes')\ndef test_footnote_referred_multiple_times(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n\n assert ('Explicitly numbered footnote: \\\\sphinxstepexplicit %\\n'\n '\\\\begin{footnote}[100]\\\\phantomsection\\\\label{\\\\thesphinxscope.100}%\\n'\n '\\\\sphinxAtStartFootnote\\nNumbered footnote\\n%\\n'\n '\\\\end{footnote} \\\\sphinxfootnotemark[100]\\n'\n in result)\n assert ('Named footnote: \\\\sphinxstepexplicit %\\n'\n '\\\\begin{footnote}[13]\\\\phantomsection\\\\label{\\\\thesphinxscope.13}%\\n'\n '\\\\sphinxAtStartFootnote\\nNamed footnote\\n%\\n'\n '\\\\end{footnote} \\\\sphinxfootnotemark[13]\\n'\n in result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_inline_test_latex_show_urls_is_inline.assert_sphinxlineitem": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_inline_test_latex_show_urls_is_inline.assert_sphinxlineitem", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 810, "end_line": 850, "span_ids": ["test_latex_show_urls_is_inline"], "tokens": 708}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='footnotes',\n confoverrides={'latex_show_urls': 'inline'})\ndef test_latex_show_urls_is_inline(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert ('Same footnote number %\\n'\n '\\\\begin{footnote}[1]\\\\sphinxAtStartFootnote\\n'\n 'footnote in bar\\n%\\n\\\\end{footnote} in bar.rst') in result\n assert ('Auto footnote number %\\n\\\\begin{footnote}[1]\\\\sphinxAtStartFootnote\\n'\n 'footnote in baz\\n%\\n\\\\end{footnote} in baz.rst') in result\n assert ('\\\\phantomsection\\\\label{\\\\detokenize{index:id38}}'\n '{\\\\hyperref[\\\\detokenize{index:the-section'\n '-with-a-reference-to-authoryear}]'\n '{\\\\sphinxcrossref{The section with a reference to '\n '\\\\sphinxcite{index:authoryear}}}}') in result\n assert ('\\\\phantomsection\\\\label{\\\\detokenize{index:id39}}'\n '{\\\\hyperref[\\\\detokenize{index:the-section-with-a-reference-to}]'\n '{\\\\sphinxcrossref{The section with a reference to }}}' in result)\n assert ('First footnote: %\\n\\\\begin{footnote}[2]\\\\sphinxAtStartFootnote\\n'\n 'First\\n%\\n\\\\end{footnote}') in result\n assert ('Second footnote: %\\n'\n '\\\\begin{footnote}[1]\\\\sphinxAtStartFootnote\\n'\n 'Second\\n%\\n\\\\end{footnote}\\n') in result\n assert '\\\\sphinxhref{http://sphinx-doc.org/}{Sphinx} (http://sphinx\\\\sphinxhyphen{}doc.org/)' in result\n assert ('Third footnote: %\\n\\\\begin{footnote}[3]\\\\sphinxAtStartFootnote\\n'\n 'Third \\\\sphinxfootnotemark[4]\\n%\\n\\\\end{footnote}%\\n'\n '\\\\begin{footnotetext}[4]'\n '\\\\phantomsection\\\\label{\\\\thesphinxscope.4}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'Footnote inside footnote\\n%\\n\\\\end{footnotetext}\\\\ignorespaces') in result\n assert ('Fourth footnote: %\\n\\\\begin{footnote}[5]\\\\sphinxAtStartFootnote\\n'\n 'Fourth\\n%\\n\\\\end{footnote}\\n') in result\n assert ('\\\\sphinxhref{http://sphinx-doc.org/~test/}{URL including tilde} '\n '(http://sphinx\\\\sphinxhyphen{}doc.org/\\\\textasciitilde{}test/)') in result\n assert ('\\\\sphinxlineitem{\\\\sphinxhref{http://sphinx-doc.org/}{URL in term} '\n '(http://sphinx\\\\sphinxhyphen{}doc.org/)}\\n'\n '\\\\sphinxAtStartPar\\nDescription' in result)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_inline.None_11_test_latex_show_urls_is_inline.assert_begin_savenotes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_inline.None_11_test_latex_show_urls_is_inline.assert_begin_savenotes", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 851, "end_line": 862, "span_ids": ["test_latex_show_urls_is_inline"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='footnotes',\n confoverrides={'latex_show_urls': 'inline'})\ndef test_latex_show_urls_is_inline(app, status, warning):\n # ... other code\n assert ('\\\\sphinxlineitem{Footnote in term \\\\sphinxfootnotemark[7]}%\\n'\n '\\\\begin{footnotetext}[7]\\\\phantomsection\\\\label{\\\\thesphinxscope.7}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'Footnote in term\\n%\\n\\\\end{footnotetext}\\\\ignorespaces '\n '\\n\\\\sphinxAtStartPar\\nDescription') in result\n assert ('\\\\sphinxlineitem{\\\\sphinxhref{http://sphinx-doc.org/}{Term in deflist} '\n '(http://sphinx\\\\sphinxhyphen{}doc.org/)}'\n '\\n\\\\sphinxAtStartPar\\nDescription') in result\n assert '\\\\sphinxurl{https://github.com/sphinx-doc/sphinx}\\n' in result\n assert ('\\\\sphinxhref{mailto:sphinx-dev@googlegroups.com}'\n '{sphinx\\\\sphinxhyphen{}dev@googlegroups.com}') in result\n assert '\\\\begin{savenotes}\\\\begin{fulllineitems}' not in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_footnote_test_latex_show_urls_is_footnote.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_footnote_test_latex_show_urls_is_footnote.None_9", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 865, "end_line": 905, "span_ids": ["test_latex_show_urls_is_footnote"], "tokens": 703}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='footnotes',\n confoverrides={'latex_show_urls': 'footnote'})\ndef test_latex_show_urls_is_footnote(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert ('Same footnote number %\\n'\n '\\\\begin{footnote}[1]\\\\sphinxAtStartFootnote\\n'\n 'footnote in bar\\n%\\n\\\\end{footnote} in bar.rst') in result\n assert ('Auto footnote number %\\n\\\\begin{footnote}[2]\\\\sphinxAtStartFootnote\\n'\n 'footnote in baz\\n%\\n\\\\end{footnote} in baz.rst') in result\n assert ('\\\\phantomsection\\\\label{\\\\detokenize{index:id38}}'\n '{\\\\hyperref[\\\\detokenize{index:the-section-with-a-reference-to-authoryear}]'\n '{\\\\sphinxcrossref{The section with a reference '\n 'to \\\\sphinxcite{index:authoryear}}}}') in result\n assert ('\\\\phantomsection\\\\label{\\\\detokenize{index:id39}}'\n '{\\\\hyperref[\\\\detokenize{index:the-section-with-a-reference-to}]'\n '{\\\\sphinxcrossref{The section with a reference to }}}') in result\n assert ('First footnote: %\\n\\\\begin{footnote}[3]\\\\sphinxAtStartFootnote\\n'\n 'First\\n%\\n\\\\end{footnote}') in result\n assert ('Second footnote: %\\n'\n '\\\\begin{footnote}[1]\\\\sphinxAtStartFootnote\\n'\n 'Second\\n%\\n\\\\end{footnote}') in result\n assert ('\\\\sphinxhref{http://sphinx-doc.org/}{Sphinx}'\n '%\\n\\\\begin{footnote}[4]\\\\sphinxAtStartFootnote\\n'\n '\\\\sphinxnolinkurl{http://sphinx-doc.org/}\\n%\\n\\\\end{footnote}') in result\n assert ('Third footnote: %\\n\\\\begin{footnote}[6]\\\\sphinxAtStartFootnote\\n'\n 'Third \\\\sphinxfootnotemark[7]\\n%\\n\\\\end{footnote}%\\n'\n '\\\\begin{footnotetext}[7]'\n '\\\\phantomsection\\\\label{\\\\thesphinxscope.7}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'Footnote inside footnote\\n%\\n'\n '\\\\end{footnotetext}\\\\ignorespaces') in result\n assert ('Fourth footnote: %\\n\\\\begin{footnote}[8]\\\\sphinxAtStartFootnote\\n'\n 'Fourth\\n%\\n\\\\end{footnote}\\n') in result\n assert ('\\\\sphinxhref{http://sphinx-doc.org/~test/}{URL including tilde}'\n '%\\n\\\\begin{footnote}[5]\\\\sphinxAtStartFootnote\\n'\n '\\\\sphinxnolinkurl{http://sphinx-doc.org/~test/}\\n%\\n\\\\end{footnote}') in result\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_footnote.assert_sphinxlineitem_test_latex_show_urls_is_footnote.assert_begin_savenotes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_footnote.assert_sphinxlineitem_test_latex_show_urls_is_footnote.assert_begin_savenotes", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 906, "end_line": 926, "span_ids": ["test_latex_show_urls_is_footnote"], "tokens": 474}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='footnotes',\n confoverrides={'latex_show_urls': 'footnote'})\ndef test_latex_show_urls_is_footnote(app, status, warning):\n # ... other code\n assert ('\\\\sphinxlineitem{\\\\sphinxhref{http://sphinx-doc.org/}'\n '{URL in term}\\\\sphinxfootnotemark[10]}%\\n'\n '\\\\begin{footnotetext}[10]\\\\phantomsection\\\\label{\\\\thesphinxscope.10}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n '\\\\sphinxnolinkurl{http://sphinx-doc.org/}\\n%\\n'\n '\\\\end{footnotetext}\\\\ignorespaces \\n\\\\sphinxAtStartPar\\nDescription') in result\n assert ('\\\\sphinxlineitem{Footnote in term \\\\sphinxfootnotemark[12]}%\\n'\n '\\\\begin{footnotetext}[12]\\\\phantomsection\\\\label{\\\\thesphinxscope.12}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'Footnote in term\\n%\\n\\\\end{footnotetext}\\\\ignorespaces '\n '\\n\\\\sphinxAtStartPar\\nDescription') in result\n assert ('\\\\sphinxlineitem{\\\\sphinxhref{http://sphinx-doc.org/}{Term in deflist}'\n '\\\\sphinxfootnotemark[11]}%\\n'\n '\\\\begin{footnotetext}[11]\\\\phantomsection\\\\label{\\\\thesphinxscope.11}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n '\\\\sphinxnolinkurl{http://sphinx-doc.org/}\\n%\\n'\n '\\\\end{footnotetext}\\\\ignorespaces \\n\\\\sphinxAtStartPar\\nDescription') in result\n assert ('\\\\sphinxurl{https://github.com/sphinx-doc/sphinx}\\n' in result)\n assert ('\\\\sphinxhref{mailto:sphinx-dev@googlegroups.com}'\n '{sphinx\\\\sphinxhyphen{}dev@googlegroups.com}\\n') in result\n assert '\\\\begin{savenotes}\\\\begin{fulllineitems}' in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_no_test_latex_show_urls_is_no.None_11": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_no_test_latex_show_urls_is_no.None_11", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 929, "end_line": 971, "span_ids": ["test_latex_show_urls_is_no"], "tokens": 743}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='footnotes',\n confoverrides={'latex_show_urls': 'no'})\ndef test_latex_show_urls_is_no(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'python.tex').read_text()\n print(result)\n print(status.getvalue())\n print(warning.getvalue())\n assert ('Same footnote number %\\n'\n '\\\\begin{footnote}[1]\\\\sphinxAtStartFootnote\\n'\n 'footnote in bar\\n%\\n\\\\end{footnote} in bar.rst') in result\n assert ('Auto footnote number %\\n\\\\begin{footnote}[1]\\\\sphinxAtStartFootnote\\n'\n 'footnote in baz\\n%\\n\\\\end{footnote} in baz.rst') in result\n assert ('\\\\phantomsection\\\\label{\\\\detokenize{index:id38}}'\n '{\\\\hyperref[\\\\detokenize{index:the-section-with-a-reference-to-authoryear}]'\n '{\\\\sphinxcrossref{The section with a reference '\n 'to \\\\sphinxcite{index:authoryear}}}}') in result\n assert ('\\\\phantomsection\\\\label{\\\\detokenize{index:id39}}'\n '{\\\\hyperref[\\\\detokenize{index:the-section-with-a-reference-to}]'\n '{\\\\sphinxcrossref{The section with a reference to }}}' in result)\n assert ('First footnote: %\\n\\\\begin{footnote}[2]\\\\sphinxAtStartFootnote\\n'\n 'First\\n%\\n\\\\end{footnote}') in result\n assert ('Second footnote: %\\n'\n '\\\\begin{footnote}[1]\\\\sphinxAtStartFootnote\\n'\n 'Second\\n%\\n\\\\end{footnote}') in result\n assert '\\\\sphinxhref{http://sphinx-doc.org/}{Sphinx}' in result\n assert ('Third footnote: %\\n\\\\begin{footnote}[3]\\\\sphinxAtStartFootnote\\n'\n 'Third \\\\sphinxfootnotemark[4]\\n%\\n\\\\end{footnote}%\\n'\n '\\\\begin{footnotetext}[4]'\n '\\\\phantomsection\\\\label{\\\\thesphinxscope.4}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'Footnote inside footnote\\n%\\n\\\\end{footnotetext}\\\\ignorespaces') in result\n assert ('Fourth footnote: %\\n\\\\begin{footnote}[5]\\\\sphinxAtStartFootnote\\n'\n 'Fourth\\n%\\n\\\\end{footnote}\\n') in result\n assert '\\\\sphinxhref{http://sphinx-doc.org/~test/}{URL including tilde}' in result\n assert ('\\\\sphinxlineitem{\\\\sphinxhref{http://sphinx-doc.org/}{URL in term}}\\n'\n '\\\\sphinxAtStartPar\\nDescription') in result\n assert ('\\\\sphinxlineitem{Footnote in term \\\\sphinxfootnotemark[7]}%\\n'\n '\\\\begin{footnotetext}[7]\\\\phantomsection\\\\label{\\\\thesphinxscope.7}%\\n'\n '\\\\sphinxAtStartFootnote\\n'\n 'Footnote in term\\n%\\n\\\\end{footnotetext}\\\\ignorespaces '\n '\\n\\\\sphinxAtStartPar\\nDescription') in result\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_no.None_12_test_latex_show_urls_is_no.assert_begin_savenotes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_show_urls_is_no.None_12_test_latex_show_urls_is_no.assert_begin_savenotes", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 972, "end_line": 977, "span_ids": ["test_latex_show_urls_is_no"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(\n 'latex', testroot='footnotes',\n confoverrides={'latex_show_urls': 'no'})\ndef test_latex_show_urls_is_no(app, status, warning):\n # ... other code\n assert ('\\\\sphinxlineitem{\\\\sphinxhref{http://sphinx-doc.org/}{Term in deflist}}'\n '\\n\\\\sphinxAtStartPar\\nDescription') in result\n assert ('\\\\sphinxurl{https://github.com/sphinx-doc/sphinx}\\n' in result)\n assert ('\\\\sphinxhref{mailto:sphinx-dev@googlegroups.com}'\n '{sphinx\\\\sphinxhyphen{}dev@googlegroups.com}\\n') in result\n assert '\\\\begin{savenotes}\\\\begin{fulllineitems}' not in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_glossary_test_latex_glossary.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_latex.py_test_latex_glossary_test_latex_glossary.None_4", "embedding": null, "metadata": {"file_path": "tests/test_build_latex.py", "file_name": "test_build_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1460, "end_line": 1481, "span_ids": ["test_latex_glossary"], "tokens": 428}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('latex', testroot='glossary')\ndef test_latex_glossary(app, status, warning):\n app.builder.build_all()\n\n result = (app.outdir / 'python.tex').read_text()\n assert (r'\\sphinxlineitem{\u00e4hnlich\\index{\u00e4hnlich@\\spxentry{\u00e4hnlich}|spxpagem}'\n r'\\phantomsection'\n r'\\label{\\detokenize{index:term-ahnlich}}}' in result)\n assert (r'\\sphinxlineitem{boson\\index{boson@\\spxentry{boson}|spxpagem}\\phantomsection'\n r'\\label{\\detokenize{index:term-boson}}}' in result)\n assert (r'\\sphinxlineitem{\\sphinxstyleemphasis{fermion}'\n r'\\index{fermion@\\spxentry{fermion}|spxpagem}'\n r'\\phantomsection'\n r'\\label{\\detokenize{index:term-fermion}}}' in result)\n assert (r'\\sphinxlineitem{tauon\\index{tauon@\\spxentry{tauon}|spxpagem}\\phantomsection'\n r'\\label{\\detokenize{index:term-tauon}}}'\n r'\\sphinxlineitem{myon\\index{myon@\\spxentry{myon}|spxpagem}\\phantomsection'\n r'\\label{\\detokenize{index:term-myon}}}'\n r'\\sphinxlineitem{electron\\index{electron@\\spxentry{electron}|spxpagem}\\phantomsection'\n r'\\label{\\detokenize{index:term-electron}}}' in result)\n assert (r'\\sphinxlineitem{\u00fcber\\index{\u00fcber@\\spxentry{\u00fcber}|spxpagem}\\phantomsection'\n r'\\label{\\detokenize{index:term-uber}}}' in result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py__Test_the_build_process_ts_re.re_compile_r_P_ts_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py__Test_the_build_process_ts_re.re_compile_r_P_ts_", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 23, "span_ids": ["impl", "docstring", "imports"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the build process with manpage builder with the test root.\"\"\"\n\nimport http.server\nimport json\nimport re\nimport textwrap\nimport time\nimport wsgiref.handlers\nfrom datetime import datetime\nfrom queue import Queue\nfrom typing import Dict\nfrom unittest import mock\n\nimport pytest\nimport requests\n\nfrom sphinx.builders.linkcheck import HyperlinkAvailabilityCheckWorker, RateLimit\nfrom sphinx.testing.util import strip_escseq\nfrom sphinx.util.console import strip_colors\n\nfrom .utils import CERT_FILE, http_server, https_server\n\nts_re = re.compile(r\".*\\[(?P<ts>.*)\\].*\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_defaults_test_defaults.assert_len_content_splitl": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_defaults_test_defaults.assert_len_content_splitl", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 26, "end_line": 44, "span_ids": ["test_defaults"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck', freshenv=True)\ndef test_defaults(app):\n app.build()\n\n assert (app.outdir / 'output.txt').exists()\n content = (app.outdir / 'output.txt').read_text()\n\n print(content)\n # looking for '#top' and '#does-not-exist' not found should fail\n assert \"Anchor 'top' not found\" in content\n assert \"Anchor 'does-not-exist' not found\" in content\n # looking for non-existent URL should fail\n assert \" Max retries exceeded with url: /doesnotexist\" in content\n # images should fail\n assert \"Not Found for url: https://www.google.com/image.png\" in content\n assert \"Not Found for url: https://www.google.com/image2.png\" in content\n # looking for local file should fail\n assert \"[broken] path/to/notfound\" in content\n assert len(content.splitlines()) == 6", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_follows_redirects_on_HEAD_test_follows_redirects_on_HEAD.assert_warning_getvalue_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_follows_redirects_on_HEAD_test_follows_redirects_on_HEAD.assert_warning_getvalue_", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 245, "end_line": 261, "span_ids": ["test_follows_redirects_on_HEAD"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)\ndef test_follows_redirects_on_HEAD(app, capsys, warning):\n with http_server(make_redirect_handler(support_head=True)):\n app.build()\n stdout, stderr = capsys.readouterr()\n content = (app.outdir / 'output.txt').read_text()\n assert content == (\n \"index.rst:1: [redirected with Found] \"\n \"http://localhost:7777/ to http://localhost:7777/?redirected=1\\n\"\n )\n assert stderr == textwrap.dedent(\n \"\"\"\\\n 127.0.0.1 - - [] \"HEAD / HTTP/1.1\" 302 -\n 127.0.0.1 - - [] \"HEAD /?redirected=1 HTTP/1.1\" 204 -\n \"\"\"\n )\n assert warning.getvalue() == ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_follows_redirects_on_GET_test_follows_redirects_on_GET.assert_warning_getvalue_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_follows_redirects_on_GET_test_follows_redirects_on_GET.assert_warning_getvalue_", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 264, "end_line": 281, "span_ids": ["test_follows_redirects_on_GET"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)\ndef test_follows_redirects_on_GET(app, capsys, warning):\n with http_server(make_redirect_handler(support_head=False)):\n app.build()\n stdout, stderr = capsys.readouterr()\n content = (app.outdir / 'output.txt').read_text()\n assert content == (\n \"index.rst:1: [redirected with Found] \"\n \"http://localhost:7777/ to http://localhost:7777/?redirected=1\\n\"\n )\n assert stderr == textwrap.dedent(\n \"\"\"\\\n 127.0.0.1 - - [] \"HEAD / HTTP/1.1\" 405 -\n 127.0.0.1 - - [] \"GET / HTTP/1.1\" 302 -\n 127.0.0.1 - - [] \"GET /?redirected=1 HTTP/1.1\" 204 -\n \"\"\"\n )\n assert warning.getvalue() == ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_allowed_redirects_test_linkcheck_allowed_redirects.assert_len_warning_getval": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_allowed_redirects_test_linkcheck_allowed_redirects.assert_len_warning_getval", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 284, "end_line": 302, "span_ids": ["test_linkcheck_allowed_redirects"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver-warn-redirects',\n freshenv=True, confoverrides={\n 'linkcheck_allowed_redirects': {'http://localhost:7777/.*1': '.*'}\n })\ndef test_linkcheck_allowed_redirects(app, warning):\n with http_server(make_redirect_handler(support_head=False)):\n app.build()\n\n with open(app.outdir / 'output.json') as fp:\n records = [json.loads(l) for l in fp.readlines()]\n\n assert len(records) == 2\n result = {r[\"uri\"]: r[\"status\"] for r in records}\n assert result[\"http://localhost:7777/path1\"] == \"working\"\n assert result[\"http://localhost:7777/path2\"] == \"redirected\"\n\n assert (\"index.rst:1: WARNING: redirect http://localhost:7777/path2 - with Found to \"\n \"http://localhost:7777/?redirected=1\\n\" in strip_escseq(warning.getvalue()))\n assert len(warning.getvalue().splitlines()) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_FakeResponse_ConnectionResetHandler.do_GET.self_end_headers_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_FakeResponse_ConnectionResetHandler.do_GET.self_end_headers_", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 549, "end_line": 602, "span_ids": ["test_limit_rate_clips_wait_time_to_max_time", "ConnectionResetHandler.do_GET", "test_limit_rate_bails_out_after_waiting_max_time", "ConnectionResetHandler", "test_limit_rate_default_sleep", "ConnectionResetHandler.do_HEAD", "FakeResponse", "test_limit_rate_user_max_delay", "test_limit_rate_doubles_previous_wait_time"], "tokens": 469}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FakeResponse:\n headers = {} # type: Dict[str, str]\n url = \"http://localhost/\"\n\n\ndef test_limit_rate_default_sleep(app):\n worker = HyperlinkAvailabilityCheckWorker(app.env, app.config, Queue(), Queue(), {})\n with mock.patch('time.time', return_value=0.0):\n next_check = worker.limit_rate(FakeResponse())\n assert next_check == 60.0\n\n\ndef test_limit_rate_user_max_delay(app):\n app.config.linkcheck_rate_limit_timeout = 0.0\n worker = HyperlinkAvailabilityCheckWorker(app.env, app.config, Queue(), Queue(), {})\n next_check = worker.limit_rate(FakeResponse())\n assert next_check is None\n\n\ndef test_limit_rate_doubles_previous_wait_time(app):\n rate_limits = {\"localhost\": RateLimit(60.0, 0.0)}\n worker = HyperlinkAvailabilityCheckWorker(app.env, app.config, Queue(), Queue(),\n rate_limits)\n with mock.patch('time.time', return_value=0.0):\n next_check = worker.limit_rate(FakeResponse())\n assert next_check == 120.0\n\n\ndef test_limit_rate_clips_wait_time_to_max_time(app):\n app.config.linkcheck_rate_limit_timeout = 90.0\n rate_limits = {\"localhost\": RateLimit(60.0, 0.0)}\n worker = HyperlinkAvailabilityCheckWorker(app.env, app.config, Queue(), Queue(),\n rate_limits)\n with mock.patch('time.time', return_value=0.0):\n next_check = worker.limit_rate(FakeResponse())\n assert next_check == 90.0\n\n\ndef test_limit_rate_bails_out_after_waiting_max_time(app):\n app.config.linkcheck_rate_limit_timeout = 90.0\n rate_limits = {\"localhost\": RateLimit(90.0, 0.0)}\n worker = HyperlinkAvailabilityCheckWorker(app.env, app.config, Queue(), Queue(),\n rate_limits)\n next_check = worker.limit_rate(FakeResponse())\n assert next_check is None\n\n\nclass ConnectionResetHandler(http.server.BaseHTTPRequestHandler):\n def do_HEAD(self):\n self.connection.close()\n\n def do_GET(self):\n self.send_response(200, \"OK\")\n self.end_headers()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_get_after_head_raises_connection_error_test_get_after_head_raises_connection_error.assert_json_loads_content": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_get_after_head_raises_connection_error_test_get_after_head_raises_connection_error.assert_json_loads_content", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 605, "end_line": 619, "span_ids": ["test_get_after_head_raises_connection_error"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)\ndef test_get_after_head_raises_connection_error(app):\n with http_server(ConnectionResetHandler):\n app.build()\n content = (app.outdir / 'output.txt').read_text()\n assert not content\n content = (app.outdir / 'output.json').read_text()\n assert json.loads(content) == {\n \"filename\": \"index.rst\",\n \"lineno\": 1,\n \"status\": \"working\",\n \"code\": 0,\n \"uri\": \"http://localhost:7777/\",\n \"info\": \"\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_exclude_documents_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_linkcheck.py_test_linkcheck_exclude_documents_", "embedding": null, "metadata": {"file_path": "tests/test_build_linkcheck.py", "file_name": "test_build_linkcheck.py", "file_type": "text/x-python", "category": "test", "start_line": 622, "end_line": 647, "span_ids": ["test_linkcheck_exclude_documents"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('linkcheck', testroot='linkcheck-documents_exclude', freshenv=True)\ndef test_linkcheck_exclude_documents(app):\n app.build()\n\n with open(app.outdir / 'output.json') as fp:\n content = [json.loads(record) for record in fp]\n\n assert content == [\n {\n 'filename': 'broken_link.rst',\n 'lineno': 4,\n 'status': 'ignored',\n 'code': 0,\n 'uri': 'https://www.sphinx-doc.org/this-is-a-broken-link',\n 'info': 'broken_link matched ^broken_link$ from linkcheck_exclude_documents',\n },\n {\n 'filename': 'br0ken_link.rst',\n 'lineno': 4,\n 'status': 'ignored',\n 'code': 0,\n 'uri': 'https://www.sphinx-doc.org/this-is-another-broken-link',\n 'info': 'br0ken_link matched br[0-9]ken_link from linkcheck_exclude_documents',\n },\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py__Test_the_build_process_test_all.assert_Footnotes_not_in": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py__Test_the_build_process_test_all.assert_Footnotes_not_in", "embedding": null, "metadata": {"file_path": "tests/test_build_manpage.py", "file_name": "test_build_manpage.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 30, "span_ids": ["docstring", "imports", "test_all"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the build process with manpage builder with the test root.\"\"\"\n\nimport pytest\n\nfrom sphinx.builders.manpage import default_man_pages\nfrom sphinx.config import Config\n\n\n@pytest.mark.sphinx('man')\ndef test_all(app, status, warning):\n app.builder.build_all()\n assert (app.outdir / 'sphinxtests.1').exists()\n\n content = (app.outdir / 'sphinxtests.1').read_text()\n assert r'\\fBprint \\fP\\fIi\\fP\\fB\\en\\fP' in content\n assert r'\\fBmanpage\\en\\fP' in content\n\n # heading (title + description)\n assert r'sphinxtests \\- Sphinx <Tests> 0.6alpha1' in content\n\n # term of definition list including nodes.strong\n assert '\\n.B term1\\n' in content\n assert '\\nterm2 (\\\\fBstronged partially\\\\fP)\\n' in content\n\n # test samp with braces\n assert '\\n\\\\fIvariable_only\\\\fP\\n' in content\n assert '\\n\\\\fIvariable\\\\fP\\\\fB and text\\\\fP\\n' in content\n assert '\\n\\\\fBShow \\\\fP\\\\fIvariable\\\\fP\\\\fB in the middle\\\\fP\\n' in content\n\n assert 'Footnotes' not in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py_test_man_pages_empty_description_test_man_make_section_directory.assert_app_outdir_man": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py_test_man_pages_empty_description_test_man_make_section_directory.assert_app_outdir_man", "embedding": null, "metadata": {"file_path": "tests/test_build_manpage.py", "file_name": "test_build_manpage.py", "file_type": "text/x-python", "category": "test", "start_line": 33, "end_line": 46, "span_ids": ["test_man_make_section_directory", "test_man_pages_empty_description"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('man', testroot='basic',\n confoverrides={'man_pages': [('index', 'title', None, [], 1)]})\ndef test_man_pages_empty_description(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'title.1').read_text()\n assert r'title \\-' not in content\n\n\n@pytest.mark.sphinx('man', testroot='basic',\n confoverrides={'man_make_section_directory': True})\ndef test_man_make_section_directory(app, status, warning):\n app.build()\n assert (app.outdir / 'man1' / 'python.1').exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py_test_captioned_code_block_test_captioned_code_block.assert_sp_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_manpage.py_test_captioned_code_block_test_captioned_code_block.assert_sp_n_", "embedding": null, "metadata": {"file_path": "tests/test_build_manpage.py", "file_name": "test_build_manpage.py", "file_type": "text/x-python", "category": "test", "start_line": 49, "end_line": 67, "span_ids": ["test_captioned_code_block"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('man', testroot='directive-code')\ndef test_captioned_code_block(app, status, warning):\n app.builder.build_all()\n content = (app.outdir / 'python.1').read_text()\n\n assert ('.sp\\n'\n 'caption \\\\fItest\\\\fP rb\\n'\n '.INDENT 0.0\\n'\n '.INDENT 3.5\\n'\n '.sp\\n'\n '.nf\\n'\n '.ft C\\n'\n 'def ruby?\\n'\n ' false\\n'\n 'end\\n'\n '.ft P\\n'\n '.fi\\n'\n '.UNINDENT\\n'\n '.UNINDENT\\n' in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py__Test_the_build_process_TEXINFO_WARNINGS.ENV_WARNINGS_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py__Test_the_build_process_TEXINFO_WARNINGS.ENV_WARNINGS_", "embedding": null, "metadata": {"file_path": "tests/test_build_texinfo.py", "file_name": "test_build_texinfo.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 25, "span_ids": ["impl", "docstring", "imports"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the build process with Texinfo builder with the test root.\"\"\"\n\nimport os\nimport re\nimport subprocess\nfrom subprocess import PIPE, CalledProcessError\nfrom unittest.mock import Mock\n\nimport pytest\n\nfrom sphinx.builders.texinfo import default_texinfo_documents\nfrom sphinx.config import Config\nfrom sphinx.testing.util import strip_escseq\nfrom sphinx.util.docutils import new_document\nfrom sphinx.writers.texinfo import TexinfoTranslator\n\nfrom .test_build_html import ENV_WARNINGS\n\nTEXINFO_WARNINGS = ENV_WARNINGS + \"\"\"\\\n%(root)s/index.rst:\\\\d+: WARNING: unknown option: &option\n%(root)s/index.rst:\\\\d+: WARNING: citation not found: missing\n%(root)s/index.rst:\\\\d+: WARNING: a suitable image for texinfo builder not found: foo.\\\\*\n%(root)s/index.rst:\\\\d+: WARNING: a suitable image for texinfo builder not found: \\\n\\\\['application/pdf', 'image/svg\\\\+xml'\\\\] \\\\(svgimg.\\\\*\\\\)\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_default_texinfo_documents_test_texinfo_escape_id.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_default_texinfo_documents_test_texinfo_escape_id.None_6", "embedding": null, "metadata": {"file_path": "tests/test_build_texinfo.py", "file_name": "test_build_texinfo.py", "file_type": "text/x-python", "category": "test", "start_line": 82, "end_line": 106, "span_ids": ["test_default_texinfo_documents", "test_texinfo_escape_id"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_default_texinfo_documents():\n config = Config({'project': 'STASI\u2122 Documentation',\n 'author': \"Wolfgang Sch\u00e4uble & G'Beckstein\"})\n config.init_values()\n expected = [('index', 'stasi', 'STASI\u2122 Documentation',\n \"Wolfgang Sch\u00e4uble & G'Beckstein\", 'stasi',\n 'One line description of project', 'Miscellaneous')]\n assert default_texinfo_documents(config) == expected\n\n\n@pytest.mark.sphinx('texinfo')\ndef test_texinfo_escape_id(app, status, warning):\n settings = Mock(title='',\n texinfo_dir_entry='',\n texinfo_elements={})\n document = new_document('', settings)\n translator = app.builder.create_translator(document, app.builder)\n\n assert translator.escape_id('Hello world') == 'Hello world'\n assert translator.escape_id('Hello world') == 'Hello world'\n assert translator.escape_id('Hello Sphinx world') == 'Hello Sphinx world'\n assert translator.escape_id('Hello:world') == 'Hello world'\n assert translator.escape_id('Hello(world)') == 'Hello world'\n assert translator.escape_id('Hello world.') == 'Hello world'\n assert translator.escape_id('.') == '.'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_footnote_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_texinfo.py_test_texinfo_footnote_", "embedding": null, "metadata": {"file_path": "tests/test_build_texinfo.py", "file_name": "test_build_texinfo.py", "file_type": "text/x-python", "category": "test", "start_line": 109, "end_line": 140, "span_ids": ["test_texinfo_footnote", "test_texinfo_xrefs", "test_texinfo_samp_with_variable"], "tokens": 315}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('texinfo', testroot='footnotes')\ndef test_texinfo_footnote(app, status, warning):\n app.builder.build_all()\n\n output = (app.outdir / 'python.texi').read_text()\n assert 'First footnote: @footnote{\\nFirst\\n}' in output\n\n\n@pytest.mark.sphinx('texinfo')\ndef test_texinfo_xrefs(app, status, warning):\n app.builder.build_all()\n output = (app.outdir / 'sphinxtests.texi').read_text()\n assert re.search(r'@ref{\\w+,,--plugin\\.option}', output)\n\n # Now rebuild it without xrefs\n app.config.texinfo_cross_references = False\n app.builder.build_all()\n output = (app.outdir / 'sphinxtests.texi').read_text()\n assert not re.search(r'@ref{\\w+,,--plugin\\.option}', output)\n assert 'Link to perl +p, --ObjC++, --plugin.option, create-auth-token, arg and -j' in output\n\n\n@pytest.mark.sphinx('texinfo', testroot='root')\ndef test_texinfo_samp_with_variable(app, status, warning):\n app.build()\n\n output = (app.outdir / 'sphinxtests.texi').read_text()\n\n assert '@code{@var{variable_only}}' in output\n assert '@code{@var{variable} and text}' in output\n assert '@code{Show @var{variable} in the middle}' in output", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py__Test_the_build_process_test_maxwitdh_with_prefix.assert_lines_11_startswi": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_build_text.py__Test_the_build_process_test_maxwitdh_with_prefix.assert_lines_11_startswi", "embedding": null, "metadata": {"file_path": "tests/test_build_text.py", "file_name": "test_build_text.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 37, "span_ids": ["with_text_app", "docstring", "imports", "test_maxwitdh_with_prefix"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the build process with Text builder with the test root.\"\"\"\n\nimport pytest\nfrom docutils.utils import column_width\n\nfrom sphinx.writers.text import MAXWIDTH, Cell, Table\n\n\ndef with_text_app(*args, **kw):\n default_kw = {\n 'buildername': 'text',\n 'testroot': 'build-text',\n }\n default_kw.update(kw)\n return pytest.mark.sphinx(*args, **default_kw)\n\n\n@with_text_app()\ndef test_maxwitdh_with_prefix(app, status, warning):\n app.builder.build_update()\n result = (app.outdir / 'maxwidth.txt').read_text()\n\n lines = result.splitlines()\n line_widths = [column_width(line) for line in lines]\n assert max(line_widths) < MAXWIDTH\n assert lines[0].startswith('See also:')\n assert lines[1].startswith('')\n assert lines[2].startswith(' ham')\n assert lines[3].startswith(' ham')\n assert lines[4] == ''\n assert lines[5].startswith('* ham')\n assert lines[6].startswith(' ham')\n assert lines[7] == ''\n assert lines[8].startswith('* ham')\n assert lines[9].startswith(' ham')\n assert lines[10] == ''\n assert lines[11].startswith('spam egg')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_builder.py__Test_the_Builder_class_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_builder.py__Test_the_Builder_class_", "embedding": null, "metadata": {"file_path": "tests/test_builder.py", "file_name": "test_builder.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["test_incremental_reading", "test_incremental_reading_for_missing_files", "docstring", "imports"], "tokens": 321}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the Builder class.\"\"\"\nimport pytest\n\n\n@pytest.mark.sphinx('dummy', srcdir=\"test_builder\", freshenv=True)\ndef test_incremental_reading(app):\n # first reading\n updated = app.builder.read()\n assert set(updated) == app.env.found_docs == set(app.env.all_docs)\n assert updated == sorted(updated) # sorted by alphanumeric\n\n # test if exclude_patterns works ok\n assert 'subdir/excluded' not in app.env.found_docs\n\n # before second reading, add, modify and remove source files\n (app.srcdir / 'new.txt').write_text('New file\\n========\\n')\n app.env.all_docs['index'] = 0 # mark as modified\n (app.srcdir / 'autodoc.txt').unlink()\n\n # second reading\n updated = app.builder.read()\n\n assert set(updated) == {'index', 'new'}\n assert 'autodoc' not in app.env.all_docs\n assert 'autodoc' not in app.env.found_docs\n\n\n@pytest.mark.sphinx('dummy', testroot='warnings', freshenv=True)\ndef test_incremental_reading_for_missing_files(app):\n # first reading\n updated = app.builder.read()\n assert set(updated) == app.env.found_docs == set(app.env.all_docs)\n\n # second reading\n updated = app.builder.read()\n\n # \"index\" is listed up to updated because it contains references\n # to nonexisting downloadable or image files\n assert set(updated) == {'index'}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py__Test_the_base_build_pr_setup_test._srcdir__build_rmtre": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_catalogs.py__Test_the_base_build_pr_setup_test._srcdir__build_rmtre", "embedding": null, "metadata": {"file_path": "tests/test_catalogs.py", "file_name": "test_catalogs.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 25, "span_ids": ["setup_test", "docstring", "imports"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the base build process.\"\"\"\nimport shutil\n\nimport pytest\n\nfrom sphinx.testing.util import find_files\n\n\n@pytest.fixture\ndef setup_test(app_params):\n srcdir = app_params.kwargs['srcdir']\n src_locale_dir = srcdir / 'xx' / 'LC_MESSAGES'\n dest_locale_dir = srcdir / 'locale'\n # copy all catalogs into locale layout directory\n for po in find_files(src_locale_dir, '.po'):\n copy_po = (dest_locale_dir / 'en' / 'LC_MESSAGES' / po)\n if not copy_po.parent.exists():\n copy_po.parent.makedirs()\n shutil.copy(src_locale_dir / po, copy_po)\n\n yield\n\n # delete remnants left over after failed build\n dest_locale_dir.rmtree(True)\n (srcdir / '_build').rmtree(True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py__Test_the_sphinx_config_test_core_config.assert_cfg_project_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py__Test_the_sphinx_config_test_core_config.assert_cfg_project_", "embedding": null, "metadata": {"file_path": "tests/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 65, "span_ids": ["test_core_config", "docstring", "imports"], "tokens": 471}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the sphinx.config.Config class.\"\"\"\n\nfrom unittest import mock\n\nimport pytest\n\nimport sphinx\nfrom sphinx.config import ENUM, Config, check_confval_types\nfrom sphinx.errors import ConfigError, ExtensionError, VersionRequirementError\nfrom sphinx.testing.path import path\n\n\n@pytest.mark.sphinx(testroot='config', confoverrides={\n 'root_doc': 'root',\n 'nonexisting_value': 'True',\n 'latex_elements.maketitle': 'blah blah blah',\n 'modindex_common_prefix': 'path1,path2'})\ndef test_core_config(app, status, warning):\n cfg = app.config\n\n # simple values\n assert 'project' in cfg.__dict__\n assert cfg.project == 'Sphinx <Tests>'\n assert cfg.templates_path == ['_templates']\n\n # overrides\n assert cfg.root_doc == 'root'\n assert cfg.latex_elements['maketitle'] == 'blah blah blah'\n assert cfg.modindex_common_prefix == ['path1', 'path2']\n\n # simple default values\n assert 'locale_dirs' not in cfg.__dict__\n assert cfg.locale_dirs == ['locales']\n assert cfg.trim_footnote_reference_space is False\n\n # complex default values\n assert 'html_title' not in cfg.__dict__\n assert cfg.html_title == 'Sphinx <Tests> 0.6alpha1 documentation'\n\n # complex default values mustn't raise\n for valuename in cfg.config_values:\n getattr(cfg, valuename)\n\n # \"contains\" gives True both for set and unset values\n assert 'project' in cfg\n assert 'html_title' in cfg\n assert 'nonexisting_value' not in cfg\n\n # invalid values\n with pytest.raises(AttributeError):\n getattr(cfg, '_value')\n with pytest.raises(AttributeError):\n getattr(cfg, 'nonexisting_value')\n\n # non-value attributes are deleted from the namespace\n with pytest.raises(AttributeError):\n getattr(cfg, 'sys')\n\n # setting attributes\n cfg.project = 'Foo'\n assert cfg.project == 'Foo'\n\n # alternative access via item interface\n cfg['project'] = 'Sphinx Tests'\n assert cfg['project'] == cfg.project == 'Sphinx Tests'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_config_not_found_test_extension_values.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_config_not_found_test_extension_values.None_3", "embedding": null, "metadata": {"file_path": "tests/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 68, "end_line": 91, "span_ids": ["test_config_not_found", "test_extension_values"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_config_not_found(tempdir):\n with pytest.raises(ConfigError):\n Config.read(tempdir)\n\n\ndef test_extension_values():\n config = Config()\n\n # check standard settings\n assert config.root_doc == 'index'\n\n # can't override it by add_config_value()\n with pytest.raises(ExtensionError) as excinfo:\n config.add('root_doc', 'index', 'env', None)\n assert 'already present' in str(excinfo.value)\n\n # add a new config value\n config.add('value_from_ext', [], 'env', None)\n assert config.value_from_ext == []\n\n # can't override it by add_config_value()\n with pytest.raises(ExtensionError) as excinfo:\n config.add('value_from_ext', [], 'env', None)\n assert 'already present' in str(excinfo.value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_check_enum_for_list_test_nitpick_ignore_regex2.assert_not_len_warning_ge": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_check_enum_for_list_test_nitpick_ignore_regex2.assert_not_len_warning_ge", "embedding": null, "metadata": {"file_path": "tests/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 294, "end_line": 362, "span_ids": ["test_nitpick_ignore_regex1", "test_nitpick_ignore_regex2", "test_nitpick_base", "test_check_enum_for_list", "test_check_enum_for_list_failed", "test_nitpick_ignore", "impl:5"], "tokens": 572}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@mock.patch(\"sphinx.config.logger\")\ndef test_check_enum_for_list(logger):\n config = Config({'value': ['one', 'two']})\n config.add('value', 'default', False, ENUM('default', 'one', 'two'))\n config.init_values()\n check_confval_types(None, config)\n logger.warning.assert_not_called() # not warned\n\n\n@mock.patch(\"sphinx.config.logger\")\ndef test_check_enum_for_list_failed(logger):\n config = Config({'value': ['one', 'two', 'invalid']})\n config.add('value', 'default', False, ENUM('default', 'one', 'two'))\n config.init_values()\n check_confval_types(None, config)\n assert logger.warning.called\n\n\nnitpick_warnings = [\n \"WARNING: py:const reference target not found: prefix.anything.postfix\",\n \"WARNING: py:class reference target not found: prefix.anything\",\n \"WARNING: py:class reference target not found: anything.postfix\",\n \"WARNING: js:class reference target not found: prefix.anything.postfix\",\n]\n\n\n@pytest.mark.sphinx(testroot='nitpicky-warnings')\ndef test_nitpick_base(app, status, warning):\n app.builder.build_all()\n\n warning = warning.getvalue().strip().split('\\n')\n assert len(warning) == len(nitpick_warnings)\n for actual, expected in zip(warning, nitpick_warnings):\n assert expected in actual\n\n\n@pytest.mark.sphinx(testroot='nitpicky-warnings', confoverrides={\n 'nitpick_ignore': [\n ('py:const', 'prefix.anything.postfix'),\n ('py:class', 'prefix.anything'),\n ('py:class', 'anything.postfix'),\n ('js:class', 'prefix.anything.postfix'),\n ],\n})\ndef test_nitpick_ignore(app, status, warning):\n app.builder.build_all()\n assert not len(warning.getvalue().strip())\n\n\n@pytest.mark.sphinx(testroot='nitpicky-warnings', confoverrides={\n 'nitpick_ignore_regex': [\n (r'py:.*', r'.*postfix'),\n (r'.*:class', r'prefix.*'),\n ]\n})\ndef test_nitpick_ignore_regex1(app, status, warning):\n app.builder.build_all()\n assert not len(warning.getvalue().strip())\n\n\n@pytest.mark.sphinx(testroot='nitpicky-warnings', confoverrides={\n 'nitpick_ignore_regex': [\n (r'py:.*', r'prefix.*'),\n (r'.*:class', r'.*postfix'),\n ]\n})\ndef test_nitpick_ignore_regex2(app, status, warning):\n app.builder.build_all()\n assert not len(warning.getvalue().strip())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_nitpick_ignore_regex_fullmatch_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_config.py_test_nitpick_ignore_regex_fullmatch_", "embedding": null, "metadata": {"file_path": "tests/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 365, "end_line": 384, "span_ids": ["test_nitpick_ignore_regex_fullmatch"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='nitpicky-warnings', confoverrides={\n 'nitpick_ignore_regex': [\n # None of these should match\n (r'py:', r'.*'),\n (r':class', r'.*'),\n (r'', r'.*'),\n (r'.*', r'anything'),\n (r'.*', r'prefix'),\n (r'.*', r'postfix'),\n (r'.*', r''),\n ]\n})\ndef test_nitpick_ignore_regex_fullmatch(app, status, warning):\n app.builder.build_all()\n\n warning = warning.getvalue().strip().split('\\n')\n assert len(warning) == len(nitpick_warnings)\n for actual, expected in zip(warning, nitpick_warnings):\n assert expected in actual", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py__Test_the_code_block_di_test_LiteralIncludeReader_lines1.assert_content_Lit": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py__Test_the_code_block_di_test_LiteralIncludeReader_lines1.assert_content_Lit", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 92, "span_ids": ["impl", "literal_inc_path", "test_LiteralIncludeReader", "test_LiteralIncludeReader_pyobject3", "test_LiteralIncludeReader_pyobject_and_lines", "test_LiteralIncludeReader_lineno_start", "test_LiteralIncludeReader_pyobject1", "docstring", "imports", "testroot", "test_LiteralIncludeReader_lines1", "test_LiteralIncludeReader_pyobject2"], "tokens": 771}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the code-block directive.\"\"\"\n\nimport os\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx.config import Config\nfrom sphinx.directives.code import LiteralIncludeReader\nfrom sphinx.testing.util import etree_parse\n\nDUMMY_CONFIG = Config({}, {})\n\n\n@pytest.fixture(scope='module')\ndef testroot(rootdir):\n testroot_path = rootdir / 'test-directive-code'\n return testroot_path\n\n\n@pytest.fixture(scope='module')\ndef literal_inc_path(testroot):\n return testroot / 'literal.inc'\n\n\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader(literal_inc_path):\n options = {'lineno-match': True}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == literal_inc_path.read_text()\n assert lines == 13\n assert reader.lineno_start == 1\n\n\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_lineno_start(literal_inc_path):\n options = {'lineno-start': 4}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == literal_inc_path.read_text()\n assert lines == 13\n assert reader.lineno_start == 4\n\n\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_pyobject1(literal_inc_path):\n options = {'lineno-match': True, 'pyobject': 'Foo'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"class Foo:\\n\"\n \" pass\\n\")\n assert reader.lineno_start == 5\n\n\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_pyobject2(literal_inc_path):\n options = {'pyobject': 'Bar'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"class Bar:\\n\"\n \" def baz():\\n\"\n \" pass\\n\")\n assert reader.lineno_start == 1 # no lineno-match\n\n\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_pyobject3(literal_inc_path):\n options = {'pyobject': 'Bar.baz'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\" def baz():\\n\"\n \" pass\\n\")\n\n\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_pyobject_and_lines(literal_inc_path):\n options = {'pyobject': 'Bar', 'lines': '2-'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\" def baz():\\n\"\n \" pass\\n\")\n\n\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_lines1(literal_inc_path):\n options = {'lines': '1-3'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"# Literally included file using Python highlighting\\n\"\n \"\\n\"\n \"foo = \\\"Including Unicode characters: \u00fc\u00f6\u00e4\\\"\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_dedent_and_append_and_prepend_test_LiteralIncludeReader_dedent_and_append_and_prepend.assert_content_class": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_LiteralIncludeReader_dedent_and_append_and_prepend_test_LiteralIncludeReader_dedent_and_append_and_prepend.assert_content_class", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 254, "end_line": 264, "span_ids": ["test_LiteralIncludeReader_dedent_and_append_and_prepend"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_LiteralIncludeReader_dedent_and_append_and_prepend(literal_inc_path):\n # dedent: 2\n options = {'lines': '9-11', 'dedent': 2, 'prepend': 'class Foo:', 'append': '# comment'}\n reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)\n content, lines = reader.read()\n assert content == (\"class Foo:\\n\"\n \" def baz():\\n\"\n \" pass\\n\"\n \"\\n\"\n \"# comment\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_linenothreshold_test_linenothreshold.assert_span_span_sp": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_linenothreshold_test_linenothreshold.assert_span_span_sp", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 569, "end_line": 587, "span_ids": ["test_linenothreshold"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='directive-code')\ndef test_linenothreshold(app, status, warning):\n app.builder.build(['linenothreshold'])\n html = (app.outdir / 'linenothreshold.html').read_text()\n\n # code-block using linenothreshold\n assert ('<span class=\"linenos\">1</span><span class=\"k\">class</span> '\n '<span class=\"nc\">Foo</span><span class=\"p\">:</span>' in html)\n\n # code-block not using linenothreshold (no line numbers)\n assert '<span></span><span class=\"c1\"># comment</span>' in html\n\n # literal include using linenothreshold\n assert ('<span class=\"linenos\"> 1</span><span class=\"c1\">'\n '# Literally included file using Python highlighting</span>' in html)\n\n # literal include not using linenothreshold (no line numbers)\n assert ('<span></span><span class=\"c1\"># Very small literal include '\n '(linenothreshold check)</span>' in html)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_code.py_test_code_block_dedent_", "embedding": null, "metadata": {"file_path": "tests/test_directive_code.py", "file_name": "test_directive_code.py", "file_type": "text/x-python", "category": "test", "start_line": 590, "end_line": 615, "span_ids": ["test_code_block_dedent"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='directive-code')\ndef test_code_block_dedent(app, status, warning):\n app.builder.build(['dedent'])\n doctree = app.env.get_doctree('dedent')\n codeblocks = list(doctree.traverse(nodes.literal_block))\n # Note: comparison string should not have newlines at the beginning or end\n text_0_indent = '''First line\nSecond line\n Third line\nFourth line'''\n text_2_indent = ''' First line\n Second line\n Third line\n Fourth line'''\n text_4_indent = ''' First line\n Second line\n Third line\n Fourth line'''\n\n assert codeblocks[0].astext() == text_0_indent\n assert codeblocks[1].astext() == text_0_indent\n assert codeblocks[2].astext() == text_4_indent\n assert codeblocks[3].astext() == text_2_indent\n assert codeblocks[4].astext() == text_4_indent\n assert codeblocks[5].astext() == text_0_indent", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_only.py__Test_the_only_directiv_test_sectioning.testsects.for_i_subsect_in_enumera.testsects_prefix_str_i_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_only.py__Test_the_only_directiv_test_sectioning.testsects.for_i_subsect_in_enumera.testsects_prefix_str_i_", "embedding": null, "metadata": {"file_path": "tests/test_directive_only.py", "file_name": "test_directive_only.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 35, "span_ids": ["docstring", "imports", "test_sectioning"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the only directive with the test root.\"\"\"\n\nimport re\n\nimport pytest\nfrom docutils import nodes\n\n\n@pytest.mark.sphinx('text', testroot='directive-only')\ndef test_sectioning(app, status, warning):\n\n def getsects(section):\n if not isinstance(section, nodes.section):\n return [getsects(n) for n in section.children]\n title = section.next_node(nodes.title).astext().strip()\n subsects = []\n children = section.children[:]\n while children:\n node = children.pop(0)\n if isinstance(node, nodes.section):\n subsects.append(node)\n continue\n children = list(node.children) + children\n return [title, [getsects(subsect) for subsect in subsects]]\n\n def testsects(prefix, sects, indent=0):\n title = sects[0]\n parent_num = title.split()[0]\n assert prefix == parent_num, \\\n 'Section out of place: %r' % title\n for i, subsect in enumerate(sects[1]):\n num = subsect[0].split()[0]\n assert re.match('[0-9]+[.0-9]*[.]', num), \\\n 'Unnumbered section: %r' % subsect[0]\n testsects(prefix + str(i + 1) + '.', subsect, indent + 4)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py__Test_the_other_directi_test_toctree.assert_node_doctree_0_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_other.py__Test_the_other_directi_test_toctree.assert_node_doctree_0_0_", "embedding": null, "metadata": {"file_path": "tests/test_directive_other.py", "file_name": "test_directive_other.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 24, "span_ids": ["docstring", "imports", "test_toctree"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the other directives.\"\"\"\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx import addnodes\nfrom sphinx.testing import restructuredtext\nfrom sphinx.testing.util import assert_node\n\n\n@pytest.mark.sphinx(testroot='toctree-glob')\ndef test_toctree(app):\n text = (\".. toctree::\\n\"\n \"\\n\"\n \" foo\\n\"\n \" bar/index\\n\"\n \" baz\\n\")\n\n app.env.find_files(app.config, app.builder)\n doctree = restructuredtext.parse(app, text, 'index')\n assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])\n assert_node(doctree[0][0],\n entries=[(None, 'foo'), (None, 'bar/index'), (None, 'baz')],\n includefiles=['foo', 'bar/index', 'baz'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_patch.py__Test_the_patched_direc_test_code_directive.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_patch.py__Test_the_patched_direc_test_code_directive.None_7", "embedding": null, "metadata": {"file_path": "tests/test_directive_patch.py", "file_name": "test_directive_patch.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 47, "span_ids": ["test_code_directive", "docstring", "imports"], "tokens": 409}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the patched directives.\"\"\"\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx.testing import restructuredtext\nfrom sphinx.testing.util import assert_node\n\n\ndef test_code_directive(app):\n # normal case\n text = ('.. code::\\n'\n '\\n'\n ' print(\"hello world\")\\n')\n\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, [nodes.document, nodes.literal_block, 'print(\"hello world\")'])\n assert_node(doctree[0], language=\"default\", highlight_args={})\n\n # with language\n text = ('.. code:: python\\n'\n '\\n'\n ' print(\"hello world\")\\n')\n\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, [nodes.document, nodes.literal_block, 'print(\"hello world\")'])\n assert_node(doctree[0], language=\"python\", highlight_args={})\n\n # :number-lines: option\n text = ('.. code:: python\\n'\n ' :number-lines:\\n'\n '\\n'\n ' print(\"hello world\")\\n')\n\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, [nodes.document, nodes.literal_block, 'print(\"hello world\")'])\n assert_node(doctree[0], language=\"python\", linenos=True, highlight_args={})\n\n # :number-lines: option\n text = ('.. code:: python\\n'\n ' :number-lines: 5\\n'\n '\\n'\n ' print(\"hello world\")\\n')\n\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, [nodes.document, nodes.literal_block, 'print(\"hello world\")'])\n assert_node(doctree[0], language=\"python\", linenos=True, highlight_args={'linenostart': 5})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_patch.py_test_csv_table_directive_test_csv_table_directive.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_directive_patch.py_test_csv_table_directive_test_csv_table_directive.None_3", "embedding": null, "metadata": {"file_path": "tests/test_directive_patch.py", "file_name": "test_directive_patch.py", "file_type": "text/x-python", "category": "test", "start_line": 50, "end_line": 78, "span_ids": ["test_csv_table_directive"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='directive-csv-table')\ndef test_csv_table_directive(app):\n # relative path from current document\n text = ('.. csv-table::\\n'\n ' :file: example.csv\\n')\n doctree = restructuredtext.parse(app, text, docname=\"subdir/index\")\n assert_node(doctree,\n ([nodes.table, nodes.tgroup, (nodes.colspec,\n nodes.colspec,\n nodes.colspec,\n [nodes.tbody, nodes.row])],))\n assert_node(doctree[0][0][3][0],\n ([nodes.entry, nodes.paragraph, \"FOO\"],\n [nodes.entry, nodes.paragraph, \"BAR\"],\n [nodes.entry, nodes.paragraph, \"BAZ\"]))\n\n # absolute path from source directory\n text = ('.. csv-table::\\n'\n ' :file: /example.csv\\n')\n doctree = restructuredtext.parse(app, text, docname=\"subdir/index\")\n assert_node(doctree,\n ([nodes.table, nodes.tgroup, (nodes.colspec,\n nodes.colspec,\n nodes.colspec,\n [nodes.tbody, nodes.row])],))\n assert_node(doctree[0][0][3][0],\n ([nodes.entry, nodes.paragraph, \"foo\"],\n [nodes.entry, nodes.paragraph, \"bar\"],\n [nodes.entry, nodes.paragraph, \"baz\"]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_docutilsconf.py__Test_docutils_conf_sup_test_html_with_default_docutilsconf.assert_node_doctree_0_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_docutilsconf.py__Test_docutils_conf_sup_test_html_with_default_docutilsconf.assert_node_doctree_0_1_", "embedding": null, "metadata": {"file_path": "tests/test_docutilsconf.py", "file_name": "test_docutilsconf.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 17, "span_ids": ["docstring", "imports", "test_html_with_default_docutilsconf"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test docutils.conf support for several writers.\"\"\"\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx.testing.util import assert_node\nfrom sphinx.util.docutils import patch_docutils\n\n\n@pytest.mark.sphinx('dummy', testroot='docutilsconf', freshenv=True)\ndef test_html_with_default_docutilsconf(app, status, warning):\n with patch_docutils(app.confdir):\n app.build()\n\n doctree = app.env.get_doctree('index')\n assert_node(doctree[0][1], [nodes.paragraph, (\"Sphinx \",\n [nodes.footnote_reference, \"1\"])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py__Tests_the_C_Domain__parse.return.ast": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py__Tests_the_C_Domain__parse.return.ast", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 29, "span_ids": ["Config", "docstring", "imports", "parse"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests the C Domain\"\"\"\n\nimport itertools\nimport zlib\nfrom xml.etree import ElementTree\n\nimport pytest\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import desc\nfrom sphinx.domains.c import (DefinitionError, DefinitionParser, Symbol, _id_prefix,\n _macroKeywords, _max_id)\nfrom sphinx.ext.intersphinx import load_mappings, normalize_intersphinx_mapping\nfrom sphinx.testing import restructuredtext\nfrom sphinx.testing.util import assert_node\n\n\nclass Config:\n c_id_attributes = [\"id_attr\", 'LIGHTGBM_C_EXPORT']\n c_paren_attributes = [\"paren_attr\"]\n c_extra_keywords = _macroKeywords\n\n\ndef parse(name, string):\n parser = DefinitionParser(string, location=None, config=Config())\n parser.allowFallbackExpressionParsing = False\n ast = parser.parse_declaration(name, name)\n parser.assert_end()\n return ast", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_check_test_domain_c_ast_expressions.exprCheck.if_res_displayString_.raise_DefinitionError_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_check_test_domain_c_ast_expressions.exprCheck.if_res_displayString_.raise_DefinitionError_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 101, "end_line": 135, "span_ids": ["check", "test_domain_c_ast_expressions"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check(name, input, idDict, output=None, key=None, asTextOutput=None):\n if output is None:\n output = input\n # First, check without semicolon\n _check(name, input, idDict, output, key, asTextOutput)\n if name != 'macro':\n # Second, check with semicolon\n _check(name, input + ' ;', idDict, output + ';', key,\n asTextOutput + ';' if asTextOutput is not None else None)\n\n\ndef test_domain_c_ast_expressions():\n def exprCheck(expr, output=None):\n parser = DefinitionParser(expr, location=None, config=Config())\n parser.allowFallbackExpressionParsing = False\n ast = parser.parse_expression()\n parser.assert_end()\n # first a simple check of the AST\n if output is None:\n output = expr\n res = str(ast)\n if res != output:\n print(\"\")\n print(\"Input: \", input)\n print(\"Result: \", res)\n print(\"Expected: \", output)\n raise DefinitionError(\"\")\n displayString = ast.get_display_string()\n if res != displayString:\n # note: if the expression contains an anon name then this will trigger a falsely\n print(\"\")\n print(\"Input: \", expr)\n print(\"Result: \", res)\n print(\"Display: \", displayString)\n raise DefinitionError(\"\")\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_expressions._type_expressions_test_domain_c_ast_expressions.None_20": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_expressions._type_expressions_test_domain_c_ast_expressions.None_20", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 137, "end_line": 207, "span_ids": ["test_domain_c_ast_expressions"], "tokens": 814}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_expressions():\n\n # type expressions\n exprCheck('int*')\n exprCheck('int *const*')\n exprCheck('int *volatile*')\n exprCheck('int *restrict*')\n exprCheck('int *(*)(double)')\n exprCheck('const int*')\n exprCheck('__int64')\n exprCheck('unsigned __int64')\n\n # actual expressions\n\n # primary\n exprCheck('true')\n exprCheck('false')\n ints = ['5', '0', '075', '0x0123456789ABCDEF', '0XF', '0b1', '0B1',\n \"0b0'1'0\", \"00'1'2\", \"0x0'1'2\", \"1'2'3\"]\n unsignedSuffix = ['', 'u', 'U']\n longSuffix = ['', 'l', 'L', 'll', 'LL']\n for i in ints:\n for u in unsignedSuffix:\n for l in longSuffix:\n expr = i + u + l\n exprCheck(expr)\n expr = i + l + u\n exprCheck(expr)\n for suffix in ['', 'f', 'F', 'l', 'L']:\n for e in [\n '5e42', '5e+42', '5e-42',\n '5.', '5.e42', '5.e+42', '5.e-42',\n '.5', '.5e42', '.5e+42', '.5e-42',\n '5.0', '5.0e42', '5.0e+42', '5.0e-42',\n \"1'2'3e7'8'9\", \"1'2'3.e7'8'9\",\n \".4'5'6e7'8'9\", \"1'2'3.4'5'6e7'8'9\"]:\n expr = e + suffix\n exprCheck(expr)\n for e in [\n 'ApF', 'Ap+F', 'Ap-F',\n 'A.', 'A.pF', 'A.p+F', 'A.p-F',\n '.A', '.ApF', '.Ap+F', '.Ap-F',\n 'A.B', 'A.BpF', 'A.Bp+F', 'A.Bp-F',\n \"A'B'Cp1'2'3\", \"A'B'C.p1'2'3\",\n \".D'E'Fp1'2'3\", \"A'B'C.D'E'Fp1'2'3\"]:\n expr = \"0x\" + e + suffix\n exprCheck(expr)\n exprCheck('\"abc\\\\\"cba\"') # string\n # character literals\n for p in ['', 'u8', 'u', 'U', 'L']:\n exprCheck(p + \"'a'\")\n exprCheck(p + \"'\\\\n'\")\n exprCheck(p + \"'\\\\012'\")\n exprCheck(p + \"'\\\\0'\")\n exprCheck(p + \"'\\\\x0a'\")\n exprCheck(p + \"'\\\\x0A'\")\n exprCheck(p + \"'\\\\u0a42'\")\n exprCheck(p + \"'\\\\u0A42'\")\n exprCheck(p + \"'\\\\U0001f34c'\")\n exprCheck(p + \"'\\\\U0001F34C'\")\n\n exprCheck('(5)')\n exprCheck('C')\n # postfix\n exprCheck('A(2)')\n exprCheck('A[2]')\n exprCheck('a.b.c')\n exprCheck('a->b->c')\n exprCheck('i++')\n exprCheck('i--')\n # unary\n exprCheck('++5')\n exprCheck('--5')\n # ['.*', '->*']\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_expressions.None_21_test_domain_c_ast_expressions.exprCheck_a_or_eq_5_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_expressions.None_21_test_domain_c_ast_expressions.exprCheck_a_or_eq_5_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 208, "end_line": 268, "span_ids": ["test_domain_c_ast_expressions"], "tokens": 532}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_expressions():\n # ... other code\n exprCheck('A[2]')\n # ... other code\n exprCheck('*5')\n exprCheck('&5')\n exprCheck('+5')\n exprCheck('-5')\n exprCheck('!5')\n exprCheck('not 5')\n exprCheck('~5')\n exprCheck('compl 5')\n exprCheck('sizeof(T)')\n exprCheck('sizeof -42')\n exprCheck('alignof(T)')\n # cast\n exprCheck('(int)2')\n # binary op\n exprCheck('5 || 42')\n exprCheck('5 or 42')\n exprCheck('5 && 42')\n exprCheck('5 and 42')\n exprCheck('5 | 42')\n exprCheck('5 bitor 42')\n exprCheck('5 ^ 42')\n exprCheck('5 xor 42')\n exprCheck('5 & 42')\n exprCheck('5 bitand 42')\n # ['==', '!=']\n exprCheck('5 == 42')\n exprCheck('5 != 42')\n exprCheck('5 not_eq 42')\n # ['<=', '>=', '<', '>']\n exprCheck('5 <= 42')\n exprCheck('5 >= 42')\n exprCheck('5 < 42')\n exprCheck('5 > 42')\n # ['<<', '>>']\n exprCheck('5 << 42')\n exprCheck('5 >> 42')\n # ['+', '-']\n exprCheck('5 + 42')\n exprCheck('5 - 42')\n # ['*', '/', '%']\n exprCheck('5 * 42')\n exprCheck('5 / 42')\n exprCheck('5 % 42')\n # ['.*', '->*']\n # conditional\n # TODO\n # assignment\n exprCheck('a = 5')\n exprCheck('a *= 5')\n exprCheck('a /= 5')\n exprCheck('a %= 5')\n exprCheck('a += 5')\n exprCheck('a -= 5')\n exprCheck('a >>= 5')\n exprCheck('a <<= 5')\n exprCheck('a &= 5')\n exprCheck('a and_eq 5')\n exprCheck('a ^= 5')\n exprCheck('a xor_eq 5')\n exprCheck('a |= 5')\n exprCheck('a or_eq 5')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_fundamental_types_test_domain_c_ast_fundamental_types.types.for_sat_in__Sat_.for_t_in__Fract_frac.for_size_in_short_.for_tt_in_signed_size_t.yield_sat_tt": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_fundamental_types_test_domain_c_ast_fundamental_types.types.for_sat_in__Sat_.for_t_in__Fract_frac.for_size_in_short_.for_tt_in_signed_size_t.yield_sat_tt", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 271, "end_line": 319, "span_ids": ["test_domain_c_ast_fundamental_types"], "tokens": 465}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_fundamental_types():\n def types():\n def signed(t):\n yield t\n yield 'signed ' + t\n yield 'unsigned ' + t\n\n # integer types\n # -------------\n yield 'void'\n yield from ('_Bool', 'bool')\n yield from signed('char')\n yield from signed('short')\n yield from signed('short int')\n yield from signed('int')\n yield from ('signed', 'unsigned')\n yield from signed('long')\n yield from signed('long int')\n yield from signed('long long')\n yield from signed('long long int')\n yield from ('__int128', '__uint128')\n # extensions\n for t in ('__int8', '__int16', '__int32', '__int64', '__int128'):\n yield from signed(t)\n\n # floating point types\n # --------------------\n yield from ('_Decimal32', '_Decimal64', '_Decimal128')\n for f in ('float', 'double', 'long double'):\n yield f\n yield from (f + \" _Complex\", f + \" complex\")\n yield from (\"_Complex \" + f, \"complex \" + f)\n yield from (\"_Imaginary \" + f, \"imaginary \" + f)\n # extensions\n # https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html#Floating-Types\n yield from ('__float80', '_Float64x',\n '__float128', '_Float128',\n '__ibm128')\n # https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html#Half-Precision\n yield '__fp16'\n\n # fixed-point types (extension)\n # -----------------------------\n # https://gcc.gnu.org/onlinedocs/gcc/Fixed-Point.html#Fixed-Point\n for sat in ('', '_Sat '):\n for t in ('_Fract', 'fract', '_Accum', 'accum'):\n for size in ('short ', '', 'long ', 'long long '):\n for tt in signed(size + t):\n yield sat + tt\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_fundamental_types.for_t_in_types__test_domain_c_ast_fundamental_types.for_t_in_types_.if_in_t_.for_p_in_itertools_permut.check_type_input_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_fundamental_types.for_t_in_types__test_domain_c_ast_fundamental_types.for_t_in_types_.if_in_t_.for_p_in_itertools_permut.check_type_input_1_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 321, "end_line": 331, "span_ids": ["test_domain_c_ast_fundamental_types"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_fundamental_types():\n # ... other code\n\n for t in types():\n input = \"{key}%s foo\" % t\n output = ' '.join(input.split())\n check('type', input, {1: 'foo'}, key='typedef', output=output)\n if ' ' in t:\n # try permutations of all components\n tcs = t.split()\n for p in itertools.permutations(tcs):\n input = \"{key}%s foo\" % ' '.join(p)\n output = ' '.join(input.split())\n check(\"type\", input, {1: 'foo'}, key='typedef', output=output)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_type_definitions_test_domain_c_ast_type_definitions.check_type_key_void_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_type_definitions_test_domain_c_ast_type_definitions.check_type_key_void_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 334, "end_line": 352, "span_ids": ["test_domain_c_ast_type_definitions"], "tokens": 341}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_type_definitions():\n check('type', \"{key}T\", {1: \"T\"})\n\n check('type', \"{key}bool *b\", {1: 'b'}, key='typedef')\n check('type', \"{key}bool *const b\", {1: 'b'}, key='typedef')\n check('type', \"{key}bool *const *b\", {1: 'b'}, key='typedef')\n check('type', \"{key}bool *volatile *b\", {1: 'b'}, key='typedef')\n check('type', \"{key}bool *restrict *b\", {1: 'b'}, key='typedef')\n check('type', \"{key}bool *volatile const b\", {1: 'b'}, key='typedef')\n check('type', \"{key}bool *volatile const b\", {1: 'b'}, key='typedef')\n check('type', \"{key}bool *volatile const *b\", {1: 'b'}, key='typedef')\n check('type', \"{key}bool b[]\", {1: 'b'}, key='typedef')\n check('type', \"{key}long long int foo\", {1: 'foo'}, key='typedef')\n # test decl specs on right\n check('type', \"{key}bool const b\", {1: 'b'}, key='typedef')\n\n # from breathe#267 (named function parameters for function pointers\n check('type', '{key}void (*gpio_callback_t)(struct device *port, uint32_t pin)',\n {1: 'gpio_callback_t'}, key='typedef')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_macro_definitions_test_domain_c_ast_macro_definitions.with_pytest_raises_Defini.check_macro_M_arg1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_macro_definitions_test_domain_c_ast_macro_definitions.with_pytest_raises_Defini.check_macro_M_arg1_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 355, "end_line": 368, "span_ids": ["test_domain_c_ast_macro_definitions"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_macro_definitions():\n check('macro', 'M', {1: 'M'})\n check('macro', 'M()', {1: 'M'})\n check('macro', 'M(arg)', {1: 'M'})\n check('macro', 'M(arg1, arg2)', {1: 'M'})\n check('macro', 'M(arg1, arg2, arg3)', {1: 'M'})\n check('macro', 'M(...)', {1: 'M'})\n check('macro', 'M(arg, ...)', {1: 'M'})\n check('macro', 'M(arg1, arg2, ...)', {1: 'M'})\n check('macro', 'M(arg1, arg2, arg3, ...)', {1: 'M'})\n # GNU extension\n check('macro', 'M(arg1, arg2, arg3...)', {1: 'M'})\n with pytest.raises(DefinitionError):\n check('macro', 'M(arg1, arg2..., arg3)', {1: 'M'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_member_definitions_test_domain_c_ast_member_definitions.check_member_int_b_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_member_definitions_test_domain_c_ast_member_definitions.check_member_int_b_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 371, "end_line": 426, "span_ids": ["test_domain_c_ast_member_definitions"], "tokens": 725}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_member_definitions():\n check('member', 'void a', {1: 'a'})\n check('member', '_Bool a', {1: 'a'})\n check('member', 'bool a', {1: 'a'})\n check('member', 'char a', {1: 'a'})\n check('member', 'int a', {1: 'a'})\n check('member', 'float a', {1: 'a'})\n check('member', 'double a', {1: 'a'})\n\n check('member', 'unsigned long a', {1: 'a'})\n check('member', '__int64 a', {1: 'a'})\n check('member', 'unsigned __int64 a', {1: 'a'})\n\n check('member', 'int .a', {1: 'a'})\n\n check('member', 'int *a', {1: 'a'})\n check('member', 'int **a', {1: 'a'})\n check('member', 'const int a', {1: 'a'})\n check('member', 'volatile int a', {1: 'a'})\n check('member', 'restrict int a', {1: 'a'})\n check('member', 'volatile const int a', {1: 'a'})\n check('member', 'restrict const int a', {1: 'a'})\n check('member', 'restrict volatile int a', {1: 'a'})\n check('member', 'restrict volatile const int a', {1: 'a'})\n\n check('member', 'T t', {1: 't'})\n\n check('member', 'int a[]', {1: 'a'})\n\n check('member', 'int (*p)[]', {1: 'p'})\n\n check('member', 'int a[42]', {1: 'a'})\n check('member', 'int a = 42', {1: 'a'})\n check('member', 'T a = {}', {1: 'a'})\n check('member', 'T a = {1}', {1: 'a'})\n check('member', 'T a = {1, 2}', {1: 'a'})\n check('member', 'T a = {1, 2, 3}', {1: 'a'})\n\n # test from issue #1539\n check('member', 'CK_UTF8CHAR model[16]', {1: 'model'})\n\n check('member', 'auto int a', {1: 'a'})\n check('member', 'register int a', {1: 'a'})\n check('member', 'extern int a', {1: 'a'})\n check('member', 'static int a', {1: 'a'})\n\n check('member', 'thread_local int a', {1: 'a'})\n check('member', '_Thread_local int a', {1: 'a'})\n check('member', 'extern thread_local int a', {1: 'a'})\n check('member', 'thread_local extern int a', {1: 'a'},\n 'extern thread_local int a')\n check('member', 'static thread_local int a', {1: 'a'})\n check('member', 'thread_local static int a', {1: 'a'},\n 'static thread_local int a')\n\n check('member', 'int b : 3', {1: 'b'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_function_definitions_test_domain_c_ast_function_definitions.None_30": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_function_definitions_test_domain_c_ast_function_definitions.None_30", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 429, "end_line": 486, "span_ids": ["test_domain_c_ast_function_definitions"], "tokens": 881}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_function_definitions():\n check('function', 'void f()', {1: 'f'})\n check('function', 'void f(int)', {1: 'f'})\n check('function', 'void f(int i)', {1: 'f'})\n check('function', 'void f(int i, int j)', {1: 'f'})\n check('function', 'void f(...)', {1: 'f'})\n check('function', 'void f(int i, ...)', {1: 'f'})\n check('function', 'void f(struct T)', {1: 'f'})\n check('function', 'void f(struct T t)', {1: 'f'})\n check('function', 'void f(union T)', {1: 'f'})\n check('function', 'void f(union T t)', {1: 'f'})\n check('function', 'void f(enum T)', {1: 'f'})\n check('function', 'void f(enum T t)', {1: 'f'})\n\n # test from issue #1539\n check('function', 'void f(A x[])', {1: 'f'})\n\n # test from issue #2377\n check('function', 'void (*signal(int sig, void (*func)(int)))(int)', {1: 'signal'})\n\n check('function', 'extern void f()', {1: 'f'})\n check('function', 'static void f()', {1: 'f'})\n check('function', 'inline void f()', {1: 'f'})\n\n # tests derived from issue #1753 (skip to keep sanity)\n check('function', \"void f(float *q(double))\", {1: 'f'})\n check('function', \"void f(float *(*q)(double))\", {1: 'f'})\n check('function', \"void f(float (*q)(double))\", {1: 'f'})\n check('function', \"int (*f(double d))(float)\", {1: 'f'})\n check('function', \"int (*f(bool b))[5]\", {1: 'f'})\n check('function', \"void f(int *const p)\", {1: 'f'})\n check('function', \"void f(int *volatile const p)\", {1: 'f'})\n\n # from breathe#223\n check('function', 'void f(struct E e)', {1: 'f'})\n check('function', 'void f(enum E e)', {1: 'f'})\n check('function', 'void f(union E e)', {1: 'f'})\n\n # array declarators\n check('function', 'void f(int arr[])', {1: 'f'})\n check('function', 'void f(int arr[*])', {1: 'f'})\n cvrs = ['', 'const', 'volatile', 'restrict', 'restrict volatile const']\n for cvr in cvrs:\n space = ' ' if len(cvr) != 0 else ''\n check('function', 'void f(int arr[{}*])'.format(cvr), {1: 'f'})\n check('function', 'void f(int arr[{}])'.format(cvr), {1: 'f'})\n check('function', 'void f(int arr[{}{}42])'.format(cvr, space), {1: 'f'})\n check('function', 'void f(int arr[static{}{} 42])'.format(space, cvr), {1: 'f'})\n check('function', 'void f(int arr[{}{}static 42])'.format(cvr, space), {1: 'f'},\n output='void f(int arr[static{}{} 42])'.format(space, cvr))\n check('function', 'void f(int arr[const static volatile 42])', {1: 'f'},\n output='void f(int arr[static volatile const 42])')\n\n with pytest.raises(DefinitionError):\n parse('function', 'void f(int for)')\n\n # from #8960\n check('function', 'void f(void (*p)(int, double), int i)', {1: 'f'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_nested_name_test_domain_c_ast_enum_definitions.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_nested_name_test_domain_c_ast_enum_definitions.None_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 489, "end_line": 508, "span_ids": ["test_domain_c_ast_union_definitions", "test_domain_c_ast_nested_name", "test_domain_c_ast_enum_definitions", "test_domain_c_ast_struct_definitions"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_nested_name():\n check('struct', '{key}.A', {1: \"A\"})\n check('struct', '{key}.A.B', {1: \"A.B\"})\n check('function', 'void f(.A a)', {1: \"f\"})\n check('function', 'void f(.A.B a)', {1: \"f\"})\n\n\ndef test_domain_c_ast_struct_definitions():\n check('struct', '{key}A', {1: 'A'})\n\n\ndef test_domain_c_ast_union_definitions():\n check('union', '{key}A', {1: 'A'})\n\n\ndef test_domain_c_ast_enum_definitions():\n check('enum', '{key}A', {1: 'A'})\n\n check('enumerator', '{key}A', {1: 'A'})\n check('enumerator', '{key}A = 42', {1: 'A'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_anon_definitions_test_domain_c_ast_anon_definitions.check_struct_a_A_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_anon_definitions_test_domain_c_ast_anon_definitions.check_struct_a_A_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 511, "end_line": 516, "span_ids": ["test_domain_c_ast_anon_definitions"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_anon_definitions():\n check('struct', '@a', {1: \"@a\"}, asTextOutput='struct [anonymous]')\n check('union', '@a', {1: \"@a\"}, asTextOutput='union [anonymous]')\n check('enum', '@a', {1: \"@a\"}, asTextOutput='enum [anonymous]')\n check('struct', '@1', {1: \"@1\"}, asTextOutput='struct [anonymous]')\n check('struct', '@a.A', {1: \"@a.A\"}, asTextOutput='struct [anonymous].A')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_initializers_test_domain_c_ast_initializers._TODO_designator_list": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_initializers_test_domain_c_ast_initializers._TODO_designator_list", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 519, "end_line": 535, "span_ids": ["test_domain_c_ast_initializers"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_initializers():\n idsMember = {1: 'v'}\n idsFunction = {1: 'f'}\n # no init\n check('member', 'T v', idsMember)\n check('function', 'void f(T v)', idsFunction)\n # with '=', assignment-expression\n check('member', 'T v = 42', idsMember)\n check('function', 'void f(T v = 42)', idsFunction)\n # with '=', braced-init\n check('member', 'T v = {}', idsMember)\n check('function', 'void f(T v = {})', idsFunction)\n check('member', 'T v = {42, 42, 42}', idsMember)\n check('function', 'void f(T v = {42, 42, 42})', idsFunction)\n check('member', 'T v = {42, 42, 42,}', idsMember)\n check('function', 'void f(T v = {42, 42, 42,})', idsFunction)\n # TODO: designator-list", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_attributes_test_domain_c_ast_attributes.check_function_LIGHTG": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_ast_attributes_test_domain_c_ast_attributes.check_function_LIGHTG", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 538, "end_line": 585, "span_ids": ["test_domain_c_ast_attributes"], "tokens": 654}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_ast_attributes():\n # style: C++\n check('member', '[[]] int f', {1: 'f'})\n check('member', '[ [ ] ] int f', {1: 'f'},\n # this will fail when the proper grammar is implemented\n output='[[ ]] int f')\n check('member', '[[a]] int f', {1: 'f'})\n # style: GNU\n check('member', '__attribute__(()) int f', {1: 'f'})\n check('member', '__attribute__((a)) int f', {1: 'f'})\n check('member', '__attribute__((a, b)) int f', {1: 'f'})\n check('member', '__attribute__((optimize(3))) int f', {1: 'f'})\n check('member', '__attribute__((format(printf, 1, 2))) int f', {1: 'f'})\n # style: user-defined id\n check('member', 'id_attr int f', {1: 'f'})\n # style: user-defined paren\n check('member', 'paren_attr() int f', {1: 'f'})\n check('member', 'paren_attr(a) int f', {1: 'f'})\n check('member', 'paren_attr(\"\") int f', {1: 'f'})\n check('member', 'paren_attr(()[{}][]{}) int f', {1: 'f'})\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr(() int f')\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr([) int f')\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr({) int f')\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr([)]) int f')\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr((])) int f')\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr({]}) int f')\n\n # position: decl specs\n check('function', 'static inline __attribute__(()) void f()', {1: 'f'},\n output='__attribute__(()) static inline void f()')\n check('function', '[[attr1]] [[attr2]] void f()', {1: 'f'})\n # position: declarator\n check('member', 'int *[[attr]] i', {1: 'i'})\n check('member', 'int *const [[attr]] volatile i', {1: 'i'},\n output='int *[[attr]] volatile const i')\n check('member', 'int *[[attr]] *i', {1: 'i'})\n # position: parameters\n check('function', 'void f() [[attr1]] [[attr2]]', {1: 'f'})\n\n # issue michaeljones/breathe#500\n check('function', 'LIGHTGBM_C_EXPORT int LGBM_BoosterFree(int handle)',\n {1: 'LGBM_BoosterFree'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_extra_keywords_filter_warnings.return.res": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_extra_keywords_filter_warnings.return.res", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 588, "end_line": 615, "span_ids": ["test_extra_keywords", "split_warnigns", "filter_warnings"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_extra_keywords():\n with pytest.raises(DefinitionError,\n match='Expected identifier in nested name'):\n parse('function', 'void complex(void)')\n\n\n# def test_print():\n# # used for getting all the ids out for checking\n# for a in ids:\n# print(a)\n# raise DefinitionError(\"\")\n\n\ndef split_warnigns(warning):\n ws = warning.getvalue().split(\"\\n\")\n assert len(ws) >= 1\n assert ws[-1] == \"\"\n return ws[:-1]\n\n\ndef filter_warnings(warning, file):\n lines = split_warnigns(warning)\n res = [l for l in lines if \"domain-c\" in l and \"{}.rst\".format(file) in l and\n \"WARNING: document isn't included in any toctree\" not in l]\n print(\"Filtered warnings for file '{}':\".format(file))\n for w in res:\n print(w)\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_test_domain_c_build_namespace.for_id__in_NS_NSVar_.assert_id_c_format": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_test_domain_c_build_namespace.for_id__in_NS_NSVar_.assert_id_c_format", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 637, "end_line": 651, "span_ids": ["test_domain_c_build_namespace", "test_domain_c_build"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-c', confoverrides={'nitpicky': True})\ndef test_domain_c_build(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"index\")\n assert len(ws) == 0\n\n\n@pytest.mark.sphinx(testroot='domain-c', confoverrides={'nitpicky': True})\ndef test_domain_c_build_namespace(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"namespace\")\n assert len(ws) == 0\n t = (app.outdir / \"namespace.html\").read_text()\n for id_ in ('NS.NSVar', 'NULLVar', 'ZeroVar', 'NS2.NS3.NS2NS3Var', 'PopVar'):\n assert 'id=\"c.{}\"'.format(id_) in t", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_anon_dup_decl_test_domain_c_build_anon_dup_decl.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_anon_dup_decl_test_domain_c_build_anon_dup_decl.None_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 654, "end_line": 660, "span_ids": ["test_domain_c_build_anon_dup_decl"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-c', confoverrides={'nitpicky': True})\ndef test_domain_c_build_anon_dup_decl(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"anon-dup-decl\")\n assert len(ws) == 2\n assert \"WARNING: c:identifier reference target not found: @a\" in ws[0]\n assert \"WARNING: c:identifier reference target not found: @b\" in ws[1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_semicolon_test_domain_c_build_semicolon.assert_len_ws_0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_semicolon_test_domain_c_build_semicolon.assert_len_ws_0", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 663, "end_line": 679, "span_ids": ["test_domain_c_build_semicolon"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(confoverrides={'nitpicky': True})\ndef test_domain_c_build_semicolon(app, warning):\n text = \"\"\"\n.. c:member:: int member;\n.. c:var:: int var;\n.. c:function:: void f();\n.. .. c:macro:: NO_SEMICOLON;\n.. c:struct:: Struct;\n.. c:union:: Union;\n.. c:enum:: Enum;\n.. c:enumerator:: Enumerator;\n.. c:type:: Type;\n.. c:type:: int TypeDef;\n\"\"\"\n restructuredtext.parse(app, text)\n ws = split_warnigns(warning)\n assert len(ws) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_function_param_target_test_domain_c_build_function_param_target.assert_entries_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_function_param_target_test_domain_c_build_function_param_target.assert_entries_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 682, "end_line": 692, "span_ids": ["test_domain_c_build_function_param_target"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-c', confoverrides={'nitpicky': True})\ndef test_domain_c_build_function_param_target(app, warning):\n # the anchor for function parameters should be the function\n app.builder.build_all()\n ws = filter_warnings(warning, \"function_param_target\")\n assert len(ws) == 0\n entries = extract_role_links(app, \"function_param_target.html\")\n assert entries == [\n ('c.function_param_target.f', 'i', 'i'),\n ('c.function_param_target.f', 'f.i', 'f.i'),\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_ns_lookup__get_obj.return._queryName_not_found": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_ns_lookup__get_obj.return._queryName_not_found", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 695, "end_line": 714, "span_ids": ["_get_obj", "test_domain_c_build_field_role", "test_domain_c_build_ns_lookup"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-c', confoverrides={'nitpicky': True})\ndef test_domain_c_build_ns_lookup(app, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"ns_lookup\")\n assert len(ws) == 0\n\n\n@pytest.mark.sphinx(testroot='domain-c', confoverrides={'nitpicky': True})\ndef test_domain_c_build_field_role(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"field-role\")\n assert len(ws) == 0\n\n\ndef _get_obj(app, queryName):\n domain = app.env.get_domain('c')\n for name, _dispname, objectType, docname, anchor, _prio in domain.get_objects():\n if name == queryName:\n return (docname, anchor, objectType)\n return (queryName, \"not\", \"found\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_intersphinx_test_domain_c_build_intersphinx.assert_len_ws_0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_build_intersphinx_test_domain_c_build_intersphinx.assert_len_ws_0", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 717, "end_line": 765, "span_ids": ["test_domain_c_build_intersphinx"], "tokens": 459}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-c-intersphinx', confoverrides={'nitpicky': True})\ndef test_domain_c_build_intersphinx(tempdir, app, status, warning):\n # a splitting of test_ids_vs_tags0 into the primary directives in a remote project,\n # and then the references in the test project\n origSource = \"\"\"\\\n.. c:member:: int _member\n.. c:var:: int _var\n.. c:function:: void _function()\n.. c:macro:: _macro\n.. c:struct:: _struct\n.. c:union:: _union\n.. c:enum:: _enum\n\n .. c:enumerator:: _enumerator\n\n.. c:type:: _type\n.. c:function:: void _functionParam(int param)\n\"\"\" # noqa\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(b'''\\\n# Sphinx inventory version 2\n# Project: C Intersphinx Test\n# Version: \n# The remainder of this file is compressed using zlib.\n''' + zlib.compress(b'''\\\n_enum c:enum 1 index.html#c.$ -\n_enum._enumerator c:enumerator 1 index.html#c.$ -\n_enumerator c:enumerator 1 index.html#c._enum.$ -\n_function c:function 1 index.html#c.$ -\n_functionParam c:function 1 index.html#c.$ -\n_functionParam.param c:functionParam 1 index.html#c._functionParam -\n_macro c:macro 1 index.html#c.$ -\n_member c:member 1 index.html#c.$ -\n_struct c:struct 1 index.html#c.$ -\n_type c:type 1 index.html#c.$ -\n_union c:union 1 index.html#c.$ -\n_var c:member 1 index.html#c.$ -\n''')) # noqa\n app.config.intersphinx_mapping = {\n 'https://localhost/intersphinx/c/': inv_file,\n }\n app.config.intersphinx_cache_limit = 0\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n\n app.builder.build_all()\n ws = filter_warnings(warning, \"index\")\n assert len(ws) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_parse_cfunction_test_domain_c_parse_cfunction.assert_entry_index_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_parse_cfunction_test_domain_c_parse_cfunction.assert_entry_index_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 768, "end_line": 776, "span_ids": ["test_domain_c_parse_cfunction"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_parse_cfunction(app):\n text = (\".. c:function:: PyObject* \"\n \"PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree[1], addnodes.desc, desctype=\"function\",\n domain=\"c\", objtype=\"function\", noindex=False)\n\n entry = _get_obj(app, 'PyType_GenericAlloc')\n assert entry == ('index', 'c.PyType_GenericAlloc', 'function')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_parse_cmember_test_domain_c_parse_cvar.assert_entry_index_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_parse_cmember_test_domain_c_parse_cvar.assert_entry_index_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 779, "end_line": 796, "span_ids": ["test_domain_c_parse_cvar", "test_domain_c_parse_cmember"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_parse_cmember(app):\n text = \".. c:member:: PyObject* PyTypeObject.tp_bases\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree[1], addnodes.desc, desctype=\"member\",\n domain=\"c\", objtype=\"member\", noindex=False)\n\n entry = _get_obj(app, 'PyTypeObject.tp_bases')\n assert entry == ('index', 'c.PyTypeObject.tp_bases', 'member')\n\n\ndef test_domain_c_parse_cvar(app):\n text = \".. c:var:: PyObject* PyClass_Type\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree[1], addnodes.desc, desctype=\"var\",\n domain=\"c\", objtype=\"var\", noindex=False)\n\n entry = _get_obj(app, 'PyClass_Type')\n assert entry == ('index', 'c.PyClass_Type', 'member')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_parse_noindexentry_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_c.py_test_domain_c_parse_noindexentry_", "embedding": null, "metadata": {"file_path": "tests/test_domain_c.py", "file_name": "test_domain_c.py", "file_type": "text/x-python", "category": "test", "start_line": 799, "end_line": 807, "span_ids": ["test_domain_c_parse_noindexentry"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_c_parse_noindexentry(app):\n text = (\".. c:function:: void f()\\n\"\n \".. c:function:: void g()\\n\"\n \" :noindexentry:\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index, desc, addnodes.index, desc))\n assert_node(doctree[0], addnodes.index, entries=[('single', 'f (C function)', 'c.f', '', None)])\n assert_node(doctree[2], addnodes.index, entries=[])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py__Tests_the_C_Domain__parse.return.ast": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py__Tests_the_C_Domain__parse.return.ast", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 30, "span_ids": ["docstring", "parse.Config", "imports", "parse", "parse.Config:2"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests the C++ Domain\"\"\"\n\nimport itertools\nimport re\nimport zlib\n\nimport pytest\n\nimport sphinx.domains.cpp as cppDomain\nfrom sphinx import addnodes\nfrom sphinx.addnodes import desc\nfrom sphinx.domains.cpp import (DefinitionError, DefinitionParser, NoOldIdError, Symbol,\n _id_prefix, _max_id)\nfrom sphinx.ext.intersphinx import load_mappings, normalize_intersphinx_mapping\nfrom sphinx.testing import restructuredtext\nfrom sphinx.testing.util import assert_node\n\n\ndef parse(name, string):\n class Config:\n cpp_id_attributes = [\"id_attr\"]\n cpp_paren_attributes = [\"paren_attr\"]\n parser = DefinitionParser(string, location=None, config=Config())\n parser.allowFallbackExpressionParsing = False\n ast = parser.parse_declaration(name, name)\n parser.assert_end()\n # The scopedness would usually have been set by CPPEnumObject\n if name == \"enum\":\n ast.scoped = None # simulate unscoped enum\n return ast", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_check_test_domain_cpp_ast_fundamental_types.for_t_id_v2_in_cppDomain.if_in_t_.for_p_in_itertools_permut.check_function_input_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_check_test_domain_cpp_ast_fundamental_types.for_t_id_v2_in_cppDomain.if_in_t_.for_p_in_itertools_permut.check_function_input_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 143, "span_ids": ["check", "test_domain_cpp_ast_fundamental_types"], "tokens": 466}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check(name, input, idDict, output=None, key=None, asTextOutput=None):\n if output is None:\n output = input\n # First, check without semicolon\n _check(name, input, idDict, output, key, asTextOutput)\n # Second, check with semicolon\n _check(name, input + ' ;', idDict, output + ';', key,\n asTextOutput + ';' if asTextOutput is not None else None)\n\n\ndef test_domain_cpp_ast_fundamental_types():\n # see https://en.cppreference.com/w/cpp/language/types\n for t, id_v2 in cppDomain._id_fundamental_v2.items():\n def makeIdV1():\n if t == 'decltype(auto)':\n return None\n id = t.replace(\" \", \"-\").replace(\"long\", \"l\")\n if \"__int\" not in t:\n id = id.replace(\"int\", \"i\")\n id = id.replace(\"bool\", \"b\").replace(\"char\", \"c\")\n id = id.replace(\"wc_t\", \"wchar_t\").replace(\"c16_t\", \"char16_t\")\n id = id.replace(\"c8_t\", \"char8_t\")\n id = id.replace(\"c32_t\", \"char32_t\")\n return \"f__%s\" % id\n\n def makeIdV2():\n id = id_v2\n if t == \"std::nullptr_t\":\n id = \"NSt9nullptr_tE\"\n return \"1f%s\" % id\n id1 = makeIdV1()\n id2 = makeIdV2()\n input = \"void f(%s arg)\" % t.replace(' ', ' ')\n output = \"void f(%s arg)\" % t\n check(\"function\", input, {1: id1, 2: id2}, output=output)\n if ' ' in t:\n # try permutations of all components\n tcs = t.split()\n for p in itertools.permutations(tcs):\n input = \"void f(%s arg)\" % ' '.join(p)\n check(\"function\", input, {1: id1, 2: id2})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions_test_domain_cpp_ast_expressions.exprCheck.if_res_displayString_.raise_DefinitionError_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions_test_domain_cpp_ast_expressions.exprCheck.if_res_displayString_.raise_DefinitionError_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 146, "end_line": 176, "span_ids": ["test_domain_cpp_ast_expressions.exprCheck.Config", "test_domain_cpp_ast_expressions.exprCheck.Config:2", "test_domain_cpp_ast_expressions"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_expressions():\n def exprCheck(expr, id, id4=None):\n ids = 'IE1CIA%s_1aE'\n # call .format() on the expr to unescape double curly braces\n idDict = {2: ids % expr.format(), 3: ids % id}\n if id4 is not None:\n idDict[4] = ids % id4\n check('class', 'template<> {key}C<a[%s]>' % expr, idDict)\n\n class Config:\n cpp_id_attributes = [\"id_attr\"]\n cpp_paren_attributes = [\"paren_attr\"]\n\n parser = DefinitionParser(expr, location=None,\n config=Config())\n parser.allowFallbackExpressionParsing = False\n ast = parser.parse_expression()\n res = str(ast)\n if res != expr:\n print(\"\")\n print(\"Input: \", expr)\n print(\"Result: \", res)\n raise DefinitionError(\"\")\n displayString = ast.get_display_string()\n if res != displayString:\n # note: if the expression contains an anon name then this will trigger a falsely\n print(\"\")\n print(\"Input: \", expr)\n print(\"Result: \", res)\n print(\"Display: \", displayString)\n raise DefinitionError(\"\")\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions._primary_test_domain_cpp_ast_expressions.for_p_t_in_charPrefixAnd.for_c_val_in_chars_.exprCheck_format": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions._primary_test_domain_cpp_ast_expressions.for_p_t_in_charPrefixAnd.for_c_val_in_chars_.exprCheck_format", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 178, "end_line": 221, "span_ids": ["test_domain_cpp_ast_expressions.exprCheck.Config:2"], "tokens": 788}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_expressions():\n\n # primary\n exprCheck('nullptr', 'LDnE')\n exprCheck('true', 'L1E')\n exprCheck('false', 'L0E')\n ints = ['5', '0', '075', '0x0123456789ABCDEF', '0XF', '0b1', '0B1',\n \"0b0'1'0\", \"00'1'2\", \"0x0'1'2\", \"1'2'3\"]\n unsignedSuffix = ['', 'u', 'U']\n longSuffix = ['', 'l', 'L', 'll', 'LL']\n for i in ints:\n for u in unsignedSuffix:\n for l in longSuffix:\n expr = i + u + l\n exprCheck(expr, 'L' + expr.replace(\"'\", \"\") + 'E')\n expr = i + l + u\n exprCheck(expr, 'L' + expr.replace(\"'\", \"\") + 'E')\n decimalFloats = ['5e42', '5e+42', '5e-42',\n '5.', '5.e42', '5.e+42', '5.e-42',\n '.5', '.5e42', '.5e+42', '.5e-42',\n '5.0', '5.0e42', '5.0e+42', '5.0e-42',\n \"1'2'3e7'8'9\", \"1'2'3.e7'8'9\",\n \".4'5'6e7'8'9\", \"1'2'3.4'5'6e7'8'9\"]\n hexFloats = ['ApF', 'Ap+F', 'Ap-F',\n 'A.', 'A.pF', 'A.p+F', 'A.p-F',\n '.A', '.ApF', '.Ap+F', '.Ap-F',\n 'A.B', 'A.BpF', 'A.Bp+F', 'A.Bp-F',\n \"A'B'Cp1'2'3\", \"A'B'C.p1'2'3\",\n \".D'E'Fp1'2'3\", \"A'B'C.D'E'Fp1'2'3\"]\n for suffix in ['', 'f', 'F', 'l', 'L']:\n for e in decimalFloats:\n expr = e + suffix\n exprCheck(expr, 'L' + expr.replace(\"'\", \"\") + 'E')\n for e in hexFloats:\n expr = \"0x\" + e + suffix\n exprCheck(expr, 'L' + expr.replace(\"'\", \"\") + 'E')\n exprCheck('\"abc\\\\\"cba\"', 'LA8_KcE') # string\n exprCheck('this', 'fpT')\n # character literals\n charPrefixAndIds = [('', 'c'), ('u8', 'c'), ('u', 'Ds'), ('U', 'Di'), ('L', 'w')]\n chars = [('a', '97'), ('\\\\n', '10'), ('\\\\012', '10'), ('\\\\0', '0'),\n ('\\\\x0a', '10'), ('\\\\x0A', '10'), ('\\\\u0a42', '2626'), ('\\\\u0A42', '2626'),\n ('\\\\U0001f34c', '127820'), ('\\\\U0001F34C', '127820')]\n for p, t in charPrefixAndIds:\n for c, val in chars:\n exprCheck(\"{}'{}'\".format(p, c), t + val)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions._user_defined_literals_test_domain_cpp_ast_expressions.exprCheck_sizeof_T_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions._user_defined_literals_test_domain_cpp_ast_expressions.exprCheck_sizeof_T_s", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 222, "end_line": 269, "span_ids": ["test_domain_cpp_ast_expressions.exprCheck.Config:2"], "tokens": 796}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_expressions():\n # user-defined literals\n for i in ints:\n exprCheck(i + '_udl', 'clL_Zli4_udlEL' + i.replace(\"'\", \"\") + 'EE')\n exprCheck(i + 'uludl', 'clL_Zli5uludlEL' + i.replace(\"'\", \"\") + 'EE')\n for f in decimalFloats:\n exprCheck(f + '_udl', 'clL_Zli4_udlEL' + f.replace(\"'\", \"\") + 'EE')\n exprCheck(f + 'fudl', 'clL_Zli4fudlEL' + f.replace(\"'\", \"\") + 'EE')\n for f in hexFloats:\n exprCheck('0x' + f + '_udl', 'clL_Zli4_udlEL0x' + f.replace(\"'\", \"\") + 'EE')\n for p, t in charPrefixAndIds:\n for c, val in chars:\n exprCheck(\"{}'{}'_udl\".format(p, c), 'clL_Zli4_udlE' + t + val + 'E')\n exprCheck('\"abc\"_udl', 'clL_Zli4_udlELA3_KcEE')\n # from issue #7294\n exprCheck('6.62607015e-34q_J', 'clL_Zli3q_JEL6.62607015e-34EE')\n\n # fold expressions, paren, name\n exprCheck('(... + Ns)', '(... + Ns)', id4='flpl2Ns')\n exprCheck('(Ns + ...)', '(Ns + ...)', id4='frpl2Ns')\n exprCheck('(Ns + ... + 0)', '(Ns + ... + 0)', id4='fLpl2NsL0E')\n exprCheck('(5)', 'L5E')\n exprCheck('C', '1C')\n # postfix\n exprCheck('A(2)', 'cl1AL2EE')\n exprCheck('A[2]', 'ix1AL2E')\n exprCheck('a.b.c', 'dtdt1a1b1c')\n exprCheck('a->b->c', 'ptpt1a1b1c')\n exprCheck('i++', 'pp1i')\n exprCheck('i--', 'mm1i')\n exprCheck('dynamic_cast<T&>(i)++', 'ppdcR1T1i')\n exprCheck('static_cast<T&>(i)++', 'ppscR1T1i')\n exprCheck('reinterpret_cast<T&>(i)++', 'pprcR1T1i')\n exprCheck('const_cast<T&>(i)++', 'ppccR1T1i')\n exprCheck('typeid(T).name', 'dtti1T4name')\n exprCheck('typeid(a + b).name', 'dttepl1a1b4name')\n # unary\n exprCheck('++5', 'pp_L5E')\n exprCheck('--5', 'mm_L5E')\n exprCheck('*5', 'deL5E')\n exprCheck('&5', 'adL5E')\n exprCheck('+5', 'psL5E')\n exprCheck('-5', 'ngL5E')\n exprCheck('!5', 'ntL5E')\n exprCheck('not 5', 'ntL5E')\n exprCheck('~5', 'coL5E')\n exprCheck('compl 5', 'coL5E')\n exprCheck('sizeof...(a)', 'sZ1a')\n exprCheck('sizeof(T)', 'st1T')\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions.exprCheck_sizeof_42__test_domain_cpp_ast_expressions.exprCheck_5_42_dvL5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions.exprCheck_sizeof_42__test_domain_cpp_ast_expressions.exprCheck_5_42_dvL5", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 270, "end_line": 323, "span_ids": ["test_domain_cpp_ast_expressions.exprCheck.Config:2"], "tokens": 813}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_expressions():\n # ... other code\n exprCheck('sizeof -42', 'szngL42E')\n exprCheck('alignof(T)', 'at1T')\n exprCheck('noexcept(-42)', 'nxngL42E')\n # new-expression\n exprCheck('new int', 'nw_iE')\n exprCheck('new volatile int', 'nw_ViE')\n exprCheck('new int[42]', 'nw_AL42E_iE')\n exprCheck('new int()', 'nw_ipiE')\n exprCheck('new int(5, 42)', 'nw_ipiL5EL42EE')\n exprCheck('::new int', 'nw_iE')\n exprCheck('new int{{}}', 'nw_iilE')\n exprCheck('new int{{5, 42}}', 'nw_iilL5EL42EE')\n # delete-expression\n exprCheck('delete p', 'dl1p')\n exprCheck('delete [] p', 'da1p')\n exprCheck('::delete p', 'dl1p')\n exprCheck('::delete [] p', 'da1p')\n # cast\n exprCheck('(int)2', 'cviL2E')\n # binary op\n exprCheck('5 || 42', 'ooL5EL42E')\n exprCheck('5 or 42', 'ooL5EL42E')\n exprCheck('5 && 42', 'aaL5EL42E')\n exprCheck('5 and 42', 'aaL5EL42E')\n exprCheck('5 | 42', 'orL5EL42E')\n exprCheck('5 bitor 42', 'orL5EL42E')\n exprCheck('5 ^ 42', 'eoL5EL42E')\n exprCheck('5 xor 42', 'eoL5EL42E')\n exprCheck('5 & 42', 'anL5EL42E')\n exprCheck('5 bitand 42', 'anL5EL42E')\n # ['==', '!=']\n exprCheck('5 == 42', 'eqL5EL42E')\n exprCheck('5 != 42', 'neL5EL42E')\n exprCheck('5 not_eq 42', 'neL5EL42E')\n # ['<=', '>=', '<', '>', '<=>']\n exprCheck('5 <= 42', 'leL5EL42E')\n exprCheck('A <= 42', 'le1AL42E')\n exprCheck('5 >= 42', 'geL5EL42E')\n exprCheck('5 < 42', 'ltL5EL42E')\n exprCheck('A < 42', 'lt1AL42E')\n exprCheck('5 > 42', 'gtL5EL42E')\n exprCheck('A > 42', 'gt1AL42E')\n exprCheck('5 <=> 42', 'ssL5EL42E')\n exprCheck('A <=> 42', 'ss1AL42E')\n # ['<<', '>>']\n exprCheck('5 << 42', 'lsL5EL42E')\n exprCheck('A << 42', 'ls1AL42E')\n exprCheck('5 >> 42', 'rsL5EL42E')\n # ['+', '-']\n exprCheck('5 + 42', 'plL5EL42E')\n exprCheck('5 - 42', 'miL5EL42E')\n # ['*', '/', '%']\n exprCheck('5 * 42', 'mlL5EL42E')\n exprCheck('5 / 42', 'dvL5EL42E')\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions.exprCheck_5_42_rmL5_test_domain_cpp_ast_expressions.exprCheck_a_b_c_1_d_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_expressions.exprCheck_5_42_rmL5_test_domain_cpp_ast_expressions.exprCheck_a_b_c_1_d_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 324, "end_line": 362, "span_ids": ["test_domain_cpp_ast_expressions.exprCheck.Config:2"], "tokens": 650}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_expressions():\n # ... other code\n exprCheck('5 % 42', 'rmL5EL42E')\n # ['.*', '->*']\n exprCheck('5 .* 42', 'dsL5EL42E')\n exprCheck('5 ->* 42', 'pmL5EL42E')\n # conditional\n # TODO\n # assignment\n exprCheck('a = 5', 'aS1aL5E')\n exprCheck('a *= 5', 'mL1aL5E')\n exprCheck('a /= 5', 'dV1aL5E')\n exprCheck('a %= 5', 'rM1aL5E')\n exprCheck('a += 5', 'pL1aL5E')\n exprCheck('a -= 5', 'mI1aL5E')\n exprCheck('a >>= 5', 'rS1aL5E')\n exprCheck('a <<= 5', 'lS1aL5E')\n exprCheck('a &= 5', 'aN1aL5E')\n exprCheck('a and_eq 5', 'aN1aL5E')\n exprCheck('a ^= 5', 'eO1aL5E')\n exprCheck('a xor_eq 5', 'eO1aL5E')\n exprCheck('a |= 5', 'oR1aL5E')\n exprCheck('a or_eq 5', 'oR1aL5E')\n exprCheck('a = {{1, 2, 3}}', 'aS1ailL1EL2EL3EE')\n # comma operator\n exprCheck('a, 5', 'cm1aL5E')\n\n # Additional tests\n # a < expression that starts with something that could be a template\n exprCheck('A < 42', 'lt1AL42E')\n check('function', 'template<> void f(A<B, 2> &v)',\n {2: \"IE1fR1AI1BX2EE\", 3: \"IE1fR1AI1BXL2EEE\", 4: \"IE1fvR1AI1BXL2EEE\"})\n exprCheck('A<1>::value', 'N1AIXL1EEE5valueE')\n check('class', \"template<int T = 42> {key}A\", {2: \"I_iE1A\"})\n check('enumerator', '{key}A = std::numeric_limits<unsigned long>::max()', {2: \"1A\"})\n\n exprCheck('operator()()', 'clclE')\n exprCheck('operator()<int>()', 'clclIiEE')\n\n # pack expansion\n exprCheck('a(b(c, 1 + d...)..., e(f..., g))', 'cl1aspcl1b1cspplL1E1dEcl1esp1f1gEE')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_type_definitions_test_domain_cpp_ast_type_definitions.check_type_key_A_d": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_type_definitions_test_domain_cpp_ast_type_definitions.check_type_key_A_d", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 365, "end_line": 395, "span_ids": ["test_domain_cpp_ast_type_definitions"], "tokens": 774}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_type_definitions():\n check(\"type\", \"public bool b\", {1: \"b\", 2: \"1b\"}, \"{key}bool b\", key='typedef')\n check(\"type\", \"{key}bool A::b\", {1: \"A::b\", 2: \"N1A1bE\"}, key='typedef')\n check(\"type\", \"{key}bool *b\", {1: \"b\", 2: \"1b\"}, key='typedef')\n check(\"type\", \"{key}bool *const b\", {1: \"b\", 2: \"1b\"}, key='typedef')\n check(\"type\", \"{key}bool *volatile const b\", {1: \"b\", 2: \"1b\"}, key='typedef')\n check(\"type\", \"{key}bool *volatile const b\", {1: \"b\", 2: \"1b\"}, key='typedef')\n check(\"type\", \"{key}bool *volatile const *b\", {1: \"b\", 2: \"1b\"}, key='typedef')\n check(\"type\", \"{key}bool &b\", {1: \"b\", 2: \"1b\"}, key='typedef')\n check(\"type\", \"{key}bool b[]\", {1: \"b\", 2: \"1b\"}, key='typedef')\n check(\"type\", \"{key}std::pair<int, int> coord\", {1: \"coord\", 2: \"5coord\"}, key='typedef')\n check(\"type\", \"{key}long long int foo\", {1: \"foo\", 2: \"3foo\"}, key='typedef')\n check(\"type\", '{key}std::vector<std::pair<std::string, long long>> module::blah',\n {1: \"module::blah\", 2: \"N6module4blahE\"}, key='typedef')\n check(\"type\", \"{key}std::function<void()> F\", {1: \"F\", 2: \"1F\"}, key='typedef')\n check(\"type\", \"{key}std::function<R(A1, A2)> F\", {1: \"F\", 2: \"1F\"}, key='typedef')\n check(\"type\", \"{key}std::function<R(A1, A2, A3)> F\", {1: \"F\", 2: \"1F\"}, key='typedef')\n check(\"type\", \"{key}std::function<R(A1, A2, A3, As...)> F\", {1: \"F\", 2: \"1F\"}, key='typedef')\n check(\"type\", \"{key}MyContainer::const_iterator\",\n {1: \"MyContainer::const_iterator\", 2: \"N11MyContainer14const_iteratorE\"})\n check(\"type\",\n \"public MyContainer::const_iterator\",\n {1: \"MyContainer::const_iterator\", 2: \"N11MyContainer14const_iteratorE\"},\n output=\"{key}MyContainer::const_iterator\")\n # test decl specs on right\n check(\"type\", \"{key}bool const b\", {1: \"b\", 2: \"1b\"}, key='typedef')\n # test name in global scope\n check(\"type\", \"{key}bool ::B::b\", {1: \"B::b\", 2: \"N1B1bE\"}, key='typedef')\n\n check('type', '{key}A = B', {2: '1A'}, key='using')\n check('type', '{key}A = decltype(b)', {2: '1A'}, key='using')\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_type_definitions._from_breathe_267_named_test_domain_cpp_ast_type_definitions.None_27": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_type_definitions._from_breathe_267_named_test_domain_cpp_ast_type_definitions.None_27", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 397, "end_line": 407, "span_ids": ["test_domain_cpp_ast_type_definitions"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_type_definitions():\n\n # from breathe#267 (named function parameters for function pointers\n check('type', '{key}void (*gpio_callback_t)(struct device *port, uint32_t pin)',\n {1: 'gpio_callback_t', 2: '15gpio_callback_t'}, key='typedef')\n check('type', '{key}void (*f)(std::function<void(int i)> g)', {1: 'f', 2: '1f'},\n key='typedef')\n\n check('type', '{key}T = A::template B<int>::template C<double>', {2: '1T'}, key='using')\n\n check('type', '{key}T = Q<A::operator()>', {2: '1T'}, key='using')\n check('type', '{key}T = Q<A::operator()<int>>', {2: '1T'}, key='using')\n check('type', '{key}T = Q<A::operator bool>', {2: '1T'}, key='using')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_concept_definitions_test_domain_cpp_ast_concept_definitions.None_1.parse_concept_templat": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_concept_definitions_test_domain_cpp_ast_concept_definitions.None_1.parse_concept_templat", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 410, "end_line": 418, "span_ids": ["test_domain_cpp_ast_concept_definitions"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_concept_definitions():\n check('concept', 'template<typename Param> {key}A::B::Concept',\n {2: 'I0EN1A1B7ConceptE'})\n check('concept', 'template<typename A, typename B, typename ...C> {key}Foo',\n {2: 'I00DpE3Foo'})\n with pytest.raises(DefinitionError):\n parse('concept', '{key}Foo')\n with pytest.raises(DefinitionError):\n parse('concept', 'template<typename T> template<typename U> {key}Foo')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_member_definitions_test_domain_cpp_ast_member_definitions.check_member_constini": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_member_definitions_test_domain_cpp_ast_member_definitions.check_member_constini", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 421, "end_line": 450, "span_ids": ["test_domain_cpp_ast_member_definitions"], "tokens": 675}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_member_definitions():\n check('member', ' const std::string & name = 42',\n {1: \"name__ssCR\", 2: \"4name\"}, output='const std::string &name = 42')\n check('member', ' const std::string & name', {1: \"name__ssCR\", 2: \"4name\"},\n output='const std::string &name')\n check('member', ' const std::string & name [ n ]',\n {1: \"name__ssCRA\", 2: \"4name\"}, output='const std::string &name[n]')\n check('member', 'const std::vector< unsigned int, long> &name',\n {1: \"name__std::vector:unsigned-i.l:CR\", 2: \"4name\"},\n output='const std::vector<unsigned int, long> &name')\n check('member', 'module::myclass foo[n]', {1: \"foo__module::myclassA\", 2: \"3foo\"})\n check('member', 'int *const p', {1: 'p__iPC', 2: '1p'})\n check('member', 'extern int myInt', {1: 'myInt__i', 2: '5myInt'})\n check('member', 'thread_local int myInt', {1: 'myInt__i', 2: '5myInt'})\n check('member', 'extern thread_local int myInt', {1: 'myInt__i', 2: '5myInt'})\n check('member', 'thread_local extern int myInt', {1: 'myInt__i', 2: '5myInt'},\n 'extern thread_local int myInt')\n\n # tests based on https://en.cppreference.com/w/cpp/language/bit_field\n check('member', 'int b : 3', {1: 'b__i', 2: '1b'})\n check('member', 'int b : 8 = 42', {1: 'b__i', 2: '1b'})\n check('member', 'int b : 8{42}', {1: 'b__i', 2: '1b'})\n # TODO: enable once the ternary operator is supported\n # check('member', 'int b : true ? 8 : a = 42', {1: 'b__i', 2: '1b'})\n # TODO: enable once the ternary operator is supported\n # check('member', 'int b : (true ? 8 : a) = 42', {1: 'b__i', 2: '1b'})\n check('member', 'int b : 1 || new int{0}', {1: 'b__i', 2: '1b'})\n\n check('member', 'inline int n', {1: 'n__i', 2: '1n'})\n check('member', 'constinit int n', {1: 'n__i', 2: '1n'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions_test_domain_cpp_ast_function_definitions.check_function_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions_test_domain_cpp_ast_function_definitions.check_function_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 453, "end_line": 489, "span_ids": ["test_domain_cpp_ast_function_definitions"], "tokens": 819}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_function_definitions():\n check('function', 'void f(volatile int)', {1: \"f__iV\", 2: \"1fVi\"})\n check('function', 'void f(std::size_t)', {1: \"f__std::s\", 2: \"1fNSt6size_tE\"})\n check('function', 'operator bool() const', {1: \"castto-b-operatorC\", 2: \"NKcvbEv\"})\n check('function', 'A::operator bool() const',\n {1: \"A::castto-b-operatorC\", 2: \"NK1AcvbEv\"})\n check('function', 'A::operator bool() volatile const &',\n {1: \"A::castto-b-operatorVCR\", 2: \"NVKR1AcvbEv\"})\n check('function', 'A::operator bool() volatile const &&',\n {1: \"A::castto-b-operatorVCO\", 2: \"NVKO1AcvbEv\"})\n check('function', 'bool namespaced::theclass::method(arg1, arg2)',\n {1: \"namespaced::theclass::method__arg1.arg2\",\n 2: \"N10namespaced8theclass6methodE4arg14arg2\"})\n x = 'std::vector<std::pair<std::string, int>> &module::test(register int ' \\\n 'foo, bar, std::string baz = \"foobar, blah, bleh\") const = 0'\n check('function', x, {1: \"module::test__i.bar.ssC\",\n 2: \"NK6module4testEi3barNSt6stringE\"})\n check('function', 'void f(std::pair<A, B>)',\n {1: \"f__std::pair:A.B:\", 2: \"1fNSt4pairI1A1BEE\"})\n check('function', 'explicit module::myclass::foo::foo()',\n {1: \"module::myclass::foo::foo\", 2: \"N6module7myclass3foo3fooEv\"})\n check('function', 'module::myclass::foo::~foo()',\n {1: \"module::myclass::foo::~foo\", 2: \"N6module7myclass3fooD0Ev\"})\n check('function', 'int printf(const char *fmt, ...)',\n {1: \"printf__cCP.z\", 2: \"6printfPKcz\"})\n check('function', 'int foo(const unsigned int j)',\n {1: \"foo__unsigned-iC\", 2: \"3fooKj\"})\n check('function', 'int foo(const int *const ptr)',\n {1: \"foo__iCPC\", 2: \"3fooPCKi\"})\n check('function', 'module::myclass::operator std::vector<std::string>()',\n {1: \"module::myclass::castto-std::vector:ss:-operator\",\n 2: \"N6module7myclasscvNSt6vectorINSt6stringEEEEv\"})\n check('function',\n 'void operator()(const boost::array<VertexID, 2> &v) const',\n {1: \"call-operator__boost::array:VertexID.2:CRC\",\n 2: \"NKclERKN5boost5arrayI8VertexIDX2EEE\",\n 3: \"NKclERKN5boost5arrayI8VertexIDXL2EEEE\"})\n # ... other code\n with pytest.raises(DefinitionError):\n # ... other code\n # check('function', 'int foo(int (*)(A)...)', {1: \"foo__ACRDp\", 2: \"3fooDpPK1A\"})\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions.None_16_test_domain_cpp_ast_function_definitions.None_33": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions.None_16_test_domain_cpp_ast_function_definitions.None_33", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 490, "end_line": 526, "span_ids": ["test_domain_cpp_ast_function_definitions"], "tokens": 766}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_function_definitions():\n # ... other code\n check('function',\n 'void operator()(const boost::array<VertexID, 2, \"foo, bar\"> &v) const',\n {1: 'call-operator__boost::array:VertexID.2.\"foo,--bar\":CRC',\n 2: 'NKclERKN5boost5arrayI8VertexIDX2EX\"foo, bar\"EEE',\n 3: 'NKclERKN5boost5arrayI8VertexIDXL2EEXLA9_KcEEEE'})\n check('function', 'MyClass::MyClass(MyClass::MyClass&&)',\n {1: \"MyClass::MyClass__MyClass::MyClassRR\",\n 2: \"N7MyClass7MyClassERRN7MyClass7MyClassE\"})\n check('function', 'constexpr int get_value()', {1: \"get_valueCE\", 2: \"9get_valuev\"})\n check('function', 'static constexpr int get_value()',\n {1: \"get_valueCE\", 2: \"9get_valuev\"})\n check('function', 'int get_value() const noexcept',\n {1: \"get_valueC\", 2: \"NK9get_valueEv\"})\n check('function', 'int get_value() const noexcept(std::is_nothrow_move_constructible<T>::value)',\n {1: \"get_valueC\", 2: \"NK9get_valueEv\"})\n check('function', 'int get_value() const noexcept(\"see below\")',\n {1: \"get_valueC\", 2: \"NK9get_valueEv\"})\n check('function', 'int get_value() const noexcept = delete',\n {1: \"get_valueC\", 2: \"NK9get_valueEv\"})\n check('function', 'int get_value() volatile const',\n {1: \"get_valueVC\", 2: \"NVK9get_valueEv\"})\n check('function', 'MyClass::MyClass(MyClass::MyClass&&) = default',\n {1: \"MyClass::MyClass__MyClass::MyClassRR\",\n 2: \"N7MyClass7MyClassERRN7MyClass7MyClassE\"})\n check('function', 'virtual MyClass::a_virtual_function() const override',\n {1: \"MyClass::a_virtual_functionC\", 2: \"NK7MyClass18a_virtual_functionEv\"})\n check('function', 'A B() override', {1: \"B\", 2: \"1Bv\"})\n check('function', 'A B() final', {1: \"B\", 2: \"1Bv\"})\n check('function', 'A B() final override', {1: \"B\", 2: \"1Bv\"})\n check('function', 'A B() override final', {1: \"B\", 2: \"1Bv\"},\n output='A B() final override')\n check('function', 'MyClass::a_member_function() volatile',\n {1: \"MyClass::a_member_functionV\", 2: \"NV7MyClass17a_member_functionEv\"})\n check('function', 'MyClass::a_member_function() volatile const',\n {1: \"MyClass::a_member_functionVC\", 2: \"NVK7MyClass17a_member_functionEv\"})\n check('function', 'MyClass::a_member_function() &&',\n {1: \"MyClass::a_member_functionO\", 2: \"NO7MyClass17a_member_functionEv\"})\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions.None_34_test_domain_cpp_ast_function_definitions.None_48": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions.None_34_test_domain_cpp_ast_function_definitions.None_48", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 527, "end_line": 561, "span_ids": ["test_domain_cpp_ast_function_definitions"], "tokens": 817}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_function_definitions():\n # ... other code\n check('function', 'void f(std::size_t)', {1: \"f__std::s\", 2: \"1fNSt6size_tE\"})\n # ... other code\n check('function', 'MyClass::a_member_function() &',\n {1: \"MyClass::a_member_functionR\", 2: \"NR7MyClass17a_member_functionEv\"})\n check('function', 'MyClass::a_member_function() const &',\n {1: \"MyClass::a_member_functionCR\", 2: \"NKR7MyClass17a_member_functionEv\"})\n check('function', 'int main(int argc, char *argv[])',\n {1: \"main__i.cPA\", 2: \"4mainiA_Pc\"})\n check('function', 'MyClass &MyClass::operator++()',\n {1: \"MyClass::inc-operator\", 2: \"N7MyClassppEv\"})\n check('function', 'MyClass::pointer MyClass::operator->()',\n {1: \"MyClass::pointer-operator\", 2: \"N7MyClassptEv\"})\n\n x = 'std::vector<std::pair<std::string, int>> &module::test(register int ' \\\n 'foo, bar[n], std::string baz = \"foobar, blah, bleh\") const = 0'\n check('function', x, {1: \"module::test__i.barA.ssC\",\n 2: \"NK6module4testEiAn_3barNSt6stringE\",\n 3: \"NK6module4testEiA1n_3barNSt6stringE\"})\n check('function',\n 'int foo(Foo f = Foo(double(), std::make_pair(int(2), double(3.4))))',\n {1: \"foo__Foo\", 2: \"3foo3Foo\"})\n check('function', 'int foo(A a = x(a))', {1: \"foo__A\", 2: \"3foo1A\"})\n with pytest.raises(DefinitionError):\n parse('function', 'int foo(B b=x(a)')\n with pytest.raises(DefinitionError):\n parse('function', 'int foo)C c=x(a))')\n with pytest.raises(DefinitionError):\n parse('function', 'int foo(D d=x(a')\n check('function', 'int foo(const A&... a)', {1: \"foo__ACRDp\", 2: \"3fooDpRK1A\"})\n check('function', 'int foo(const A&...)', {1: \"foo__ACRDp\", 2: \"3fooDpRK1A\"})\n check('function', 'int foo(const A*... a)', {1: \"foo__ACPDp\", 2: \"3fooDpPK1A\"})\n check('function', 'int foo(const A*...)', {1: \"foo__ACPDp\", 2: \"3fooDpPK1A\"})\n check('function', 'int foo(const int A::*... a)', {2: \"3fooDpM1AKi\"})\n check('function', 'int foo(const int A::*...)', {2: \"3fooDpM1AKi\"})\n # check('function', 'int foo(int (*a)(A)...)', {1: \"foo__ACRDp\", 2: \"3fooDpPK1A\"})\n # check('function', 'int foo(int (*)(A)...)', {1: \"foo__ACRDp\", 2: \"3fooDpPK1A\"})\n check('function', 'virtual void f()', {1: \"f\", 2: \"1fv\"})\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions._test_for_nestedName__test_domain_cpp_ast_function_definitions.None_71": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions._test_for_nestedName__test_domain_cpp_ast_function_definitions.None_71", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 562, "end_line": 599, "span_ids": ["test_domain_cpp_ast_function_definitions"], "tokens": 786}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_function_definitions():\n # test for ::nestedName, from issue 1738\n check(\"function\", \"result(int val, ::std::error_category const &cat)\",\n {1: \"result__i.std::error_categoryCR\", 2: \"6resultiRKNSt14error_categoryE\"})\n check(\"function\", \"int *f()\", {1: \"f\", 2: \"1fv\"})\n # tests derived from issue #1753 (skip to keep sanity)\n check(\"function\", \"f(int (&array)[10])\", {2: \"1fRA10_i\", 3: \"1fRAL10E_i\"})\n check(\"function\", \"void f(int (&array)[10])\", {2: \"1fRA10_i\", 3: \"1fRAL10E_i\"})\n check(\"function\", \"void f(float *q(double))\", {2: \"1fFPfdE\"})\n check(\"function\", \"void f(float *(*q)(double))\", {2: \"1fPFPfdE\"})\n check(\"function\", \"void f(float (*q)(double))\", {2: \"1fPFfdE\"})\n check(\"function\", \"int (*f(double d))(float)\", {1: \"f__double\", 2: \"1fd\"})\n check(\"function\", \"int (*f(bool b))[5]\", {1: \"f__b\", 2: \"1fb\"})\n check(\"function\", \"int (*A::f(double d) const)(float)\",\n {1: \"A::f__doubleC\", 2: \"NK1A1fEd\"})\n check(\"function\", \"void f(std::shared_ptr<int(double)> ptr)\",\n {2: \"1fNSt10shared_ptrIFidEEE\"})\n check(\"function\", \"void f(int *const p)\", {1: \"f__iPC\", 2: \"1fPCi\"})\n check(\"function\", \"void f(int *volatile const p)\", {1: \"f__iPVC\", 2: \"1fPVCi\"})\n\n check('function', 'extern int f()', {1: 'f', 2: '1fv'})\n check('function', 'consteval int f()', {1: 'f', 2: '1fv'})\n\n check('function', 'explicit(true) void f()', {1: 'f', 2: '1fv'})\n\n check('function', 'decltype(auto) f()', {1: 'f', 2: \"1fv\"})\n\n # TODO: make tests for functions in a template, e.g., Test<int&&()>\n # such that the id generation for function type types is correct.\n\n check('function', 'friend std::ostream &f(std::ostream &s, int i)',\n {1: 'f__osR.i', 2: '1fRNSt7ostreamEi'})\n\n # from breathe#223\n check('function', 'void f(struct E e)', {1: 'f__E', 2: '1f1E'})\n check('function', 'void f(class E e)', {1: 'f__E', 2: '1f1E'})\n check('function', 'void f(typename E e)', {1: 'f__E', 2: '1f1E'})\n check('function', 'void f(enum E e)', {1: 'f__E', 2: '1f1E'})\n check('function', 'void f(union E e)', {1: 'f__E', 2: '1f1E'})\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions._pointer_to_member_func_test_domain_cpp_ast_function_definitions.None_100": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_function_definitions._pointer_to_member_func_test_domain_cpp_ast_function_definitions.None_100", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 601, "end_line": 644, "span_ids": ["test_domain_cpp_ast_function_definitions"], "tokens": 788}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_function_definitions():\n\n # pointer to member (function)\n check('function', 'void f(int C::*)', {2: '1fM1Ci'})\n check('function', 'void f(int C::* p)', {2: '1fM1Ci'})\n check('function', 'void f(int ::C::* p)', {2: '1fM1Ci'})\n check('function', 'void f(int C::*const)', {2: '1fKM1Ci'})\n check('function', 'void f(int C::*const&)', {2: '1fRKM1Ci'})\n check('function', 'void f(int C::*volatile)', {2: '1fVM1Ci'})\n check('function', 'void f(int C::*const volatile)', {2: '1fVKM1Ci'},\n output='void f(int C::*volatile const)')\n check('function', 'void f(int C::*volatile const)', {2: '1fVKM1Ci'})\n check('function', 'void f(int (C::*)(float, double))', {2: '1fM1CFifdE'})\n check('function', 'void f(int (C::* p)(float, double))', {2: '1fM1CFifdE'})\n check('function', 'void f(int (::C::* p)(float, double))', {2: '1fM1CFifdE'})\n check('function', 'void f(void (C::*)() const &)', {2: '1fM1CKRFvvE'})\n check('function', 'int C::* f(int, double)', {2: '1fid'})\n check('function', 'void f(int C::* *p)', {2: '1fPM1Ci'})\n check('function', 'void f(int C::**)', {2: '1fPM1Ci'})\n check('function', 'void f(int C::*const *p)', {2: '1fPKM1Ci'})\n check('function', 'void f(int C::*const*)', {2: '1fPKM1Ci'})\n\n # exceptions from return type mangling\n check('function', 'template<typename T> C()', {2: 'I0E1Cv'})\n check('function', 'template<typename T> operator int()', {1: None, 2: 'I0Ecviv'})\n\n # trailing return types\n ids = {1: 'f', 2: '1fv'}\n check('function', 'int f()', ids)\n check('function', 'auto f() -> int', ids)\n check('function', 'virtual auto f() -> int = 0', ids)\n check('function', 'virtual auto f() -> int final', ids)\n check('function', 'virtual auto f() -> int override', ids)\n\n ids = {2: 'I0E1fv', 4: 'I0E1fiv'}\n check('function', 'template<typename T> int f()', ids)\n check('function', 'template<typename T> f() -> int', ids)\n\n # from breathe#441\n check('function', 'auto MakeThingy() -> Thingy*', {1: 'MakeThingy', 2: '10MakeThingyv'})\n\n # from #8960\n check('function', 'void f(void (*p)(int, double), int i)', {2: '1fPFvidEi'})\n\n # from #9535 comment\n check('function', 'void f(void (*p)(int) = &foo)', {2: '1fPFviE'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_operators_test_domain_cpp_ast_operators.None_31": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_operators_test_domain_cpp_ast_operators.None_31", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 647, "end_line": 680, "span_ids": ["test_domain_cpp_ast_operators"], "tokens": 769}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_operators():\n check('function', 'void operator new()', {1: \"new-operator\", 2: \"nwv\"})\n check('function', 'void operator new[]()', {1: \"new-array-operator\", 2: \"nav\"})\n check('function', 'void operator delete()', {1: \"delete-operator\", 2: \"dlv\"})\n check('function', 'void operator delete[]()', {1: \"delete-array-operator\", 2: \"dav\"})\n check('function', 'operator bool() const', {1: \"castto-b-operatorC\", 2: \"NKcvbEv\"})\n check('function', 'void operator\"\"_udl()', {2: 'li4_udlv'})\n\n check('function', 'void operator~()', {1: \"inv-operator\", 2: \"cov\"})\n check('function', 'void operator compl()', {2: \"cov\"})\n check('function', 'void operator+()', {1: \"add-operator\", 2: \"plv\"})\n check('function', 'void operator-()', {1: \"sub-operator\", 2: \"miv\"})\n check('function', 'void operator*()', {1: \"mul-operator\", 2: \"mlv\"})\n check('function', 'void operator/()', {1: \"div-operator\", 2: \"dvv\"})\n check('function', 'void operator%()', {1: \"mod-operator\", 2: \"rmv\"})\n check('function', 'void operator&()', {1: \"and-operator\", 2: \"anv\"})\n check('function', 'void operator bitand()', {2: \"anv\"})\n check('function', 'void operator|()', {1: \"or-operator\", 2: \"orv\"})\n check('function', 'void operator bitor()', {2: \"orv\"})\n check('function', 'void operator^()', {1: \"xor-operator\", 2: \"eov\"})\n check('function', 'void operator xor()', {2: \"eov\"})\n check('function', 'void operator=()', {1: \"assign-operator\", 2: \"aSv\"})\n check('function', 'void operator+=()', {1: \"add-assign-operator\", 2: \"pLv\"})\n check('function', 'void operator-=()', {1: \"sub-assign-operator\", 2: \"mIv\"})\n check('function', 'void operator*=()', {1: \"mul-assign-operator\", 2: \"mLv\"})\n check('function', 'void operator/=()', {1: \"div-assign-operator\", 2: \"dVv\"})\n check('function', 'void operator%=()', {1: \"mod-assign-operator\", 2: \"rMv\"})\n check('function', 'void operator&=()', {1: \"and-assign-operator\", 2: \"aNv\"})\n check('function', 'void operator and_eq()', {2: \"aNv\"})\n check('function', 'void operator|=()', {1: \"or-assign-operator\", 2: \"oRv\"})\n check('function', 'void operator or_eq()', {2: \"oRv\"})\n check('function', 'void operator^=()', {1: \"xor-assign-operator\", 2: \"eOv\"})\n check('function', 'void operator xor_eq()', {2: \"eOv\"})\n check('function', 'void operator<<()', {1: \"lshift-operator\", 2: \"lsv\"})\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_operators.None_32_test_domain_cpp_ast_operators.None_55": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_operators.None_32_test_domain_cpp_ast_operators.None_55", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 681, "end_line": 704, "span_ids": ["test_domain_cpp_ast_operators"], "tokens": 575}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_operators():\n # ... other code\n check('function', 'void operator>>()', {1: \"rshift-operator\", 2: \"rsv\"})\n check('function', 'void operator<<=()', {1: \"lshift-assign-operator\", 2: \"lSv\"})\n check('function', 'void operator>>=()', {1: \"rshift-assign-operator\", 2: \"rSv\"})\n check('function', 'void operator==()', {1: \"eq-operator\", 2: \"eqv\"})\n check('function', 'void operator!=()', {1: \"neq-operator\", 2: \"nev\"})\n check('function', 'void operator not_eq()', {2: \"nev\"})\n check('function', 'void operator<()', {1: \"lt-operator\", 2: \"ltv\"})\n check('function', 'void operator>()', {1: \"gt-operator\", 2: \"gtv\"})\n check('function', 'void operator<=()', {1: \"lte-operator\", 2: \"lev\"})\n check('function', 'void operator>=()', {1: \"gte-operator\", 2: \"gev\"})\n check('function', 'void operator<=>()', {1: None, 2: \"ssv\"})\n check('function', 'void operator!()', {1: \"not-operator\", 2: \"ntv\"})\n check('function', 'void operator not()', {2: \"ntv\"})\n check('function', 'void operator&&()', {1: \"sand-operator\", 2: \"aav\"})\n check('function', 'void operator and()', {2: \"aav\"})\n check('function', 'void operator||()', {1: \"sor-operator\", 2: \"oov\"})\n check('function', 'void operator or()', {2: \"oov\"})\n check('function', 'void operator++()', {1: \"inc-operator\", 2: \"ppv\"})\n check('function', 'void operator--()', {1: \"dec-operator\", 2: \"mmv\"})\n check('function', 'void operator,()', {1: \"comma-operator\", 2: \"cmv\"})\n check('function', 'void operator->*()', {1: \"pointer-by-pointer-operator\", 2: \"pmv\"})\n check('function', 'void operator->()', {1: \"pointer-operator\", 2: \"ptv\"})\n check('function', 'void operator()()', {1: \"call-operator\", 2: \"clv\"})\n check('function', 'void operator[]()', {1: \"subscript-operator\", 2: \"ixv\"})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_nested_name_test_domain_cpp_ast_nested_name.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_nested_name_test_domain_cpp_ast_nested_name.None_3", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 707, "end_line": 711, "span_ids": ["test_domain_cpp_ast_nested_name"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_nested_name():\n check('class', '{key}::A', {1: \"A\", 2: \"1A\"})\n check('class', '{key}::A::B', {1: \"A::B\", 2: \"N1A1BE\"})\n check('function', 'void f(::A a)', {1: \"f__A\", 2: \"1f1A\"})\n check('function', 'void f(::A::B a)', {1: \"f__A::B\", 2: \"1fN1A1BE\"})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_class_definitions_test_domain_cpp_ast_class_definitions.None_19": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_class_definitions_test_domain_cpp_ast_class_definitions.None_19", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 714, "end_line": 742, "span_ids": ["test_domain_cpp_ast_class_definitions"], "tokens": 641}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_class_definitions():\n check('class', 'public A', {1: \"A\", 2: \"1A\"}, output='{key}A')\n check('class', 'private {key}A', {1: \"A\", 2: \"1A\"})\n check('class', '{key}A final', {1: 'A', 2: '1A'})\n\n # test bases\n check('class', '{key}A', {1: \"A\", 2: \"1A\"})\n check('class', '{key}A::B::C', {1: \"A::B::C\", 2: \"N1A1B1CE\"})\n check('class', '{key}A : B', {1: \"A\", 2: \"1A\"})\n check('class', '{key}A : private B', {1: \"A\", 2: \"1A\"})\n check('class', '{key}A : public B', {1: \"A\", 2: \"1A\"})\n check('class', '{key}A : B, C', {1: \"A\", 2: \"1A\"})\n check('class', '{key}A : B, protected C, D', {1: \"A\", 2: \"1A\"})\n check('class', 'A : virtual private B', {1: 'A', 2: '1A'}, output='{key}A : private virtual B')\n check('class', '{key}A : private virtual B', {1: 'A', 2: '1A'})\n check('class', '{key}A : B, virtual C', {1: 'A', 2: '1A'})\n check('class', '{key}A : public virtual B', {1: 'A', 2: '1A'})\n check('class', '{key}A : B, C...', {1: 'A', 2: '1A'})\n check('class', '{key}A : B..., C', {1: 'A', 2: '1A'})\n\n # from #4094\n check('class', 'template<class, class = std::void_t<>> {key}has_var', {2: 'I00E7has_var'})\n check('class', 'template<class T> {key}has_var<T, std::void_t<decltype(&T::var)>>',\n {2: 'I0E7has_varI1TNSt6void_tIDTadN1T3varEEEEE'})\n\n check('class', 'template<typename ...Ts> {key}T<int (*)(Ts)...>',\n {2: 'IDpE1TIJPFi2TsEEE'})\n check('class', 'template<int... Is> {key}T<(Is)...>',\n {2: 'I_DpiE1TIJX(Is)EEE', 3: 'I_DpiE1TIJX2IsEEE'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_union_definitions_test_domain_cpp_ast_enum_definitions.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_union_definitions_test_domain_cpp_ast_enum_definitions.None_6", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 745, "end_line": 757, "span_ids": ["test_domain_cpp_ast_enum_definitions", "test_domain_cpp_ast_union_definitions"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_union_definitions():\n check('union', '{key}A', {2: \"1A\"})\n\n\ndef test_domain_cpp_ast_enum_definitions():\n check('enum', '{key}A', {2: \"1A\"})\n check('enum', '{key}A : std::underlying_type<B>::type', {2: \"1A\"})\n check('enum', '{key}A : unsigned int', {2: \"1A\"})\n check('enum', 'public A', {2: \"1A\"}, output='{key}A')\n check('enum', 'private {key}A', {2: \"1A\"})\n\n check('enumerator', '{key}A', {2: \"1A\"})\n check('enumerator', '{key}A = std::numeric_limits<unsigned long>::max()', {2: \"1A\"})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_anon_definitions_test_domain_cpp_ast_anon_definitions.check_function_int_f_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_anon_definitions_test_domain_cpp_ast_anon_definitions.check_function_int_f_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 760, "end_line": 768, "span_ids": ["test_domain_cpp_ast_anon_definitions"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_anon_definitions():\n check('class', '@a', {3: \"Ut1_a\"}, asTextOutput='class [anonymous]')\n check('union', '@a', {3: \"Ut1_a\"}, asTextOutput='union [anonymous]')\n check('enum', '@a', {3: \"Ut1_a\"}, asTextOutput='enum [anonymous]')\n check('class', '@1', {3: \"Ut1_1\"}, asTextOutput='class [anonymous]')\n check('class', '@a::A', {3: \"NUt1_a1AE\"}, asTextOutput='class [anonymous]::A')\n\n check('function', 'int f(int @a)', {1: 'f__i', 2: '1fi'},\n asTextOutput='int f(int [anonymous])')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates_test_domain_cpp_ast_templates.None_24": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates_test_domain_cpp_ast_templates.None_24", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 771, "end_line": 806, "span_ids": ["test_domain_cpp_ast_templates"], "tokens": 763}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_templates():\n check('class', \"A<T>\", {2: \"IE1AI1TE\"}, output=\"template<> {key}A<T>\")\n # first just check which objects support templating\n check('class', \"template<> {key}A\", {2: \"IE1A\"})\n check('function', \"template<> void A()\", {2: \"IE1Av\", 4: \"IE1Avv\"})\n check('member', \"template<> A a\", {2: \"IE1a\"})\n check('type', \"template<> {key}a = A\", {2: \"IE1a\"}, key='using')\n with pytest.raises(DefinitionError):\n parse('enum', \"template<> A\")\n with pytest.raises(DefinitionError):\n parse('enumerator', \"template<> A\")\n # then all the real tests\n check('class', \"template<typename T1, typename T2> {key}A\", {2: \"I00E1A\"})\n check('type', \"template<> {key}a\", {2: \"IE1a\"}, key='using')\n\n check('class', \"template<typename T> {key}A\", {2: \"I0E1A\"})\n check('class', \"template<class T> {key}A\", {2: \"I0E1A\"})\n check('class', \"template<typename ...T> {key}A\", {2: \"IDpE1A\"})\n check('class', \"template<typename...> {key}A\", {2: \"IDpE1A\"})\n check('class', \"template<typename = Test> {key}A\", {2: \"I0E1A\"})\n check('class', \"template<typename T = Test> {key}A\", {2: \"I0E1A\"})\n\n check('class', \"template<template<typename> typename T> {key}A\", {2: \"II0E0E1A\"})\n check('class', \"template<template<typename> class T> {key}A\", {2: \"II0E0E1A\"})\n check('class', \"template<template<typename> typename> {key}A\", {2: \"II0E0E1A\"})\n check('class', \"template<template<typename> typename ...T> {key}A\", {2: \"II0EDpE1A\"})\n check('class', \"template<template<typename> typename...> {key}A\", {2: \"II0EDpE1A\"})\n check('class', \"template<typename T, template<typename> typename...> {key}A\", {2: \"I0I0EDpE1A\"})\n\n check('class', \"template<int> {key}A\", {2: \"I_iE1A\"})\n check('class', \"template<int T> {key}A\", {2: \"I_iE1A\"})\n check('class', \"template<int... T> {key}A\", {2: \"I_DpiE1A\"})\n check('class', \"template<int T = 42> {key}A\", {2: \"I_iE1A\"})\n check('class', \"template<int = 42> {key}A\", {2: \"I_iE1A\"})\n\n check('class', \"template<typename A<B>::C> {key}A\", {2: \"I_N1AI1BE1CEE1A\"}) # same as above\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates.None_25_test_domain_cpp_ast_templates.None_31": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates.None_25_test_domain_cpp_ast_templates.None_31", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 807, "end_line": 841, "span_ids": ["test_domain_cpp_ast_templates"], "tokens": 716}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_templates():\n # ... other code\n check('class', \"template<typename A<B>::C = 42> {key}A\", {2: \"I_N1AI1BE1CEE1A\"})\n # from #7944\n check('function', \"template<typename T, \"\n \"typename std::enable_if<!has_overloaded_addressof<T>::value, bool>::type = false\"\n \"> constexpr T *static_addressof(T &ref)\",\n {2: \"I0_NSt9enable_ifIX!has_overloaded_addressof<T>::valueEbE4typeEE16static_addressofR1T\",\n 3: \"I0_NSt9enable_ifIXntN24has_overloaded_addressofI1TE5valueEEbE4typeEE16static_addressofR1T\",\n 4: \"I0_NSt9enable_ifIXntN24has_overloaded_addressofI1TE5valueEEbE4typeEE16static_addressofP1TR1T\"})\n\n check('class', \"template<> {key}A<NS::B<>>\", {2: \"IE1AIN2NS1BIEEE\"})\n\n # from #2058\n check('function',\n \"template<typename Char, typename Traits> \"\n \"inline std::basic_ostream<Char, Traits> &operator<<(\"\n \"std::basic_ostream<Char, Traits> &os, \"\n \"const c_string_view_base<const Char, Traits> &str)\",\n {2: \"I00ElsRNSt13basic_ostreamI4Char6TraitsEE\"\n \"RK18c_string_view_baseIK4Char6TraitsE\",\n 4: \"I00Els\"\n \"RNSt13basic_ostreamI4Char6TraitsEE\"\n \"RNSt13basic_ostreamI4Char6TraitsEE\"\n \"RK18c_string_view_baseIK4Char6TraitsE\"})\n\n # template introductions\n with pytest.raises(DefinitionError):\n parse('enum', 'abc::ns::foo{id_0, id_1, id_2} A')\n with pytest.raises(DefinitionError):\n parse('enumerator', 'abc::ns::foo{id_0, id_1, id_2} A')\n check('class', 'abc::ns::foo{{id_0, id_1, id_2}} {key}xyz::bar',\n {2: 'I000EXN3abc2ns3fooEI4id_04id_14id_2EEN3xyz3barE'})\n check('class', 'abc::ns::foo{{id_0, id_1, ...id_2}} {key}xyz::bar',\n {2: 'I00DpEXN3abc2ns3fooEI4id_04id_1sp4id_2EEN3xyz3barE'})\n check('class', 'abc::ns::foo{{id_0, id_1, id_2}} {key}xyz::bar<id_0, id_1, id_2>',\n {2: 'I000EXN3abc2ns3fooEI4id_04id_14id_2EEN3xyz3barI4id_04id_14id_2EE'})\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates.None_32_test_domain_cpp_ast_templates.None_42": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates.None_32_test_domain_cpp_ast_templates.None_42", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 842, "end_line": 866, "span_ids": ["test_domain_cpp_ast_templates"], "tokens": 760}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_templates():\n # ... other code\n check('class', 'abc::ns::foo{{id_0, id_1, ...id_2}} {key}xyz::bar<id_0, id_1, id_2...>',\n {2: 'I00DpEXN3abc2ns3fooEI4id_04id_1sp4id_2EEN3xyz3barI4id_04id_1Dp4id_2EE'})\n\n check('class', 'template<> Concept{{U}} {key}A<int>::B', {2: 'IEI0EX7ConceptI1UEEN1AIiE1BE'})\n\n check('type', 'abc::ns::foo{{id_0, id_1, id_2}} {key}xyz::bar = ghi::qux',\n {2: 'I000EXN3abc2ns3fooEI4id_04id_14id_2EEN3xyz3barE'}, key='using')\n check('type', 'abc::ns::foo{{id_0, id_1, ...id_2}} {key}xyz::bar = ghi::qux',\n {2: 'I00DpEXN3abc2ns3fooEI4id_04id_1sp4id_2EEN3xyz3barE'}, key='using')\n check('function', 'abc::ns::foo{id_0, id_1, id_2} void xyz::bar()',\n {2: 'I000EXN3abc2ns3fooEI4id_04id_14id_2EEN3xyz3barEv',\n 4: 'I000EXN3abc2ns3fooEI4id_04id_14id_2EEN3xyz3barEvv'})\n check('function', 'abc::ns::foo{id_0, id_1, ...id_2} void xyz::bar()',\n {2: 'I00DpEXN3abc2ns3fooEI4id_04id_1sp4id_2EEN3xyz3barEv',\n 4: 'I00DpEXN3abc2ns3fooEI4id_04id_1sp4id_2EEN3xyz3barEvv'})\n check('member', 'abc::ns::foo{id_0, id_1, id_2} ghi::qux xyz::bar',\n {2: 'I000EXN3abc2ns3fooEI4id_04id_14id_2EEN3xyz3barE'})\n check('member', 'abc::ns::foo{id_0, id_1, ...id_2} ghi::qux xyz::bar',\n {2: 'I00DpEXN3abc2ns3fooEI4id_04id_1sp4id_2EEN3xyz3barE'})\n check('concept', 'Iterator{{T, U}} {key}Another', {2: 'I00EX8IteratorI1T1UEE7Another'})\n check('concept', 'template<typename ...Pack> {key}Numerics = (... && Numeric<Pack>)',\n {2: 'IDpE8Numerics'})\n\n # explicit specializations of members\n check('member', 'template<> int A<int>::a', {2: 'IEN1AIiE1aE'})\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates.None_43_test_domain_cpp_ast_templates.check_type_template_C": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_templates.None_43_test_domain_cpp_ast_templates.check_type_template_C", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 867, "end_line": 874, "span_ids": ["test_domain_cpp_ast_templates"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_templates():\n # ... other code\n\n check('class', \"template<typename T> {key}A\", {2: \"I0E1A\"})\n # ... other code\n check('member', 'template int A<int>::a', {2: 'IEN1AIiE1aE'},\n output='template<> int A<int>::a') # same as above\n check('member', 'template<> template<> int A<int>::B<int>::b', {2: 'IEIEN1AIiE1BIiE1bE'})\n check('member', 'template int A<int>::B<int>::b', {2: 'IEIEN1AIiE1BIiE1bE'},\n output='template<> template<> int A<int>::B<int>::b') # same as above\n\n # defaulted constrained type parameters\n check('type', 'template<C T = int&> {key}A', {2: 'I_1CE1A'}, key='using')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_placeholder_types_test_domain_cpp_ast_placeholder_types.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_placeholder_types_test_domain_cpp_ast_placeholder_types.None_4", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 877, "end_line": 883, "span_ids": ["test_domain_cpp_ast_placeholder_types"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_placeholder_types():\n check('function', 'void f(Sortable auto &v)', {1: 'f__SortableR', 2: '1fR8Sortable'})\n check('function', 'void f(const Sortable auto &v)', {1: 'f__SortableCR', 2: '1fRK8Sortable'})\n check('function', 'void f(Sortable decltype(auto) &v)', {1: 'f__SortableR', 2: '1fR8Sortable'})\n check('function', 'void f(const Sortable decltype(auto) &v)', {1: 'f__SortableCR', 2: '1fRK8Sortable'})\n check('function', 'void f(Sortable decltype ( auto ) &v)', {1: 'f__SortableR', 2: '1fR8Sortable'},\n output='void f(Sortable decltype(auto) &v)')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_requires_clauses_test_domain_cpp_ast_requires_clauses.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_requires_clauses_test_domain_cpp_ast_requires_clauses.None_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 886, "end_line": 892, "span_ids": ["test_domain_cpp_ast_requires_clauses"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_requires_clauses():\n check('function', 'template<typename T> requires A auto f() -> void requires B',\n {4: 'I0EIQaa1A1BE1fvv'})\n check('function', 'template<typename T> requires A || B or C void f()',\n {4: 'I0EIQoo1Aoo1B1CE1fvv'})\n check('function', 'template<typename T> requires A && B || C and D void f()',\n {4: 'I0EIQooaa1A1Baa1C1DE1fvv'})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_template_args_test_domain_cpp_ast_template_args.check_type_template_t": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_template_args_test_domain_cpp_ast_template_args.check_type_template_t", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 895, "end_line": 907, "span_ids": ["test_domain_cpp_ast_template_args"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_template_args():\n # from breathe#218\n check('function',\n \"template<typename F> \"\n \"void allow(F *f, typename func<F, B, G != 1>::type tt)\",\n {2: \"I0E5allowP1FN4funcI1F1BXG != 1EE4typeE\",\n 3: \"I0E5allowP1FN4funcI1F1BXne1GL1EEE4typeE\",\n 4: \"I0E5allowvP1FN4funcI1F1BXne1GL1EEE4typeE\"})\n # from #3542\n check('type', \"template<typename T> {key}\"\n \"enable_if_not_array_t = std::enable_if_t<!is_array<T>::value, int>\",\n {2: \"I0E21enable_if_not_array_t\"},\n key='using')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_initializers_test_domain_cpp_ast_initializers.check_member_T_v_T_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_initializers_test_domain_cpp_ast_initializers.check_member_T_v_T_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 910, "end_line": 941, "span_ids": ["test_domain_cpp_ast_initializers"], "tokens": 550}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_initializers():\n idsMember = {1: 'v__T', 2: '1v'}\n idsFunction = {1: 'f__T', 2: '1f1T'}\n idsTemplate = {2: 'I_1TE1fv', 4: 'I_1TE1fvv'}\n # no init\n check('member', 'T v', idsMember)\n check('function', 'void f(T v)', idsFunction)\n check('function', 'template<T v> void f()', idsTemplate)\n # with '=', assignment-expression\n check('member', 'T v = 42', idsMember)\n check('function', 'void f(T v = 42)', idsFunction)\n check('function', 'template<T v = 42> void f()', idsTemplate)\n # with '=', braced-init\n check('member', 'T v = {}', idsMember)\n check('function', 'void f(T v = {})', idsFunction)\n check('function', 'template<T v = {}> void f()', idsTemplate)\n check('member', 'T v = {42, 42, 42}', idsMember)\n check('function', 'void f(T v = {42, 42, 42})', idsFunction)\n check('function', 'template<T v = {42, 42, 42}> void f()', idsTemplate)\n check('member', 'T v = {42, 42, 42,}', idsMember)\n check('function', 'void f(T v = {42, 42, 42,})', idsFunction)\n check('function', 'template<T v = {42, 42, 42,}> void f()', idsTemplate)\n check('member', 'T v = {42, 42, args...}', idsMember)\n check('function', 'void f(T v = {42, 42, args...})', idsFunction)\n check('function', 'template<T v = {42, 42, args...}> void f()', idsTemplate)\n # without '=', braced-init\n check('member', 'T v{}', idsMember)\n check('member', 'T v{42, 42, 42}', idsMember)\n check('member', 'T v{42, 42, 42,}', idsMember)\n check('member', 'T v{42, 42, args...}', idsMember)\n # other\n check('member', 'T v = T{}', idsMember)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_attributes_test_domain_cpp_ast_attributes._position_parameters_an": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_attributes_test_domain_cpp_ast_attributes._position_parameters_an", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 944, "end_line": 988, "span_ids": ["test_domain_cpp_ast_attributes"], "tokens": 783}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_attributes():\n # style: C++\n check('member', '[[]] int f', {1: 'f__i', 2: '1f'})\n check('member', '[ [ ] ] int f', {1: 'f__i', 2: '1f'},\n # this will fail when the proper grammar is implemented\n output='[[ ]] int f')\n check('member', '[[a]] int f', {1: 'f__i', 2: '1f'})\n # style: GNU\n check('member', '__attribute__(()) int f', {1: 'f__i', 2: '1f'})\n check('member', '__attribute__((a)) int f', {1: 'f__i', 2: '1f'})\n check('member', '__attribute__((a, b)) int f', {1: 'f__i', 2: '1f'})\n check('member', '__attribute__((optimize(3))) int f', {1: 'f__i', 2: '1f'})\n check('member', '__attribute__((format(printf, 1, 2))) int f', {1: 'f__i', 2: '1f'})\n # style: user-defined id\n check('member', 'id_attr int f', {1: 'f__i', 2: '1f'})\n # style: user-defined paren\n check('member', 'paren_attr() int f', {1: 'f__i', 2: '1f'})\n check('member', 'paren_attr(a) int f', {1: 'f__i', 2: '1f'})\n check('member', 'paren_attr(\"\") int f', {1: 'f__i', 2: '1f'})\n check('member', 'paren_attr(()[{}][]{}) int f', {1: 'f__i', 2: '1f'})\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr(() int f')\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr([) int f')\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr({) int f')\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr([)]) int f')\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr((])) int f')\n with pytest.raises(DefinitionError):\n parse('member', 'paren_attr({]}) int f')\n\n # position: decl specs\n check('function', 'static inline __attribute__(()) void f()',\n {1: 'f', 2: '1fv'},\n output='__attribute__(()) static inline void f()')\n check('function', '[[attr1]] [[attr2]] void f()', {1: 'f', 2: '1fv'})\n # position: declarator\n check('member', 'int *[[attr]] i', {1: 'i__iP', 2: '1i'})\n check('member', 'int *const [[attr]] volatile i', {1: 'i__iPVC', 2: '1i'},\n output='int *[[attr]] volatile const i')\n check('member', 'int &[[attr]] i', {1: 'i__iR', 2: '1i'})\n check('member', 'int *[[attr]] *i', {1: 'i__iPP', 2: '1i'})\n # position: parameters and qualifiers\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_attributes.check_function_void_f_test_domain_cpp_ast_attributes.check_enum_key_nod": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_attributes.check_function_void_f_test_domain_cpp_ast_attributes.check_enum_key_nod", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 989, "end_line": 994, "span_ids": ["test_domain_cpp_ast_attributes"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_attributes():\n # ... other code\n check('function', 'void f() [[attr1]] [[attr2]]', {1: 'f', 2: '1fv'})\n\n # position: class, union, enum\n check('class', '{key}[[nodiscard]] Foo', {1: 'Foo', 2: '3Foo'}, key='class')\n check('union', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo'}, key='union')\n check('enum', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo'}, key='enum')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_xref_parsing_test_domain_cpp_build_multi_decl_lookup.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_ast_xref_parsing_test_domain_cpp_build_multi_decl_lookup.None_1", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 997, "end_line": 1036, "span_ids": ["test_domain_cpp_ast_xref_parsing.check.Config:2", "test_domain_cpp_build_multi_decl_lookup", "test_domain_cpp_ast_xref_parsing", "filter_warnings", "test_domain_cpp_ast_xref_parsing.check.Config"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_ast_xref_parsing():\n def check(target):\n class Config:\n cpp_id_attributes = [\"id_attr\"]\n cpp_paren_attributes = [\"paren_attr\"]\n parser = DefinitionParser(target, location=None,\n config=Config())\n ast, isShorthand = parser.parse_xref_object()\n parser.assert_end()\n check('f')\n check('f()')\n check('void f()')\n check('T f()')\n\n\n# def test_print():\n# # used for getting all the ids out for checking\n# for a in ids:\n# print(a)\n# raise DefinitionError(\"\")\n\n\ndef filter_warnings(warning, file):\n lines = warning.getvalue().split(\"\\n\")\n res = [l for l in lines if \"domain-cpp\" in l and \"{}.rst\".format(file) in l and\n \"WARNING: document isn't included in any toctree\" not in l]\n print(\"Filtered warnings for file '{}':\".format(file))\n for w in res:\n print(w)\n return res\n\n\n@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'nitpicky': True})\ndef test_domain_cpp_build_multi_decl_lookup(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"lookup-key-overload\")\n assert len(ws) == 0\n\n ws = filter_warnings(warning, \"multi-decl-lookup\")\n assert len(ws) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_warn_template_param_qualified_name_test_domain_cpp_build_warn_template_param_qualified_name.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_warn_template_param_qualified_name_test_domain_cpp_build_warn_template_param_qualified_name.None_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1039, "end_line": 1045, "span_ids": ["test_domain_cpp_build_warn_template_param_qualified_name"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'nitpicky': True})\ndef test_domain_cpp_build_warn_template_param_qualified_name(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"warn-template-param-qualified-name\")\n assert len(ws) == 2\n assert \"WARNING: cpp:type reference target not found: T::typeWarn\" in ws[0]\n assert \"WARNING: cpp:type reference target not found: T::U::typeWarn\" in ws[1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_backslash_ok_true_test_domain_cpp_build_backslash_ok_false.assert_WARNING_Parsing_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_backslash_ok_true_test_domain_cpp_build_backslash_ok_false.assert_WARNING_Parsing_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1048, "end_line": 1068, "span_ids": ["test_domain_cpp_build_backslash_ok_false", "test_domain_cpp_build_backslash_ok_true", "test_domain_cpp_build_semicolon"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'nitpicky': True})\ndef test_domain_cpp_build_backslash_ok_true(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"backslash\")\n assert len(ws) == 0\n\n\n@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'nitpicky': True})\ndef test_domain_cpp_build_semicolon(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"semicolon\")\n assert len(ws) == 0\n\n\n@pytest.mark.sphinx(testroot='domain-cpp',\n confoverrides={'nitpicky': True, 'strip_signature_backslash': True})\ndef test_domain_cpp_build_backslash_ok_false(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"backslash\")\n assert len(ws) == 1\n assert \"WARNING: Parsing of expression failed. Using fallback parser.\" in ws[0]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_anon_dup_decl_test_domain_cpp_build_anon_dup_decl.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_anon_dup_decl_test_domain_cpp_build_anon_dup_decl.None_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1071, "end_line": 1077, "span_ids": ["test_domain_cpp_build_anon_dup_decl"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'nitpicky': True})\ndef test_domain_cpp_build_anon_dup_decl(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"anon-dup-decl\")\n assert len(ws) == 2\n assert \"WARNING: cpp:identifier reference target not found: @a\" in ws[0]\n assert \"WARNING: cpp:identifier reference target not found: @b\" in ws[1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_misuse_of_roles_test_domain_cpp_build_misuse_of_roles.assert_len_ws_len_war": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_misuse_of_roles_test_domain_cpp_build_misuse_of_roles.assert_len_ws_len_war", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1080, "end_line": 1125, "span_ids": ["test_domain_cpp_build_misuse_of_roles"], "tokens": 460}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-cpp')\ndef test_domain_cpp_build_misuse_of_roles(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"roles-targets-ok\")\n assert len(ws) == 0\n\n ws = filter_warnings(warning, \"roles-targets-warn\")\n # the roles that should be able to generate warnings:\n allRoles = ['class', 'struct', 'union', 'func', 'member', 'var', 'type', 'concept', 'enum', 'enumerator']\n ok = [ # targetType, okRoles\n ('class', ['class', 'struct', 'type']),\n ('union', ['union', 'type']),\n ('func', ['func', 'type']),\n ('member', ['member', 'var']),\n ('type', ['type']),\n ('concept', ['concept']),\n ('enum', ['type', 'enum']),\n ('enumerator', ['enumerator']),\n ('functionParam', ['member', 'var']),\n ('templateParam', ['class', 'struct', 'union', 'member', 'var', 'type']),\n ]\n warn = []\n for targetType, roles in ok:\n txtTargetType = \"function\" if targetType == \"func\" else targetType\n for r in allRoles:\n if r not in roles:\n warn.append(\"WARNING: cpp:{} targets a {} (\".format(r, txtTargetType))\n if targetType == 'templateParam':\n warn.append(\"WARNING: cpp:{} targets a {} (\".format(r, txtTargetType))\n warn.append(\"WARNING: cpp:{} targets a {} (\".format(r, txtTargetType))\n warn = list(sorted(warn))\n for w in ws:\n assert \"targets a\" in w\n ws = [w[w.index(\"WARNING:\"):] for w in ws]\n ws = list(sorted(ws))\n print(\"Expected warnings:\")\n for w in warn:\n print(w)\n print(\"Actual warnings:\")\n for w in ws:\n print(w)\n\n for i in range(min(len(warn), len(ws))):\n assert ws[i].startswith(warn[i])\n\n assert len(ws) == len(warn)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_with_add_function_parentheses_is_True_test_domain_cpp_build_with_add_function_parentheses_is_True.None_2.check_s_t_f_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_with_add_function_parentheses_is_True_test_domain_cpp_build_with_add_function_parentheses_is_True.None_2.check_s_t_f_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1128, "end_line": 1166, "span_ids": ["test_domain_cpp_build_with_add_function_parentheses_is_True"], "tokens": 409}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'add_function_parentheses': True})\ndef test_domain_cpp_build_with_add_function_parentheses_is_True(app, status, warning):\n app.builder.build_all()\n\n def check(spec, text, file):\n pattern = '<li><p>%s<a .*?><code .*?><span .*?>%s</span></code></a></p></li>' % spec\n res = re.search(pattern, text)\n if not res:\n print(\"Pattern\\n\\t%s\\nnot found in %s\" % (pattern, file))\n assert False\n rolePatterns = [\n ('', 'Sphinx'),\n ('', 'Sphinx::version'),\n ('', 'version'),\n ('', 'List'),\n ('', 'MyEnum')\n ]\n parenPatterns = [\n ('ref function without parens ', r'paren_1\\(\\)'),\n ('ref function with parens ', r'paren_2\\(\\)'),\n ('ref function without parens, explicit title ', 'paren_3_title'),\n ('ref function with parens, explicit title ', 'paren_4_title'),\n ('ref op call without parens ', r'paren_5::operator\\(\\)\\(\\)'),\n ('ref op call with parens ', r'paren_6::operator\\(\\)\\(\\)'),\n ('ref op call without parens, explicit title ', 'paren_7_title'),\n ('ref op call with parens, explicit title ', 'paren_8_title')\n ]\n\n f = 'roles.html'\n t = (app.outdir / f).read_text()\n for s in rolePatterns:\n check(s, t, f)\n for s in parenPatterns:\n check(s, t, f)\n\n f = 'any-role.html'\n t = (app.outdir / f).read_text()\n for s in parenPatterns:\n check(s, t, f)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_with_add_function_parentheses_is_False_test_domain_cpp_build_with_add_function_parentheses_is_False.None_2.check_s_t_f_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_with_add_function_parentheses_is_False_test_domain_cpp_build_with_add_function_parentheses_is_False.None_2.check_s_t_f_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1169, "end_line": 1207, "span_ids": ["test_domain_cpp_build_with_add_function_parentheses_is_False"], "tokens": 400}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'add_function_parentheses': False})\ndef test_domain_cpp_build_with_add_function_parentheses_is_False(app, status, warning):\n app.builder.build_all()\n\n def check(spec, text, file):\n pattern = '<li><p>%s<a .*?><code .*?><span .*?>%s</span></code></a></p></li>' % spec\n res = re.search(pattern, text)\n if not res:\n print(\"Pattern\\n\\t%s\\nnot found in %s\" % (pattern, file))\n assert False\n rolePatterns = [\n ('', 'Sphinx'),\n ('', 'Sphinx::version'),\n ('', 'version'),\n ('', 'List'),\n ('', 'MyEnum')\n ]\n parenPatterns = [\n ('ref function without parens ', 'paren_1'),\n ('ref function with parens ', 'paren_2'),\n ('ref function without parens, explicit title ', 'paren_3_title'),\n ('ref function with parens, explicit title ', 'paren_4_title'),\n ('ref op call without parens ', r'paren_5::operator\\(\\)'),\n ('ref op call with parens ', r'paren_6::operator\\(\\)'),\n ('ref op call without parens, explicit title ', 'paren_7_title'),\n ('ref op call with parens, explicit title ', 'paren_8_title')\n ]\n\n f = 'roles.html'\n t = (app.outdir / f).read_text()\n for s in rolePatterns:\n check(s, t, f)\n for s in parenPatterns:\n check(s, t, f)\n\n f = 'any-role.html'\n t = (app.outdir / f).read_text()\n for s in parenPatterns:\n check(s, t, f)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_xref_consistency_test_domain_cpp_build_xref_consistency.classes.return.set_result_group_classes": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_xref_consistency_test_domain_cpp_build_xref_consistency.classes.return.set_result_group_classes", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1210, "end_line": 1229, "span_ids": ["test_domain_cpp_build_xref_consistency"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-cpp')\ndef test_domain_cpp_build_xref_consistency(app, status, warning):\n app.builder.build_all()\n\n test = 'xref_consistency.html'\n output = (app.outdir / test).read_text()\n\n def classes(role, tag):\n pattern = (r'{role}-role:.*?'\n r'<(?P<tag>{tag}) .*?class=[\"\\'](?P<classes>.*?)[\"\\'].*?>'\n r'.*'\n r'</(?P=tag)>').format(role=role, tag=tag)\n result = re.search(pattern, output)\n expect = '''\\\nPattern for role `{role}` with tag `{tag}`\n\\t{pattern}\nnot found in `{test}`\n'''.format(role=role, tag=tag, pattern=pattern, test=test)\n assert result, expect\n return set(result.group('classes').split())\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_xref_consistency.RoleClasses_test_domain_cpp_build_field_role.assert_len_ws_0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_xref_consistency.RoleClasses_test_domain_cpp_build_field_role.assert_len_ws_0", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1231, "end_line": 1278, "span_ids": ["test_domain_cpp_build_field_role", "test_domain_cpp_build_xref_consistency.RoleClasses:2", "test_domain_cpp_build_xref_consistency.RoleClasses"], "tokens": 528}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-cpp')\ndef test_domain_cpp_build_xref_consistency(app, status, warning):\n # ... other code\n\n class RoleClasses:\n \"\"\"Collect the classes from the layout that was generated for a given role.\"\"\"\n\n def __init__(self, role, root, contents):\n self.name = role\n self.classes = classes(role, root)\n self.content_classes = dict()\n for tag in contents:\n self.content_classes[tag] = classes(role, tag)\n\n # not actually used as a reference point\n # code_role = RoleClasses('code', 'code', [])\n any_role = RoleClasses('any', 'a', ['code'])\n cpp_any_role = RoleClasses('cpp-any', 'a', ['code'])\n # NYI: consistent looks\n # texpr_role = RoleClasses('cpp-texpr', 'span', ['a', 'code'])\n expr_role = RoleClasses('cpp-expr', 'span', ['a'])\n texpr_role = RoleClasses('cpp-texpr', 'span', ['a', 'span'])\n\n # XRefRole-style classes\n\n # any and cpp:any do not put these classes at the root\n\n # n.b. the generic any machinery finds the specific 'cpp-class' object type\n expect = 'any uses XRefRole classes'\n assert {'xref', 'any', 'cpp', 'cpp-class'} <= any_role.content_classes['code'], expect\n\n expect = 'cpp:any uses XRefRole classes'\n assert {'xref', 'cpp-any', 'cpp'} <= cpp_any_role.content_classes['code'], expect\n\n for role in (expr_role, texpr_role):\n name = role.name\n expect = '`{name}` puts the domain and role classes at its root'.format(name=name)\n assert {'sig', 'sig-inline', 'cpp', name} <= role.classes, expect\n\n # reference classes\n\n expect = 'the xref roles use the same reference classes'\n assert any_role.classes == cpp_any_role.classes, expect\n assert any_role.classes == expr_role.content_classes['a'], expect\n assert any_role.classes == texpr_role.content_classes['a'], expect\n\n\n@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'nitpicky': True})\ndef test_domain_cpp_build_field_role(app, status, warning):\n app.builder.build_all()\n ws = filter_warnings(warning, \"field-role\")\n assert len(ws) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_intersphinx_test_domain_cpp_build_intersphinx.assert_len_ws_0": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_build_intersphinx_test_domain_cpp_build_intersphinx.assert_len_ws_0", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1281, "end_line": 1341, "span_ids": ["test_domain_cpp_build_intersphinx"], "tokens": 696}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='domain-cpp-intersphinx', confoverrides={'nitpicky': True})\ndef test_domain_cpp_build_intersphinx(tempdir, app, status, warning):\n origSource = \"\"\"\\\n.. cpp:class:: _class\n.. cpp:struct:: _struct\n.. cpp:union:: _union\n.. cpp:function:: void _function()\n.. cpp:member:: int _member\n.. cpp:var:: int _var\n.. cpp:type:: _type\n.. cpp:concept:: template<typename T> _concept\n.. cpp:enum:: _enum\n\n .. cpp:enumerator:: _enumerator\n\n.. cpp:enum-struct:: _enumStruct\n\n .. cpp:enumerator:: _scopedEnumerator\n\n.. cpp:enum-class:: _enumClass\n.. cpp:function:: void _functionParam(int param)\n.. cpp:function:: template<typename TParam> void _templateParam()\n\"\"\" # noqa\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(b'''\\\n# Sphinx inventory version 2\n# Project: C Intersphinx Test\n# Version: \n# The remainder of this file is compressed using zlib.\n''' + zlib.compress(b'''\\\n_class cpp:class 1 index.html#_CPPv46$ -\n_concept cpp:concept 1 index.html#_CPPv4I0E8$ -\n_concept::T cpp:templateParam 1 index.html#_CPPv4I0E8_concept -\n_enum cpp:enum 1 index.html#_CPPv45$ -\n_enum::_enumerator cpp:enumerator 1 index.html#_CPPv4N5_enum11_enumeratorE -\n_enumClass cpp:enum 1 index.html#_CPPv410$ -\n_enumStruct cpp:enum 1 index.html#_CPPv411$ -\n_enumStruct::_scopedEnumerator cpp:enumerator 1 index.html#_CPPv4N11_enumStruct17_scopedEnumeratorE -\n_enumerator cpp:enumerator 1 index.html#_CPPv4N5_enum11_enumeratorE -\n_function cpp:function 1 index.html#_CPPv49_functionv -\n_functionParam cpp:function 1 index.html#_CPPv414_functionParami -\n_functionParam::param cpp:functionParam 1 index.html#_CPPv414_functionParami -\n_member cpp:member 1 index.html#_CPPv47$ -\n_struct cpp:class 1 index.html#_CPPv47$ -\n_templateParam cpp:function 1 index.html#_CPPv4I0E14_templateParamvv -\n_templateParam::TParam cpp:templateParam 1 index.html#_CPPv4I0E14_templateParamvv -\n_type cpp:type 1 index.html#_CPPv45$ -\n_union cpp:union 1 index.html#_CPPv46$ -\n_var cpp:member 1 index.html#_CPPv44$ -\n''')) # noqa\n app.config.intersphinx_mapping = {\n 'https://localhost/intersphinx/cpp/': inv_file,\n }\n app.config.intersphinx_cache_limit = 0\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n\n app.builder.build_all()\n ws = filter_warnings(warning, \"index\")\n assert len(ws) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_parse_noindexentry_test_domain_cpp_parse_noindexentry.assert_node_doctree_2_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_parse_noindexentry_test_domain_cpp_parse_noindexentry.assert_node_doctree_2_a", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1344, "end_line": 1351, "span_ids": ["test_domain_cpp_parse_noindexentry"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_parse_noindexentry(app):\n text = (\".. cpp:function:: void f()\\n\"\n \".. cpp:function:: void g()\\n\"\n \" :noindexentry:\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index, desc, addnodes.index, desc))\n assert_node(doctree[0], addnodes.index, entries=[('single', 'f (C++ function)', '_CPPv41fv', '', None)])\n assert_node(doctree[2], addnodes.index, entries=[])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_parse_mix_decl_duplicate_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_cpp.py_test_domain_cpp_parse_mix_decl_duplicate_", "embedding": null, "metadata": {"file_path": "tests/test_domain_cpp.py", "file_name": "test_domain_cpp.py", "file_type": "text/x-python", "category": "test", "start_line": 1354, "end_line": 1367, "span_ids": ["test_domain_cpp_parse_mix_decl_duplicate"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_domain_cpp_parse_mix_decl_duplicate(app, warning):\n # Issue 8270\n text = (\".. cpp:struct:: A\\n\"\n \".. cpp:function:: void A()\\n\"\n \".. cpp:struct:: A\\n\")\n restructuredtext.parse(app, text)\n ws = warning.getvalue().split(\"\\n\")\n assert len(ws) == 5\n assert \"index.rst:2: WARNING: Duplicate C++ declaration, also defined at index:1.\" in ws[0]\n assert \"Declaration is '.. cpp:function:: void A()'.\" in ws[1]\n assert \"index.rst:3: WARNING: Duplicate C++ declaration, also defined at index:1.\" in ws[2]\n assert \"Declaration is '.. cpp:struct:: A'.\" in ws[3]\n assert ws[4] == \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py__Tests_the_JavaScript_D_test_domain_js_xrefs.assert_len_refnodes_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_js.py__Tests_the_JavaScript_D_test_domain_js_xrefs.assert_len_refnodes_7", "embedding": null, "metadata": {"file_path": "tests/test_domain_js.py", "file_name": "test_domain_js.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 70, "span_ids": ["docstring", "imports", "test_domain_js_xrefs"], "tokens": 862}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests the JavaScript Domain\"\"\"\n\nfrom unittest.mock import Mock\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import (desc, desc_annotation, desc_content, desc_name, desc_parameter,\n desc_parameterlist, desc_sig_keyword, desc_sig_name,\n desc_sig_space, desc_signature)\nfrom sphinx.domains.javascript import JavaScriptDomain\nfrom sphinx.testing import restructuredtext\nfrom sphinx.testing.util import assert_node\n\n\n@pytest.mark.sphinx('dummy', testroot='domain-js')\ndef test_domain_js_xrefs(app, status, warning):\n \"\"\"Domain objects have correct prefixes when looking up xrefs\"\"\"\n app.builder.build_all()\n\n def assert_refnode(node, mod_name, prefix, target, reftype=None,\n domain='js'):\n attributes = {\n 'refdomain': domain,\n 'reftarget': target,\n }\n if reftype is not None:\n attributes['reftype'] = reftype\n if mod_name is not False:\n attributes['js:module'] = mod_name\n if prefix is not False:\n attributes['js:object'] = prefix\n assert_node(node, **attributes)\n\n doctree = app.env.get_doctree('roles')\n refnodes = list(doctree.findall(addnodes.pending_xref))\n assert_refnode(refnodes[0], None, None, 'TopLevel', 'class')\n assert_refnode(refnodes[1], None, None, 'top_level', 'func')\n assert_refnode(refnodes[2], None, 'NestedParentA', 'child_1', 'func')\n assert_refnode(refnodes[3], None, 'NestedParentA', 'NestedChildA.subchild_2', 'func')\n assert_refnode(refnodes[4], None, 'NestedParentA', 'child_2', 'func')\n assert_refnode(refnodes[5], False, 'NestedParentA', 'any_child', domain='')\n assert_refnode(refnodes[6], None, 'NestedParentA', 'NestedChildA', 'class')\n assert_refnode(refnodes[7], None, 'NestedParentA.NestedChildA', 'subchild_2', 'func')\n assert_refnode(refnodes[8], None, 'NestedParentA.NestedChildA',\n 'NestedParentA.child_1', 'func')\n assert_refnode(refnodes[9], None, 'NestedParentA', 'NestedChildA.subchild_1', 'func')\n assert_refnode(refnodes[10], None, 'NestedParentB', 'child_1', 'func')\n assert_refnode(refnodes[11], None, 'NestedParentB', 'NestedParentB', 'class')\n assert_refnode(refnodes[12], None, None, 'NestedParentA.NestedChildA', 'class')\n assert len(refnodes) == 13\n\n doctree = app.env.get_doctree('module')\n refnodes = list(doctree.findall(addnodes.pending_xref))\n assert_refnode(refnodes[0], 'module_a.submodule', None, 'ModTopLevel',\n 'class')\n assert_refnode(refnodes[1], 'module_a.submodule', 'ModTopLevel',\n 'mod_child_1', 'meth')\n assert_refnode(refnodes[2], 'module_a.submodule', 'ModTopLevel',\n 'ModTopLevel.mod_child_1', 'meth')\n assert_refnode(refnodes[3], 'module_a.submodule', 'ModTopLevel',\n 'mod_child_2', 'meth')\n assert_refnode(refnodes[4], 'module_a.submodule', 'ModTopLevel',\n 'module_a.submodule.ModTopLevel.mod_child_1', 'meth')\n assert_refnode(refnodes[5], 'module_b.submodule', None, 'ModTopLevel',\n 'class')\n assert_refnode(refnodes[6], 'module_b.submodule', 'ModTopLevel',\n 'module_a.submodule', 'mod')\n assert len(refnodes) == 7", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py__Tests_the_Python_Domai_parse.return.signode_astext_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py__Tests_the_Python_Domai_parse.return.signode_astext_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 31, "span_ids": ["docstring", "imports", "parse"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests the Python Domain\"\"\"\n\nimport re\nimport sys\nfrom unittest.mock import Mock\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import (desc, desc_addname, desc_annotation, desc_content, desc_name,\n desc_optional, desc_parameter, desc_parameterlist, desc_returns,\n desc_sig_keyword, desc_sig_literal_number,\n desc_sig_literal_string, desc_sig_name, desc_sig_operator,\n desc_sig_punctuation, desc_sig_space, desc_signature,\n pending_xref)\nfrom sphinx.domains import IndexEntry\nfrom sphinx.domains.python import (PythonDomain, PythonModuleIndex, _parse_annotation,\n _pseudo_parse_arglist, py_sig_re)\nfrom sphinx.testing import restructuredtext\nfrom sphinx.testing.util import assert_node\n\n\ndef parse(sig):\n m = py_sig_re.match(sig)\n if m is None:\n raise ValueError\n name_prefix, name, arglist, retann = m.groups()\n signode = addnodes.desc_signature(sig, '')\n _pseudo_parse_arglist(signode, arglist)\n return signode.astext()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_resolve_xref_for_properties_test_resolve_xref_for_properties.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_resolve_xref_for_properties_test_resolve_xref_for_properties.None_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 185, "end_line": 201, "span_ids": ["test_resolve_xref_for_properties"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='domain-py')\ndef test_resolve_xref_for_properties(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'module.html').read_text()\n assert ('Link to <a class=\"reference internal\" href=\"#module_a.submodule.ModTopLevel.prop\"'\n ' title=\"module_a.submodule.ModTopLevel.prop\">'\n '<code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">'\n 'prop</span> <span class=\"pre\">attribute</span></code></a>' in content)\n assert ('Link to <a class=\"reference internal\" href=\"#module_a.submodule.ModTopLevel.prop\"'\n ' title=\"module_a.submodule.ModTopLevel.prop\">'\n '<code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">'\n 'prop</span> <span class=\"pre\">method</span></code></a>' in content)\n assert ('Link to <a class=\"reference internal\" href=\"#module_a.submodule.ModTopLevel.prop\"'\n ' title=\"module_a.submodule.ModTopLevel.prop\">'\n '<code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">'\n 'prop</span> <span class=\"pre\">attribute</span></code></a>' in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_canonical_test_domain_py_canonical.assert_warning_getvalue_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_domain_py_canonical_test_domain_py_canonical.assert_warning_getvalue_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 233, "end_line": 241, "span_ids": ["test_domain_py_canonical"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='domain-py', freshenv=True)\ndef test_domain_py_canonical(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'canonical.html').read_text()\n assert ('<a class=\"reference internal\" href=\"#canonical.Foo\" title=\"canonical.Foo\">'\n '<code class=\"xref py py-class docutils literal notranslate\">'\n '<span class=\"pre\">Foo</span></code></a>' in content)\n assert warning.getvalue() == ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_parse_annotation_test_parse_annotation.None_12": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_parse_annotation_test_parse_annotation.None_12", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 272, "end_line": 352, "span_ids": ["test_parse_annotation"], "tokens": 843}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_parse_annotation(app):\n doctree = _parse_annotation(\"int\", app.env)\n assert_node(doctree, ([pending_xref, \"int\"],))\n assert_node(doctree[0], pending_xref, refdomain=\"py\", reftype=\"class\", reftarget=\"int\")\n\n doctree = _parse_annotation(\"List[int]\", app.env)\n assert_node(doctree, ([pending_xref, \"List\"],\n [desc_sig_punctuation, \"[\"],\n [pending_xref, \"int\"],\n [desc_sig_punctuation, \"]\"]))\n\n doctree = _parse_annotation(\"Tuple[int, int]\", app.env)\n assert_node(doctree, ([pending_xref, \"Tuple\"],\n [desc_sig_punctuation, \"[\"],\n [pending_xref, \"int\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [pending_xref, \"int\"],\n [desc_sig_punctuation, \"]\"]))\n\n doctree = _parse_annotation(\"Tuple[()]\", app.env)\n assert_node(doctree, ([pending_xref, \"Tuple\"],\n [desc_sig_punctuation, \"[\"],\n [desc_sig_punctuation, \"(\"],\n [desc_sig_punctuation, \")\"],\n [desc_sig_punctuation, \"]\"]))\n\n doctree = _parse_annotation(\"Tuple[int, ...]\", app.env)\n assert_node(doctree, ([pending_xref, \"Tuple\"],\n [desc_sig_punctuation, \"[\"],\n [pending_xref, \"int\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [desc_sig_punctuation, \"...\"],\n [desc_sig_punctuation, \"]\"]))\n\n doctree = _parse_annotation(\"Callable[[int, int], int]\", app.env)\n assert_node(doctree, ([pending_xref, \"Callable\"],\n [desc_sig_punctuation, \"[\"],\n [desc_sig_punctuation, \"[\"],\n [pending_xref, \"int\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [pending_xref, \"int\"],\n [desc_sig_punctuation, \"]\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [pending_xref, \"int\"],\n [desc_sig_punctuation, \"]\"]))\n\n doctree = _parse_annotation(\"Callable[[], int]\", app.env)\n assert_node(doctree, ([pending_xref, \"Callable\"],\n [desc_sig_punctuation, \"[\"],\n [desc_sig_punctuation, \"[\"],\n [desc_sig_punctuation, \"]\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [pending_xref, \"int\"],\n [desc_sig_punctuation, \"]\"]))\n\n doctree = _parse_annotation(\"List[None]\", app.env)\n assert_node(doctree, ([pending_xref, \"List\"],\n [desc_sig_punctuation, \"[\"],\n [pending_xref, \"None\"],\n [desc_sig_punctuation, \"]\"]))\n\n # None type makes an object-reference (not a class reference)\n doctree = _parse_annotation(\"None\", app.env)\n assert_node(doctree, ([pending_xref, \"None\"],))\n assert_node(doctree[0], pending_xref, refdomain=\"py\", reftype=\"obj\", reftarget=\"None\")\n\n # Literal type makes an object-reference (not a class reference)\n doctree = _parse_annotation(\"typing.Literal['a', 'b']\", app.env)\n assert_node(doctree, ([pending_xref, \"Literal\"],\n [desc_sig_punctuation, \"[\"],\n [desc_sig_literal_string, \"'a'\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [desc_sig_literal_string, \"'b'\"],\n [desc_sig_punctuation, \"]\"]))\n assert_node(doctree[0], pending_xref, refdomain=\"py\", reftype=\"obj\", reftarget=\"typing.Literal\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_parse_annotation_suppress_test_parse_annotation_suppress.assert_node_doctree_0_p": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_parse_annotation_suppress_test_parse_annotation_suppress.assert_node_doctree_0_p", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 355, "end_line": 364, "span_ids": ["test_parse_annotation_suppress"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_parse_annotation_suppress(app):\n doctree = _parse_annotation(\"~typing.Dict[str, str]\", app.env)\n assert_node(doctree, ([pending_xref, \"Dict\"],\n [desc_sig_punctuation, \"[\"],\n [pending_xref, \"str\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [pending_xref, \"str\"],\n [desc_sig_punctuation, \"]\"]))\n assert_node(doctree[0], pending_xref, refdomain=\"py\", reftype=\"obj\", reftarget=\"typing.Dict\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_parse_annotation_Literal_test_parse_annotation_Literal.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_parse_annotation_Literal_test_parse_annotation_Literal.None_1", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 367, "end_line": 388, "span_ids": ["test_parse_annotation_Literal"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8), reason='python 3.8+ is required.')\ndef test_parse_annotation_Literal(app):\n doctree = _parse_annotation(\"Literal[True, False]\", app.env)\n assert_node(doctree, ([pending_xref, \"Literal\"],\n [desc_sig_punctuation, \"[\"],\n [desc_sig_keyword, \"True\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [desc_sig_keyword, \"False\"],\n [desc_sig_punctuation, \"]\"]))\n\n doctree = _parse_annotation(\"typing.Literal[0, 1, 'abc']\", app.env)\n assert_node(doctree, ([pending_xref, \"Literal\"],\n [desc_sig_punctuation, \"[\"],\n [desc_sig_literal_number, \"0\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [desc_sig_literal_number, \"1\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [desc_sig_literal_string, \"'abc'\"],\n [desc_sig_punctuation, \"]\"]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_with_union_type_operator_test_pyfunction_with_union_type_operator.assert_node_doctree_1_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyfunction_with_union_type_operator_test_pyfunction_with_union_type_operator.assert_node_doctree_1_0_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 504, "end_line": 515, "span_ids": ["test_pyfunction_with_union_type_operator"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pyfunction_with_union_type_operator(app):\n text = \".. py:function:: hello(age: int | None)\"\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree[1][0][1],\n [desc_parameterlist, ([desc_parameter, ([desc_sig_name, \"age\"],\n [desc_sig_punctuation, \":\"],\n desc_sig_space,\n [desc_sig_name, ([pending_xref, \"int\"],\n desc_sig_space,\n [desc_sig_punctuation, \"|\"],\n desc_sig_space,\n [pending_xref, \"None\"])])])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_with_union_type_operator_test_pydata_with_union_type_operator.assert_node_doctree_1_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pydata_with_union_type_operator_test_pydata_with_union_type_operator.assert_node_doctree_1_0_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 580, "end_line": 592, "span_ids": ["test_pydata_with_union_type_operator"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pydata_with_union_type_operator(app):\n text = (\".. py:data:: version\\n\"\n \" :type: int | str\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree[1][0],\n ([desc_name, \"version\"],\n [desc_annotation, ([desc_sig_punctuation, ':'],\n desc_sig_space,\n [pending_xref, \"int\"],\n desc_sig_space,\n [desc_sig_punctuation, \"|\"],\n desc_sig_space,\n [pending_xref, \"str\"])]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pymethod_options_test_pymethod_options.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pymethod_options_test_pymethod_options.None_8", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 696, "end_line": 767, "span_ids": ["test_pymethod_options"], "tokens": 808}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pymethod_options(app):\n text = (\".. py:class:: Class\\n\"\n \"\\n\"\n \" .. py:method:: meth1\\n\"\n \" .. py:method:: meth2\\n\"\n \" :classmethod:\\n\"\n \" .. py:method:: meth3\\n\"\n \" :staticmethod:\\n\"\n \" .. py:method:: meth4\\n\"\n \" :async:\\n\"\n \" .. py:method:: meth5\\n\"\n \" :property:\\n\"\n \" .. py:method:: meth6\\n\"\n \" :abstractmethod:\\n\"\n \" .. py:method:: meth7\\n\"\n \" :final:\\n\")\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space)],\n [desc_name, \"Class\"])],\n [desc_content, (addnodes.index,\n desc,\n addnodes.index,\n desc,\n addnodes.index,\n desc,\n addnodes.index,\n desc,\n addnodes.index,\n desc,\n addnodes.index,\n desc,\n addnodes.index,\n desc)])]))\n\n # method\n assert_node(doctree[1][1][0], addnodes.index,\n entries=[('single', 'meth1() (Class method)', 'Class.meth1', '', None)])\n assert_node(doctree[1][1][1], ([desc_signature, ([desc_name, \"meth1\"],\n [desc_parameterlist, ()])],\n [desc_content, ()]))\n assert 'Class.meth1' in domain.objects\n assert domain.objects['Class.meth1'] == ('index', 'Class.meth1', 'method', False)\n\n # :classmethod:\n assert_node(doctree[1][1][2], addnodes.index,\n entries=[('single', 'meth2() (Class class method)', 'Class.meth2', '', None)])\n assert_node(doctree[1][1][3], ([desc_signature, ([desc_annotation, (\"classmethod\", desc_sig_space)],\n [desc_name, \"meth2\"],\n [desc_parameterlist, ()])],\n [desc_content, ()]))\n assert 'Class.meth2' in domain.objects\n assert domain.objects['Class.meth2'] == ('index', 'Class.meth2', 'method', False)\n\n # :staticmethod:\n assert_node(doctree[1][1][4], addnodes.index,\n entries=[('single', 'meth3() (Class static method)', 'Class.meth3', '', None)])\n assert_node(doctree[1][1][5], ([desc_signature, ([desc_annotation, (\"static\", desc_sig_space)],\n [desc_name, \"meth3\"],\n [desc_parameterlist, ()])],\n [desc_content, ()]))\n assert 'Class.meth3' in domain.objects\n assert domain.objects['Class.meth3'] == ('index', 'Class.meth3', 'method', False)\n\n # :async:\n assert_node(doctree[1][1][6], addnodes.index,\n entries=[('single', 'meth4() (Class method)', 'Class.meth4', '', None)])\n assert_node(doctree[1][1][7], ([desc_signature, ([desc_annotation, (\"async\", desc_sig_space)],\n [desc_name, \"meth4\"],\n [desc_parameterlist, ()])],\n [desc_content, ()]))\n # ... other code\n assert domain.objects['Class.meth4'] == ('index', 'Class.meth4', 'method', False)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pymethod_options.assert_Class_meth4_in_d_test_pymethod_options.None_13": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pymethod_options.assert_Class_meth4_in_d_test_pymethod_options.None_13", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 768, "end_line": 798, "span_ids": ["test_pymethod_options"], "tokens": 493}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pymethod_options(app):\n # ... other code\n assert_node(doctree[1][1][6], addnodes.index,\n entries=[('single', 'meth4() (Class method)', 'Class.meth4', '', None)])\n # ... other code\n assert 'Class.meth4' in domain.objects\n assert domain.objects['Class.meth4'] == ('index', 'Class.meth4', 'method', False)\n\n # :property:\n assert_node(doctree[1][1][8], addnodes.index,\n entries=[('single', 'meth5 (Class property)', 'Class.meth5', '', None)])\n assert_node(doctree[1][1][9], ([desc_signature, ([desc_annotation, (\"property\", desc_sig_space)],\n [desc_name, \"meth5\"])],\n [desc_content, ()]))\n assert 'Class.meth5' in domain.objects\n assert domain.objects['Class.meth5'] == ('index', 'Class.meth5', 'method', False)\n\n # :abstractmethod:\n assert_node(doctree[1][1][10], addnodes.index,\n entries=[('single', 'meth6() (Class method)', 'Class.meth6', '', None)])\n assert_node(doctree[1][1][11], ([desc_signature, ([desc_annotation, (\"abstract\", desc_sig_space)],\n [desc_name, \"meth6\"],\n [desc_parameterlist, ()])],\n [desc_content, ()]))\n assert 'Class.meth6' in domain.objects\n assert domain.objects['Class.meth6'] == ('index', 'Class.meth6', 'method', False)\n\n # :final:\n assert_node(doctree[1][1][12], addnodes.index,\n entries=[('single', 'meth7() (Class method)', 'Class.meth7', '', None)])\n assert_node(doctree[1][1][13], ([desc_signature, ([desc_annotation, (\"final\", desc_sig_space)],\n [desc_name, \"meth7\"],\n [desc_parameterlist, ()])],\n [desc_content, ()]))\n assert 'Class.meth7' in domain.objects\n assert domain.objects['Class.meth7'] == ('index', 'Class.meth7', 'method', False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyproperty_test_pyproperty.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_pyproperty_test_pyproperty.None_3", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 877, "end_line": 917, "span_ids": ["test_pyproperty"], "tokens": 474}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pyproperty(app):\n text = (\".. py:class:: Class\\n\"\n \"\\n\"\n \" .. py:property:: prop1\\n\"\n \" :abstractmethod:\\n\"\n \" :type: str\\n\"\n \"\\n\"\n \" .. py:property:: prop2\\n\"\n \" :classmethod:\\n\"\n \" :type: str\\n\")\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space)],\n [desc_name, \"Class\"])],\n [desc_content, (addnodes.index,\n desc,\n addnodes.index,\n desc)])]))\n assert_node(doctree[1][1][0], addnodes.index,\n entries=[('single', 'prop1 (Class property)', 'Class.prop1', '', None)])\n assert_node(doctree[1][1][1], ([desc_signature, ([desc_annotation, (\"abstract\", desc_sig_space,\n \"property\", desc_sig_space)],\n [desc_name, \"prop1\"],\n [desc_annotation, ([desc_sig_punctuation, ':'],\n desc_sig_space,\n [pending_xref, \"str\"])])],\n [desc_content, ()]))\n assert_node(doctree[1][1][2], addnodes.index,\n entries=[('single', 'prop2 (Class property)', 'Class.prop2', '', None)])\n assert_node(doctree[1][1][3], ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space,\n \"property\", desc_sig_space)],\n [desc_name, \"prop2\"],\n [desc_annotation, ([desc_sig_punctuation, ':'],\n desc_sig_space,\n [pending_xref, \"str\"])])],\n [desc_content, ()]))\n assert 'Class.prop1' in domain.objects\n assert domain.objects['Class.prop1'] == ('index', 'Class.prop1', 'property', False)\n assert 'Class.prop2' in domain.objects\n assert domain.objects['Class.prop2'] == ('index', 'Class.prop2', 'property', False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_canonical_test_canonical.assert_domain_objects__i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_canonical_test_canonical.assert_domain_objects__i", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 950, "end_line": 962, "span_ids": ["test_canonical"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_canonical(app):\n text = (\".. py:class:: io.StringIO\\n\"\n \" :canonical: _io.StringIO\")\n domain = app.env.get_domain('py')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space)],\n [desc_addname, \"io.\"],\n [desc_name, \"StringIO\"])],\n desc_content)]))\n assert 'io.StringIO' in domain.objects\n assert domain.objects['io.StringIO'] == ('index', 'io.StringIO', 'class', False)\n assert domain.objects['_io.StringIO'] == ('index', 'io.StringIO', 'class', True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_canonical_definition_overrides_test_canonical_duplicated.assert_warning_getvalue_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_canonical_definition_overrides_test_canonical_duplicated.assert_warning_getvalue_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 965, "end_line": 995, "span_ids": ["test_canonical_definition_skip", "test_canonical_duplicated", "test_canonical_definition_overrides"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_canonical_definition_overrides(app, warning):\n text = (\".. py:class:: io.StringIO\\n\"\n \" :canonical: _io.StringIO\\n\"\n \".. py:class:: _io.StringIO\\n\")\n restructuredtext.parse(app, text)\n assert warning.getvalue() == \"\"\n\n domain = app.env.get_domain('py')\n assert domain.objects['_io.StringIO'] == ('index', 'id0', 'class', False)\n\n\ndef test_canonical_definition_skip(app, warning):\n text = (\".. py:class:: _io.StringIO\\n\"\n \".. py:class:: io.StringIO\\n\"\n \" :canonical: _io.StringIO\\n\")\n\n restructuredtext.parse(app, text)\n assert warning.getvalue() == \"\"\n\n domain = app.env.get_domain('py')\n assert domain.objects['_io.StringIO'] == ('index', 'io.StringIO', 'class', False)\n\n\ndef test_canonical_duplicated(app, warning):\n text = (\".. py:class:: mypackage.StringIO\\n\"\n \" :canonical: _io.StringIO\\n\"\n \".. py:class:: io.StringIO\\n\"\n \" :canonical: _io.StringIO\\n\")\n\n restructuredtext.parse(app, text)\n assert warning.getvalue() != \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_test_info_field_list.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_test_info_field_list.None_8", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 998, "end_line": 1064, "span_ids": ["test_info_field_list"], "tokens": 747}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_info_field_list(app):\n text = (\".. py:module:: example\\n\"\n \".. py:class:: Class\\n\"\n \"\\n\"\n \" :param str name: blah blah\\n\"\n \" :param age: blah blah\\n\"\n \" :type age: int\\n\"\n \" :param items: blah blah\\n\"\n \" :type items: Tuple[str, ...]\\n\"\n \" :param Dict[str, str] params: blah blah\\n\")\n doctree = restructuredtext.parse(app, text)\n print(doctree)\n\n assert_node(doctree, (nodes.target,\n addnodes.index,\n addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space)],\n [desc_addname, \"example.\"],\n [desc_name, \"Class\"])],\n [desc_content, nodes.field_list, nodes.field])]))\n assert_node(doctree[3][1][0][0],\n ([nodes.field_name, \"Parameters\"],\n [nodes.field_body, nodes.bullet_list, ([nodes.list_item, nodes.paragraph],\n [nodes.list_item, nodes.paragraph],\n [nodes.list_item, nodes.paragraph],\n [nodes.list_item, nodes.paragraph])]))\n\n # :param str name:\n assert_node(doctree[3][1][0][0][1][0][0][0],\n ([addnodes.literal_strong, \"name\"],\n \" (\",\n [pending_xref, addnodes.literal_emphasis, \"str\"],\n \")\",\n \" -- \",\n \"blah blah\"))\n assert_node(doctree[3][1][0][0][1][0][0][0][2], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"str\",\n **{\"py:module\": \"example\", \"py:class\": \"Class\"})\n\n # :param age: + :type age:\n assert_node(doctree[3][1][0][0][1][0][1][0],\n ([addnodes.literal_strong, \"age\"],\n \" (\",\n [pending_xref, addnodes.literal_emphasis, \"int\"],\n \")\",\n \" -- \",\n \"blah blah\"))\n assert_node(doctree[3][1][0][0][1][0][1][0][2], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"int\",\n **{\"py:module\": \"example\", \"py:class\": \"Class\"})\n\n # :param items: + :type items:\n assert_node(doctree[3][1][0][0][1][0][2][0],\n ([addnodes.literal_strong, \"items\"],\n \" (\",\n [pending_xref, addnodes.literal_emphasis, \"Tuple\"],\n [addnodes.literal_emphasis, \"[\"],\n [pending_xref, addnodes.literal_emphasis, \"str\"],\n [addnodes.literal_emphasis, \", \"],\n [addnodes.literal_emphasis, \"...\"],\n [addnodes.literal_emphasis, \"]\"],\n \")\",\n \" -- \",\n \"blah blah\"))\n assert_node(doctree[3][1][0][0][1][0][2][0][2], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"Tuple\",\n **{\"py:module\": \"example\", \"py:class\": \"Class\"})\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list.None_9_test_info_field_list.None_13": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list.None_9_test_info_field_list.None_13", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 1065, "end_line": 1090, "span_ids": ["test_info_field_list"], "tokens": 403}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_info_field_list(app):\n # ... other code\n assert_node(doctree[3][1][0][0][1][0][2][0][4], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"str\",\n **{\"py:module\": \"example\", \"py:class\": \"Class\"})\n\n # :param Dict[str, str] params:\n assert_node(doctree[3][1][0][0][1][0][3][0],\n ([addnodes.literal_strong, \"params\"],\n \" (\",\n [pending_xref, addnodes.literal_emphasis, \"Dict\"],\n [addnodes.literal_emphasis, \"[\"],\n [pending_xref, addnodes.literal_emphasis, \"str\"],\n [addnodes.literal_emphasis, \", \"],\n [pending_xref, addnodes.literal_emphasis, \"str\"],\n [addnodes.literal_emphasis, \"]\"],\n \")\",\n \" -- \",\n \"blah blah\"))\n assert_node(doctree[3][1][0][0][1][0][3][0][2], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"Dict\",\n **{\"py:module\": \"example\", \"py:class\": \"Class\"})\n assert_node(doctree[3][1][0][0][1][0][3][0][4], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"str\",\n **{\"py:module\": \"example\", \"py:class\": \"Class\"})\n assert_node(doctree[3][1][0][0][1][0][3][0][6], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"str\",\n **{\"py:module\": \"example\", \"py:class\": \"Class\"})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_piped_type_test_info_field_list_piped_type.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_piped_type_test_info_field_list_piped_type.None_3", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 1093, "end_line": 1124, "span_ids": ["test_info_field_list_piped_type"], "tokens": 364}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_info_field_list_piped_type(app):\n text = (\".. py:module:: example\\n\"\n \".. py:class:: Class\\n\"\n \"\\n\"\n \" :param age: blah blah\\n\"\n \" :type age: int | str\\n\")\n doctree = restructuredtext.parse(app, text)\n\n assert_node(doctree,\n (nodes.target,\n addnodes.index,\n addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space)],\n [desc_addname, \"example.\"],\n [desc_name, \"Class\"])],\n [desc_content, nodes.field_list, nodes.field, (nodes.field_name,\n nodes.field_body)])]))\n assert_node(doctree[3][1][0][0][1],\n ([nodes.paragraph, ([addnodes.literal_strong, \"age\"],\n \" (\",\n [pending_xref, addnodes.literal_emphasis, \"int\"],\n [addnodes.literal_emphasis, \" | \"],\n [pending_xref, addnodes.literal_emphasis, \"str\"],\n \")\",\n \" -- \",\n \"blah blah\")],))\n assert_node(doctree[3][1][0][0][1][0][2], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"int\",\n **{\"py:module\": \"example\", \"py:class\": \"Class\"})\n assert_node(doctree[3][1][0][0][1][0][4], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"str\",\n **{\"py:module\": \"example\", \"py:class\": \"Class\"})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_Literal_test_info_field_list_Literal.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_Literal_test_info_field_list_Literal.None_2", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 1127, "end_line": 1160, "span_ids": ["test_info_field_list_Literal"], "tokens": 363}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_info_field_list_Literal(app):\n text = (\".. py:module:: example\\n\"\n \".. py:class:: Class\\n\"\n \"\\n\"\n \" :param age: blah blah\\n\"\n \" :type age: Literal['foo', 'bar', 'baz']\\n\")\n doctree = restructuredtext.parse(app, text)\n\n assert_node(doctree,\n (nodes.target,\n addnodes.index,\n addnodes.index,\n [desc, ([desc_signature, ([desc_annotation, (\"class\", desc_sig_space)],\n [desc_addname, \"example.\"],\n [desc_name, \"Class\"])],\n [desc_content, nodes.field_list, nodes.field, (nodes.field_name,\n nodes.field_body)])]))\n assert_node(doctree[3][1][0][0][1],\n ([nodes.paragraph, ([addnodes.literal_strong, \"age\"],\n \" (\",\n [pending_xref, addnodes.literal_emphasis, \"Literal\"],\n [addnodes.literal_emphasis, \"[\"],\n [addnodes.literal_emphasis, \"'foo'\"],\n [addnodes.literal_emphasis, \", \"],\n [addnodes.literal_emphasis, \"'bar'\"],\n [addnodes.literal_emphasis, \", \"],\n [addnodes.literal_emphasis, \"'baz'\"],\n [addnodes.literal_emphasis, \"]\"],\n \")\",\n \" -- \",\n \"blah blah\")],))\n assert_node(doctree[3][1][0][0][1][0][2], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"Literal\",\n **{\"py:module\": \"example\", \"py:class\": \"Class\"})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_var_test_info_field_list_var.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_info_field_list_var_test_info_field_list_var.None_3", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 1163, "end_line": 1184, "span_ids": ["test_info_field_list_var"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_info_field_list_var(app):\n text = (\".. py:class:: Class\\n\"\n \"\\n\"\n \" :var int attr: blah blah\\n\")\n doctree = restructuredtext.parse(app, text)\n\n assert_node(doctree, (addnodes.index,\n [desc, (desc_signature,\n [desc_content, nodes.field_list, nodes.field])]))\n assert_node(doctree[1][1][0][0], ([nodes.field_name, \"Variables\"],\n [nodes.field_body, nodes.paragraph]))\n\n # :var int attr:\n assert_node(doctree[1][1][0][0][1][0],\n ([addnodes.literal_strong, \"attr\"],\n \" (\",\n [pending_xref, addnodes.literal_emphasis, \"int\"],\n \")\",\n \" -- \",\n \"blah blah\"))\n assert_node(doctree[1][1][0][0][1][0][2], pending_xref,\n refdomain=\"py\", reftype=\"class\", reftarget=\"int\", **{\"py:class\": \"Class\"})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_type_field_test_type_field.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_type_field_test_type_field.None_6", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 1187, "end_line": 1227, "span_ids": ["test_type_field"], "tokens": 529}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_type_field(app):\n text = (\".. py:data:: var1\\n\"\n \" :type: .int\\n\"\n \".. py:data:: var2\\n\"\n \" :type: ~builtins.int\\n\"\n \".. py:data:: var3\\n\"\n \" :type: typing.Optional[typing.Tuple[int, typing.Any]]\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"var1\"],\n [desc_annotation, ([desc_sig_punctuation, ':'],\n desc_sig_space,\n [pending_xref, \"int\"])])],\n [desc_content, ()])],\n addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"var2\"],\n [desc_annotation, ([desc_sig_punctuation, ':'],\n desc_sig_space,\n [pending_xref, \"int\"])])],\n [desc_content, ()])],\n addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"var3\"],\n [desc_annotation, ([desc_sig_punctuation, \":\"],\n desc_sig_space,\n [pending_xref, \"Optional\"],\n [desc_sig_punctuation, \"[\"],\n [pending_xref, \"Tuple\"],\n [desc_sig_punctuation, \"[\"],\n [pending_xref, \"int\"],\n [desc_sig_punctuation, \",\"],\n desc_sig_space,\n [pending_xref, \"Any\"],\n [desc_sig_punctuation, \"]\"],\n [desc_sig_punctuation, \"]\"])])],\n [desc_content, ()])]))\n assert_node(doctree[1][0][1][2], pending_xref, reftarget='int', refspecific=True)\n assert_node(doctree[3][0][1][2], pending_xref, reftarget='builtins.int', refspecific=False)\n assert_node(doctree[5][0][1][2], pending_xref, reftarget='typing.Optional', refspecific=False)\n assert_node(doctree[5][0][1][4], pending_xref, reftarget='typing.Tuple', refspecific=False)\n assert_node(doctree[5][0][1][6], pending_xref, reftarget='int', refspecific=False)\n assert_node(doctree[5][0][1][9], pending_xref, reftarget='typing.Any', refspecific=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_noindexentry_test_noindexentry.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_noindexentry_test_noindexentry.None_5", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 1297, "end_line": 1312, "span_ids": ["test_noindexentry"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_noindexentry(app):\n text = (\".. py:function:: f()\\n\"\n \".. py:function:: g()\\n\"\n \" :noindexentry:\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index, desc, addnodes.index, desc))\n assert_node(doctree[0], addnodes.index, entries=[('pair', 'built-in function; f()', 'f', '', None)])\n assert_node(doctree[2], addnodes.index, entries=[])\n\n text = (\".. py:class:: f\\n\"\n \".. py:class:: g\\n\"\n \" :noindexentry:\\n\")\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index, desc, addnodes.index, desc))\n assert_node(doctree[0], addnodes.index, entries=[('single', 'f (built-in class)', 'f', '', None)])\n assert_node(doctree[2], addnodes.index, entries=[])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_python_python_use_unqualified_type_names_test_python_python_use_unqualified_type_names.assert_p_strong_age_s": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_python_python_use_unqualified_type_names_test_python_python_use_unqualified_type_names.assert_p_strong_age_s", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 1315, "end_line": 1324, "span_ids": ["test_python_python_use_unqualified_type_names"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='domain-py-python_use_unqualified_type_names')\ndef test_python_python_use_unqualified_type_names(app, status, warning):\n app.build()\n content = (app.outdir / 'index.html').read_text()\n assert ('<span class=\"n\"><a class=\"reference internal\" href=\"#foo.Name\" title=\"foo.Name\">'\n '<span class=\"pre\">Name</span></a></span>' in content)\n assert '<span class=\"n\"><span class=\"pre\">foo.Age</span></span>' in content\n assert ('<p><strong>name</strong> (<a class=\"reference internal\" href=\"#foo.Name\" '\n 'title=\"foo.Name\"><em>Name</em></a>) \u2013 blah blah</p>' in content)\n assert '<p><strong>age</strong> (<em>foo.Age</em>) \u2013 blah blah</p>' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_python_python_use_unqualified_type_names_disabled_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_py.py_test_python_python_use_unqualified_type_names_disabled_", "embedding": null, "metadata": {"file_path": "tests/test_domain_py.py", "file_name": "test_domain_py.py", "file_type": "text/x-python", "category": "test", "start_line": 1327, "end_line": 1346, "span_ids": ["test_warn_missing_reference", "test_python_python_use_unqualified_type_names_disabled"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='domain-py-python_use_unqualified_type_names',\n confoverrides={'python_use_unqualified_type_names': False})\ndef test_python_python_use_unqualified_type_names_disabled(app, status, warning):\n app.build()\n content = (app.outdir / 'index.html').read_text()\n assert ('<span class=\"n\"><a class=\"reference internal\" href=\"#foo.Name\" title=\"foo.Name\">'\n '<span class=\"pre\">foo.Name</span></a></span>' in content)\n assert '<span class=\"n\"><span class=\"pre\">foo.Age</span></span>' in content\n assert ('<p><strong>name</strong> (<a class=\"reference internal\" href=\"#foo.Name\" '\n 'title=\"foo.Name\"><em>foo.Name</em></a>) \u2013 blah blah</p>' in content)\n assert '<p><strong>age</strong> (<em>foo.Age</em>) \u2013 blah blah</p>' in content\n\n\n@pytest.mark.sphinx('dummy', testroot='domain-py-xref-warning')\ndef test_warn_missing_reference(app, status, warning):\n app.build()\n assert 'index.rst:6: WARNING: undefined label: no-label' in warning.getvalue()\n assert ('index.rst:6: WARNING: Failed to create a cross reference. A title or caption not found: existing-label'\n in warning.getvalue())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py__Tests_the_reStructured_test_parse_directive.assert_s_bar_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_rst.py__Tests_the_reStructured_test_parse_directive.assert_s_bar_", "embedding": null, "metadata": {"file_path": "tests/test_domain_rst.py", "file_name": "test_domain_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["test_parse_directive", "docstring", "imports"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests the reStructuredText domain.\"\"\"\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import (desc, desc_addname, desc_annotation, desc_content, desc_name,\n desc_signature)\nfrom sphinx.domains.rst import parse_directive\nfrom sphinx.testing import restructuredtext\nfrom sphinx.testing.util import assert_node\n\n\ndef test_parse_directive():\n s = parse_directive(' fo\u00f6 ')\n assert s == ('fo\u00f6', '')\n\n s = parse_directive(' .. fo\u00f6 :: ')\n assert s == ('fo\u00f6', '')\n\n s = parse_directive('.. fo\u00f6:: args1 args2')\n assert s == ('fo\u00f6', ' args1 args2')\n\n s = parse_directive('.. :: bar')\n assert s == ('.. :: bar', '')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py__Tests_the_std_domain__from_sphinx_testing_util_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py__Tests_the_std_domain__from_sphinx_testing_util_", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 15, "span_ids": ["docstring", "imports"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests the std domain\"\"\"\n\nfrom unittest import mock\n\nimport pytest\nfrom docutils import nodes\nfrom docutils.nodes import definition, definition_list, definition_list_item, term\nfrom html5lib import HTMLParser\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import (desc, desc_addname, desc_content, desc_name, desc_signature,\n glossary, index, pending_xref)\nfrom sphinx.domains.std import StandardDomain\nfrom sphinx.testing import restructuredtext\nfrom sphinx.testing.util import assert_node", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmdoption_for_None_test_cmdoption_for_None.assert_domain_progoptions": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_domain_std.py_test_cmdoption_for_None_test_cmdoption_for_None.assert_domain_progoptions", "embedding": null, "metadata": {"file_path": "tests/test_domain_std.py", "file_name": "test_domain_std.py", "file_type": "text/x-python", "category": "test", "start_line": 322, "end_line": 336, "span_ids": ["test_cmdoption_for_None"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cmdoption_for_None(app):\n text = (\".. program:: ls\\n\"\n \".. program:: None\\n\"\n \"\\n\"\n \".. option:: -l\\n\")\n domain = app.env.get_domain('std')\n doctree = restructuredtext.parse(app, text)\n assert_node(doctree, (addnodes.index,\n [desc, ([desc_signature, ([desc_name, \"-l\"],\n [desc_addname, ()])],\n [desc_content, ()])]))\n assert_node(doctree[0], addnodes.index,\n entries=[('pair', 'command line option; -l', 'cmdoption-l', '', None)])\n assert (None, '-l') in domain.progoptions\n assert domain.progoptions[(None, '-l')] == ('index', 'cmdoption-l')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py__Test_the_BuildEnvironm_test_config_status.assert_want_str_in_app4__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment.py__Test_the_BuildEnvironm_test_config_status.assert_want_str_in_app4__", "embedding": null, "metadata": {"file_path": "tests/test_environment.py", "file_name": "test_environment.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 44, "span_ids": ["test_config_status", "docstring", "imports"], "tokens": 412}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the BuildEnvironment class.\"\"\"\nimport os\nimport shutil\n\nimport pytest\n\nfrom sphinx.builders.html import StandaloneHTMLBuilder\nfrom sphinx.builders.latex import LaTeXBuilder\nfrom sphinx.environment import CONFIG_CHANGED, CONFIG_EXTENSIONS_CHANGED, CONFIG_NEW, CONFIG_OK\nfrom sphinx.testing.comparer import PathComparer\n\n\n@pytest.mark.sphinx('dummy', testroot='basic')\ndef test_config_status(make_app, app_params):\n args, kwargs = app_params\n\n # clean build\n app1 = make_app(*args, freshenv=True, **kwargs)\n assert app1.env.config_status == CONFIG_NEW\n app1.build()\n assert '[new config] 1 added' in app1._status.getvalue()\n\n # incremental build (no config changed)\n app2 = make_app(*args, **kwargs)\n assert app2.env.config_status == CONFIG_OK\n app2.build()\n assert \"0 added, 0 changed, 0 removed\" in app2._status.getvalue()\n\n # incremental build (config entry changed)\n app3 = make_app(*args, confoverrides={'root_doc': 'indexx'}, **kwargs)\n fname = os.path.join(app3.srcdir, 'index.rst')\n assert os.path.isfile(fname)\n shutil.move(fname, fname[:-4] + 'x.rst')\n assert app3.env.config_status == CONFIG_CHANGED\n app3.build()\n shutil.move(fname[:-4] + 'x.rst', fname)\n assert \"[config changed ('root_doc')] 1 added\" in app3._status.getvalue()\n\n # incremental build (extension changed)\n app4 = make_app(*args, confoverrides={'extensions': ['sphinx.ext.autodoc']}, **kwargs)\n assert app4.env.config_status == CONFIG_EXTENSIONS_CHANGED\n app4.build()\n want_str = \"[extensions changed ('sphinx.ext.autodoc')] 1 added\"\n assert want_str in app4._status.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py__Test_the_sphinx_enviro_test_create_single_index.assert_index_5_\u05e2_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_indexentries.py__Test_the_sphinx_enviro_test_create_single_index.assert_index_5_\u05e2_", "embedding": null, "metadata": {"file_path": "tests/test_environment_indexentries.py", "file_name": "test_environment_indexentries.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 38, "span_ids": ["docstring", "imports", "test_create_single_index"], "tokens": 460}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the sphinx.environment.managers.indexentries.\"\"\"\n\nimport pytest\n\nfrom sphinx.environment.adapters.indexentries import IndexEntries\nfrom sphinx.testing import restructuredtext\n\n\n@pytest.mark.sphinx('dummy', freshenv=True)\ndef test_create_single_index(app):\n text = (\".. index:: docutils\\n\"\n \".. index:: Python\\n\"\n \".. index:: pip; install\\n\"\n \".. index:: pip; upgrade\\n\"\n \".. index:: Sphinx\\n\"\n \".. index:: \u0415\u043b\u044c\\n\"\n \".. index:: \u0451\u043b\u043a\u0430\\n\"\n \".. index:: \u200f\u05e2\u05d1\u05e8\u05d9\u05ea\u200e\\n\"\n \".. index:: 9-symbol\\n\"\n \".. index:: &-symbol\\n\"\n \".. index:: \u00a3100\\n\")\n restructuredtext.parse(app, text)\n index = IndexEntries(app.env).create_index(app.builder)\n assert len(index) == 6\n assert index[0] == ('Symbols', [('&-symbol', [[('', '#index-9')], [], None]),\n ('9-symbol', [[('', '#index-8')], [], None]),\n ('\u00a3100', [[('', '#index-10')], [], None])])\n assert index[1] == ('D', [('docutils', [[('', '#index-0')], [], None])])\n assert index[2] == ('P', [('pip', [[], [('install', [('', '#index-2')]),\n ('upgrade', [('', '#index-3')])], None]),\n ('Python', [[('', '#index-1')], [], None])])\n assert index[3] == ('S', [('Sphinx', [[('', '#index-4')], [], None])])\n assert index[4] == ('\u0415',\n [('\u0451\u043b\u043a\u0430', [[('', '#index-6')], [], None]),\n ('\u0415\u043b\u044c', [[('', '#index-5')], [], None])])\n # Here the word starts with U+200F RIGHT-TO-LEFT MARK, which should be\n # ignored when getting the first letter.\n assert index[5] == ('\u05e2', [('\u200f\u05e2\u05d1\u05e8\u05d9\u05ea\u200e', [[('', '#index-7')], [], None])])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py__Test_the_sphinx_enviro_test_process_doc.assert_app_env_files_to_r": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_environment_toctree.py__Test_the_sphinx_enviro_test_process_doc.assert_app_env_files_to_r", "embedding": null, "metadata": {"file_path": "tests/test_environment_toctree.py", "file_name": "test_environment_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 71, "span_ids": ["test_process_doc", "docstring", "imports"], "tokens": 903}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the sphinx.environment.managers.toctree.\"\"\"\n\nimport pytest\nfrom docutils import nodes\nfrom docutils.nodes import bullet_list, comment, list_item, reference, title\n\nfrom sphinx import addnodes\nfrom sphinx.addnodes import compact_paragraph, only\nfrom sphinx.builders.html import StandaloneHTMLBuilder\nfrom sphinx.environment.adapters.toctree import TocTree\nfrom sphinx.testing.util import assert_node\n\n\n@pytest.mark.sphinx('xml', testroot='toctree')\n@pytest.mark.test_params(shared_result='test_environment_toctree_basic')\ndef test_process_doc(app):\n app.build()\n # tocs\n toctree = app.env.tocs['index']\n assert_node(toctree,\n [bullet_list, ([list_item, (compact_paragraph, # [0][0]\n [bullet_list, (addnodes.toctree, # [0][1][0]\n only, # [0][1][1]\n list_item)])], # [0][1][2]\n [list_item, (compact_paragraph, # [1][0]\n [bullet_list, (addnodes.toctree, # [1][1][0]\n addnodes.toctree)])], # [1][1][1]\n list_item)])\n\n assert_node(toctree[0][0],\n [compact_paragraph, reference, \"Welcome to Sphinx Tests\u2019s documentation!\"])\n assert_node(toctree[0][0][0], reference, anchorname='')\n assert_node(toctree[0][1][0], addnodes.toctree,\n caption=\"Table of Contents\", glob=False, hidden=False,\n titlesonly=False, maxdepth=2, numbered=999,\n entries=[(None, 'foo'), (None, 'bar'), (None, 'http://sphinx-doc.org/'),\n (None, 'self')],\n includefiles=['foo', 'bar'])\n\n # only branch\n assert_node(toctree[0][1][1], addnodes.only, expr=\"html\")\n assert_node(toctree[0][1][1],\n [only, list_item, ([compact_paragraph, reference, \"Section for HTML\"],\n [bullet_list, addnodes.toctree])])\n assert_node(toctree[0][1][1][0][0][0], reference, anchorname='#section-for-html')\n assert_node(toctree[0][1][1][0][1][0], addnodes.toctree,\n caption=None, glob=False, hidden=False, entries=[(None, 'baz')],\n includefiles=['baz'], titlesonly=False, maxdepth=-1, numbered=0)\n assert_node(toctree[0][1][2],\n ([compact_paragraph, reference, \"subsection\"],\n [bullet_list, list_item, compact_paragraph, reference, \"subsubsection\"]))\n\n assert_node(toctree[1][0],\n [compact_paragraph, reference, \"Test for issue #1157\"])\n assert_node(toctree[1][0][0], reference, anchorname='#test-for-issue-1157')\n assert_node(toctree[1][1][0], addnodes.toctree,\n caption=None, entries=[], glob=False, hidden=False,\n titlesonly=False, maxdepth=-1, numbered=0)\n assert_node(toctree[1][1][1], addnodes.toctree,\n caption=None, glob=False, hidden=True,\n titlesonly=False, maxdepth=-1, numbered=0,\n entries=[('Latest reference', 'http://sphinx-doc.org/latest/'),\n ('Python', 'http://python.org/')])\n\n assert_node(toctree[2][0],\n [compact_paragraph, reference, \"Indices and tables\"])\n\n # other collections\n assert app.env.toc_num_entries['index'] == 6\n assert app.env.toctree_includes['index'] == ['foo', 'bar', 'baz']\n assert app.env.files_to_rebuild['foo'] == {'index'}\n assert app.env.files_to_rebuild['bar'] == {'index'}\n # ... other code\n assert app.env.toc_num_entries['qux'] == 0\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_events.py__Test_the_EventManager__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_events.py__Test_the_EventManager__", "embedding": null, "metadata": {"file_path": "tests/test_events.py", "file_name": "test_events.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 36, "span_ids": ["test_event_priority", "test_event_allowed_exceptions", "docstring", "imports"], "tokens": 297}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the EventManager class.\"\"\"\n\nimport pytest\n\nfrom sphinx.errors import ExtensionError\nfrom sphinx.events import EventManager\n\n\ndef test_event_priority():\n result = []\n events = EventManager(object()) # pass an dummy object as an app\n events.connect('builder-inited', lambda app: result.append(1), priority = 500)\n events.connect('builder-inited', lambda app: result.append(2), priority = 500)\n events.connect('builder-inited', lambda app: result.append(3), priority = 200) # eariler\n events.connect('builder-inited', lambda app: result.append(4), priority = 700) # later\n events.connect('builder-inited', lambda app: result.append(5), priority = 500)\n\n events.emit('builder-inited')\n assert result == [3, 1, 2, 5, 4]\n\n\ndef test_event_allowed_exceptions():\n def raise_error(app):\n raise RuntimeError\n\n events = EventManager(object()) # pass an dummy object as an app\n events.connect('builder-inited', raise_error, priority=500)\n\n # all errors are converted to ExtensionError\n with pytest.raises(ExtensionError):\n events.emit('builder-inited')\n\n # Allow RuntimeError (pass-through)\n with pytest.raises(RuntimeError):\n events.emit('builder-inited', allowed_exceptions=(RuntimeError,))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py__Test_the_sphinx_apidoc_apidoc.return.namedtuple_apidoc_cod": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_apidoc.py__Test_the_sphinx_apidoc_apidoc.return.namedtuple_apidoc_cod", "embedding": null, "metadata": {"file_path": "tests/test_ext_apidoc.py", "file_name": "test_ext_apidoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 19, "span_ids": ["docstring", "imports", "apidoc"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the sphinx.apidoc module.\"\"\"\n\nfrom collections import namedtuple\n\nimport pytest\n\nfrom sphinx.ext.apidoc import main as apidoc_main\nfrom sphinx.testing.path import path\n\n\n@pytest.fixture()\ndef apidoc(rootdir, tempdir, apidoc_params):\n _, kwargs = apidoc_params\n coderoot = rootdir / kwargs.get('coderoot', 'test-root')\n outdir = tempdir / 'out'\n excludes = [coderoot / e for e in kwargs.get('excludes', [])]\n args = ['-o', outdir, '-F', coderoot] + excludes + kwargs.get('options', [])\n apidoc_main(args)\n return namedtuple('apidoc', 'coderoot,outdir')(coderoot, outdir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py__Test_the_autodoc_exten_try_.except_ImportError_.pyximport.None": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py__Test_the_autodoc_exten_try_.except_ImportError_.pyximport.None", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 25, "span_ids": ["impl", "impl:2", "docstring", "imports:11", "docstring:2", "imports"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension.\n\nThis tests mainly the Documenters; the auto directives are tested in a test\nsource file translated by test_build.\n\"\"\"\n\nimport sys\nfrom unittest.mock import Mock\nfrom warnings import catch_warnings\n\nimport pytest\nfrom docutils.statemachine import ViewList\n\nfrom sphinx import addnodes\nfrom sphinx.ext.autodoc import ALL, ModuleLevelDocumenter, Options\nfrom sphinx.ext.autodoc.directive import DocumenterBridge, process_documenter_options\nfrom sphinx.testing.util import SphinxTestApp, Struct # NOQA\nfrom sphinx.util.docutils import LoggingReporter\n\ntry:\n # Enable pyximport to test cython module\n import pyximport\n pyximport.install()\nexcept ImportError:\n pyximport = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_process_signature_typing_generic_test_autodoc_process_signature_typehints.assert_captured_app_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_process_signature_typing_generic_test_autodoc_process_signature_typehints.assert_captured_app_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 284, "end_line": 316, "span_ids": ["test_autodoc_process_signature_typehints", "test_autodoc_process_signature_typing_generic"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_process_signature_typing_generic(app):\n actual = do_autodoc(app, 'class', 'target.generic_class.A', {})\n\n assert list(actual) == [\n '',\n '.. py:class:: A(a, b=None)',\n ' :module: target.generic_class',\n '',\n ' docstring for A',\n '',\n ]\n\n\ndef test_autodoc_process_signature_typehints(app):\n captured = []\n\n def process_signature(*args):\n captured.append(args)\n\n app.connect('autodoc-process-signature', process_signature)\n\n def func(x: int, y: int) -> int:\n pass\n\n directive = make_directive_bridge(app.env)\n inst = app.registry.documenters['function'](directive, 'func')\n inst.fullname = 'func'\n inst.object = func\n inst.objpath = ['func']\n inst.format_signature()\n assert captured == [(app, 'function', 'func', func,\n directive.genopt, '(x: int, y: int)', 'int')]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_members_test_autodoc_members.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_members_test_autodoc_members.None_8", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 539, "end_line": 594, "span_ids": ["test_autodoc_members"], "tokens": 614}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_members(app):\n # default (no-members)\n actual = do_autodoc(app, 'class', 'target.inheritance.Base')\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ]\n\n # default ALL-members\n options = {\"members\": None}\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedclassmeth()',\n ' .. py:method:: Base.inheritedmeth()',\n ' .. py:method:: Base.inheritedstaticmeth(cls)'\n ]\n\n # default specific-members\n options = {\"members\": \"inheritedmeth,inheritedstaticmeth\"}\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedmeth()',\n ' .. py:method:: Base.inheritedstaticmeth(cls)'\n ]\n\n # ALL-members override autodoc_default_options\n options = {\"members\": None}\n app.config.autodoc_default_options[\"members\"] = \"inheritedstaticmeth\"\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedclassmeth()',\n ' .. py:method:: Base.inheritedmeth()',\n ' .. py:method:: Base.inheritedstaticmeth(cls)'\n ]\n\n # members override autodoc_default_options\n options = {\"members\": \"inheritedmeth\"}\n app.config.autodoc_default_options[\"members\"] = \"inheritedstaticmeth\"\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedmeth()',\n ]\n\n # members extends autodoc_default_options\n options = {\"members\": \"+inheritedmeth\"}\n app.config.autodoc_default_options[\"members\"] = \"inheritedstaticmeth\"\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedmeth()',\n ' .. py:method:: Base.inheritedstaticmeth(cls)'\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_exclude_members_test_autodoc_exclude_members.None_10": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_exclude_members_test_autodoc_exclude_members.None_10", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 597, "end_line": 664, "span_ids": ["test_autodoc_exclude_members"], "tokens": 757}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_exclude_members(app):\n options = {\"members\": None,\n \"exclude-members\": \"inheritedmeth,inheritedstaticmeth\"}\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedclassmeth()'\n ]\n\n # members vs exclude-members\n options = {\"members\": \"inheritedmeth\",\n \"exclude-members\": \"inheritedmeth\"}\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ]\n\n # + has no effect when autodoc_default_options are not present\n options = {\"members\": None,\n \"exclude-members\": \"+inheritedmeth,inheritedstaticmeth\"}\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedclassmeth()'\n ]\n\n # exclude-members overrides autodoc_default_options\n options = {\"members\": None,\n \"exclude-members\": \"inheritedmeth\"}\n app.config.autodoc_default_options[\"exclude-members\"] = \"inheritedstaticmeth\"\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedclassmeth()',\n ' .. py:method:: Base.inheritedstaticmeth(cls)'\n ]\n\n # exclude-members extends autodoc_default_options\n options = {\"members\": None,\n \"exclude-members\": \"+inheritedmeth\"}\n app.config.autodoc_default_options[\"exclude-members\"] = \"inheritedstaticmeth\"\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedclassmeth()',\n ]\n\n # no exclude-members causes use autodoc_default_options\n options = {\"members\": None}\n app.config.autodoc_default_options[\"exclude-members\"] = \"inheritedstaticmeth,inheritedmeth\"\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedclassmeth()',\n ]\n\n # empty exclude-members cancels autodoc_default_options\n options = {\"members\": None,\n \"exclude-members\": None}\n app.config.autodoc_default_options[\"exclude-members\"] = \"inheritedstaticmeth,inheritedmeth\"\n actual = do_autodoc(app, 'class', 'target.inheritance.Base', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Base()',\n ' .. py:method:: Base.inheritedclassmeth()',\n ' .. py:method:: Base.inheritedmeth()',\n ' .. py:method:: Base.inheritedstaticmeth(cls)'\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_undoc_members_test_autodoc_undoc_members.actual_5.do_autodoc_app_class_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_undoc_members_test_autodoc_undoc_members.actual_5.do_autodoc_app_class_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 667, "end_line": 716, "span_ids": ["test_autodoc_undoc_members"], "tokens": 648}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_undoc_members(app):\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'class', 'target.Class', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:attribute:: Class.attr',\n ' .. py:attribute:: Class.docattr',\n ' .. py:method:: Class.excludemeth()',\n ' .. py:attribute:: Class.inst_attr_comment',\n ' .. py:attribute:: Class.inst_attr_inline',\n ' .. py:attribute:: Class.inst_attr_string',\n ' .. py:attribute:: Class.mdocattr',\n ' .. py:method:: Class.meth()',\n ' .. py:method:: Class.moore(a, e, f) -> happiness',\n ' .. py:method:: Class.roger(a, *, b=2, c=3, d=4, e=5, f=6)',\n ' .. py:attribute:: Class.skipattr',\n ' .. py:method:: Class.skipmeth()',\n ' .. py:attribute:: Class.udocattr',\n ' .. py:method:: Class.undocmeth()'\n ]\n\n # use autodoc_default_options\n options = {\"members\": None}\n app.config.autodoc_default_options[\"undoc-members\"] = None\n actual = do_autodoc(app, 'class', 'target.Class', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:attribute:: Class.attr',\n ' .. py:attribute:: Class.docattr',\n ' .. py:method:: Class.excludemeth()',\n ' .. py:attribute:: Class.inst_attr_comment',\n ' .. py:attribute:: Class.inst_attr_inline',\n ' .. py:attribute:: Class.inst_attr_string',\n ' .. py:attribute:: Class.mdocattr',\n ' .. py:method:: Class.meth()',\n ' .. py:method:: Class.moore(a, e, f) -> happiness',\n ' .. py:method:: Class.roger(a, *, b=2, c=3, d=4, e=5, f=6)',\n ' .. py:attribute:: Class.skipattr',\n ' .. py:method:: Class.skipmeth()',\n ' .. py:attribute:: Class.udocattr',\n ' .. py:method:: Class.undocmeth()'\n ]\n\n # options negation work check\n options = {\"members\": None,\n \"no-undoc-members\": None}\n app.config.autodoc_default_options[\"undoc-members\"] = None\n actual = do_autodoc(app, 'class', 'target.Class', options)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_undoc_members.None_4_test_autodoc_undoc_members.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_undoc_members.None_4_test_autodoc_undoc_members.None_4", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 717, "end_line": 730, "span_ids": ["test_autodoc_undoc_members"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_undoc_members(app):\n # ... other code\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:attribute:: Class.attr',\n ' .. py:attribute:: Class.docattr',\n ' .. py:method:: Class.excludemeth()',\n ' .. py:attribute:: Class.inst_attr_comment',\n ' .. py:attribute:: Class.inst_attr_inline',\n ' .. py:attribute:: Class.inst_attr_string',\n ' .. py:attribute:: Class.mdocattr',\n ' .. py:method:: Class.meth()',\n ' .. py:method:: Class.moore(a, e, f) -> happiness',\n ' .. py:method:: Class.skipmeth()',\n ' .. py:attribute:: Class.udocattr',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_undoc_members_for_metadata_only_test_autodoc_undoc_members_for_metadata_only.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_undoc_members_for_metadata_only_test_autodoc_undoc_members_for_metadata_only.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 733, "end_line": 758, "span_ids": ["test_autodoc_undoc_members_for_metadata_only"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_undoc_members_for_metadata_only(app):\n # metadata only member is not displayed\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.metadata', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.metadata',\n '',\n ]\n\n # metadata only member is displayed when undoc-member given\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.metadata', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.metadata',\n '',\n '',\n '.. py:function:: foo()',\n ' :module: target.metadata',\n '',\n ' :meta metadata-only-docstring:',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_special_members_test_autodoc_special_members.options_8._undoc_members_None_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_special_members_test_autodoc_special_members.options_8._undoc_members_None_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 806, "end_line": 872, "span_ids": ["test_autodoc_special_members"], "tokens": 774}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_special_members(app):\n # specific special methods\n options = {\"undoc-members\": None,\n \"special-members\": \"__init__,__special1__\"}\n actual = do_autodoc(app, 'class', 'target.Class', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:method:: Class.__init__(arg)',\n ' .. py:method:: Class.__special1__()',\n ]\n\n # combination with specific members\n options = {\"members\": \"attr,docattr\",\n \"undoc-members\": None,\n \"special-members\": \"__init__,__special1__\"}\n actual = do_autodoc(app, 'class', 'target.Class', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:method:: Class.__init__(arg)',\n ' .. py:method:: Class.__special1__()',\n ' .. py:attribute:: Class.attr',\n ' .. py:attribute:: Class.docattr',\n ]\n\n # all special methods\n options = {\"members\": None,\n \"undoc-members\": None,\n \"special-members\": None}\n actual = do_autodoc(app, 'class', 'target.Class', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:attribute:: Class.__annotations__',\n ' .. py:attribute:: Class.__dict__',\n ' .. py:method:: Class.__init__(arg)',\n ' .. py:attribute:: Class.__module__',\n ' .. py:method:: Class.__special1__()',\n ' .. py:method:: Class.__special2__()',\n ' .. py:attribute:: Class.__weakref__',\n ' .. py:attribute:: Class.attr',\n ' .. py:attribute:: Class.docattr',\n ' .. py:method:: Class.excludemeth()',\n ' .. py:attribute:: Class.inst_attr_comment',\n ' .. py:attribute:: Class.inst_attr_inline',\n ' .. py:attribute:: Class.inst_attr_string',\n ' .. py:attribute:: Class.mdocattr',\n ' .. py:method:: Class.meth()',\n ' .. py:method:: Class.moore(a, e, f) -> happiness',\n ' .. py:method:: Class.roger(a, *, b=2, c=3, d=4, e=5, f=6)',\n ' .. py:attribute:: Class.skipattr',\n ' .. py:method:: Class.skipmeth()',\n ' .. py:attribute:: Class.udocattr',\n ' .. py:method:: Class.undocmeth()'\n ]\n\n # specific special methods from autodoc_default_options\n options = {\"undoc-members\": None}\n app.config.autodoc_default_options[\"special-members\"] = \"__special2__\"\n actual = do_autodoc(app, 'class', 'target.Class', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:method:: Class.__special2__()',\n ]\n\n # specific special methods option with autodoc_default_options\n options = {\"undoc-members\": None,\n \"special-members\": \"__init__,__special1__\"}\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_special_members.None_5_test_autodoc_special_members.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_autodoc_special_members.None_5_test_autodoc_special_members.None_8", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 873, "end_line": 891, "span_ids": ["test_autodoc_special_members"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_special_members(app):\n # ... other code\n app.config.autodoc_default_options[\"special-members\"] = \"__special2__\"\n actual = do_autodoc(app, 'class', 'target.Class', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:method:: Class.__init__(arg)',\n ' .. py:method:: Class.__special1__()',\n ]\n\n # specific special methods merge with autodoc_default_options\n options = {\"undoc-members\": None,\n \"special-members\": \"+__init__,__special1__\"}\n app.config.autodoc_default_options[\"special-members\"] = \"__special2__\"\n actual = do_autodoc(app, 'class', 'target.Class', options)\n assert list(filter(lambda l: '::' in l, actual)) == [\n '.. py:class:: Class(arg)',\n ' .. py:method:: Class.__init__(arg)',\n ' .. py:method:: Class.__special1__()',\n ' .. py:method:: Class.__special2__()',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_singledispatch_test_singledispatch.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_singledispatch_test_singledispatch.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2063, "end_line": 2080, "span_ids": ["test_singledispatch"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_singledispatch(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.singledispatch', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.singledispatch',\n '',\n '',\n '.. py:function:: func(arg, kwarg=None)',\n ' func(arg: float, kwarg=None)',\n ' func(arg: int, kwarg=None)',\n ' func(arg: str, kwarg=None)',\n ' :module: target.singledispatch',\n '',\n ' A function for general use.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_type_union_operator_test_type_union_operator.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_type_union_operator_test_type_union_operator.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2392, "end_line": 2433, "span_ids": ["test_type_union_operator"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_type_union_operator(app):\n options = {'members': None}\n actual = do_autodoc(app, 'module', 'target.pep604', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.pep604',\n '',\n '',\n '.. py:class:: Foo()',\n ' :module: target.pep604',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Foo.attr',\n ' :module: target.pep604',\n ' :type: int | str',\n '',\n ' docstring',\n '',\n '',\n ' .. py:method:: Foo.meth(x: int | str, y: int | str) -> int | str',\n ' :module: target.pep604',\n '',\n ' docstring',\n '',\n '',\n '.. py:data:: attr',\n ' :module: target.pep604',\n ' :type: int | str',\n '',\n ' docstring',\n '',\n '',\n '.. py:function:: sum(x: int | str, y: int | str) -> int | str',\n ' :module: target.pep604',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_hide_value_test_hide_value.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_hide_value_test_hide_value.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2436, "end_line": 2479, "span_ids": ["test_hide_value"], "tokens": 288}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_hide_value(app):\n options = {'members': None}\n actual = do_autodoc(app, 'module', 'target.hide_value', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.hide_value',\n '',\n '',\n '.. py:class:: Foo()',\n ' :module: target.hide_value',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Foo.SENTINEL1',\n ' :module: target.hide_value',\n '',\n ' docstring',\n '',\n ' :meta hide-value:',\n '',\n '',\n ' .. py:attribute:: Foo.SENTINEL2',\n ' :module: target.hide_value',\n '',\n ' :meta hide-value:',\n '',\n '',\n '.. py:data:: SENTINEL1',\n ' :module: target.hide_value',\n '',\n ' docstring',\n '',\n ' :meta hide-value:',\n '',\n '',\n '.. py:data:: SENTINEL2',\n ' :module: target.hide_value',\n '',\n ' :meta hide-value:',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_canonical_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc.py_test_canonical_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc.py", "file_name": "test_ext_autodoc.py", "file_type": "text/x-python", "category": "test", "start_line": 2482, "end_line": 2511, "span_ids": ["test_canonical"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_canonical(app):\n options = {'members': None,\n 'imported-members': None}\n actual = do_autodoc(app, 'module', 'target.canonical', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.canonical',\n '',\n '',\n '.. py:class:: Bar()',\n ' :module: target.canonical',\n '',\n ' docstring',\n '',\n '',\n '.. py:class:: Foo()',\n ' :module: target.canonical',\n ' :canonical: target.canonical.original.Foo',\n '',\n ' docstring',\n '',\n '',\n ' .. py:method:: Foo.meth()',\n ' :module: target.canonical',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py__Test_the_autodoc_exten_test_autoattribute_novalue.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py__Test_the_autodoc_exten_test_autoattribute_novalue.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoattribute.py", "file_name": "test_ext_autodoc_autoattribute.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 39, "span_ids": ["test_autoattribute_novalue", "docstring", "imports", "test_autoattribute"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension.\n\nThis tests mainly the Documenters; the auto directives are tested in a test\nsource file translated by test_build.\n\"\"\"\n\nimport sys\n\nimport pytest\n\nfrom .test_ext_autodoc import do_autodoc\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute(app):\n actual = do_autodoc(app, 'attribute', 'target.Class.attr')\n assert list(actual) == [\n '',\n '.. py:attribute:: Class.attr',\n ' :module: target',\n \" :value: 'bar'\",\n '',\n ' should be documented -- s\u00fc\u00df',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_novalue(app):\n options = {'no-value': None}\n actual = do_autodoc(app, 'attribute', 'target.Class.attr', options)\n assert list(actual) == [\n '',\n '.. py:attribute:: Class.attr',\n ' :module: target',\n '',\n ' should be documented -- s\u00fc\u00df',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_instance_variable_without_comment_test_autoattribute_slots_variable_str.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoattribute.py_test_autoattribute_instance_variable_without_comment_test_autoattribute_slots_variable_str.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoattribute.py", "file_name": "test_ext_autodoc_autoattribute.py", "file_type": "text/x-python", "category": "test", "start_line": 98, "end_line": 142, "span_ids": ["test_autoattribute_slots_variable_str", "test_autoattribute_slots_variable_list", "test_autoattribute_instance_variable_without_comment", "test_autoattribute_slots_variable_dict"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_instance_variable_without_comment(app):\n actual = do_autodoc(app, 'attribute', 'target.instance_variable.Bar.attr4')\n assert list(actual) == [\n '',\n '.. py:attribute:: Bar.attr4',\n ' :module: target.instance_variable',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_slots_variable_list(app):\n actual = do_autodoc(app, 'attribute', 'target.slots.Foo.attr')\n assert list(actual) == [\n '',\n '.. py:attribute:: Foo.attr',\n ' :module: target.slots',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_slots_variable_dict(app):\n actual = do_autodoc(app, 'attribute', 'target.slots.Bar.attr1')\n assert list(actual) == [\n '',\n '.. py:attribute:: Bar.attr1',\n ' :module: target.slots',\n ' :type: int',\n '',\n ' docstring of attr1',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoattribute_slots_variable_str(app):\n actual = do_autodoc(app, 'attribute', 'target.slots.Baz.attr')\n assert list(actual) == [\n '',\n '.. py:attribute:: Baz.attr',\n ' :module: target.slots',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py__Test_the_autodoc_exten_test_classes.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py__Test_the_autodoc_exten_test_classes.None_3", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 47, "span_ids": ["test_classes", "docstring", "imports"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension.\n\nThis tests mainly the Documenters; the auto directives are tested in a test\nsource file translated by test_build.\n\"\"\"\n\nimport sys\nfrom typing import List, Union\n\nimport pytest\n\nfrom .test_ext_autodoc import do_autodoc\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_classes(app):\n actual = do_autodoc(app, 'function', 'target.classes.Foo')\n assert list(actual) == [\n '',\n '.. py:function:: Foo()',\n ' :module: target.classes',\n '',\n ]\n\n actual = do_autodoc(app, 'function', 'target.classes.Bar')\n assert list(actual) == [\n '',\n '.. py:function:: Bar(x, y)',\n ' :module: target.classes',\n '',\n ]\n\n actual = do_autodoc(app, 'function', 'target.classes.Baz')\n assert list(actual) == [\n '',\n '.. py:function:: Baz(x, y)',\n ' :module: target.classes',\n '',\n ]\n\n actual = do_autodoc(app, 'function', 'target.classes.Qux')\n assert list(actual) == [\n '',\n '.. py:function:: Qux(foo, bar)',\n ' :module: target.classes',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_uninitialized_attributes_test_uninitialized_attributes.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_uninitialized_attributes_test_uninitialized_attributes.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 105, "end_line": 130, "span_ids": ["test_uninitialized_attributes"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='py36+ is available since python3.6.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_uninitialized_attributes(app):\n options = {\"members\": None,\n \"inherited-members\": None}\n actual = do_autodoc(app, 'class', 'target.uninitialized_attributes.Derived', options)\n assert list(actual) == [\n '',\n '.. py:class:: Derived()',\n ' :module: target.uninitialized_attributes',\n '',\n '',\n ' .. py:attribute:: Derived.attr1',\n ' :module: target.uninitialized_attributes',\n ' :type: int',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Derived.attr3',\n ' :module: target.uninitialized_attributes',\n ' :type: int',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_undocumented_uninitialized_attributes_test_undocumented_uninitialized_attributes.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_undocumented_uninitialized_attributes_test_undocumented_uninitialized_attributes.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 133, "end_line": 169, "span_ids": ["test_undocumented_uninitialized_attributes"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 6), reason='py36+ is available since python3.6.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_undocumented_uninitialized_attributes(app):\n options = {\"members\": None,\n \"inherited-members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'class', 'target.uninitialized_attributes.Derived', options)\n assert list(actual) == [\n '',\n '.. py:class:: Derived()',\n ' :module: target.uninitialized_attributes',\n '',\n '',\n ' .. py:attribute:: Derived.attr1',\n ' :module: target.uninitialized_attributes',\n ' :type: int',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Derived.attr2',\n ' :module: target.uninitialized_attributes',\n ' :type: str',\n '',\n '',\n ' .. py:attribute:: Derived.attr3',\n ' :module: target.uninitialized_attributes',\n ' :type: int',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Derived.attr4',\n ' :module: target.uninitialized_attributes',\n ' :type: str',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_properties_test_properties.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_properties_test_properties.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 198, "end_line": 224, "span_ids": ["test_properties"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_properties(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'class', 'target.properties.Foo', options)\n assert list(actual) == [\n '',\n '.. py:class:: Foo()',\n ' :module: target.properties',\n '',\n ' docstring',\n '',\n '',\n ' .. py:property:: Foo.prop1',\n ' :module: target.properties',\n ' :type: int',\n '',\n ' docstring',\n '',\n '',\n ' .. py:property:: Foo.prop2',\n ' :module: target.properties',\n ' :classmethod:',\n ' :type: int',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_show_inheritance_for_decendants_of_generic_type_test_show_inheritance_for_decendants_of_generic_type.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_show_inheritance_for_decendants_of_generic_type_test_show_inheritance_for_decendants_of_generic_type.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 272, "end_line": 284, "span_ids": ["test_show_inheritance_for_decendants_of_generic_type"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_show_inheritance_for_decendants_of_generic_type(app):\n options = {'show-inheritance': None}\n actual = do_autodoc(app, 'class', 'target.classes.Corge', options)\n assert list(actual) == [\n '',\n '.. py:class:: Corge(iterable=(), /)',\n ' :module: target.classes',\n '',\n ' Bases: :py:class:`~target.classes.Quux`',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_autodoc_process_bases_test_autodoc_process_bases.if_sys_version_info_3_.else_.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_autodoc_process_bases_test_autodoc_process_bases.if_sys_version_info_3_.else_.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 287, "end_line": 325, "span_ids": ["test_autodoc_process_bases"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_process_bases(app):\n def autodoc_process_bases(app, name, obj, options, bases):\n assert name == 'target.classes.Quux'\n assert obj.__module__ == 'target.classes'\n assert obj.__name__ == 'Quux'\n assert options == {'show-inheritance': True,\n 'members': []}\n assert bases == [List[Union[int, float]]]\n\n bases.pop()\n bases.extend([int, str])\n\n app.connect('autodoc-process-bases', autodoc_process_bases)\n\n options = {'show-inheritance': None}\n actual = do_autodoc(app, 'class', 'target.classes.Quux', options)\n if sys.version_info < (3, 7):\n assert list(actual) == [\n '',\n '.. py:class:: Quux(*args, **kwds)',\n ' :module: target.classes',\n '',\n ' Bases: :py:class:`int`, :py:class:`str`',\n '',\n ' A subclass of List[Union[int, float]]',\n '',\n ]\n else:\n assert list(actual) == [\n '',\n '.. py:class:: Quux(iterable=(), /)',\n ' :module: target.classes',\n '',\n ' Bases: :py:class:`int`, :py:class:`str`',\n '',\n ' A subclass of List[Union[int, float]]',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_doc_from_class_test_class_doc_from_class.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_doc_from_class_test_class_doc_from_class.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 328, "end_line": 340, "span_ids": ["test_class_doc_from_class"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_class_doc_from_class(app):\n options = {\"members\": None,\n \"class-doc-from\": \"class\"}\n actual = do_autodoc(app, 'class', 'target.autoclass_content.C', options)\n assert list(actual) == [\n '',\n '.. py:class:: C()',\n ' :module: target.autoclass_content',\n '',\n ' A class having __init__, no __new__',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_doc_from_init_test_class_doc_from_init.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_doc_from_init_test_class_doc_from_init.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 343, "end_line": 355, "span_ids": ["test_class_doc_from_init"], "tokens": 106}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_class_doc_from_init(app):\n options = {\"members\": None,\n \"class-doc-from\": \"init\"}\n actual = do_autodoc(app, 'class', 'target.autoclass_content.C', options)\n assert list(actual) == [\n '',\n '.. py:class:: C()',\n ' :module: target.autoclass_content',\n '',\n ' __init__ docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_doc_from_both_test_class_doc_from_both.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_doc_from_both_test_class_doc_from_both.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 358, "end_line": 372, "span_ids": ["test_class_doc_from_both"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_class_doc_from_both(app):\n options = {\"members\": None,\n \"class-doc-from\": \"both\"}\n actual = do_autodoc(app, 'class', 'target.autoclass_content.C', options)\n assert list(actual) == [\n '',\n '.. py:class:: C()',\n ' :module: target.autoclass_content',\n '',\n ' A class having __init__, no __new__',\n '',\n ' __init__ docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_alias_test_class_alias.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_alias_test_class_alias.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 375, "end_line": 390, "span_ids": ["test_class_alias"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_class_alias(app):\n def autodoc_process_docstring(*args):\n \"\"\"A handler always raises an error.\n This confirms this handler is never called for class aliases.\n \"\"\"\n raise\n\n app.connect('autodoc-process-docstring', autodoc_process_docstring)\n actual = do_autodoc(app, 'class', 'target.classes.Alias')\n assert list(actual) == [\n '',\n '.. py:attribute:: Alias',\n ' :module: target.classes',\n '',\n ' alias of :py:class:`~target.classes.Foo`',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_alias_having_doccomment_test_class_alias_for_imported_object_having_doccomment.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_class_alias_having_doccomment_test_class_alias_for_imported_object_having_doccomment.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 393, "end_line": 414, "span_ids": ["test_class_alias_for_imported_object_having_doccomment", "test_class_alias_having_doccomment"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_class_alias_having_doccomment(app):\n actual = do_autodoc(app, 'class', 'target.classes.OtherAlias')\n assert list(actual) == [\n '',\n '.. py:attribute:: OtherAlias',\n ' :module: target.classes',\n '',\n ' docstring',\n '',\n ]\n\n\ndef test_class_alias_for_imported_object_having_doccomment(app):\n actual = do_autodoc(app, 'class', 'target.classes.IntAlias')\n assert list(actual) == [\n '',\n '.. py:attribute:: IntAlias',\n ' :module: target.classes',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_coroutine_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoclass.py_test_coroutine_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoclass.py", "file_name": "test_ext_autodoc_autoclass.py", "file_type": "text/x-python", "category": "test", "start_line": 417, "end_line": 457, "span_ids": ["test_coroutine"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_coroutine(app):\n options = {\"members\": None}\n actual = do_autodoc(app, 'class', 'target.coroutine.AsyncClass', options)\n assert list(actual) == [\n '',\n '.. py:class:: AsyncClass()',\n ' :module: target.coroutine',\n '',\n '',\n ' .. py:method:: AsyncClass.do_asyncgen()',\n ' :module: target.coroutine',\n ' :async:',\n '',\n ' A documented async generator',\n '',\n '',\n ' .. py:method:: AsyncClass.do_coroutine()',\n ' :module: target.coroutine',\n ' :async:',\n '',\n ' A documented coroutine function',\n '',\n '',\n ' .. py:method:: AsyncClass.do_coroutine2()',\n ' :module: target.coroutine',\n ' :async:',\n ' :classmethod:',\n '',\n ' A documented coroutine classmethod',\n '',\n '',\n ' .. py:method:: AsyncClass.do_coroutine3()',\n ' :module: target.coroutine',\n ' :async:',\n ' :staticmethod:',\n '',\n ' A documented coroutine staticmethod',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py__Test_the_autodoc_exten_test_autodata_novalue.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autodata.py__Test_the_autodoc_exten_test_autodata_novalue.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autodata.py", "file_name": "test_ext_autodoc_autodata.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 39, "span_ids": ["test_autodata", "docstring", "imports", "test_autodata_novalue"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension.\n\nThis tests mainly the Documenters; the auto directives are tested in a test\nsource file translated by test_build.\n\"\"\"\n\nimport sys\n\nimport pytest\n\nfrom .test_ext_autodoc import do_autodoc\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodata(app):\n actual = do_autodoc(app, 'data', 'target.integer')\n assert list(actual) == [\n '',\n '.. py:data:: integer',\n ' :module: target',\n ' :value: 1',\n '',\n ' documentation for the integer',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodata_novalue(app):\n options = {'no-value': None}\n actual = do_autodoc(app, 'data', 'target.integer', options)\n assert list(actual) == [\n '',\n '.. py:data:: integer',\n ' :module: target',\n '',\n ' documentation for the integer',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py__Test_the_autodoc_exten_test_classes.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py__Test_the_autodoc_exten_test_classes.None_3", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autofunction.py", "file_name": "test_ext_autodoc_autofunction.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 44, "span_ids": ["test_classes", "docstring", "imports"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension.\n\nThis tests mainly the Documenters; the auto directives are tested in a test\nsource file translated by test_build.\n\"\"\"\n\nimport pytest\n\nfrom .test_ext_autodoc import do_autodoc\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_classes(app):\n actual = do_autodoc(app, 'function', 'target.classes.Foo')\n assert list(actual) == [\n '',\n '.. py:function:: Foo()',\n ' :module: target.classes',\n '',\n ]\n\n actual = do_autodoc(app, 'function', 'target.classes.Bar')\n assert list(actual) == [\n '',\n '.. py:function:: Bar(x, y)',\n ' :module: target.classes',\n '',\n ]\n\n actual = do_autodoc(app, 'function', 'target.classes.Baz')\n assert list(actual) == [\n '',\n '.. py:function:: Baz(x, y)',\n ' :module: target.classes',\n '',\n ]\n\n actual = do_autodoc(app, 'function', 'target.classes.Qux')\n assert list(actual) == [\n '',\n '.. py:function:: Qux(foo, bar)',\n ' :module: target.classes',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_singledispatch_test_singledispatch.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_singledispatch_test_singledispatch.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autofunction.py", "file_name": "test_ext_autodoc_autofunction.py", "file_type": "text/x-python", "category": "test", "start_line": 110, "end_line": 124, "span_ids": ["test_singledispatch"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_singledispatch(app):\n options = {}\n actual = do_autodoc(app, 'function', 'target.singledispatch.func', options)\n assert list(actual) == [\n '',\n '.. py:function:: func(arg, kwarg=None)',\n ' func(arg: float, kwarg=None)',\n ' func(arg: int, kwarg=None)',\n ' func(arg: str, kwarg=None)',\n ' :module: target.singledispatch',\n '',\n ' A function for general use.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_wrapped_function_test_wrapped_function_contextmanager.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_wrapped_function_test_wrapped_function_contextmanager.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autofunction.py", "file_name": "test_ext_autodoc_autofunction.py", "file_type": "text/x-python", "category": "test", "start_line": 142, "end_line": 165, "span_ids": ["test_wrapped_function", "test_wrapped_function_contextmanager"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_wrapped_function(app):\n actual = do_autodoc(app, 'function', 'target.wrappedfunction.slow_function')\n assert list(actual) == [\n '',\n '.. py:function:: slow_function(message, timeout)',\n ' :module: target.wrappedfunction',\n '',\n ' This function is slow.',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_wrapped_function_contextmanager(app):\n actual = do_autodoc(app, 'function', 'target.wrappedfunction.feeling_good')\n assert list(actual) == [\n '',\n '.. py:function:: feeling_good(x: int, y: int) -> ~typing.Generator',\n ' :module: target.wrappedfunction',\n '',\n \" You'll feel better in this context!\",\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_coroutine_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autofunction.py_test_coroutine_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autofunction.py", "file_name": "test_ext_autodoc_autofunction.py", "file_type": "text/x-python", "category": "test", "start_line": 168, "end_line": 201, "span_ids": ["test_coroutine", "test_async_generator", "test_synchronized_coroutine"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_coroutine(app):\n actual = do_autodoc(app, 'function', 'target.functions.coroutinefunc')\n assert list(actual) == [\n '',\n '.. py:function:: coroutinefunc()',\n ' :module: target.functions',\n ' :async:',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_synchronized_coroutine(app):\n actual = do_autodoc(app, 'function', 'target.coroutine.sync_func')\n assert list(actual) == [\n '',\n '.. py:function:: sync_func()',\n ' :module: target.coroutine',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_async_generator(app):\n actual = do_autodoc(app, 'function', 'target.functions.asyncgenerator')\n assert list(actual) == [\n '',\n '.. py:function:: asyncgenerator()',\n ' :module: target.functions',\n ' :async:',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py__Test_the_autodoc_exten_test_empty_all.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py__Test_the_autodoc_exten_test_empty_all.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_automodule.py", "file_name": "test_ext_autodoc_automodule.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 24, "span_ids": ["test_empty_all", "docstring", "imports"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension.\n\nThis tests mainly the Documenters; the auto directives are tested in a test\nsource file translated by test_build.\n\"\"\"\n\nimport sys\n\nimport pytest\n\nfrom .test_ext_autodoc import do_autodoc\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_empty_all(app):\n options = {'members': None}\n actual = do_autodoc(app, 'module', 'target.empty_all', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.empty_all',\n '',\n 'docsting of empty_all module.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_automodule_test_automodule.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_automodule_test_automodule.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_automodule.py", "file_name": "test_ext_autodoc_automodule.py", "file_type": "text/x-python", "category": "test", "start_line": 27, "end_line": 49, "span_ids": ["test_automodule"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_automodule(app):\n options = {'members': None}\n actual = do_autodoc(app, 'module', 'target.module', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.module',\n '',\n '',\n '.. py:data:: annotated',\n ' :module: target.module',\n ' :type: int',\n '',\n ' docstring',\n '',\n '',\n '.. py:data:: documented',\n ' :module: target.module',\n ' :value: 1',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_automodule_undoc_members_test_automodule_undoc_members.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_automodule_undoc_members_test_automodule_undoc_members.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_automodule.py", "file_name": "test_ext_autodoc_automodule.py", "file_type": "text/x-python", "category": "test", "start_line": 52, "end_line": 80, "span_ids": ["test_automodule_undoc_members"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_automodule_undoc_members(app):\n options = {'members': None,\n 'undoc-members': None}\n actual = do_autodoc(app, 'module', 'target.module', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.module',\n '',\n '',\n '.. py:data:: annotated',\n ' :module: target.module',\n ' :type: int',\n '',\n ' docstring',\n '',\n '',\n '.. py:data:: documented',\n ' :module: target.module',\n ' :value: 1',\n '',\n ' docstring',\n '',\n '',\n '.. py:data:: undoc_annotated',\n ' :module: target.module',\n ' :type: int',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_automodule_special_members_test_automodule_special_members.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_automodule_special_members_test_automodule_special_members.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_automodule.py", "file_name": "test_ext_autodoc_automodule.py", "file_type": "text/x-python", "category": "test", "start_line": 83, "end_line": 113, "span_ids": ["test_automodule_special_members"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_automodule_special_members(app):\n options = {'members': None,\n 'special-members': None}\n actual = do_autodoc(app, 'module', 'target.module', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.module',\n '',\n '',\n '.. py:data:: __documented_special__',\n ' :module: target.module',\n ' :value: 1',\n '',\n ' docstring',\n '',\n '',\n '.. py:data:: annotated',\n ' :module: target.module',\n ' :type: int',\n '',\n ' docstring',\n '',\n '',\n '.. py:data:: documented',\n ' :module: target.module',\n ' :value: 1',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_subclass_of_mocked_object_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_automodule.py_test_subclass_of_mocked_object_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_automodule.py", "file_name": "test_ext_autodoc_automodule.py", "file_type": "text/x-python", "category": "test", "start_line": 116, "end_line": 129, "span_ids": ["test_subclass_of_mocked_object"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc',\n confoverrides={'autodoc_mock_imports': ['missing_module',\n 'missing_package1',\n 'missing_package2',\n 'missing_package3',\n 'sphinx.missing_module4']})\n@pytest.mark.usefixtures(\"rollback_sysmodules\")\ndef test_subclass_of_mocked_object(app):\n sys.modules.pop('target', None) # unload target module to clear the module cache\n\n options = {'members': None}\n actual = do_autodoc(app, 'module', 'target.need_mocks', options)\n assert '.. py:class:: Inherited(*args: ~typing.Any, **kwargs: ~typing.Any)' in actual", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoproperty.py__Test_the_autodoc_exten_test_class_properties.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoproperty.py__Test_the_autodoc_exten_test_class_properties.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoproperty.py", "file_name": "test_ext_autodoc_autoproperty.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["test_properties", "docstring", "imports", "test_class_properties"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension.\n\nThis tests mainly the Documenters; the auto directives are tested in a test\nsource file translated by test_build.\n\"\"\"\n\nimport sys\n\nimport pytest\n\nfrom .test_ext_autodoc import do_autodoc\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_properties(app):\n actual = do_autodoc(app, 'property', 'target.properties.Foo.prop1')\n assert list(actual) == [\n '',\n '.. py:property:: Foo.prop1',\n ' :module: target.properties',\n ' :type: int',\n '',\n ' docstring',\n '',\n ]\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_class_properties(app):\n actual = do_autodoc(app, 'property', 'target.properties.Foo.prop2')\n assert list(actual) == [\n '',\n '.. py:property:: Foo.prop2',\n ' :module: target.properties',\n ' :classmethod:',\n ' :type: int',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoproperty.py_test_cached_properties_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_autoproperty.py_test_cached_properties_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_autoproperty.py", "file_name": "test_ext_autodoc_autoproperty.py", "file_type": "text/x-python", "category": "test", "start_line": 43, "end_line": 54, "span_ids": ["test_cached_properties"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8), reason='python 3.8+ is required.')\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_cached_properties(app):\n actual = do_autodoc(app, 'property', 'target.cached_property.Foo.prop')\n assert list(actual) == [\n '',\n '.. py:property:: Foo.prop',\n ' :module: target.cached_property',\n ' :type: int',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py__Test_the_autodoc_exten_test_autoclass_content_class.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py__Test_the_autodoc_exten_test_autoclass_content_class.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 72, "span_ids": ["test_autoclass_content_class", "impl", "docstring", "imports"], "tokens": 478}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension. This tests mainly for config variables\"\"\"\n\nimport platform\nimport sys\n\nimport pytest\n\nfrom sphinx.testing import restructuredtext\n\nfrom .test_ext_autodoc import do_autodoc\n\nIS_PYPY = platform.python_implementation() == 'PyPy'\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autoclass_content_class(app):\n app.config.autoclass_content = 'class'\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.autoclass_content', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.autoclass_content',\n '',\n '',\n '.. py:class:: A()',\n ' :module: target.autoclass_content',\n '',\n ' A class having no __init__, no __new__',\n '',\n '',\n '.. py:class:: B()',\n ' :module: target.autoclass_content',\n '',\n ' A class having __init__(no docstring), no __new__',\n '',\n '',\n '.. py:class:: C()',\n ' :module: target.autoclass_content',\n '',\n ' A class having __init__, no __new__',\n '',\n '',\n '.. py:class:: D()',\n ' :module: target.autoclass_content',\n '',\n ' A class having no __init__, __new__(no docstring)',\n '',\n '',\n '.. py:class:: E()',\n ' :module: target.autoclass_content',\n '',\n ' A class having no __init__, __new__',\n '',\n '',\n '.. py:class:: F()',\n ' :module: target.autoclass_content',\n '',\n ' A class having both __init__ and __new__',\n '',\n '',\n '.. py:class:: G()',\n ' :module: target.autoclass_content',\n '',\n ' A class inherits __init__ without docstring.',\n '',\n '',\n '.. py:class:: H()',\n ' :module: target.autoclass_content',\n '',\n ' A class inherits __new__ without docstring.',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_class_signature_mixed_test_autodoc_class_signature_mixed.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_class_signature_mixed_test_autodoc_class_signature_mixed.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 135, "end_line": 146, "span_ids": ["test_autodoc_class_signature_mixed"], "tokens": 105}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_class_signature_mixed(app):\n app.config.autodoc_class_signature = 'mixed'\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'class', 'target.classes.Bar', options)\n assert list(actual) == [\n '',\n '.. py:class:: Bar(x, y)',\n ' :module: target.classes',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_class_signature_separated_init_test_autodoc_class_signature_separated_init.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_class_signature_separated_init_test_autodoc_class_signature_separated_init.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 149, "end_line": 164, "span_ids": ["test_autodoc_class_signature_separated_init"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_class_signature_separated_init(app):\n app.config.autodoc_class_signature = 'separated'\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'class', 'target.classes.Bar', options)\n assert list(actual) == [\n '',\n '.. py:class:: Bar',\n ' :module: target.classes',\n '',\n '',\n ' .. py:method:: Bar.__init__(x, y)',\n ' :module: target.classes',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_class_signature_separated_new_test_autodoc_class_signature_separated_new.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_class_signature_separated_new_test_autodoc_class_signature_separated_new.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 167, "end_line": 183, "span_ids": ["test_autodoc_class_signature_separated_new"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_class_signature_separated_new(app):\n app.config.autodoc_class_signature = 'separated'\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'class', 'target.classes.Baz', options)\n assert list(actual) == [\n '',\n '.. py:class:: Baz',\n ' :module: target.classes',\n '',\n '',\n ' .. py:method:: Baz.__new__(cls, x, y)',\n ' :module: target.classes',\n ' :staticmethod:',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_docstring_signature_test_autodoc_docstring_signature.actual_3.do_autodoc_app_class_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_docstring_signature_test_autodoc_docstring_signature.actual_3.do_autodoc_app_class_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 280, "end_line": 343, "span_ids": ["test_autodoc_docstring_signature"], "tokens": 527}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_docstring_signature(app):\n options = {\"members\": None, \"special-members\": \"__init__, __new__\"}\n actual = do_autodoc(app, 'class', 'target.DocstringSig', options)\n assert list(actual) == [\n '',\n # FIXME: Ideally this would instead be: `DocstringSig(d, e=1)` but\n # currently `ClassDocumenter` does not apply the docstring signature\n # logic when extracting a signature from a __new__ or __init__ method.\n '.. py:class:: DocstringSig(*new_args, **new_kwargs)',\n ' :module: target',\n '',\n '',\n ' .. py:method:: DocstringSig.__init__(self, a, b=1) -> None',\n ' :module: target',\n '',\n ' First line of docstring',\n '',\n ' rest of docstring',\n '',\n '',\n ' .. py:method:: DocstringSig.__new__(cls, d, e=1) -> DocstringSig',\n ' :module: target',\n ' :staticmethod:',\n '',\n ' First line of docstring',\n '',\n ' rest of docstring',\n '',\n '',\n ' .. py:method:: DocstringSig.meth(FOO, BAR=1) -> BAZ',\n ' :module: target',\n '',\n ' First line of docstring',\n '',\n ' rest of docstring',\n '',\n '',\n ' .. py:method:: DocstringSig.meth2()',\n ' :module: target',\n '',\n ' First line, no signature',\n ' Second line followed by indentation::',\n '',\n ' indented line',\n '',\n '',\n ' .. py:property:: DocstringSig.prop1',\n ' :module: target',\n '',\n ' First line of docstring',\n '',\n '',\n ' .. py:property:: DocstringSig.prop2',\n ' :module: target',\n '',\n ' First line of docstring',\n ' Second line of docstring',\n '',\n ]\n\n # disable autodoc_docstring_signature\n app.config.autodoc_docstring_signature = False\n actual = do_autodoc(app, 'class', 'target.DocstringSig', options)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_docstring_signature.None_1_test_autodoc_docstring_signature.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_docstring_signature.None_1_test_autodoc_docstring_signature.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 344, "end_line": 403, "span_ids": ["test_autodoc_docstring_signature"], "tokens": 442}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_autodoc_docstring_signature(app):\n # ... other code\n assert list(actual) == [\n '',\n '.. py:class:: DocstringSig(*new_args, **new_kwargs)',\n ' :module: target',\n '',\n '',\n ' .. py:method:: DocstringSig.__init__(*init_args, **init_kwargs)',\n ' :module: target',\n '',\n ' __init__(self, a, b=1) -> None',\n ' First line of docstring',\n '',\n ' rest of docstring',\n '',\n '',\n '',\n ' .. py:method:: DocstringSig.__new__(cls, *new_args, **new_kwargs)',\n ' :module: target',\n ' :staticmethod:',\n '',\n ' __new__(cls, d, e=1) -> DocstringSig',\n ' First line of docstring',\n '',\n ' rest of docstring',\n '',\n '',\n '',\n ' .. py:method:: DocstringSig.meth()',\n ' :module: target',\n '',\n ' meth(FOO, BAR=1) -> BAZ',\n ' First line of docstring',\n '',\n ' rest of docstring',\n '',\n '',\n '',\n ' .. py:method:: DocstringSig.meth2()',\n ' :module: target',\n '',\n ' First line, no signature',\n ' Second line followed by indentation::',\n '',\n ' indented line',\n '',\n '',\n ' .. py:property:: DocstringSig.prop1',\n ' :module: target',\n '',\n ' DocstringSig.prop1(self)',\n ' First line of docstring',\n '',\n '',\n ' .. py:property:: DocstringSig.prop2',\n ' :module: target',\n '',\n ' First line of docstring',\n ' Second line of docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_test_autodoc_typehints_description.assert_target_overload_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_test_autodoc_typehints_description.assert_target_overload_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 818, "end_line": 848, "span_ids": ["test_autodoc_typehints_description"], "tokens": 312}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('text', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints': \"description\"})\ndef test_autodoc_typehints_description(app):\n app.build()\n context = (app.outdir / 'index.txt').read_text()\n assert ('target.typehints.incr(a, b=1)\\n'\n '\\n'\n ' Parameters:\\n'\n ' * **a** (*int*) --\\n'\n '\\n'\n ' * **b** (*int*) --\\n'\n '\\n'\n ' Return type:\\n'\n ' int\\n'\n in context)\n assert ('target.typehints.tuple_args(x)\\n'\n '\\n'\n ' Parameters:\\n'\n ' **x** (*Tuple**[**int**, **Union**[**int**, **str**]**]*) --\\n'\n '\\n'\n ' Return type:\\n'\n ' *Tuple*[int, int]\\n'\n in context)\n\n # Overloads still get displayed in the signature\n assert ('target.overload.sum(x: int, y: int = 0) -> int\\n'\n 'target.overload.sum(x: float, y: float = 0.0) -> float\\n'\n 'target.overload.sum(x: str, y: str = None) -> str\\n'\n '\\n'\n ' docstring\\n'\n in context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_no_undoc_test_autodoc_typehints_description_no_undoc.assert_target_typehints": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_no_undoc_test_autodoc_typehints_description_no_undoc.assert_target_typehints", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 851, "end_line": 892, "span_ids": ["test_autodoc_typehints_description_no_undoc"], "tokens": 407}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('text', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints': \"description\",\n 'autodoc_typehints_description_target': 'documented'})\ndef test_autodoc_typehints_description_no_undoc(app):\n # No :type: or :rtype: will be injected for `incr`, which does not have\n # a description for its parameters or its return. `tuple_args` does\n # describe them, so :type: and :rtype: will be added.\n (app.srcdir / 'index.rst').write_text(\n '.. autofunction:: target.typehints.incr\\n'\n '\\n'\n '.. autofunction:: target.typehints.decr\\n'\n '\\n'\n ' :returns: decremented number\\n'\n '\\n'\n '.. autofunction:: target.typehints.tuple_args\\n'\n '\\n'\n ' :param x: arg\\n'\n ' :return: another tuple\\n'\n )\n app.build()\n context = (app.outdir / 'index.txt').read_text()\n assert ('target.typehints.incr(a, b=1)\\n'\n '\\n'\n 'target.typehints.decr(a, b=1)\\n'\n '\\n'\n ' Returns:\\n'\n ' decremented number\\n'\n '\\n'\n ' Return type:\\n'\n ' int\\n'\n '\\n'\n 'target.typehints.tuple_args(x)\\n'\n '\\n'\n ' Parameters:\\n'\n ' **x** (*Tuple**[**int**, **Union**[**int**, **str**]**]*) -- arg\\n'\n '\\n'\n ' Returns:\\n'\n ' another tuple\\n'\n '\\n'\n ' Return type:\\n'\n ' *Tuple*[int, int]\\n'\n in context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_with_documented_init_test_autodoc_typehints_description_with_documented_init.assert_class_target_typ": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_with_documented_init_test_autodoc_typehints_description_with_documented_init.assert_class_target_typ", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 895, "end_line": 922, "span_ids": ["test_autodoc_typehints_description_with_documented_init"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('text', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints': \"description\"})\ndef test_autodoc_typehints_description_with_documented_init(app):\n (app.srcdir / 'index.rst').write_text(\n '.. autoclass:: target.typehints._ClassWithDocumentedInit\\n'\n ' :special-members: __init__\\n'\n )\n app.build()\n context = (app.outdir / 'index.txt').read_text()\n assert ('class target.typehints._ClassWithDocumentedInit(x)\\n'\n '\\n'\n ' Class docstring.\\n'\n '\\n'\n ' Parameters:\\n'\n ' **x** (*int*) --\\n'\n '\\n'\n ' Return type:\\n'\n ' None\\n'\n '\\n'\n ' __init__(x)\\n'\n '\\n'\n ' Init docstring.\\n'\n '\\n'\n ' Parameters:\\n'\n ' **x** (*int*) -- Some integer\\n'\n '\\n'\n ' Return type:\\n'\n ' None\\n' == context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_with_documented_init_no_undoc_test_autodoc_typehints_description_for_invalid_node._raises_no_error": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_with_documented_init_no_undoc_test_autodoc_typehints_description_for_invalid_node._raises_no_error", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 925, "end_line": 951, "span_ids": ["test_autodoc_typehints_description_with_documented_init_no_undoc", "test_autodoc_typehints_description_for_invalid_node"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('text', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints': \"description\",\n 'autodoc_typehints_description_target': 'documented'})\ndef test_autodoc_typehints_description_with_documented_init_no_undoc(app):\n (app.srcdir / 'index.rst').write_text(\n '.. autoclass:: target.typehints._ClassWithDocumentedInit\\n'\n ' :special-members: __init__\\n'\n )\n app.build()\n context = (app.outdir / 'index.txt').read_text()\n assert ('class target.typehints._ClassWithDocumentedInit(x)\\n'\n '\\n'\n ' Class docstring.\\n'\n '\\n'\n ' __init__(x)\\n'\n '\\n'\n ' Init docstring.\\n'\n '\\n'\n ' Parameters:\\n'\n ' **x** (*int*) -- Some integer\\n' == context)\n\n\n@pytest.mark.sphinx('text', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints': \"description\"})\ndef test_autodoc_typehints_description_for_invalid_node(app):\n text = \".. py:function:: hello; world\"\n restructuredtext.parse(app, text) # raises no error", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_both_test_autodoc_typehints_both.assert_target_overload_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_both_test_autodoc_typehints_both.assert_target_overload_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 954, "end_line": 991, "span_ids": ["test_autodoc_typehints_both"], "tokens": 393}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('text', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints': \"both\"})\ndef test_autodoc_typehints_both(app):\n (app.srcdir / 'index.rst').write_text(\n '.. autofunction:: target.typehints.incr\\n'\n '\\n'\n '.. autofunction:: target.typehints.tuple_args\\n'\n '\\n'\n '.. autofunction:: target.overload.sum\\n'\n )\n app.build()\n context = (app.outdir / 'index.txt').read_text()\n assert ('target.typehints.incr(a: int, b: int = 1) -> int\\n'\n '\\n'\n ' Parameters:\\n'\n ' * **a** (*int*) --\\n'\n '\\n'\n ' * **b** (*int*) --\\n'\n '\\n'\n ' Return type:\\n'\n ' int\\n'\n in context)\n assert ('target.typehints.tuple_args(x: Tuple[int, Union[int, str]]) -> Tuple[int, int]\\n'\n '\\n'\n ' Parameters:\\n'\n ' **x** (*Tuple**[**int**, **Union**[**int**, **str**]**]*) --\\n'\n '\\n'\n ' Return type:\\n'\n ' *Tuple*[int, int]\\n'\n in context)\n\n # Overloads still get displayed in the signature\n assert ('target.overload.sum(x: int, y: int = 0) -> int\\n'\n 'target.overload.sum(x: float, y: float = 0.0) -> float\\n'\n 'target.overload.sum(x: str, y: str = None) -> str\\n'\n '\\n'\n ' docstring\\n'\n in context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_type_aliases_test_autodoc_type_aliases.actual_3.do_autodoc_app_module_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_type_aliases_test_autodoc_type_aliases.actual_3.do_autodoc_app_module_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 994, "end_line": 1063, "span_ids": ["test_autodoc_type_aliases"], "tokens": 527}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.')\n@pytest.mark.sphinx('text', testroot='ext-autodoc')\ndef test_autodoc_type_aliases(app):\n # default\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.autodoc_type_aliases', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.autodoc_type_aliases',\n '',\n '',\n '.. py:class:: Foo()',\n ' :module: target.autodoc_type_aliases',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Foo.attr1',\n ' :module: target.autodoc_type_aliases',\n ' :type: int',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Foo.attr2',\n ' :module: target.autodoc_type_aliases',\n ' :type: int',\n '',\n ' docstring',\n '',\n '',\n '.. py:function:: mult(x: int, y: int) -> int',\n ' mult(x: float, y: float) -> float',\n ' :module: target.autodoc_type_aliases',\n '',\n ' docstring',\n '',\n '',\n '.. py:function:: read(r: ~_io.BytesIO) -> ~_io.StringIO',\n ' :module: target.autodoc_type_aliases',\n '',\n ' docstring',\n '',\n '',\n '.. py:function:: sum(x: int, y: int) -> int',\n ' :module: target.autodoc_type_aliases',\n '',\n ' docstring',\n '',\n '',\n '.. py:data:: variable',\n ' :module: target.autodoc_type_aliases',\n ' :type: int',\n '',\n ' docstring',\n '',\n '',\n '.. py:data:: variable2',\n ' :module: target.autodoc_type_aliases',\n ' :type: int',\n ' :value: None',\n '',\n ' docstring',\n '',\n ]\n\n # define aliases\n app.config.autodoc_type_aliases = {'myint': 'myint',\n 'io.StringIO': 'my.module.StringIO'}\n actual = do_autodoc(app, 'module', 'target.autodoc_type_aliases', options)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_type_aliases.None_1_test_autodoc_type_aliases.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_type_aliases.None_1_test_autodoc_type_aliases.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 1064, "end_line": 1122, "span_ids": ["test_autodoc_type_aliases"], "tokens": 447}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.')\n@pytest.mark.sphinx('text', testroot='ext-autodoc')\ndef test_autodoc_type_aliases(app):\n # ... other code\n assert list(actual) == [\n '',\n '.. py:module:: target.autodoc_type_aliases',\n '',\n '',\n '.. py:class:: Foo()',\n ' :module: target.autodoc_type_aliases',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Foo.attr1',\n ' :module: target.autodoc_type_aliases',\n ' :type: myint',\n '',\n ' docstring',\n '',\n '',\n ' .. py:attribute:: Foo.attr2',\n ' :module: target.autodoc_type_aliases',\n ' :type: myint',\n '',\n ' docstring',\n '',\n '',\n '.. py:function:: mult(x: myint, y: myint) -> myint',\n ' mult(x: float, y: float) -> float',\n ' :module: target.autodoc_type_aliases',\n '',\n ' docstring',\n '',\n '',\n '.. py:function:: read(r: ~_io.BytesIO) -> my.module.StringIO',\n ' :module: target.autodoc_type_aliases',\n '',\n ' docstring',\n '',\n '',\n '.. py:function:: sum(x: myint, y: myint) -> myint',\n ' :module: target.autodoc_type_aliases',\n '',\n ' docstring',\n '',\n '',\n '.. py:data:: variable',\n ' :module: target.autodoc_type_aliases',\n ' :type: myint',\n '',\n ' docstring',\n '',\n '',\n '.. py:data:: variable2',\n ' :module: target.autodoc_type_aliases',\n ' :type: myint',\n ' :value: None',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_and_type_aliases_test_autodoc_typehints_description_and_type_aliases.assert_target_autodoc_t": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_description_and_type_aliases_test_autodoc_typehints_description_and_type_aliases.assert_target_autodoc_t", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 1125, "end_line": 1144, "span_ids": ["test_autodoc_typehints_description_and_type_aliases"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.')\n@pytest.mark.sphinx('text', testroot='ext-autodoc',\n srcdir='autodoc_typehints_description_and_type_aliases',\n confoverrides={'autodoc_typehints': \"description\",\n 'autodoc_type_aliases': {'myint': 'myint'}})\ndef test_autodoc_typehints_description_and_type_aliases(app):\n (app.srcdir / 'autodoc_type_aliases.rst').write_text('.. autofunction:: target.autodoc_type_aliases.sum')\n app.build()\n context = (app.outdir / 'autodoc_type_aliases.txt').read_text()\n assert ('target.autodoc_type_aliases.sum(x, y)\\n'\n '\\n'\n ' docstring\\n'\n '\\n'\n ' Parameters:\\n'\n ' * **x** (*myint*) --\\n'\n '\\n'\n ' * **y** (*myint*) --\\n'\n '\\n'\n ' Return type:\\n'\n ' myint\\n' == context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_test_autodoc_typehints_format_fully_qualified.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_test_autodoc_typehints_format_fully_qualified.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 1147, "end_line": 1237, "span_ids": ["test_autodoc_typehints_format_fully_qualified"], "tokens": 751}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints_format': \"fully-qualified\"})\ndef test_autodoc_typehints_format_fully_qualified(app):\n if sys.version_info < (3, 11):\n type_o = \"typing.Optional[typing.Any]\"\n else:\n type_o = \"typing.Any\"\n\n options = {\"members\": None,\n \"undoc-members\": None}\n actual = do_autodoc(app, 'module', 'target.typehints', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.typehints',\n '',\n '',\n '.. py:data:: CONST1',\n ' :module: target.typehints',\n ' :type: int',\n '',\n '',\n '.. py:class:: Math(s: str, o: %s = None)' % type_o,\n ' :module: target.typehints',\n '',\n '',\n ' .. py:attribute:: Math.CONST1',\n ' :module: target.typehints',\n ' :type: int',\n '',\n '',\n ' .. py:attribute:: Math.CONST2',\n ' :module: target.typehints',\n ' :type: int',\n ' :value: 1',\n '',\n '',\n ' .. py:method:: Math.decr(a: int, b: int = 1) -> int',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:method:: Math.horse(a: str, b: int) -> None',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:method:: Math.incr(a: int, b: int = 1) -> int',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:method:: Math.nothing() -> None',\n ' :module: target.typehints',\n '',\n '',\n ' .. py:property:: Math.prop',\n ' :module: target.typehints',\n ' :type: int',\n '',\n '',\n '.. py:class:: NewAnnotation(i: int)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:class:: NewComment(i: int)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:class:: SignatureFromMetaclass(a: int)',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: complex_func(arg1: str, arg2: List[int], arg3: Tuple[int, '\n 'Union[str, Unknown]] = None, *args: str, **kwargs: str) -> None',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: decr(a: int, b: int = 1) -> int',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: incr(a: int, b: int = 1) -> int',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: missing_attr(c, a: str, b: Optional[str] = None) -> str',\n ' :module: target.typehints',\n '',\n '',\n '.. py:function:: tuple_args(x: typing.Tuple[int, typing.Union[int, str]]) '\n '-> typing.Tuple[int, int]',\n ' :module: target.typehints',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_for_class_alias_test_autodoc_typehints_format_fully_qualified_for_class_alias.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_for_class_alias_test_autodoc_typehints_format_fully_qualified_for_class_alias.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 1240, "end_line": 1250, "span_ids": ["test_autodoc_typehints_format_fully_qualified_for_class_alias"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints_format': \"fully-qualified\"})\ndef test_autodoc_typehints_format_fully_qualified_for_class_alias(app):\n actual = do_autodoc(app, 'class', 'target.classes.Alias')\n assert list(actual) == [\n '',\n '.. py:attribute:: Alias',\n ' :module: target.classes',\n '',\n ' alias of :py:class:`target.classes.Foo`',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_for_generic_alias_test_autodoc_typehints_format_fully_qualified_for_generic_alias.if_sys_version_info_3_.else_.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_for_generic_alias_test_autodoc_typehints_format_fully_qualified_for_generic_alias.if_sys_version_info_3_.else_.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 1253, "end_line": 1277, "span_ids": ["test_autodoc_typehints_format_fully_qualified_for_generic_alias"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints_format': \"fully-qualified\"})\ndef test_autodoc_typehints_format_fully_qualified_for_generic_alias(app):\n actual = do_autodoc(app, 'data', 'target.genericalias.L')\n if sys.version_info < (3, 7):\n assert list(actual) == [\n '',\n '.. py:data:: L',\n ' :module: target.genericalias',\n ' :value: typing.List[target.genericalias.Class]',\n '',\n ' A list of Class',\n '',\n ]\n else:\n assert list(actual) == [\n '',\n '.. py:data:: L',\n ' :module: target.genericalias',\n '',\n ' A list of Class',\n '',\n ' alias of :py:class:`~typing.List`\\\\ [:py:class:`target.genericalias.Class`]',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_for_newtype_alias_test_autodoc_typehints_format_fully_qualified_for_newtype_alias.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_configs.py_test_autodoc_typehints_format_fully_qualified_for_newtype_alias_test_autodoc_typehints_format_fully_qualified_for_newtype_alias.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_configs.py", "file_name": "test_ext_autodoc_configs.py", "file_type": "text/x-python", "category": "test", "start_line": 1280, "end_line": 1293, "span_ids": ["test_autodoc_typehints_format_fully_qualified_for_newtype_alias"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-autodoc',\n confoverrides={'autodoc_typehints_format': \"fully-qualified\"})\ndef test_autodoc_typehints_format_fully_qualified_for_newtype_alias(app):\n actual = do_autodoc(app, 'data', 'target.typevar.T6')\n assert list(actual) == [\n '',\n '.. py:data:: T6',\n ' :module: target.typevar',\n '',\n ' T6',\n '',\n ' alias of :py:class:`datetime.date`',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py__Test_the_autodoc_exten_test_process_docstring.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_events.py__Test_the_autodoc_exten_test_process_docstring.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_events.py", "file_name": "test_ext_autodoc_events.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 26, "span_ids": ["docstring", "imports", "test_process_docstring"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension. This tests mainly for autodoc events\"\"\"\n\nimport pytest\n\nfrom sphinx.ext.autodoc import between, cut_lines\n\nfrom .test_ext_autodoc import do_autodoc\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_process_docstring(app):\n def on_process_docstring(app, what, name, obj, options, lines):\n lines.clear()\n lines.append('my docstring')\n\n app.connect('autodoc-process-docstring', on_process_docstring)\n\n actual = do_autodoc(app, 'function', 'target.process_docstring.func')\n assert list(actual) == [\n '',\n '.. py:function:: func()',\n ' :module: target.process_docstring',\n '',\n ' my docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py__Test_the_autodoc_exten_test_MockModule.assert_repr_mock_moc": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_mock.py__Test_the_autodoc_exten_test_MockModule.assert_repr_mock_moc", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_mock.py", "file_name": "test_ext_autodoc_mock.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 25, "span_ids": ["docstring", "imports", "test_MockModule"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension.\"\"\"\n\nimport abc\nimport sys\nfrom importlib import import_module\nfrom typing import TypeVar\n\nimport pytest\n\nfrom sphinx.ext.autodoc.mock import _MockModule, _MockObject, ismock, mock, undecorate\n\n\ndef test_MockModule():\n mock = _MockModule('mocked_module')\n assert isinstance(mock.some_attr, _MockObject)\n assert isinstance(mock.some_method, _MockObject)\n assert isinstance(mock.attr1.attr2, _MockObject)\n assert isinstance(mock.attr1.attr2.meth(), _MockObject)\n\n assert repr(mock.some_attr) == 'mocked_module.some_attr'\n assert repr(mock.some_method) == 'mocked_module.some_method'\n assert repr(mock.attr1.attr2) == 'mocked_module.attr1.attr2'\n assert repr(mock.attr1.attr2.meth) == 'mocked_module.attr1.attr2.meth'\n\n assert repr(mock) == 'mocked_module'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_preserve_defaults.py__Test_the_autodoc_exten_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_preserve_defaults.py__Test_the_autodoc_exten_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_preserve_defaults.py", "file_name": "test_ext_autodoc_preserve_defaults.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 47, "span_ids": ["test_preserve_defaults", "docstring", "imports"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension.\"\"\"\n\nimport sys\n\nimport pytest\n\nfrom .test_ext_autodoc import do_autodoc\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc',\n confoverrides={'autodoc_preserve_defaults': True})\ndef test_preserve_defaults(app):\n if sys.version_info < (3, 8):\n color = \"16777215\"\n else:\n color = \"0xFFFFFF\"\n\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.preserve_defaults', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.preserve_defaults',\n '',\n '',\n '.. py:class:: Class()',\n ' :module: target.preserve_defaults',\n '',\n ' docstring',\n '',\n '',\n ' .. py:method:: Class.meth(name: str = CONSTANT, sentinel: ~typing.Any = '\n 'SENTINEL, now: ~datetime.datetime = datetime.now(), color: int = %s, *, '\n 'kwarg1, kwarg2=%s) -> None' % (color, color),\n ' :module: target.preserve_defaults',\n '',\n ' docstring',\n '',\n '',\n '.. py:function:: foo(name: str = CONSTANT, sentinel: ~typing.Any = SENTINEL, '\n 'now: ~datetime.datetime = datetime.now(), color: int = %s, *, kwarg1, '\n 'kwarg2=%s) -> None' % (color, color),\n ' :module: target.preserve_defaults',\n '',\n ' docstring',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_private_members.py__Test_the_autodoc_exten_test_private_field.assert_list_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autodoc_private_members.py__Test_the_autodoc_exten_test_private_field.assert_list_actual_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autodoc_private_members.py", "file_name": "test_ext_autodoc_private_members.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 33, "span_ids": ["docstring", "imports", "test_private_field"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autodoc extension. This tests mainly for private-members option.\n\"\"\"\n\nimport pytest\n\nfrom .test_ext_autodoc import do_autodoc\n\n\n@pytest.mark.sphinx('html', testroot='ext-autodoc')\ndef test_private_field(app):\n app.config.autoclass_content = 'class'\n options = {\"members\": None}\n actual = do_autodoc(app, 'module', 'target.private', options)\n assert list(actual) == [\n '',\n '.. py:module:: target.private',\n '',\n '',\n '.. py:data:: _PUBLIC_CONSTANT',\n ' :module: target.private',\n ' :value: None',\n '',\n ' :meta public:',\n '',\n '',\n '.. py:function:: _public_function(name)',\n ' :module: target.private',\n '',\n ' public_function is a docstring().',\n '',\n ' :meta public:',\n '',\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosectionlabel.py__Test_sphinx_ext_autose_test_autosectionlabel_html.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosectionlabel.py__Test_sphinx_ext_autose_test_autosectionlabel_html.None_6", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosectionlabel.py", "file_name": "test_ext_autosectionlabel.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 42, "span_ids": ["test_autosectionlabel_html", "docstring", "imports"], "tokens": 462}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.ext.autosectionlabel extension.\"\"\"\n\nimport re\n\nimport pytest\n\n\n@pytest.mark.sphinx('html', testroot='ext-autosectionlabel')\ndef test_autosectionlabel_html(app, status, warning, skipped_labels=False):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n html = ('<li><p><a class=\"reference internal\" href=\"#introduce-of-sphinx\">'\n '<span class=\".*?\">Introduce of Sphinx</span></a></p></li>')\n assert re.search(html, content, re.S)\n\n html = ('<li><p><a class=\"reference internal\" href=\"#installation\">'\n '<span class=\"std std-ref\">Installation</span></a></p></li>')\n assert re.search(html, content, re.S)\n\n html = ('<li><p><a class=\"reference internal\" href=\"#for-windows-users\">'\n '<span class=\"std std-ref\">For Windows users</span></a></p></li>')\n assert re.search(html, content, re.S)\n\n html = ('<li><p><a class=\"reference internal\" href=\"#for-unix-users\">'\n '<span class=\"std std-ref\">For UNIX users</span></a></p></li>')\n assert re.search(html, content, re.S)\n\n html = ('<li><p><a class=\"reference internal\" href=\"#linux\">'\n '<span class=\"std std-ref\">Linux</span></a></p></li>')\n assert re.search(html, content, re.S)\n\n html = ('<li><p><a class=\"reference internal\" href=\"#freebsd\">'\n '<span class=\"std std-ref\">FreeBSD</span></a></p></li>')\n assert re.search(html, content, re.S)\n\n # for smart_quotes (refs: #4027)\n html = ('<li><p><a class=\"reference internal\" '\n 'href=\"#this-one-s-got-an-apostrophe\">'\n '<span class=\"std std-ref\">This one\u2019s got an apostrophe'\n '</span></a></p></li>')\n assert re.search(html, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py__Test_the_autosummary_e_unload_target_module.sys_modules_pop_target_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py__Test_the_autosummary_e_unload_target_module.sys_modules_pop_target_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 36, "span_ids": ["unload_target_module", "impl", "docstring", "imports"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the autosummary extension.\"\"\"\n\nimport sys\nfrom io import StringIO\nfrom unittest.mock import Mock, patch\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx import addnodes\nfrom sphinx.ext.autosummary import (autosummary_table, autosummary_toc, extract_summary,\n import_by_name, mangle_signature)\nfrom sphinx.ext.autosummary.generate import (AutosummaryEntry, generate_autosummary_content,\n generate_autosummary_docs)\nfrom sphinx.ext.autosummary.generate import main as autogen_main\nfrom sphinx.testing.util import assert_node, etree_parse\nfrom sphinx.util.docutils import new_document\nfrom sphinx.util.osutil import cd\n\nhtml_warnfile = StringIO()\n\n\ndefault_kw = {\n 'testroot': 'autosummary',\n 'confoverrides': {\n 'extensions': ['sphinx.ext.autosummary'],\n 'autosummary_generate': True,\n 'autosummary_generate_overwrite': False,\n 'source_suffix': '.rst'\n }\n}\n\n\n@pytest.fixture(scope='function', autouse=True)\ndef unload_target_module():\n sys.modules.pop('target', None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module___all___test_autosummary_generate_content_for_module___all__.assert_context_objtype_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_autosummary.py_test_autosummary_generate_content_for_module___all___test_autosummary_generate_content_for_module___all__.assert_context_objtype_", "embedding": null, "metadata": {"file_path": "tests/test_ext_autosummary.py", "file_name": "test_ext_autosummary.py", "file_type": "text/x-python", "category": "test", "start_line": 229, "end_line": 253, "span_ids": ["test_autosummary_generate_content_for_module___all__"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autosummary')\ndef test_autosummary_generate_content_for_module___all__(app):\n import autosummary_dummy_module\n template = Mock()\n app.config.autosummary_ignore_module_all = False\n\n generate_autosummary_content('autosummary_dummy_module', autosummary_dummy_module, None,\n template, None, False, app, False, {})\n assert template.render.call_args[0][0] == 'module'\n\n context = template.render.call_args[0][1]\n assert context['members'] == ['CONSTANT1', 'Exc', 'Foo', '_Baz', 'bar', 'qux', 'path']\n assert context['functions'] == ['bar']\n assert context['all_functions'] == ['bar']\n assert context['classes'] == ['Foo']\n assert context['all_classes'] == ['Foo', '_Baz']\n assert context['exceptions'] == ['Exc']\n assert context['all_exceptions'] == ['Exc']\n assert context['attributes'] == ['CONSTANT1', 'qux']\n assert context['all_attributes'] == ['CONSTANT1', 'qux']\n assert context['fullname'] == 'autosummary_dummy_module'\n assert context['module'] == 'autosummary_dummy_module'\n assert context['objname'] == ''\n assert context['name'] == ''\n assert context['objtype'] == 'module'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_coverage.py__Test_the_coverage_buil_test_build.assert_undocumented_c_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_coverage.py__Test_the_coverage_buil_test_build.assert_undocumented_c_", "embedding": null, "metadata": {"file_path": "tests/test_ext_coverage.py", "file_name": "test_ext_coverage.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 43, "span_ids": ["docstring", "imports", "test_build"], "tokens": 452}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the coverage builder.\"\"\"\n\nimport pickle\n\nimport pytest\n\n\n@pytest.mark.sphinx('coverage')\ndef test_build(app, status, warning):\n app.builder.build_all()\n\n py_undoc = (app.outdir / 'python.txt').read_text()\n assert py_undoc.startswith('Undocumented Python objects\\n'\n '===========================\\n')\n assert 'autodoc_target\\n--------------\\n' in py_undoc\n assert ' * Class -- missing methods:\\n' in py_undoc\n assert ' * raises\\n' in py_undoc\n assert ' * function\\n' not in py_undoc # these two are documented\n assert ' * Class\\n' not in py_undoc # in autodoc.txt\n\n assert ' * mod -- No module named mod' # in the \"failed import\" section\n\n assert \"undocumented py\" not in status.getvalue()\n\n c_undoc = (app.outdir / 'c.txt').read_text()\n assert c_undoc.startswith('Undocumented C API elements\\n'\n '===========================\\n')\n assert 'api.h' in c_undoc\n assert ' * Py_SphinxTest' in c_undoc\n\n undoc_py, undoc_c = pickle.loads((app.outdir / 'undoc.pickle').read_bytes())\n assert len(undoc_c) == 1\n # the key is the full path to the header file, which isn't testable\n assert list(undoc_c.values())[0] == {('function', 'Py_SphinxTest')}\n\n assert 'autodoc_target' in undoc_py\n assert 'funcs' in undoc_py['autodoc_target']\n assert 'raises' in undoc_py['autodoc_target']['funcs']\n assert 'classes' in undoc_py['autodoc_target']\n assert 'Class' in undoc_py['autodoc_target']['classes']\n assert 'undocmeth' in undoc_py['autodoc_target']['classes']['Class']\n\n assert \"undocumented c\" not in status.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py__Test_the_doctest_exten_test_build.assert_cleanup_called_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py__Test_the_doctest_exten_test_build.assert_cleanup_called_", "embedding": null, "metadata": {"file_path": "tests/test_ext_doctest.py", "file_name": "test_ext_doctest.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 24, "span_ids": ["impl", "docstring", "imports", "test_build"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the doctest extension.\"\"\"\nimport os\nfrom collections import Counter\n\nimport pytest\nfrom docutils import nodes\nfrom packaging.specifiers import InvalidSpecifier\nfrom packaging.version import InvalidVersion\n\nfrom sphinx.ext.doctest import is_allowed_version\n\ncleanup_called = 0\n\n\n@pytest.mark.sphinx('doctest', testroot='ext-doctest')\ndef test_build(app, status, warning):\n global cleanup_called\n cleanup_called = 0\n app.builder.build_all()\n if app.statuscode != 0:\n assert False, 'failures in doctests:' + status.getvalue()\n # in doctest.txt, there are two named groups and the default group,\n # so the cleanup function must be called three times\n assert cleanup_called == 3, 'testcleanup did not get executed enough times'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_test_highlight_language_default_test_highlight_language_python2.for_node_in_doctree_finda.assert_node_language_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_doctest.py_test_highlight_language_default_test_highlight_language_python2.for_node_in_doctree_finda.assert_node_language_i", "embedding": null, "metadata": {"file_path": "tests/test_ext_doctest.py", "file_name": "test_ext_doctest.py", "file_type": "text/x-python", "category": "test", "start_line": 27, "end_line": 41, "span_ids": ["test_highlight_language_python2", "test_highlight_language_default"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('dummy', testroot='ext-doctest')\ndef test_highlight_language_default(app, status, warning):\n app.build()\n doctree = app.env.get_doctree('doctest')\n for node in doctree.findall(nodes.literal_block):\n assert node['language'] in ('python3', 'pycon3', 'none')\n\n\n@pytest.mark.sphinx('dummy', testroot='ext-doctest',\n confoverrides={'highlight_language': 'python'})\ndef test_highlight_language_python2(app, status, warning):\n app.build()\n doctree = app.env.get_doctree('doctest')\n for node in doctree.findall(nodes.literal_block):\n assert node['language'] in ('python', 'pycon', 'none')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_duration.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_duration.py__", "embedding": null, "metadata": {"file_path": "tests/test_ext_duration.py", "file_name": "test_ext_duration.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 15, "span_ids": ["test_githubpages", "docstring", "imports"], "tokens": 87}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.ext.duration extension.\"\"\"\n\nimport re\n\nimport pytest\n\n\n@pytest.mark.sphinx('dummy', testroot='basic',\n confoverrides={'extensions': ['sphinx.ext.duration']})\ndef test_githubpages(app, status, warning):\n app.build()\n\n assert 'slowest reading durations' in status.getvalue()\n assert re.search('\\\\d+\\\\.\\\\d{3} index\\n', status.getvalue())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_extlinks.py_pytest_test_replaceable_uris_emit_extlinks_warnings.assert_message_15_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_extlinks.py_pytest_test_replaceable_uris_emit_extlinks_warnings.assert_message_15_i", "embedding": null, "metadata": {"file_path": "tests/test_ext_extlinks.py", "file_name": "test_ext_extlinks.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 23, "span_ids": ["test_replaceable_uris_emit_extlinks_warnings", "imports", "test_extlinks_detect_candidates"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\n\n@pytest.mark.sphinx('html', testroot='ext-extlinks-hardcoded-urls',\n confoverrides={'extlinks_detect_hardcoded_links': False})\ndef test_extlinks_detect_candidates(app, warning):\n app.build()\n assert warning.getvalue() == ''\n\n\n@pytest.mark.sphinx('html', testroot='ext-extlinks-hardcoded-urls')\ndef test_replaceable_uris_emit_extlinks_warnings(app, warning):\n app.build()\n warning_output = warning.getvalue()\n\n # there should be exactly three warnings for replaceable URLs\n message = (\n \"index.rst:%d: WARNING: hardcoded link 'https://github.com/sphinx-doc/sphinx/issues/1' \"\n \"could be replaced by an extlink (try using '%s' instead)\"\n )\n assert message % (11, \":issue:`1`\") in warning_output\n assert message % (13, \":issue:`inline replaceable link <1>`\") in warning_output\n assert message % (15, \":issue:`replaceable link <1>`\") in warning_output", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_extlinks.py_test_all_replacements_suggested_if_multiple_replacements_possible_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_extlinks.py_test_all_replacements_suggested_if_multiple_replacements_possible_", "embedding": null, "metadata": {"file_path": "tests/test_ext_extlinks.py", "file_name": "test_ext_extlinks.py", "file_type": "text/x-python", "category": "test", "start_line": 26, "end_line": 45, "span_ids": ["test_all_replacements_suggested_if_multiple_replacements_possible"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-extlinks-hardcoded-urls-multiple-replacements')\ndef test_all_replacements_suggested_if_multiple_replacements_possible(app, warning):\n app.build()\n warning_output = warning.getvalue()\n # there should be six warnings for replaceable URLs, three pairs per link\n message = (\n \"index.rst:%d: WARNING: hardcoded link 'https://github.com/octocat' \"\n \"could be replaced by an extlink (try using '%s' instead)\"\n )\n assert message % (14, \":user:`octocat`\") in warning_output\n assert message % (16, \":user:`inline replaceable link <octocat>`\") in warning_output\n assert message % (18, \":user:`replaceable link <octocat>`\") in warning_output\n message = (\n \"index.rst:%d: WARNING: hardcoded link 'https://github.com/octocat' \"\n \"could be replaced by an extlink (try using '%s' instead)\"\n )\n assert message % (14, \":repo:`octocat`\") in warning_output\n assert message % (16, \":repo:`inline replaceable link <octocat>`\") in warning_output\n assert message % (18, \":repo:`replaceable link <octocat>`\") in warning_output", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_githubpages.py__Test_sphinx_ext_github_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_githubpages.py__Test_sphinx_ext_github_", "embedding": null, "metadata": {"file_path": "tests/test_ext_githubpages.py", "file_name": "test_ext_githubpages.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 27, "span_ids": ["docstring", "test_githubpages", "test_no_cname_for_github_io_domain", "test_cname_for_custom_domain", "imports"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.ext.githubpages extension.\"\"\"\n\nimport pytest\n\n\n@pytest.mark.sphinx('html', testroot='ext-githubpages')\ndef test_githubpages(app, status, warning):\n app.builder.build_all()\n assert (app.outdir / '.nojekyll').exists()\n assert not (app.outdir / 'CNAME').exists()\n\n\n@pytest.mark.sphinx('html', testroot='ext-githubpages',\n confoverrides={'html_baseurl': 'https://sphinx-doc.github.io'})\ndef test_no_cname_for_github_io_domain(app, status, warning):\n app.builder.build_all()\n assert (app.outdir / '.nojekyll').exists()\n assert not (app.outdir / 'CNAME').exists()\n\n\n@pytest.mark.sphinx('html', testroot='ext-githubpages',\n confoverrides={'html_baseurl': 'https://sphinx-doc.org'})\ndef test_cname_for_custom_domain(app, status, warning):\n app.builder.build_all()\n assert (app.outdir / '.nojekyll').exists()\n assert (app.outdir / 'CNAME').read_text() == 'sphinx-doc.org'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py__Test_sphinx_ext_graphv_test_graphviz_png_html.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_graphviz.py__Test_sphinx_ext_graphv_test_graphviz_png_html.None_4", "embedding": null, "metadata": {"file_path": "tests/test_ext_graphviz.py", "file_name": "test_ext_graphviz.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 50, "span_ids": ["docstring", "imports", "test_graphviz_png_html"], "tokens": 595}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.ext.graphviz extension.\"\"\"\n\nimport re\n\nimport pytest\n\nfrom sphinx.ext.graphviz import ClickableMapDefinition\nfrom sphinx.util import docutils\n\n\n@pytest.mark.sphinx('html', testroot='ext-graphviz')\n@pytest.mark.usefixtures('if_graphviz_found')\ndef test_graphviz_png_html(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n if docutils.__version_info__ < (0, 17):\n html = (r'<div class=\"figure align-default\" .*?>\\s*'\n r'<div class=\"graphviz\"><img .*?/></div>\\s*<p class=\"caption\">'\n r'<span class=\"caption-text\">caption of graph</span>.*</p>\\s*</div>')\n else:\n html = (r'<figure class=\"align-default\" .*?>\\s*'\n r'<div class=\"graphviz\"><img .*?/></div>\\s*<figcaption>\\s*'\n r'<p><span class=\"caption-text\">caption of graph</span>.*</p>\\s*'\n r'</figcaption>\\s*</figure>')\n assert re.search(html, content, re.S)\n\n html = 'Hello <div class=\"graphviz\"><img .*?/></div>\\n graphviz world'\n assert re.search(html, content, re.S)\n\n html = ('<img src=\".*?\" alt=\"digraph foo {\\nbaz -> qux\\n}\" '\n 'class=\"graphviz neato-graph\" />')\n assert re.search(html, content, re.S)\n\n if docutils.__version_info__ < (0, 17):\n html = (r'<div class=\"figure align-right\" .*?>\\s*'\n r'<div class=\"graphviz\"><img .*?/></div>\\s*<p class=\"caption\">'\n r'<span class=\"caption-text\">on <em>right</em></span>.*</p>\\s*</div>')\n else:\n html = (r'<figure class=\"align-right\" .*?>\\s*'\n r'<div class=\"graphviz\"><img .*?/></div>\\s*<figcaption>\\s*'\n r'<p><span class=\"caption-text\">on <em>right</em></span>.*</p>\\s*'\n r'</figcaption>\\s*</figure>')\n assert re.search(html, content, re.S)\n\n html = (r'<div align=\\\"center\\\" class=\\\"align-center\\\">'\n r'<div class=\"graphviz\"><img src=\\\".*\\.png\\\" alt=\\\"digraph foo {\\n'\n r'centered\\n'\n r'}\\\" class=\"graphviz\" /></div>\\n</div>')\n assert re.search(html, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_ifconfig.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_ifconfig.py__", "embedding": null, "metadata": {"file_path": "tests/test_ext_ifconfig.py", "file_name": "test_ext_ifconfig.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 12, "span_ids": ["docstring", "imports", "test_ifconfig"], "tokens": 73}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.ext.ifconfig extension.\"\"\"\n\nimport pytest\n\n\n@pytest.mark.sphinx('text', testroot='ext-ifconfig')\ndef test_ifconfig(app, status, warning):\n app.builder.build_all()\n result = (app.outdir / 'index.txt').read_text()\n assert 'spam' in result\n assert 'ham' not in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_imgconverter.py__Test_sphinx_ext_imgcon_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_imgconverter.py__Test_sphinx_ext_imgcon_", "embedding": null, "metadata": {"file_path": "tests/test_ext_imgconverter.py", "file_name": "test_ext_imgconverter.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["test_ext_imgconverter", "docstring", "imports"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.ext.imgconverter extension.\"\"\"\n\nimport os\n\nimport pytest\n\n\n@pytest.mark.sphinx('latex', testroot='ext-imgconverter')\n@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_ext_imgconverter(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'python.tex').read_text()\n\n # supported image (not converted)\n assert '\\\\sphinxincludegraphics{{img}.pdf}' in content\n\n # non supported image (converted)\n assert '\\\\sphinxincludegraphics{{svgimg}.png}' in content\n assert not (app.outdir / 'svgimg.svg').exists()\n assert (app.outdir / 'svgimg.png').exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py__Test_sphinx_ext_inheri_test_inheritance_diagram.None_23": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_inheritance_diagram.py__Test_sphinx_ext_inheri_test_inheritance_diagram.None_23", "embedding": null, "metadata": {"file_path": "tests/test_ext_inheritance_diagram.py", "file_name": "test_ext_inheritance_diagram.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 94, "span_ids": ["test_inheritance_diagram", "docstring", "imports"], "tokens": 799}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.ext.inheritance_diagram extension.\"\"\"\n\nimport os\nimport re\nimport sys\n\nimport pytest\n\nfrom sphinx.ext.inheritance_diagram import (InheritanceDiagram, InheritanceException,\n import_classes)\nfrom sphinx.util import docutils\n\n\n@pytest.mark.sphinx(buildername=\"html\", testroot=\"inheritance\")\n@pytest.mark.usefixtures('if_graphviz_found')\ndef test_inheritance_diagram(app, status, warning):\n # monkey-patch InheritaceDiagram.run() so we can get access to its\n # results.\n orig_run = InheritanceDiagram.run\n graphs = {}\n\n def new_run(self):\n result = orig_run(self)\n node = result[0]\n source = os.path.basename(node.document.current_source).replace(\".rst\", \"\")\n graphs[source] = node['graph']\n return result\n\n InheritanceDiagram.run = new_run\n\n try:\n app.builder.build_all()\n finally:\n InheritanceDiagram.run = orig_run\n\n assert app.statuscode == 0\n\n html_warnings = warning.getvalue()\n assert html_warnings == \"\"\n\n # note: it is better to split these asserts into separate test functions\n # but I can't figure out how to build only a specific .rst file\n\n # basic inheritance diagram showing all classes\n for cls in graphs['basic_diagram'].class_info:\n # use in b/c traversing order is different sometimes\n assert cls in [\n ('dummy.test.A', 'dummy.test.A', [], None),\n ('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),\n ('dummy.test.C', 'dummy.test.C', ['dummy.test.A'], None),\n ('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),\n ('dummy.test.D', 'dummy.test.D', ['dummy.test.B', 'dummy.test.C'], None),\n ('dummy.test.B', 'dummy.test.B', ['dummy.test.A'], None)\n ]\n\n # inheritance diagram using :parts: 1 option\n for cls in graphs['diagram_w_parts'].class_info:\n assert cls in [\n ('A', 'dummy.test.A', [], None),\n ('F', 'dummy.test.F', ['C'], None),\n ('C', 'dummy.test.C', ['A'], None),\n ('E', 'dummy.test.E', ['B'], None),\n ('D', 'dummy.test.D', ['B', 'C'], None),\n ('B', 'dummy.test.B', ['A'], None)\n ]\n\n # inheritance diagram with 1 top class\n # :top-classes: dummy.test.B\n # rendering should be\n # A\n # \\\n # B C\n # / \\ / \\\n # E D F\n #\n for cls in graphs['diagram_w_1_top_class'].class_info:\n assert cls in [\n ('dummy.test.A', 'dummy.test.A', [], None),\n ('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),\n ('dummy.test.C', 'dummy.test.C', ['dummy.test.A'], None),\n ('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),\n ('dummy.test.D', 'dummy.test.D', ['dummy.test.B', 'dummy.test.C'], None),\n ('dummy.test.B', 'dummy.test.B', [], None)\n ]\n\n # inheritance diagram with 2 top classes\n # :top-classes: dummy.test.B, dummy.test.C\n # Note: we're specifying separate classes, not the entire module here\n # rendering should be\n #\n # B C\n # / \\ / \\\n # E D F\n #\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py__Test_the_intersphinx_e_set_config.app.config.intersphinx_disabled_reftypes._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py__Test_the_intersphinx_e_set_config.app.config.intersphinx_disabled_reftypes._", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["reference_check", "docstring", "imports", "fake_node", "set_config"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the intersphinx extension.\"\"\"\n\nimport http.server\nimport os\nimport unittest\nfrom unittest import mock\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx import addnodes\nfrom sphinx.ext.intersphinx import (INVENTORY_FILENAME, _get_safe_url, _strip_basic_auth,\n fetch_inventory, inspect_main, load_mappings,\n missing_reference, normalize_intersphinx_mapping)\nfrom sphinx.ext.intersphinx import setup as intersphinx_setup\n\nfrom .test_util_inventory import inventory_v2, inventory_v2_not_having_version\nfrom .utils import http_server\n\n\ndef fake_node(domain, type, target, content, **attrs):\n contnode = nodes.emphasis(content, content)\n node = addnodes.pending_xref('')\n node['reftarget'] = target\n node['reftype'] = type\n node['refdomain'] = domain\n node.attributes.update(attrs)\n node += contnode\n return node, contnode\n\n\ndef reference_check(app, *args, **kwds):\n node, contnode = fake_node(*args, **kwds)\n return missing_reference(app, app.env, node, contnode)\n\n\ndef set_config(app, mapping):\n app.config.intersphinx_mapping = mapping\n app.config.intersphinx_cache_limit = 0\n app.config.intersphinx_disabled_reftypes = []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference.rn_9_test_missing_reference.None_21": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference.rn_9_test_missing_reference.None_21", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 151, "end_line": 163, "span_ids": ["test_missing_reference"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Path separator mismatch issue\")\ndef test_missing_reference(tempdir, app, status, warning):\n # ... other code\n\n rn = reference_check(app, 'py', 'mod', 'py3krelparent:module1', 'foo')\n assert rn['refuri'] == '../../py3k/foo.html#module-module1'\n\n rn = reference_check(app, 'py', 'mod', 'py3krel:module1', 'foo', refdoc='sub/dir/test')\n assert rn['refuri'] == '../../py3k/foo.html#module-module1'\n\n rn = reference_check(app, 'py', 'mod', 'py3krelparent:module1', 'foo',\n refdoc='sub/dir/test')\n assert rn['refuri'] == '../../../../py3k/foo.html#module-module1'\n\n # check refs of standard domain\n rn = reference_check(app, 'std', 'doc', 'docname', 'docname')\n assert rn['refuri'] == 'https://docs.python.org/docname.html'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_pydomain_test_missing_reference_pydomain.assert_rn_astext_A_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_pydomain_test_missing_reference_pydomain.assert_rn_astext_A_", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 166, "end_line": 203, "span_ids": ["test_missing_reference_pydomain"], "tokens": 395}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_missing_reference_pydomain(tempdir, app, status, warning):\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(inventory_v2)\n set_config(app, {\n 'https://docs.python.org/': inv_file,\n })\n\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n\n # no context data\n kwargs = {}\n node, contnode = fake_node('py', 'func', 'func', 'func()', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert rn is None\n\n # py:module context helps to search objects\n kwargs = {'py:module': 'module1'}\n node, contnode = fake_node('py', 'func', 'func', 'func()', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert rn.astext() == 'func()'\n\n # py:attr context helps to search objects\n kwargs = {'py:module': 'module1'}\n node, contnode = fake_node('py', 'attr', 'Foo.bar', 'Foo.bar', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert rn.astext() == 'Foo.bar'\n\n # term reference (normal)\n node, contnode = fake_node('std', 'term', 'a term', 'a term')\n rn = missing_reference(app, app.env, node, contnode)\n assert rn.astext() == 'a term'\n\n # term reference (case insensitive)\n node, contnode = fake_node('std', 'term', 'A TERM', 'A TERM')\n rn = missing_reference(app, app.env, node, contnode)\n assert rn.astext() == 'A TERM'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_disabled_domain_test_missing_reference_disabled_domain.case.assert__rn_func_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_disabled_domain_test_missing_reference_disabled_domain.case.assert__rn_func_", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 287, "end_line": 330, "span_ids": ["test_missing_reference_disabled_domain"], "tokens": 460}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_missing_reference_disabled_domain(tempdir, app, status, warning):\n inv_file = tempdir / 'inventory'\n inv_file.write_bytes(inventory_v2)\n set_config(app, {\n 'inv': ('https://docs.python.org/', inv_file),\n })\n\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n\n def case(*, term, doc, py):\n def assert_(rn, expected):\n if expected is None:\n assert rn is None\n else:\n assert rn.astext() == expected\n\n kwargs = {}\n\n node, contnode = fake_node('std', 'term', 'a term', 'a term', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert_(rn, 'a term' if term else None)\n\n node, contnode = fake_node('std', 'term', 'inv:a term', 'a term', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert_(rn, 'a term')\n\n node, contnode = fake_node('std', 'doc', 'docname', 'docname', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert_(rn, 'docname' if doc else None)\n\n node, contnode = fake_node('std', 'doc', 'inv:docname', 'docname', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert_(rn, 'docname')\n\n # an arbitrary ref in another domain\n node, contnode = fake_node('py', 'func', 'module1.func', 'func()', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert_(rn, 'func()' if py else None)\n\n node, contnode = fake_node('py', 'func', 'inv:module1.func', 'func()', **kwargs)\n rn = missing_reference(app, app.env, node, contnode)\n assert_(rn, 'func()')\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_disabled_domain._the_base_case_everythi_test_missing_reference_disabled_domain.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_missing_reference_disabled_domain._the_base_case_everythi_test_missing_reference_disabled_domain.None_7", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 332, "end_line": 346, "span_ids": ["test_missing_reference_disabled_domain"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_missing_reference_disabled_domain(tempdir, app, status, warning):\n\n # the base case, everything should resolve\n assert app.config.intersphinx_disabled_reftypes == []\n case(term=True, doc=True, py=True)\n\n # disabled a single ref type\n app.config.intersphinx_disabled_reftypes = ['std:doc']\n case(term=True, doc=False, py=True)\n\n # disabled a whole domain\n app.config.intersphinx_disabled_reftypes = ['std:*']\n case(term=False, doc=False, py=True)\n\n # disabled all domains\n app.config.intersphinx_disabled_reftypes = ['*']\n case(term=False, doc=False, py=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_inspect_main_url_test_inspect_main_url.assert_stderr_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_inspect_main_url_test_inspect_main_url.assert_stderr_", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 499, "end_line": 518, "span_ids": ["test_inspect_main_url.InventoryHandler.do_GET", "test_inspect_main_url", "test_inspect_main_url.InventoryHandler"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_inspect_main_url(capsys):\n \"\"\"inspect_main interface, with url argument\"\"\"\n class InventoryHandler(http.server.BaseHTTPRequestHandler):\n def do_GET(self):\n self.send_response(200, \"OK\")\n self.end_headers()\n self.wfile.write(inventory_v2)\n\n def log_message(*args, **kwargs):\n # Silenced.\n pass\n\n url = 'http://localhost:7777/' + INVENTORY_FILENAME\n\n with http_server(InventoryHandler):\n inspect_main([url])\n\n stdout, stderr = capsys.readouterr()\n assert stdout.startswith(\"c:function\\n\")\n assert stderr == \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_intersphinx_role_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_intersphinx.py_test_intersphinx_role_", "embedding": null, "metadata": {"file_path": "tests/test_ext_intersphinx.py", "file_name": "test_ext_intersphinx.py", "file_type": "text/x-python", "category": "test", "start_line": 521, "end_line": 564, "span_ids": ["test_intersphinx_role"], "tokens": 446}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-intersphinx-role')\ndef test_intersphinx_role(app, warning):\n inv_file = app.srcdir / 'inventory'\n inv_file.write_bytes(inventory_v2)\n app.config.intersphinx_mapping = {\n 'inv': ('http://example.org/', inv_file),\n }\n app.config.intersphinx_cache_limit = 0\n app.config.nitpicky = True\n\n # load the inventory and check if it's done correctly\n normalize_intersphinx_mapping(app, app.config)\n load_mappings(app)\n\n app.build()\n content = (app.outdir / 'index.html').read_text()\n wStr = warning.getvalue()\n\n html = '<a class=\"reference external\" href=\"http://example.org/{}\" title=\"(in foo v2.0)\">'\n assert html.format('foo.html#module-module1') in content\n assert html.format('foo.html#module-module2') in content\n assert \"WARNING: external py:mod reference target not found: module3\" in wStr\n assert \"WARNING: external py:mod reference target not found: module10\" in wStr\n\n assert html.format('sub/foo.html#module1.func') in content\n assert \"WARNING: external py:meth reference target not found: inv:Foo.bar\" in wStr\n\n assert \"WARNING: role for external cross-reference not found: py:nope\" in wStr\n\n # default domain\n assert html.format('index.html#std_uint8_t') in content\n assert \"WARNING: role for external cross-reference not found: nope\" in wStr\n\n # std roles without domain prefix\n assert html.format('docname.html') in content\n assert html.format('index.html#cmdoption-ls-l') in content\n\n # explicit inventory\n assert html.format('cfunc.html#CFunc') in content\n assert \"WARNING: inventory for external cross-reference not found: invNope\" in wStr\n\n # explicit title\n assert html.format('index.html#foons') in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py__Test_math_extensions__test_imgmath_png.assert_re_search_html_co": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py__Test_math_extensions__test_imgmath_png.assert_re_search_html_co", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 38, "span_ids": ["has_binary", "docstring", "imports", "test_imgmath_png"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test math extensions.\"\"\"\n\nimport re\nimport subprocess\nimport warnings\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx.ext.mathjax import MATHJAX_URL\nfrom sphinx.testing.util import assert_node\n\n\ndef has_binary(binary):\n try:\n subprocess.check_output([binary])\n except FileNotFoundError:\n return False\n except OSError:\n pass\n return True\n\n\n@pytest.mark.skipif(not has_binary('dvipng'),\n reason='Requires dvipng\" binary')\n@pytest.mark.sphinx('html', testroot='ext-math-simple',\n confoverrides = {'extensions': ['sphinx.ext.imgmath']})\ndef test_imgmath_png(app, status, warning):\n app.builder.build_all()\n if \"LaTeX command 'latex' cannot be run\" in warning.getvalue():\n raise pytest.skip.Exception('LaTeX command \"latex\" is not available')\n if \"dvipng command 'dvipng' cannot be run\" in warning.getvalue():\n raise pytest.skip.Exception('dvipng command \"dvipng\" is not available')\n\n content = (app.outdir / 'index.html').read_text()\n html = (r'<div class=\"math\">\\s*<p>\\s*<img src=\"_images/math/\\w+.png\"'\n r'\\s*alt=\"a\\^2\\+b\\^2=c\\^2\"/>\\s*</p>\\s*</div>')\n assert re.search(html, content, re.S)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax3_config_test_mathjax3_config.assert_script_window_M": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax3_config_test_mathjax3_config.assert_script_window_M", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 208, "end_line": 217, "span_ids": ["test_mathjax3_config"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax'],\n 'mathjax3_config': {'extensions': ['tex2jax.js']}})\ndef test_mathjax3_config(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n assert MATHJAX_URL in content\n assert ('<script defer=\"defer\" src=\"%s\">' % MATHJAX_URL in content)\n assert ('<script>window.MathJax = {\"extensions\": [\"tex2jax.js\"]}</script>' in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax2_config_test_mathjax2_config.assert_script_type_te": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax2_config_test_mathjax2_config.assert_script_type_te", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 220, "end_line": 230, "span_ids": ["test_mathjax2_config"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax'],\n 'mathjax2_config': {'extensions': ['tex2jax.js']}})\ndef test_mathjax2_config(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n assert ('<script async=\"async\" src=\"%s\">' % MATHJAX_URL in content)\n assert ('<script type=\"text/x-mathjax-config\">'\n 'MathJax.Hub.Config({\"extensions\": [\"tex2jax.js\"]})'\n '</script>' in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_options_async_for_mathjax3_test_mathjax_options_async_for_mathjax3.assert_script_async_a": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_options_async_for_mathjax3_test_mathjax_options_async_for_mathjax3.assert_script_async_a", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 233, "end_line": 242, "span_ids": ["test_mathjax_options_async_for_mathjax3"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax'],\n 'mathjax_options': {'async': 'async'},\n 'mathjax3_config': {'extensions': ['tex2jax.js']}})\ndef test_mathjax_options_async_for_mathjax3(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n assert MATHJAX_URL in content\n assert ('<script async=\"async\" src=\"%s\">' % MATHJAX_URL in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_options_defer_for_mathjax2_test_mathjax_options_defer_for_mathjax2.assert_script_defer_d": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_options_defer_for_mathjax2_test_mathjax_options_defer_for_mathjax2.assert_script_defer_d", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 245, "end_line": 253, "span_ids": ["test_mathjax_options_defer_for_mathjax2"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax'],\n 'mathjax_options': {'defer': 'defer'},\n 'mathjax2_config': {'extensions': ['tex2jax.js']}})\ndef test_mathjax_options_defer_for_mathjax2(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n assert ('<script defer=\"defer\" src=\"%s\">' % MATHJAX_URL in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_is_installed_only_if_document_having_math_test_mathjax_is_not_installed_if_no_equations.assert_MathJax_js_not_i": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_is_installed_only_if_document_having_math_test_mathjax_is_not_installed_if_no_equations.assert_MathJax_js_not_i", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 256, "end_line": 274, "span_ids": ["test_mathjax_is_not_installed_if_no_equations", "test_mathjax_is_installed_only_if_document_having_math"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax']})\ndef test_mathjax_is_installed_only_if_document_having_math(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n assert MATHJAX_URL in content\n\n content = (app.outdir / 'nomath.html').read_text()\n assert MATHJAX_URL not in content\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n confoverrides={'extensions': ['sphinx.ext.mathjax']})\ndef test_mathjax_is_not_installed_if_no_equations(app, status, warning):\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n assert 'MathJax.js' not in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_is_installed_if_no_equations_when_forced_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_math.py_test_mathjax_is_installed_if_no_equations_when_forced_", "embedding": null, "metadata": {"file_path": "tests/test_ext_math.py", "file_name": "test_ext_math.py", "file_type": "text/x-python", "category": "test", "start_line": 277, "end_line": 288, "span_ids": ["test_mathjax_is_installed_if_no_equations_when_forced"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='ext-math',\n confoverrides={'extensions': ['sphinx.ext.mathjax']})\ndef test_mathjax_is_installed_if_no_equations_when_forced(app, status, warning):\n app.set_html_assets_policy('always')\n app.builder.build_all()\n\n content = (app.outdir / 'index.html').read_text()\n assert MATHJAX_URL in content\n\n content = (app.outdir / 'nomath.html').read_text()\n assert MATHJAX_URL in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py__Tests_for_mod_sphinx_ProcessDocstringTest.test_modify_in_place.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon.py__Tests_for_mod_sphinx_ProcessDocstringTest.test_modify_in_place.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon.py", "file_name": "test_ext_napoleon.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 85, "span_ids": ["impl", "ProcessDocstringTest.test_modify_in_place", "SampleError.__special_undoc__", "SampleError", "docstring", "__special_doc__", "SampleClass.__special_undoc__", "SampleError.__special_doc__", "SampleClass.__decorated_func__", "SampleError._private_undoc", "_private_doc", "ProcessDocstringTest", "SampleError._private_doc", "SampleClass._private_doc", "imports", "_private_undoc", "SampleClass.__special_doc__", "SampleClass._private_undoc", "__special_undoc__", "SampleClass"], "tokens": 414}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests for :mod:`sphinx.ext.napoleon.__init__` module.\"\"\"\n\nimport sys\nfrom collections import namedtuple\nfrom unittest import TestCase, mock\n\nfrom sphinx.application import Sphinx\nfrom sphinx.ext.napoleon import Config, _process_docstring, _skip_member, setup\nfrom sphinx.testing.util import simple_decorator\n\n\ndef _private_doc():\n \"\"\"module._private_doc.DOCSTRING\"\"\"\n pass\n\n\ndef _private_undoc():\n pass\n\n\ndef __special_doc__():\n \"\"\"module.__special_doc__.DOCSTRING\"\"\"\n pass\n\n\ndef __special_undoc__():\n pass\n\n\nclass SampleClass:\n def _private_doc(self):\n \"\"\"SampleClass._private_doc.DOCSTRING\"\"\"\n pass\n\n def _private_undoc(self):\n pass\n\n def __special_doc__(self):\n \"\"\"SampleClass.__special_doc__.DOCSTRING\"\"\"\n pass\n\n def __special_undoc__(self):\n pass\n\n @simple_decorator\n def __decorated_func__(self):\n \"\"\"doc\"\"\"\n pass\n\n\nclass SampleError(Exception):\n def _private_doc(self):\n \"\"\"SampleError._private_doc.DOCSTRING\"\"\"\n pass\n\n def _private_undoc(self):\n pass\n\n def __special_doc__(self):\n \"\"\"SampleError.__special_doc__.DOCSTRING\"\"\"\n pass\n\n def __special_undoc__(self):\n pass\n\n\nSampleNamedTuple = namedtuple('SampleNamedTuple', 'user_id block_type def_id')\n\n\nclass ProcessDocstringTest(TestCase):\n def test_modify_in_place(self):\n lines = ['Summary line.',\n '',\n 'Args:',\n ' arg1: arg1 description']\n app = mock.Mock()\n app.config = Config()\n _process_docstring(app, 'class', 'SampleClass', SampleClass,\n mock.Mock(), lines)\n\n expected = ['Summary line.',\n '',\n ':param arg1: arg1 description',\n '']\n self.assertEqual(expected, lines)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py__Tests_for_mod_sphinx_if_sys_version_info_3.PEP526NumpyClass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py__Tests_for_mod_sphinx_if_sys_version_info_3.PEP526NumpyClass", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 20, "span_ids": ["impl", "docstring", "imports", "imports:11"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests for :mod:`sphinx.ext.napoleon.docstring` module.\"\"\"\n\nimport re\nimport sys\nfrom collections import namedtuple\nfrom contextlib import contextmanager\nfrom inspect import cleandoc\nfrom textwrap import dedent\nfrom unittest import TestCase, mock\n\nimport pytest\n\nfrom sphinx.ext.napoleon import Config\nfrom sphinx.ext.napoleon.docstring import (GoogleDocstring, NumpyDocstring,\n _convert_numpy_type_spec, _recombine_set_tokens,\n _token_type, _tokenize_type_spec)\n\nif sys.version_info >= (3, 6):\n from .ext_napoleon_pep526_data_google import PEP526GoogleClass\n from .ext_napoleon_pep526_data_numpy import PEP526NumpyClass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_attributes_with_class_reference_GoogleDocstringTest.test_attributes_with_class_reference.expected_5._": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_attributes_with_class_reference_GoogleDocstringTest.test_attributes_with_class_reference.expected_5._", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 448, "end_line": 476, "span_ids": ["GoogleDocstringTest.test_attributes_with_class_reference"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_attributes_with_class_reference(self):\n docstring = \"\"\"\\\nAttributes:\n in_attr(:class:`numpy.ndarray`): super-dooper attribute\n\"\"\"\n\n actual = str(GoogleDocstring(docstring))\n expected = \"\"\"\\\n.. attribute:: in_attr\n\n super-dooper attribute\n\n :type: :class:`numpy.ndarray`\n\"\"\"\n self.assertEqual(expected, actual)\n\n docstring = \"\"\"\\\nAttributes:\n in_attr(numpy.ndarray): super-dooper attribute\n\"\"\"\n\n actual = str(GoogleDocstring(docstring))\n expected = \"\"\"\\\n.. attribute:: in_attr\n\n super-dooper attribute\n\n :type: numpy.ndarray\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_attributes_with_use_ivar_GoogleDocstringTest.test_colon_in_return_type.self_assertEqual_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_docstring.py_GoogleDocstringTest.test_attributes_with_use_ivar_GoogleDocstringTest.test_colon_in_return_type.self_assertEqual_expected", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_docstring.py", "file_name": "test_ext_napoleon_docstring.py", "file_type": "text/x-python", "category": "test", "start_line": 478, "end_line": 529, "span_ids": ["GoogleDocstringTest.test_attributes_with_use_ivar", "GoogleDocstringTest.test_code_block_in_returns_section", "GoogleDocstringTest.test_colon_in_return_type"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GoogleDocstringTest(BaseDocstringTest):\n\n def test_attributes_with_use_ivar(self):\n docstring = \"\"\"\\\nAttributes:\n foo (int): blah blah\n bar (str): blah blah\n\"\"\"\n\n config = Config(napoleon_use_ivar=True)\n actual = str(GoogleDocstring(docstring, config, obj=self.__class__))\n expected = \"\"\"\\\n:ivar foo: blah blah\n:vartype foo: int\n:ivar bar: blah blah\n:vartype bar: str\n\"\"\"\n self.assertEqual(expected, actual)\n\n def test_code_block_in_returns_section(self):\n docstring = \"\"\"\nReturns:\n foobar: foo::\n\n codecode\n codecode\n\"\"\"\n expected = \"\"\"\n:returns:\n\n foo::\n\n codecode\n codecode\n:rtype: foobar\n\"\"\"\n actual = str(GoogleDocstring(docstring))\n self.assertEqual(expected, actual)\n\n def test_colon_in_return_type(self):\n docstring = \"\"\"Example property.\n\nReturns:\n :py:class:`~.module.submodule.SomeClass`: an example instance\n if available, None if not available.\n\"\"\"\n expected = \"\"\"Example property.\n\n:returns: an example instance\n if available, None if not available.\n:rtype: :py:class:`~.module.submodule.SomeClass`\n\"\"\"\n actual = str(GoogleDocstring(docstring))\n self.assertEqual(expected, actual)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py__Tests_for_mod_sphinx_BaseIteratorsTest.assertTrueTwice.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_napoleon_iterators.py__Tests_for_mod_sphinx_BaseIteratorsTest.assertTrueTwice.None_1", "embedding": null, "metadata": {"file_path": "tests/test_ext_napoleon_iterators.py", "file_name": "test_ext_napoleon_iterators.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 36, "span_ids": ["BaseIteratorsTest.assertNext", "BaseIteratorsTest.assertRaisesTwice", "BaseIteratorsTest.assertTrueTwice", "docstring", "BaseIteratorsTest.assertEqualTwice", "BaseIteratorsTest.assertFalseTwice", "imports", "BaseIteratorsTest"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests for :mod:`sphinx.ext.napoleon.iterators` module.\"\"\"\n\nfrom unittest import TestCase\n\nfrom sphinx.ext.napoleon.iterators import modify_iter, peek_iter\n\n\nclass BaseIteratorsTest(TestCase):\n def assertEqualTwice(self, expected, func, *args):\n self.assertEqual(expected, func(*args))\n self.assertEqual(expected, func(*args))\n\n def assertFalseTwice(self, func, *args):\n self.assertFalse(func(*args))\n self.assertFalse(func(*args))\n\n def assertNext(self, it, expected, is_last):\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(expected, it.peek)\n self.assertTrueTwice(it.has_next)\n self.assertEqualTwice(expected, it.peek)\n self.assertTrueTwice(it.has_next)\n self.assertEqual(expected, next(it))\n if is_last:\n self.assertFalseTwice(it.has_next)\n self.assertRaisesTwice(StopIteration, it.next)\n else:\n self.assertTrueTwice(it.has_next)\n\n def assertRaisesTwice(self, exc, func, *args):\n self.assertRaises(exc, func, *args)\n self.assertRaises(exc, func, *args)\n\n def assertTrueTwice(self, func, *args):\n self.assertTrue(func(*args))\n self.assertTrue(func(*args))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_todo.py__Test_sphinx_ext_todo_e_test_todo.assert_todo_1_astext_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_todo.py__Test_sphinx_ext_todo_e_test_todo.assert_todo_1_astext_", "embedding": null, "metadata": {"file_path": "tests/test_ext_todo.py", "file_name": "test_ext_todo.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 43, "span_ids": ["test_todo", "docstring", "imports"], "tokens": 352}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.ext.todo extension.\"\"\"\n\nimport re\n\nimport pytest\n\n\n@pytest.mark.sphinx('html', testroot='ext-todo', freshenv=True,\n confoverrides={'todo_include_todos': True, 'todo_emit_warnings': True})\ndef test_todo(app, status, warning):\n todos = []\n\n def on_todo_defined(app, node):\n todos.append(node)\n\n app.connect('todo-defined', on_todo_defined)\n app.builder.build_all()\n\n # check todolist\n content = (app.outdir / 'index.html').read_text()\n assert ('<p class=\"admonition-title\">Todo</p>\\n'\n '<p>todo in foo</p>') in content\n\n assert ('<p class=\"admonition-title\">Todo</p>\\n'\n '<p>todo in bar</p>') in content\n\n # check todo\n content = (app.outdir / 'foo.html').read_text()\n assert ('<p class=\"admonition-title\">Todo</p>\\n'\n '<p>todo in foo</p>') in content\n\n assert ('<p class=\"admonition-title\">Todo</p>\\n'\n '<p>todo in param field</p>') in content\n\n # check emitted warnings\n assert 'WARNING: TODO entry found: todo in foo' in warning.getvalue()\n assert 'WARNING: TODO entry found: todo in bar' in warning.getvalue()\n\n # check handled event\n assert len(todos) == 3\n assert {todo[1].astext() for todo in todos} == {'todo in foo',\n 'todo in bar',\n 'todo in param field'}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py__Test_sphinx_ext_viewco_test_viewcode.assert_div_class_view": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_ext_viewcode.py__Test_sphinx_ext_viewco_test_viewcode.assert_div_class_view", "embedding": null, "metadata": {"file_path": "tests/test_ext_viewcode.py", "file_name": "test_ext_viewcode.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 41, "span_ids": ["test_viewcode", "docstring", "imports"], "tokens": 467}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.ext.viewcode extension.\"\"\"\n\nimport re\n\nimport pytest\n\n\n@pytest.mark.sphinx(testroot='ext-viewcode')\ndef test_viewcode(app, status, warning):\n app.builder.build_all()\n\n warnings = re.sub(r'\\\\+', '/', warning.getvalue())\n assert re.findall(\n r\"index.rst:\\d+: WARNING: Object named 'func1' not found in include \" +\n r\"file .*/spam/__init__.py'\",\n warnings\n )\n\n result = (app.outdir / 'index.html').read_text()\n assert result.count('href=\"_modules/spam/mod1.html#func1\"') == 2\n assert result.count('href=\"_modules/spam/mod2.html#func2\"') == 2\n assert result.count('href=\"_modules/spam/mod1.html#Class1\"') == 2\n assert result.count('href=\"_modules/spam/mod2.html#Class2\"') == 2\n assert result.count('@decorator') == 1\n\n # test that the class attribute is correctly documented\n assert result.count('this is Class3') == 2\n assert 'this is the class attribute class_attr' in result\n # the next assert fails, until the autodoc bug gets fixed\n assert result.count('this is the class attribute class_attr') == 2\n\n result = (app.outdir / '_modules/spam/mod1.html').read_text()\n result = re.sub('<span class=\".*?\">', '<span>', result) # filter pygments classes\n assert ('<div class=\"viewcode-block\" id=\"Class1\"><a class=\"viewcode-back\" '\n 'href=\"../../index.html#spam.Class1\">[docs]</a>'\n '<span>@decorator</span>\\n'\n '<span>class</span> <span>Class1</span>'\n '<span>(</span><span>object</span><span>):</span>\\n'\n ' <span>"""</span>\\n'\n '<span> this is Class1</span>\\n'\n '<span> """</span></div>\\n') in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_extension.py__Test_sphinx_extension__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_extension.py__Test_sphinx_extension__", "embedding": null, "metadata": {"file_path": "tests/test_extension.py", "file_name": "test_extension.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 24, "span_ids": ["test_needs_extensions", "docstring", "imports"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.extension module.\"\"\"\n\nimport pytest\n\nfrom sphinx.errors import VersionRequirementError\nfrom sphinx.extension import Extension, verify_needs_extensions\n\n\ndef test_needs_extensions(app):\n # empty needs_extensions\n assert app.config.needs_extensions == {}\n verify_needs_extensions(app, app.config)\n\n # needs_extensions fulfilled\n app.config.needs_extensions = {'test.extension': '3.9'}\n app.extensions['test.extension'] = Extension('test.extension', 'test.extension', version='3.10')\n verify_needs_extensions(app, app.config)\n\n # needs_extensions not fulfilled\n app.config.needs_extensions = {'test.extension': '3.11'}\n app.extensions['test.extension'] = Extension('test.extension', 'test.extension', version='3.10')\n with pytest.raises(VersionRequirementError):\n verify_needs_extensions(app, app.config)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_highlighting.py__Test_the_Pygments_high_test_set_formatter.try_.finally_.PygmentsBridge.html_formatter.HtmlFormatter": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_highlighting.py__Test_the_Pygments_high_test_set_formatter.try_.finally_.PygmentsBridge.html_formatter.HtmlFormatter", "embedding": null, "metadata": {"file_path": "tests/test_highlighting.py", "file_name": "test_highlighting.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 68, "span_ids": ["test_set_formatter", "MyFormatter.format", "docstring", "MyFormatter", "test_add_lexer", "MyLexer", "imports", "test_detect_interactive", "ComplainOnUnhighlighted", "ComplainOnUnhighlighted.unhighlighted", "test_lexer_options"], "tokens": 387}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the Pygments highlighting bridge.\"\"\"\n\nfrom unittest import mock\n\nfrom pygments.formatters.html import HtmlFormatter\nfrom pygments.lexer import RegexLexer\nfrom pygments.token import Name, Text\n\nfrom sphinx.highlighting import PygmentsBridge\n\n\nclass MyLexer(RegexLexer):\n name = 'testlexer'\n\n tokens = {\n 'root': [\n ('a', Name),\n ('b', Text),\n ],\n }\n\n\nclass MyFormatter(HtmlFormatter):\n def format(self, tokensource, outfile):\n for tok in tokensource:\n outfile.write(tok[1])\n\n\nclass ComplainOnUnhighlighted(PygmentsBridge):\n def unhighlighted(self, source):\n raise AssertionError(\"should highlight %r\" % source)\n\n\ndef test_add_lexer(app, status, warning):\n app.add_lexer('test', MyLexer)\n\n bridge = PygmentsBridge('html')\n ret = bridge.highlight_block('ab', 'test')\n assert '<span class=\"n\">a</span>b' in ret\n\n\ndef test_detect_interactive():\n bridge = ComplainOnUnhighlighted('html')\n blocks = [\n \"\"\"\n >>> testing()\n True\n \"\"\",\n ]\n for block in blocks:\n ret = bridge.highlight_block(block.lstrip(), 'python')\n assert ret.startswith(\"<div class=\\\"highlight\\\">\")\n\n\ndef test_lexer_options():\n bridge = PygmentsBridge('html')\n ret = bridge.highlight_block('//comment', 'php', opts={'startinline': True})\n assert '<span class=\"c1\">//comment</span>' in ret\n\n\ndef test_set_formatter():\n PygmentsBridge.html_formatter = MyFormatter\n try:\n bridge = PygmentsBridge('html')\n ret = bridge.highlight_block('foo\\n', 'python')\n assert ret == 'foo\\n'\n finally:\n PygmentsBridge.html_formatter = HtmlFormatter", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py__Test_message_patching__write_mo.with_pathname_open_wb_.return.mofile_write_mo_f_po_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py__Test_message_patching__write_mo.with_pathname_open_wb_.return.mofile_write_mo_f_po_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 38, "span_ids": ["impl", "docstring", "read_po", "imports", "write_mo"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test message patching for internationalization purposes.\n\nRuns the text builder in the test root.\n\"\"\"\n\nimport os\nimport re\n\nimport pygments\nimport pytest\nfrom babel.messages import mofile, pofile\nfrom babel.messages.catalog import Catalog\nfrom docutils import nodes\n\nfrom sphinx import locale\nfrom sphinx.testing.util import (assert_node, assert_not_re_search, assert_re_search,\n assert_startswith, etree_parse, path, strip_escseq)\nfrom sphinx.util import docutils\n\nsphinx_intl = pytest.mark.sphinx(\n testroot='intl',\n confoverrides={\n 'language': 'xx', 'locale_dirs': ['.'],\n 'gettext_compact': False,\n },\n)\n\npygments_version = tuple(int(v) for v in pygments.__version__.split('.'))\n\n\ndef read_po(pathname):\n with pathname.open() as f:\n return pofile.read_po(f)\n\n\ndef write_mo(pathname, po):\n with pathname.open('wb') as f:\n return mofile.write_mo(f, po)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_setup_intl_setup_intl.for_dirpath__dirs_files.for_f_in_f_for_f_in_file.if_not_mo_exists_or_mo_.write_mo_mo_read_po_po_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_setup_intl_setup_intl.for_dirpath__dirs_files.for_f_in_f_for_f_in_file.if_not_mo_exists_or_mo_.write_mo_mo_read_po_po_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 41, "end_line": 55, "span_ids": ["setup_intl"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(autouse=True)\ndef setup_intl(app_params):\n srcdir = path(app_params.kwargs['srcdir'])\n for dirpath, _dirs, files in os.walk(srcdir):\n dirpath = path(dirpath)\n for f in [f for f in files if f.endswith('.po')]:\n po = dirpath / f\n mo = srcdir / 'xx' / 'LC_MESSAGES' / (\n os.path.relpath(po[:-3], srcdir) + '.mo')\n if not mo.parent.exists():\n mo.parent.makedirs()\n\n if not mo.exists() or mo.stat().st_mtime < po.stat().st_mtime:\n # compile .mo file only if needed\n write_mo(mo, read_po(po))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_noqa_test_noqa.assert_next_section_not": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_noqa_test_noqa.assert_next_section_not", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 189, "end_line": 212, "span_ids": ["test_noqa"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('text')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_noqa(app, warning):\n app.build()\n result = (app.outdir / 'noqa.txt').read_text()\n expect = r\"\"\"FIRST SECTION\n*************\n\nTRANSLATED TEXT WITHOUT REFERENCE.\n\nTEST noqa WHITESPACE INSENSITIVITY.\n\n\"#noqa\" IS ESCAPED AT THE END OF THIS STRING. #noqa\n\n\nNEXT SECTION WITH PARAGRAPH TO TEST BARE noqa\n*********************************************\n\nSome text, again referring to the section: NEXT SECTION WITH PARAGRAPH\nTO TEST BARE noqa.\n\"\"\"\n assert result == expect\n assert \"next-section\" not in getwarning(warning)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_additional_targets_should_not_be_translated_test_additional_targets_should_not_be_translated.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_additional_targets_should_not_be_translated_test_additional_targets_should_not_be_translated.None_8", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 1081, "end_line": 1148, "span_ids": ["test_additional_targets_should_not_be_translated"], "tokens": 729}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@sphinx_intl\n@pytest.mark.sphinx('html')\n@pytest.mark.test_params(shared_result='test_intl_basic')\ndef test_additional_targets_should_not_be_translated(app):\n app.build()\n # [literalblock.txt]\n result = (app.outdir / 'literalblock.html').read_text()\n\n # title should be translated\n expected_expr = 'CODE-BLOCKS'\n assert_count(expected_expr, result, 2)\n\n # ruby code block should not be translated but be highlighted\n expected_expr = \"\"\"<span class=\"s1\">'result'</span>\"\"\"\n assert_count(expected_expr, result, 1)\n\n # C code block without lang should not be translated and *ruby* highlighted\n expected_expr = \"\"\"<span class=\"c1\">#include <stdlib.h></span>\"\"\"\n assert_count(expected_expr, result, 1)\n\n # C code block with lang should not be translated but be *C* highlighted\n if pygments_version < (2, 10, 0):\n expected_expr = (\"\"\"<span class=\"cp\">#include</span> \"\"\"\n \"\"\"<span class=\"cpf\"><stdio.h></span>\"\"\")\n else:\n expected_expr = (\"\"\"<span class=\"cp\">#include</span>\"\"\"\n \"\"\"<span class=\"w\"> </span>\"\"\"\n \"\"\"<span class=\"cpf\"><stdio.h></span>\"\"\")\n assert_count(expected_expr, result, 1)\n\n # literal block in list item should not be translated\n expected_expr = (\"\"\"<span class=\"n\">literal</span>\"\"\"\n \"\"\"<span class=\"o\">-</span>\"\"\"\n \"\"\"<span class=\"n\">block</span>\\n\"\"\"\n \"\"\"<span class=\"k\">in</span> \"\"\"\n \"\"\"<span class=\"n\">list</span>\"\"\")\n assert_count(expected_expr, result, 1)\n\n # doctest block should not be translated but be highlighted\n expected_expr = (\n \"\"\"<span class=\"gp\">>>> </span>\"\"\"\n \"\"\"<span class=\"kn\">import</span> <span class=\"nn\">sys</span> \"\"\"\n \"\"\"<span class=\"c1\"># sys importing</span>\"\"\")\n assert_count(expected_expr, result, 1)\n\n # [raw.txt]\n\n result = (app.outdir / 'raw.html').read_text()\n\n # raw block should not be translated\n if docutils.__version_info__ < (0, 17):\n expected_expr = \"\"\"<iframe src=\"http://sphinx-doc.org\"></iframe></div>\"\"\"\n assert_count(expected_expr, result, 1)\n else:\n expected_expr = \"\"\"<iframe src=\"http://sphinx-doc.org\"></iframe></section>\"\"\"\n assert_count(expected_expr, result, 1)\n\n # [figure.txt]\n\n result = (app.outdir / 'figure.html').read_text()\n\n # src for image block should not be translated (alt is translated)\n expected_expr = \"\"\"<img alt=\"I18N -> IMG\" src=\"_images/i18n.png\" />\"\"\"\n assert_count(expected_expr, result, 1)\n\n # src for figure block should not be translated (alt is translated)\n expected_expr = \"\"\"<img alt=\"IMG -> I18N\" src=\"_images/img.png\" />\"\"\"\n assert_count(expected_expr, result, 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_getwarning_test_gettext_allow_fuzzy_translations.assert_FEATURES_in_cont": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_getwarning_test_gettext_allow_fuzzy_translations.assert_FEATURES_in_cont", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 1339, "end_line": 1359, "span_ids": ["test_gettext_allow_fuzzy_translations", "getwarning"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getwarning(warnings):\n return strip_escseq(warnings.getvalue().replace(os.sep, '/'))\n\n\n@pytest.mark.sphinx('html', testroot='basic',\n srcdir='gettext_allow_fuzzy_translations',\n confoverrides={\n 'language': 'de',\n 'gettext_allow_fuzzy_translations': True\n })\ndef test_gettext_allow_fuzzy_translations(app):\n locale_dir = app.srcdir / 'locales' / 'de' / 'LC_MESSAGES'\n locale_dir.makedirs()\n with (locale_dir / 'index.po').open('wb') as f:\n catalog = Catalog()\n catalog.add('features', 'FEATURES', flags=('fuzzy',))\n pofile.write_po(f, catalog)\n\n app.build()\n content = (app.outdir / 'index.html').read_text()\n assert 'FEATURES' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_disallow_fuzzy_translations_test_gettext_disallow_fuzzy_translations.assert_FEATURES_not_in_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_gettext_disallow_fuzzy_translations_test_gettext_disallow_fuzzy_translations.assert_FEATURES_not_in_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 1362, "end_line": 1378, "span_ids": ["test_gettext_disallow_fuzzy_translations"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='basic',\n srcdir='gettext_disallow_fuzzy_translations',\n confoverrides={\n 'language': 'de',\n 'gettext_allow_fuzzy_translations': False\n })\ndef test_gettext_disallow_fuzzy_translations(app):\n locale_dir = app.srcdir / 'locales' / 'de' / 'LC_MESSAGES'\n locale_dir.makedirs()\n with (locale_dir / 'index.po').open('wb') as f:\n catalog = Catalog()\n catalog.add('features', 'FEATURES', flags=('fuzzy',))\n pofile.write_po(f, catalog)\n\n app.build()\n content = (app.outdir / 'index.html').read_text()\n assert 'FEATURES' not in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_customize_system_message_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_intl.py_test_customize_system_message_", "embedding": null, "metadata": {"file_path": "tests/test_intl.py", "file_name": "test_intl.py", "file_type": "text/x-python", "category": "test", "start_line": 1381, "end_line": 1406, "span_ids": ["test_customize_system_message"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='basic', confoverrides={'language': 'de'})\ndef test_customize_system_message(make_app, app_params, sphinx_test_tempdir):\n try:\n # clear translators cache\n locale.translators.clear()\n\n # prepare message catalog (.po)\n locale_dir = sphinx_test_tempdir / 'basic' / 'locales' / 'de' / 'LC_MESSAGES'\n locale_dir.makedirs()\n with (locale_dir / 'sphinx.po').open('wb') as f:\n catalog = Catalog()\n catalog.add('Quick search', 'QUICK SEARCH')\n pofile.write_po(f, catalog)\n\n # construct application and convert po file to .mo\n args, kwargs = app_params\n app = make_app(*args, **kwargs)\n assert (locale_dir / 'sphinx.mo').exists()\n assert app.translator.gettext('Quick search') == 'QUICK SEARCH'\n\n app.build()\n content = (app.outdir / 'index.html').read_text()\n assert 'QUICK SEARCH' in content\n finally:\n locale.translators.clear()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_locale.py__Test_locale__test_init.None_11": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_locale.py__Test_locale__test_init.None_11", "embedding": null, "metadata": {"file_path": "tests/test_locale.py", "file_name": "test_locale.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["docstring", "imports", "test_init", "cleanup_translations"], "tokens": 347}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test locale.\"\"\"\n\nimport pytest\n\nfrom sphinx import locale\n\n\n@pytest.fixture(autouse=True)\ndef cleanup_translations():\n yield\n locale.translators.clear()\n\n\ndef test_init(rootdir):\n # not initialized yet\n _ = locale.get_translation('myext')\n assert _('Hello world') == 'Hello world'\n assert _('Hello sphinx') == 'Hello sphinx'\n assert _('Hello reST') == 'Hello reST'\n\n # load locale1\n locale.init([rootdir / 'test-locale' / 'locale1'], 'en', 'myext')\n _ = locale.get_translation('myext')\n assert _('Hello world') == 'HELLO WORLD'\n assert _('Hello sphinx') == 'Hello sphinx'\n assert _('Hello reST') == 'Hello reST'\n\n # load a catalog to unrelated namespace\n locale.init([rootdir / 'test-locale' / 'locale2'], 'en', 'myext', 'mynamespace')\n _ = locale.get_translation('myext')\n assert _('Hello world') == 'HELLO WORLD'\n assert _('Hello sphinx') == 'Hello sphinx' # nothing changed here\n assert _('Hello reST') == 'Hello reST'\n\n # load locale2 in addition\n locale.init([rootdir / 'test-locale' / 'locale2'], 'en', 'myext')\n _ = locale.get_translation('myext')\n assert _('Hello world') == 'HELLO WORLD'\n assert _('Hello sphinx') == 'HELLO SPHINX'\n assert _('Hello reST') == 'Hello reST'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py__Test_various_Sphinx_sp_verify_re_html.return.verify": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_markup.py__Test_various_Sphinx_sp_verify_re_html.return.verify", "embedding": null, "metadata": {"file_path": "tests/test_markup.py", "file_name": "test_markup.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 96, "span_ids": ["ForgivingTranslator.visit_pending_xref", "ForgivingTranslator", "docstring", "verify_re_html", "inliner", "new_document", "ForgivingLaTeXTranslator", "imports", "settings", "parse", "ForgivingHTMLTranslator", "ForgivingTranslator.depart_pending_xref"], "tokens": 606}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test various Sphinx-specific markup extensions.\"\"\"\n\nimport re\n\nimport pytest\nfrom docutils import frontend, nodes, utils\nfrom docutils.parsers.rst import Parser as RstParser\n\nfrom sphinx import addnodes\nfrom sphinx.builders.html.transforms import KeyboardTransform\nfrom sphinx.builders.latex import LaTeXBuilder\nfrom sphinx.environment import default_settings\nfrom sphinx.roles import XRefRole\nfrom sphinx.testing.util import Struct, assert_node\nfrom sphinx.transforms import SphinxSmartQuotes\nfrom sphinx.util import docutils, texescape\nfrom sphinx.util.docutils import sphinx_domains\nfrom sphinx.writers.html import HTMLTranslator, HTMLWriter\nfrom sphinx.writers.latex import LaTeXTranslator, LaTeXWriter\n\n\n@pytest.fixture\ndef settings(app):\n texescape.init() # otherwise done by the latex builder\n optparser = frontend.OptionParser(\n components=(RstParser, HTMLWriter, LaTeXWriter),\n defaults=default_settings)\n settings = optparser.get_default_values()\n settings.smart_quotes = True\n settings.env = app.builder.env\n settings.env.temp_data['docname'] = 'dummy'\n settings.contentsname = 'dummy'\n domain_context = sphinx_domains(settings.env)\n domain_context.enable()\n yield settings\n domain_context.disable()\n\n\n@pytest.fixture\ndef new_document(settings):\n def create():\n document = utils.new_document('test data', settings)\n document['file'] = 'dummy'\n return document\n\n return create\n\n\n@pytest.fixture\ndef inliner(new_document):\n document = new_document()\n document.reporter.get_source_and_line = lambda line=1: ('dummy.rst', line)\n return Struct(document=document, reporter=document.reporter)\n\n\n@pytest.fixture\ndef parse(new_document):\n def parse_(rst):\n document = new_document()\n parser = RstParser()\n parser.parse(rst, document)\n SphinxSmartQuotes(document, startnode=None).apply()\n for msg in list(document.findall(nodes.system_message)):\n if msg['level'] == 1:\n msg.replace_self([])\n return document\n return parse_\n\n\n# since we're not resolving the markup afterwards, these nodes may remain\nclass ForgivingTranslator:\n def visit_pending_xref(self, node):\n pass\n\n def depart_pending_xref(self, node):\n pass\n\n\nclass ForgivingHTMLTranslator(HTMLTranslator, ForgivingTranslator):\n pass\n\n\nclass ForgivingLaTeXTranslator(LaTeXTranslator, ForgivingTranslator):\n pass\n\n\n@pytest.fixture\ndef verify_re_html(app, parse):\n def verify(rst, html_expected):\n document = parse(rst)\n KeyboardTransform(document).apply()\n html_translator = ForgivingHTMLTranslator(document, app.builder)\n document.walkabout(html_translator)\n html_translated = ''.join(html_translator.fragment).strip()\n assert re.match(html_expected, html_translated), 'from ' + rst\n return verify", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_metadata.py__Test_our_handling_of_m_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_metadata.py__Test_our_handling_of_m_", "embedding": null, "metadata": {"file_path": "tests/test_metadata.py", "file_name": "test_metadata.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 44, "span_ids": ["docstring", "imports", "test_docinfo"], "tokens": 456}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test our handling of metadata in files with bibliographic metadata.\"\"\"\n\n# adapted from an example of bibliographic metadata at\n# https://docutils.sourceforge.io/docs/user/rst/demo.txt\n\nimport pytest\n\n\n@pytest.mark.sphinx('dummy', testroot='metadata')\ndef test_docinfo(app, status, warning):\n \"\"\"\n Inspect the 'docinfo' metadata stored in the first node of the document.\n Note this doesn't give us access to data stored in subsequence blocks\n that might be considered document metadata, such as 'abstract' or\n 'dedication' blocks, or the 'meta' role. Doing otherwise is probably more\n messing with the internals of sphinx than this rare use case merits.\n \"\"\"\n app.build()\n expecteddocinfo = {\n 'author': 'David Goodger',\n 'authors': ['Me', 'Myself', 'I'],\n 'address': '123 Example Street\\nExample, EX Canada\\nA1B 2C3',\n 'field name': 'This is a generic bibliographic field.',\n 'field name 2': ('Generic bibliographic fields may contain multiple '\n 'body elements.\\n\\nLike this.'),\n 'status': 'This is a \u201cwork in progress\u201d',\n 'version': '1',\n 'copyright': ('This document has been placed in the public domain. '\n 'You\\nmay do with it as you wish. You may copy, modify,'\n '\\nredistribute, reattribute, sell, buy, rent, lease,\\n'\n 'destroy, or improve it, quote it at length, excerpt,\\n'\n 'incorporate, collate, fold, staple, or mutilate it, or '\n 'do\\nanything else to it that your or anyone else\u2019s '\n 'heart\\ndesires.'),\n 'contact': 'goodger@python.org',\n 'date': '2006-05-21',\n 'organization': 'humankind',\n 'revision': '4564',\n 'tocdepth': 1,\n 'orphan': '',\n 'nocomments': '',\n }\n assert app.env.metadata['index'] == expecteddocinfo", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_parser.py__Tests_parsers_module__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_parser.py__Tests_parsers_module__", "embedding": null, "metadata": {"file_path": "tests/test_parser.py", "file_name": "test_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 58, "span_ids": ["docstring", "imports", "test_RSTParser_prolog_epilog"], "tokens": 585}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests parsers module.\"\"\"\n\nfrom unittest.mock import Mock, patch\n\nimport pytest\n\nfrom sphinx.parsers import RSTParser\nfrom sphinx.util.docutils import new_document\n\n\n@pytest.mark.sphinx(testroot='basic')\n@patch('docutils.parsers.rst.states.RSTStateMachine')\ndef test_RSTParser_prolog_epilog(RSTStateMachine, app):\n document = new_document('dummy.rst')\n document.settings = Mock(tab_width=8, language_code='')\n parser = RSTParser()\n parser.set_application(app)\n\n # normal case\n text = ('hello Sphinx world\\n'\n 'Sphinx is a document generator')\n parser.parse(text, document)\n (content, _), _ = RSTStateMachine().run.call_args\n\n assert list(content.xitems()) == [('dummy.rst', 0, 'hello Sphinx world'),\n ('dummy.rst', 1, 'Sphinx is a document generator')]\n\n # with rst_prolog\n app.env.config.rst_prolog = 'this is rst_prolog\\nhello reST!'\n parser.parse(text, document)\n (content, _), _ = RSTStateMachine().run.call_args\n assert list(content.xitems()) == [('<rst_prolog>', 0, 'this is rst_prolog'),\n ('<rst_prolog>', 1, 'hello reST!'),\n ('<generated>', 0, ''),\n ('dummy.rst', 0, 'hello Sphinx world'),\n ('dummy.rst', 1, 'Sphinx is a document generator')]\n\n # with rst_epilog\n app.env.config.rst_prolog = None\n app.env.config.rst_epilog = 'this is rst_epilog\\ngood-bye reST!'\n parser.parse(text, document)\n (content, _), _ = RSTStateMachine().run.call_args\n assert list(content.xitems()) == [('dummy.rst', 0, 'hello Sphinx world'),\n ('dummy.rst', 1, 'Sphinx is a document generator'),\n ('dummy.rst', 2, ''),\n ('<rst_epilog>', 0, 'this is rst_epilog'),\n ('<rst_epilog>', 1, 'good-bye reST!')]\n\n # expandtabs / convert whitespaces\n app.env.config.rst_prolog = None\n app.env.config.rst_epilog = None\n text = ('\\thello Sphinx world\\n'\n '\\v\\fSphinx is a document generator')\n parser.parse(text, document)\n (content, _), _ = RSTStateMachine().run.call_args\n assert list(content.xitems()) == [('dummy.rst', 0, ' hello Sphinx world'),\n ('dummy.rst', 1, ' Sphinx is a document generator')]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_project.py__Tests_project_module__test_project_discover.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_project.py__Tests_project_module__test_project_discover.None_6", "embedding": null, "metadata": {"file_path": "tests/test_project.py", "file_name": "test_project.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 42, "span_ids": ["docstring", "imports", "test_project_discover"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests project module.\"\"\"\n\nfrom collections import OrderedDict\n\nimport pytest\n\nfrom sphinx.project import Project\n\n\ndef test_project_discover(rootdir):\n project = Project(rootdir / 'test-root', {})\n\n docnames = {'autodoc', 'bom', 'extapi', 'extensions', 'footnote', 'images',\n 'includes', 'index', 'lists', 'markup', 'math', 'objects',\n 'subdir/excluded', 'subdir/images', 'subdir/includes'}\n subdir_docnames = {'subdir/excluded', 'subdir/images', 'subdir/includes'}\n\n # basic case\n project.source_suffix = ['.txt']\n assert project.discover() == docnames\n\n # exclude_paths option\n assert project.discover(['subdir/*']) == docnames - subdir_docnames\n\n # exclude_patterns\n assert project.discover(['.txt', 'subdir/*']) == docnames - subdir_docnames\n\n # multiple source_suffixes\n project.source_suffix = ['.txt', '.foo']\n assert project.discover() == docnames | {'otherext'}\n\n # complicated source_suffix\n project.source_suffix = ['.foo.png']\n assert project.discover() == {'img'}\n\n # templates_path\n project.source_suffix = ['.html']\n assert project.discover() == {'_templates/layout',\n '_templates/customsb',\n '_templates/contentssb'}\n\n assert project.discover(['_templates']) == set()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py__Test_pycode__test_ModuleAnalyzer_for_file.assert_analyzer_srcname_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py__Test_pycode__test_ModuleAnalyzer_for_file.assert_analyzer_srcname_", "embedding": null, "metadata": {"file_path": "tests/test_pycode.py", "file_name": "test_pycode.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 34, "span_ids": ["impl", "docstring", "test_ModuleAnalyzer_get_module_source", "imports", "test_ModuleAnalyzer_for_file", "test_ModuleAnalyzer_for_string"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test pycode.\"\"\"\n\nimport os\nimport sys\n\nimport pytest\n\nimport sphinx\nfrom sphinx.errors import PycodeError\nfrom sphinx.pycode import ModuleAnalyzer\n\nSPHINX_MODULE_PATH = os.path.splitext(sphinx.__file__)[0] + '.py'\n\n\ndef test_ModuleAnalyzer_get_module_source():\n assert ModuleAnalyzer.get_module_source('sphinx') == (sphinx.__file__, sphinx.__loader__.get_source('sphinx'))\n\n # failed to obtain source information from builtin modules\n with pytest.raises(PycodeError):\n ModuleAnalyzer.get_module_source('builtins')\n with pytest.raises(PycodeError):\n ModuleAnalyzer.get_module_source('itertools')\n\n\ndef test_ModuleAnalyzer_for_string():\n analyzer = ModuleAnalyzer.for_string('print(\"Hello world\")', 'module_name')\n assert analyzer.modname == 'module_name'\n assert analyzer.srcname == '<string>'\n\n\ndef test_ModuleAnalyzer_for_file():\n analyzer = ModuleAnalyzer.for_string(SPHINX_MODULE_PATH, 'sphinx')\n assert analyzer.modname == 'sphinx'\n assert analyzer.srcname == '<string>'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_find_attr_docs_test_ModuleAnalyzer_find_attr_docs.assert_analyzer_tagorder_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_find_attr_docs_test_ModuleAnalyzer_find_attr_docs.assert_analyzer_tagorder_", "embedding": null, "metadata": {"file_path": "tests/test_pycode.py", "file_name": "test_pycode.py", "file_type": "text/x-python", "category": "test", "start_line": 122, "end_line": 185, "span_ids": ["test_ModuleAnalyzer_find_attr_docs"], "tokens": 752}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ModuleAnalyzer_find_attr_docs():\n code = ('class Foo(object):\\n'\n ' \"\"\"class Foo!\"\"\"\\n'\n ' #: comment before attr1\\n'\n ' attr1 = None\\n'\n ' attr2 = None # attribute comment for attr2 (without colon)\\n'\n ' attr3 = None #: attribute comment for attr3\\n'\n ' attr4 = None #: long attribute comment\\n'\n ' #: for attr4\\n'\n ' #: comment before attr5\\n'\n ' attr5 = None #: attribute comment for attr5\\n'\n ' attr6, attr7 = 1, 2 #: this comment is ignored\\n'\n '\\n'\n ' def __init__(self):\\n'\n ' self.attr8 = None #: first attribute comment (ignored)\\n'\n ' self.attr8 = None #: attribute comment for attr8\\n'\n ' #: comment before attr9\\n'\n ' self.attr9 = None #: comment after attr9\\n'\n ' \"string after attr9\"\\n'\n '\\n'\n ' def bar(self, arg1, arg2=True, *args, **kwargs):\\n'\n ' \"\"\"method Foo.bar\"\"\"\\n'\n ' pass\\n'\n '\\n'\n 'def baz():\\n'\n ' \"\"\"function baz\"\"\"\\n'\n ' pass\\n'\n '\\n'\n 'class Qux: attr1 = 1; attr2 = 2')\n analyzer = ModuleAnalyzer.for_string(code, 'module')\n docs = analyzer.find_attr_docs()\n assert set(docs) == {('Foo', 'attr1'),\n ('Foo', 'attr3'),\n ('Foo', 'attr4'),\n ('Foo', 'attr5'),\n ('Foo', 'attr6'),\n ('Foo', 'attr7'),\n ('Foo', 'attr8'),\n ('Foo', 'attr9')}\n assert docs[('Foo', 'attr1')] == ['comment before attr1', '']\n assert docs[('Foo', 'attr3')] == ['attribute comment for attr3', '']\n assert docs[('Foo', 'attr4')] == ['long attribute comment', '']\n assert docs[('Foo', 'attr4')] == ['long attribute comment', '']\n assert docs[('Foo', 'attr5')] == ['attribute comment for attr5', '']\n assert docs[('Foo', 'attr6')] == ['this comment is ignored', '']\n assert docs[('Foo', 'attr7')] == ['this comment is ignored', '']\n assert docs[('Foo', 'attr8')] == ['attribute comment for attr8', '']\n assert docs[('Foo', 'attr9')] == ['string after attr9', '']\n assert analyzer.tagorder == {'Foo': 0,\n 'Foo.__init__': 8,\n 'Foo.attr1': 1,\n 'Foo.attr2': 2,\n 'Foo.attr3': 3,\n 'Foo.attr4': 4,\n 'Foo.attr5': 5,\n 'Foo.attr6': 6,\n 'Foo.attr7': 7,\n 'Foo.attr8': 10,\n 'Foo.attr9': 12,\n 'Foo.bar': 13,\n 'baz': 14,\n 'Qux': 15,\n 'Qux.attr1': 16,\n 'Qux.attr2': 17}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_find_attr_docs_for_posonlyargs_method_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode.py_test_ModuleAnalyzer_find_attr_docs_for_posonlyargs_method_", "embedding": null, "metadata": {"file_path": "tests/test_pycode.py", "file_name": "test_pycode.py", "file_type": "text/x-python", "category": "test", "start_line": 188, "end_line": 201, "span_ids": ["test_ModuleAnalyzer_find_attr_docs_for_posonlyargs_method"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8),\n reason='posonlyargs are available since python3.8.')\ndef test_ModuleAnalyzer_find_attr_docs_for_posonlyargs_method():\n code = ('class Foo(object):\\n'\n ' def __init__(self, /):\\n'\n ' self.attr = None #: attribute comment\\n')\n analyzer = ModuleAnalyzer.for_string(code, 'module')\n docs = analyzer.find_attr_docs()\n assert set(docs) == {('Foo', 'attr')}\n assert docs[('Foo', 'attr')] == ['attribute comment', '']\n assert analyzer.tagorder == {'Foo': 0,\n 'Foo.__init__': 1,\n 'Foo.attr': 2}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_ast.py__Test_pycode_ast__test_unparse.assert_ast_unparse_module": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_ast.py__Test_pycode_ast__test_unparse.assert_ast_unparse_module", "embedding": null, "metadata": {"file_path": "tests/test_pycode_ast.py", "file_name": "test_pycode_ast.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 54, "span_ids": ["test_unparse", "docstring", "imports"], "tokens": 693}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test pycode.ast\"\"\"\n\nimport sys\n\nimport pytest\n\nfrom sphinx.pycode import ast\n\n\n@pytest.mark.parametrize('source,expected', [\n (\"a + b\", \"a + b\"), # Add\n (\"a and b\", \"a and b\"), # And\n (\"os.path\", \"os.path\"), # Attribute\n (\"1 * 2\", \"1 * 2\"), # BinOp\n (\"a & b\", \"a & b\"), # BitAnd\n (\"a | b\", \"a | b\"), # BitOr\n (\"a ^ b\", \"a ^ b\"), # BitXor\n (\"a and b and c\", \"a and b and c\"), # BoolOp\n (\"b'bytes'\", \"b'bytes'\"), # Bytes\n (\"object()\", \"object()\"), # Call\n (\"1234\", \"1234\"), # Constant\n (\"{'key1': 'value1', 'key2': 'value2'}\",\n \"{'key1': 'value1', 'key2': 'value2'}\"), # Dict\n (\"a / b\", \"a / b\"), # Div\n (\"...\", \"...\"), # Ellipsis\n (\"a // b\", \"a // b\"), # FloorDiv\n (\"Tuple[int, int]\", \"Tuple[int, int]\"), # Index, Subscript\n (\"~ 1\", \"~ 1\"), # Invert\n (\"lambda x, y: x + y\",\n \"lambda x, y: ...\"), # Lambda\n (\"[1, 2, 3]\", \"[1, 2, 3]\"), # List\n (\"a << b\", \"a << b\"), # LShift\n (\"a @ b\", \"a @ b\"), # MatMult\n (\"a % b\", \"a % b\"), # Mod\n (\"a * b\", \"a * b\"), # Mult\n (\"sys\", \"sys\"), # Name, NameConstant\n (\"1234\", \"1234\"), # Num\n (\"not a\", \"not a\"), # Not\n (\"a or b\", \"a or b\"), # Or\n (\"a ** b\", \"a ** b\"), # Pow\n (\"a >> b\", \"a >> b\"), # RShift\n (\"{1, 2, 3}\", \"{1, 2, 3}\"), # Set\n (\"a - b\", \"a - b\"), # Sub\n (\"'str'\", \"'str'\"), # Str\n (\"+ a\", \"+ a\"), # UAdd\n (\"- 1\", \"- 1\"), # UnaryOp\n (\"- a\", \"- a\"), # USub\n (\"(1, 2, 3)\", \"(1, 2, 3)\"), # Tuple\n (\"()\", \"()\"), # Tuple (empty)\n (\"(1,)\", \"(1,)\"), # Tuple (single item)\n])\ndef test_unparse(source, expected):\n module = ast.parse(source)\n assert ast.unparse(module.body[0].value, source) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py__Test_pycode_parser__test_comment_picker_basic.assert_parser_comments_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py__Test_pycode_parser__test_comment_picker_basic.assert_parser_comments_", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 24, "span_ids": ["test_comment_picker_basic", "docstring", "imports"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test pycode.parser.\"\"\"\n\nfrom sphinx.pycode.parser import Parser\nfrom sphinx.util.inspect import signature_from_str\n\n\ndef test_comment_picker_basic():\n source = ('a = 1 + 1 #: assignment\\n'\n 'b = 1 +\\\\\\n 1 #: assignment including a CR\\n'\n 'c = (1 +\\n 1) #: tuple \\n'\n 'd = {1, \\n 1} #: set\\n'\n 'e = [1, \\n 1] #: list #: additional comment\\n'\n 'f = \"abc\"\\n'\n '#: string; comment on next line (ignored)\\n'\n 'g = 1.0\\n'\n '\"\"\"float; string on next line\"\"\"\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'a'): 'assignment',\n ('', 'b'): 'assignment including a CR',\n ('', 'c'): 'tuple ',\n ('', 'd'): ' set',\n ('', 'e'): 'list #: additional comment',\n ('', 'g'): 'float; string on next line'}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_annotated_assignment_test_annotated_assignment.assert_parser_definitions": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_pycode_parser.py_test_annotated_assignment_test_annotated_assignment.assert_parser_definitions", "embedding": null, "metadata": {"file_path": "tests/test_pycode_parser.py", "file_name": "test_pycode_parser.py", "file_type": "text/x-python", "category": "test", "start_line": 86, "end_line": 103, "span_ids": ["test_annotated_assignment"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_annotated_assignment():\n source = ('a: str = \"Sphinx\" #: comment\\n'\n 'b: int = 1\\n'\n '\"\"\"string on next line\"\"\"\\n'\n 'c: int #: comment\\n'\n 'd = 1 # type: int\\n'\n '\"\"\"string on next line\"\"\"\\n')\n parser = Parser(source)\n parser.parse()\n assert parser.comments == {('', 'a'): 'comment',\n ('', 'b'): 'string on next line',\n ('', 'c'): 'comment',\n ('', 'd'): 'string on next line'}\n assert parser.annotations == {('', 'a'): 'str',\n ('', 'b'): 'int',\n ('', 'c'): 'int',\n ('', 'd'): 'int'}\n assert parser.definitions == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py__Test_the_sphinx_quicks_teardown_module.coloron_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py__Test_the_sphinx_quicks_teardown_module.coloron_", "embedding": null, "metadata": {"file_path": "tests/test_quickstart.py", "file_name": "test_quickstart.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 42, "span_ids": ["impl", "mock_input", "teardown_module", "docstring", "setup_module", "imports", "impl:3"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the sphinx.quickstart module.\"\"\"\n\nimport time\nfrom io import StringIO\nfrom os import path\n\nimport pytest\n\nfrom sphinx import application\nfrom sphinx.cmd import quickstart as qs\nfrom sphinx.util.console import coloron, nocolor\n\nwarnfile = StringIO()\n\n\ndef setup_module():\n nocolor()\n\n\ndef mock_input(answers, needanswer=False):\n called = set()\n\n def input_(prompt):\n if prompt in called:\n raise AssertionError('answer for %r missing and no default '\n 'present' % prompt)\n called.add(prompt)\n for question in answers:\n if prompt.startswith(qs.PROMPT_PREFIX + question):\n return answers[question]\n if needanswer:\n raise AssertionError('answer for %r missing' % prompt)\n return ''\n return input_\n\n\nreal_input = input\n\n\ndef teardown_module():\n qs.term_input = real_input\n coloron()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_default_filename_test_default_filename.exec_conffile_read_text_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_default_filename_test_default_filename.exec_conffile_read_text_", "embedding": null, "metadata": {"file_path": "tests/test_quickstart.py", "file_name": "test_quickstart.py", "file_type": "text/x-python", "category": "test", "start_line": 219, "end_line": 234, "span_ids": ["test_default_filename"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_default_filename(tempdir):\n answers = {\n 'Root path': tempdir,\n 'Project name': '\\u30c9\\u30a4\\u30c4', # Fullwidth characters only\n 'Author name': 'Georg Brandl',\n 'Project version': '0.1',\n }\n qs.term_input = mock_input(answers)\n d = {}\n qs.ask_user(d)\n qs.generate(d)\n\n conffile = tempdir / 'conf.py'\n assert conffile.isfile()\n ns = {}\n exec(conffile.read_text(), ns)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_extensions_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_quickstart.py_test_extensions_", "embedding": null, "metadata": {"file_path": "tests/test_quickstart.py", "file_name": "test_quickstart.py", "file_type": "text/x-python", "category": "test", "start_line": 237, "end_line": 261, "span_ids": ["test_exits_when_existing_confpy", "test_extensions"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_extensions(tempdir):\n qs.main(['-q', '-p', 'project_name', '-a', 'author',\n '--extensions', 'foo,bar,baz', tempdir])\n\n conffile = tempdir / 'conf.py'\n assert conffile.isfile()\n ns = {}\n exec(conffile.read_text(), ns)\n assert ns['extensions'] == ['foo', 'bar', 'baz']\n\n\ndef test_exits_when_existing_confpy(monkeypatch):\n # The code detects existing conf.py with path.isfile()\n # so we mock it as True with pytest's monkeypatch\n def mock_isfile(path):\n return True\n monkeypatch.setattr(path, 'isfile', mock_isfile)\n\n qs.term_input = mock_input({\n 'Please enter a new root path (or just Enter to exit)': ''\n })\n d = {}\n with pytest.raises(SystemExit):\n qs.ask_user(d)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_roles.py__Test_sphinx_roles__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_roles.py__Test_sphinx_roles__", "embedding": null, "metadata": {"file_path": "tests/test_roles.py", "file_name": "test_roles.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 76, "span_ids": ["docstring", "imports", "test_samp"], "tokens": 655}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.roles\"\"\"\n\nfrom unittest.mock import Mock\n\nfrom docutils import nodes\n\nfrom sphinx.roles import EmphasizedLiteral\nfrom sphinx.testing.util import assert_node\n\n\ndef test_samp():\n emph_literal_role = EmphasizedLiteral()\n\n # normal case\n text = 'print 1+{variable}'\n ret, msg = emph_literal_role('samp', text, text, 0, Mock())\n assert_node(ret[0], [nodes.literal, (\"print 1+\",\n [nodes.emphasis, \"variable\"])])\n assert msg == []\n\n # two emphasis items\n text = 'print {1}+{variable}'\n ret, msg = emph_literal_role('samp', text, text, 0, Mock())\n assert_node(ret[0], [nodes.literal, (\"print \",\n [nodes.emphasis, \"1\"],\n \"+\",\n [nodes.emphasis, \"variable\"])])\n assert msg == []\n\n # empty curly brace\n text = 'print 1+{}'\n ret, msg = emph_literal_role('samp', text, text, 0, Mock())\n assert_node(ret[0], [nodes.literal, \"print 1+{}\"])\n assert msg == []\n\n # half-opened variable\n text = 'print 1+{variable'\n ret, msg = emph_literal_role('samp', text, text, 0, Mock())\n assert_node(ret[0], [nodes.literal, \"print 1+{variable\"])\n assert msg == []\n\n # nested\n text = 'print 1+{{variable}}'\n ret, msg = emph_literal_role('samp', text, text, 0, Mock())\n assert_node(ret[0], [nodes.literal, (\"print 1+\",\n [nodes.emphasis, \"{variable\"],\n \"}\")])\n assert msg == []\n\n # emphasized item only\n text = '{variable}'\n ret, msg = emph_literal_role('samp', text, text, 0, Mock())\n assert_node(ret[0], [nodes.literal, nodes.emphasis, \"variable\"])\n assert msg == []\n\n # escaping\n text = r'print 1+\\{variable}'\n ret, msg = emph_literal_role('samp', text, text, 0, Mock())\n assert_node(ret[0], [nodes.literal, \"print 1+{variable}\"])\n assert msg == []\n\n # escaping (2)\n text = r'print 1+\\{{variable}\\}'\n ret, msg = emph_literal_role('samp', text, text, 0, Mock())\n assert_node(ret[0], [nodes.literal, (\"print 1+{\",\n [nodes.emphasis, \"variable\"],\n \"}\")])\n assert msg == []\n\n # escape a backslash\n text = r'print 1+\\\\{variable}'\n ret, msg = emph_literal_role('samp', text, text, 0, Mock())\n assert_node(ret[0], [nodes.literal, (\"print 1+\\\\\",\n [nodes.emphasis, \"variable\"])])\n assert msg == []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py__Test_the_search_index__test_objects_are_escaped.for_item_in_index_get_ob.else_.assert_False_index_get_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py__Test_the_search_index__test_objects_are_escaped.for_item_in_index_get_ob.else_.assert_False_index_get_", "embedding": null, "metadata": {"file_path": "tests/test_search.py", "file_name": "test_search.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 65, "span_ids": ["impl", "DummyDomain", "DummyDomain.get_objects", "docstring", "jsload", "impl:6", "setup_module", "imports", "impl:3", "test_objects_are_escaped", "is_registered_term"], "tokens": 346}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the search index builder.\"\"\"\n\nfrom collections import namedtuple\nfrom io import BytesIO\n\nimport pytest\nfrom docutils import frontend, utils\nfrom docutils.parsers import rst\n\nfrom sphinx.search import IndexBuilder\nfrom sphinx.util import jsdump\n\nDummyEnvironment = namedtuple('DummyEnvironment', ['version', 'domains'])\n\n\nclass DummyDomain:\n def __init__(self, data):\n self.data = data\n self.object_types = {}\n\n def get_objects(self):\n return self.data\n\n\nsettings = parser = None\n\n\ndef setup_module():\n global settings, parser\n optparser = frontend.OptionParser(components=(rst.Parser,))\n settings = optparser.get_default_values()\n parser = rst.Parser()\n\n\ndef jsload(path):\n searchindex = path.read_text()\n assert searchindex.startswith('Search.setIndex(')\n assert searchindex.endswith(')')\n\n return jsdump.loads(searchindex[16:-1])\n\n\ndef is_registered_term(index, keyword):\n return index['terms'].get(keyword, []) != []\n\n\nFILE_CONTENTS = '''\\\nsection_title\n=============\n\n.. test that comments are not indexed: boson\n\ntest that non-comments are indexed: fermion\n'''\n\n\n@pytest.mark.sphinx(testroot='ext-viewcode')\ndef test_objects_are_escaped(app, status, warning):\n app.builder.build_all()\n index = jsload(app.outdir / 'searchindex.js')\n for item in index.get('objects').get(''):\n if item[-1] == 'n::Array<T, d>': # n::Array<T,d> is escaped\n break\n else:\n assert False, index.get('objects').get('')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder_test_IndexBuilder._freeze": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder_test_IndexBuilder._freeze", "embedding": null, "metadata": {"file_path": "tests/test_search.py", "file_name": "test_search.py", "file_type": "text/x-python", "category": "test", "start_line": 127, "end_line": 159, "span_ids": ["test_IndexBuilder"], "tokens": 687}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_IndexBuilder():\n domain1 = DummyDomain([('objname1', 'objdispname1', 'objtype1', 'docname1_1', '#anchor', 1),\n ('objname2', 'objdispname2', 'objtype2', 'docname1_2', '', -1)])\n domain2 = DummyDomain([('objname1', 'objdispname1', 'objtype1', 'docname2_1', '#anchor', 1),\n ('objname2', 'objdispname2', 'objtype2', 'docname2_2', '', -1)])\n env = DummyEnvironment('1.0', {'dummy1': domain1, 'dummy2': domain2})\n doc = utils.new_document(b'test data', settings)\n doc['file'] = 'dummy'\n parser.parse(FILE_CONTENTS, doc)\n\n # feed\n index = IndexBuilder(env, 'en', {}, None)\n index.feed('docname1_1', 'filename1_1', 'title1_1', doc)\n index.feed('docname1_2', 'filename1_2', 'title1_2', doc)\n index.feed('docname2_1', 'filename2_1', 'title2_1', doc)\n index.feed('docname2_2', 'filename2_2', 'title2_2', doc)\n assert index._titles == {'docname1_1': 'title1_1', 'docname1_2': 'title1_2',\n 'docname2_1': 'title2_1', 'docname2_2': 'title2_2'}\n assert index._filenames == {'docname1_1': 'filename1_1', 'docname1_2': 'filename1_2',\n 'docname2_1': 'filename2_1', 'docname2_2': 'filename2_2'}\n assert index._mapping == {\n 'ar': {'docname1_1', 'docname1_2', 'docname2_1', 'docname2_2'},\n 'fermion': {'docname1_1', 'docname1_2', 'docname2_1', 'docname2_2'},\n 'comment': {'docname1_1', 'docname1_2', 'docname2_1', 'docname2_2'},\n 'non': {'docname1_1', 'docname1_2', 'docname2_1', 'docname2_2'},\n 'index': {'docname1_1', 'docname1_2', 'docname2_1', 'docname2_2'},\n 'test': {'docname1_1', 'docname1_2', 'docname2_1', 'docname2_2'}\n }\n assert index._title_mapping == {'section_titl': {'docname1_1', 'docname1_2', 'docname2_1', 'docname2_2'}}\n assert index._objtypes == {}\n assert index._objnames == {}\n\n # freeze\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder.assert_index_freeze__test_IndexBuilder.None_20": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder.assert_index_freeze__test_IndexBuilder.None_20", "embedding": null, "metadata": {"file_path": "tests/test_search.py", "file_name": "test_search.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 204, "span_ids": ["test_IndexBuilder"], "tokens": 679}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_IndexBuilder():\n # ... other code\n assert index.freeze() == {\n 'docnames': ('docname1_1', 'docname1_2', 'docname2_1', 'docname2_2'),\n 'envversion': '1.0',\n 'filenames': ['filename1_1', 'filename1_2', 'filename2_1', 'filename2_2'],\n 'objects': {'': [(0, 0, 1, '#anchor', 'objdispname1'),\n (2, 1, 1, '#anchor', 'objdispname1')]},\n 'objnames': {0: ('dummy1', 'objtype1', 'objtype1'), 1: ('dummy2', 'objtype1', 'objtype1')},\n 'objtypes': {0: 'dummy1:objtype1', 1: 'dummy2:objtype1'},\n 'terms': {'ar': [0, 1, 2, 3],\n 'comment': [0, 1, 2, 3],\n 'fermion': [0, 1, 2, 3],\n 'index': [0, 1, 2, 3],\n 'non': [0, 1, 2, 3],\n 'test': [0, 1, 2, 3]},\n 'titles': ('title1_1', 'title1_2', 'title2_1', 'title2_2'),\n 'titleterms': {'section_titl': [0, 1, 2, 3]}\n }\n assert index._objtypes == {('dummy1', 'objtype1'): 0, ('dummy2', 'objtype1'): 1}\n assert index._objnames == {0: ('dummy1', 'objtype1', 'objtype1'),\n 1: ('dummy2', 'objtype1', 'objtype1')}\n\n # dump / load\n stream = BytesIO()\n index.dump(stream, 'pickle')\n stream.seek(0)\n\n index2 = IndexBuilder(env, 'en', {}, None)\n index2.load(stream, 'pickle')\n\n assert index2._titles == index._titles\n assert index2._filenames == index._filenames\n assert index2._mapping == index._mapping\n assert index2._title_mapping == index._title_mapping\n assert index2._objtypes == {}\n assert index2._objnames == {}\n\n # freeze after load\n assert index2.freeze() == index.freeze()\n assert index2._objtypes == index._objtypes\n assert index2._objnames == index._objnames\n\n # prune\n index.prune(['docname1_2', 'docname2_2'])\n assert index._titles == {'docname1_2': 'title1_2', 'docname2_2': 'title2_2'}\n assert index._filenames == {'docname1_2': 'filename1_2', 'docname2_2': 'filename2_2'}\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder.None_21_test_IndexBuilder.None_27": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_search.py_test_IndexBuilder.None_21_test_IndexBuilder.None_27", "embedding": null, "metadata": {"file_path": "tests/test_search.py", "file_name": "test_search.py", "file_type": "text/x-python", "category": "test", "start_line": 205, "end_line": 236, "span_ids": ["test_IndexBuilder"], "tokens": 536}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_IndexBuilder():\n # ... other code\n assert index._mapping == {\n 'ar': {'docname1_2', 'docname2_2'},\n 'fermion': {'docname1_2', 'docname2_2'},\n 'comment': {'docname1_2', 'docname2_2'},\n 'non': {'docname1_2', 'docname2_2'},\n 'index': {'docname1_2', 'docname2_2'},\n 'test': {'docname1_2', 'docname2_2'}\n }\n assert index._title_mapping == {'section_titl': {'docname1_2', 'docname2_2'}}\n assert index._objtypes == {('dummy1', 'objtype1'): 0, ('dummy2', 'objtype1'): 1}\n assert index._objnames == {0: ('dummy1', 'objtype1', 'objtype1'), 1: ('dummy2', 'objtype1', 'objtype1')}\n\n # freeze after prune\n assert index.freeze() == {\n 'docnames': ('docname1_2', 'docname2_2'),\n 'envversion': '1.0',\n 'filenames': ['filename1_2', 'filename2_2'],\n 'objects': {},\n 'objnames': {0: ('dummy1', 'objtype1', 'objtype1'), 1: ('dummy2', 'objtype1', 'objtype1')},\n 'objtypes': {0: 'dummy1:objtype1', 1: 'dummy2:objtype1'},\n 'terms': {'ar': [0, 1],\n 'comment': [0, 1],\n 'fermion': [0, 1],\n 'index': [0, 1],\n 'non': [0, 1],\n 'test': [0, 1]},\n 'titles': ('title1_2', 'title2_2'),\n 'titleterms': {'section_titl': [0, 1]}\n }\n assert index._objtypes == {('dummy1', 'objtype1'): 0, ('dummy2', 'objtype1'): 1}\n assert index._objnames == {0: ('dummy1', 'objtype1', 'objtype1'),\n 1: ('dummy2', 'objtype1', 'objtype1')}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py__Test_setup_command_for_setup_command.with_cd_pkgrootdir_.yield_namedtuple_setup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py__Test_setup_command_for_setup_command.with_cd_pkgrootdir_.yield_namedtuple_setup_", "embedding": null, "metadata": {"file_path": "tests/test_setup_command.py", "file_name": "test_setup_command.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 42, "span_ids": ["setup_command", "docstring", "imports"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test setup_command for distutils.\"\"\"\n\nimport os\nimport subprocess\nimport sys\nfrom collections import namedtuple\nfrom textwrap import dedent\n\nimport pytest\n\nimport sphinx\nfrom sphinx.util.osutil import cd\n\n\n@pytest.fixture\ndef setup_command(request, tempdir, rootdir):\n \"\"\"\n Run `setup.py build_sphinx` with args and kwargs,\n pass it to the test and clean up properly.\n \"\"\"\n if hasattr(request.node, 'get_closest_marker'): # pytest-3.6.0 or newer\n marker = request.node.get_closest_marker('setup_command')\n else:\n marker = request.node.get_marker('setup_command')\n args = marker.args if marker else []\n\n pkgrootdir = tempdir / 'test-setup'\n (rootdir / 'test-setup').copytree(pkgrootdir)\n\n with cd(pkgrootdir):\n pythonpath = os.path.dirname(os.path.dirname(sphinx.__file__))\n if os.getenv('PYTHONPATH'):\n pythonpath = os.getenv('PYTHONPATH') + os.pathsep + pythonpath\n command = [sys.executable, 'setup.py', 'build_sphinx']\n command.extend(args)\n\n proc = subprocess.Popen(\n command,\n env=dict(os.environ, PYTHONPATH=pythonpath),\n stdout=subprocess.PIPE,\n stderr=subprocess.PIPE)\n yield namedtuple('setup', 'pkgroot,proc')(pkgrootdir, proc)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py_nonascii_srcdir_nonascii_srcdir.root_doc_write_bytes_roo": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_setup_command.py_nonascii_srcdir_nonascii_srcdir.root_doc_write_bytes_roo", "embedding": null, "metadata": {"file_path": "tests/test_setup_command.py", "file_name": "test_setup_command.py", "file_type": "text/x-python", "category": "test", "start_line": 71, "end_line": 93, "span_ids": ["nonascii_srcdir"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef nonascii_srcdir(request, setup_command):\n mb_name = '\\u65e5\\u672c\\u8a9e'\n srcdir = (setup_command.pkgroot / 'doc')\n try:\n (srcdir / mb_name).makedirs()\n except UnicodeEncodeError:\n from sphinx.testing.path import FILESYSTEMENCODING\n pytest.skip(\n 'non-ASCII filename not supported on this filesystem encoding: '\n '%s' % FILESYSTEMENCODING)\n\n (srcdir / mb_name / (mb_name + '.txt')).write_text(dedent(\"\"\"\n multi byte file name page\n ==========================\n \"\"\"))\n\n root_doc = srcdir / 'index.txt'\n root_doc.write_bytes((root_doc.read_text() + dedent(\"\"\"\n .. toctree::\n\n %(mb_name)s/%(mb_name)s\n \"\"\" % locals())).encode())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_smartquotes.py__Test_smart_quotes__test_literals.for_code_element_in_etree.if_code_text_startswith_.None_1.assert_code_text_lite": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_smartquotes.py__Test_smart_quotes__test_literals.for_code_element_in_etree.if_code_text_startswith_.None_1.assert_code_text_lite", "embedding": null, "metadata": {"file_path": "tests/test_smartquotes.py", "file_name": "test_smartquotes.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 32, "span_ids": ["test_basic", "docstring", "imports", "test_literals"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test smart quotes.\"\"\"\n\nimport pytest\nfrom html5lib import HTMLParser\n\nfrom sphinx.util import docutils\n\n\n@pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True)\ndef test_basic(app, status, warning):\n app.build()\n\n content = (app.outdir / 'index.html').read_text()\n assert '<p>\u2013 \u201cSphinx\u201d is a tool that makes it easy \u2026</p>' in content\n\n\n@pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True)\ndef test_literals(app, status, warning):\n app.build()\n\n with (app.outdir / 'literals.html').open() as html_file:\n etree = HTMLParser(namespaceHTMLElements=False).parse(html_file)\n\n for code_element in etree.iter('code'):\n code_text = ''.join(code_element.itertext())\n\n if code_text.startswith('code role'):\n assert \"'quotes'\" in code_text\n elif code_text.startswith('{'):\n assert code_text == \"{'code': 'role', 'with': 'quotes'}\"\n elif code_text.startswith('literal'):\n assert code_text == \"literal with 'quotes'\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_smartquotes.py_test_text_builder_test_man_builder.if_docutils___version_inf.else_.assert_r_Sphinx_is": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_smartquotes.py_test_text_builder_test_man_builder.if_docutils___version_inf.else_.assert_r_Sphinx_is", "embedding": null, "metadata": {"file_path": "tests/test_smartquotes.py", "file_name": "test_smartquotes.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 51, "span_ids": ["test_man_builder", "test_text_builder"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(buildername='text', testroot='smartquotes', freshenv=True)\ndef test_text_builder(app, status, warning):\n app.build()\n\n content = (app.outdir / 'index.txt').read_text()\n assert '-- \"Sphinx\" is a tool that makes it easy ...' in content\n\n\n@pytest.mark.sphinx(buildername='man', testroot='smartquotes', freshenv=True)\ndef test_man_builder(app, status, warning):\n app.build()\n\n content = (app.outdir / 'python.1').read_text()\n if docutils.__version_info__ > (0, 18):\n assert r'\\-\\- \\(dqSphinx\\(dq is a tool that makes it easy ...' in content\n else:\n assert r'\\-\\- \"Sphinx\" is a tool that makes it easy ...' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_smartquotes.py_test_latex_builder_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_smartquotes.py_test_latex_builder_", "embedding": null, "metadata": {"file_path": "tests/test_smartquotes.py", "file_name": "test_smartquotes.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 105, "span_ids": ["test_smartquotes_excludes_language", "test_smartquotes_action", "test_smartquotes_disabled", "test_smartquotes_excludes_builders", "test_latex_builder", "test_ja_html_builder"], "tokens": 509}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(buildername='latex', testroot='smartquotes', freshenv=True)\ndef test_latex_builder(app, status, warning):\n app.build()\n\n content = (app.outdir / 'python.tex').read_text()\n assert '\\\\textendash{} \u201cSphinx\u201d is a tool that makes it easy \u2026' in content\n\n\n@pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True,\n confoverrides={'language': 'ja'})\ndef test_ja_html_builder(app, status, warning):\n app.build()\n\n content = (app.outdir / 'index.html').read_text()\n assert '<p>-- "Sphinx" is a tool that makes it easy ...</p>' in content\n\n\n@pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True,\n confoverrides={'smartquotes': False})\ndef test_smartquotes_disabled(app, status, warning):\n app.build()\n\n content = (app.outdir / 'index.html').read_text()\n assert '<p>-- "Sphinx" is a tool that makes it easy ...</p>' in content\n\n\n@pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True,\n confoverrides={'smartquotes_action': 'q'})\ndef test_smartquotes_action(app, status, warning):\n app.build()\n\n content = (app.outdir / 'index.html').read_text()\n assert '<p>-- \u201cSphinx\u201d is a tool that makes it easy ...</p>' in content\n\n\n@pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True,\n confoverrides={'language': 'ja', 'smartquotes_excludes': {}})\ndef test_smartquotes_excludes_language(app, status, warning):\n app.build()\n\n content = (app.outdir / 'index.html').read_text()\n assert '<p>\u2013 \u300cSphinx\u300d is a tool that makes it easy \u2026</p>' in content\n\n\n@pytest.mark.sphinx(buildername='man', testroot='smartquotes', freshenv=True,\n confoverrides={'smartquotes_excludes': {}})\ndef test_smartquotes_excludes_builders(app, status, warning):\n app.build()\n\n content = (app.outdir / 'python.1').read_text()\n assert '\u2013 \u201cSphinx\u201d is a tool that makes it easy \u2026' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_templating.py__Test_templating__test_autosummary_class_template_overloading.assert_foobar_not_in_re": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_templating.py__Test_templating__test_autosummary_class_template_overloading.assert_foobar_not_in_re", "embedding": null, "metadata": {"file_path": "tests/test_templating.py", "file_name": "test_templating.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 28, "span_ids": ["test_autosummary_class_template_overloading", "test_layout_overloading", "docstring", "imports"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test templating.\"\"\"\n\nimport pytest\n\nfrom sphinx.ext.autosummary.generate import setup_documenters\n\n\n@pytest.mark.sphinx('html', testroot='templating')\ndef test_layout_overloading(make_app, app_params):\n args, kwargs = app_params\n app = make_app(*args, **kwargs)\n setup_documenters(app)\n app.builder.build_update()\n\n result = (app.outdir / 'index.html').read_text()\n assert '<!-- layout overloading -->' in result\n\n\n@pytest.mark.sphinx('html', testroot='templating')\ndef test_autosummary_class_template_overloading(make_app, app_params):\n args, kwargs = app_params\n app = make_app(*args, **kwargs)\n setup_documenters(app)\n app.builder.build_update()\n\n result = (app.outdir / 'generated' / 'sphinx.application.TemplateBridge.html').read_text()\n assert 'autosummary/class.rst method block overloading' in result\n assert 'foobar' not in result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py__Test_the_Theme_class__test_theme_api.assert_not_os_path_exists": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_theming.py__Test_the_Theme_class__test_theme_api.assert_not_os_path_exists", "embedding": null, "metadata": {"file_path": "tests/test_theming.py", "file_name": "test_theming.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 57, "span_ids": ["test_theme_api", "docstring", "imports"], "tokens": 489}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the Theme class.\"\"\"\n\nimport os\n\nimport alabaster\nimport pytest\n\nfrom sphinx.theming import ThemeError\n\n\n@pytest.mark.sphinx(\n testroot='theming',\n confoverrides={'html_theme': 'ziptheme',\n 'html_theme_options.testopt': 'foo'})\ndef test_theme_api(app, status, warning):\n cfg = app.config\n\n themes = ['basic', 'default', 'scrolls', 'agogo', 'sphinxdoc', 'haiku',\n 'traditional', 'epub', 'nature', 'pyramid', 'bizstyle', 'classic', 'nonav',\n 'test-theme', 'ziptheme', 'staticfiles', 'parent', 'child']\n if alabaster.version.__version_info__ >= (0, 7, 11):\n themes.append('alabaster')\n\n # test Theme class API\n assert set(app.registry.html_themes.keys()) == set(themes)\n assert app.registry.html_themes['test-theme'] == app.srcdir / 'test_theme' / 'test-theme'\n assert app.registry.html_themes['ziptheme'] == app.srcdir / 'ziptheme.zip'\n assert app.registry.html_themes['staticfiles'] == app.srcdir / 'test_theme' / 'staticfiles'\n\n # test Theme instance API\n theme = app.builder.theme\n assert theme.name == 'ziptheme'\n themedir = theme.themedir\n assert theme.base.name == 'basic'\n assert len(theme.get_theme_dirs()) == 2\n\n # direct setting\n assert theme.get_config('theme', 'stylesheet') == 'custom.css'\n # inherited setting\n assert theme.get_config('options', 'nosidebar') == 'false'\n # nonexisting setting\n assert theme.get_config('theme', 'foobar', 'def') == 'def'\n with pytest.raises(ThemeError):\n theme.get_config('theme', 'foobar')\n\n # options API\n\n options = theme.get_options({'nonexisting': 'foo'})\n assert 'nonexisting' not in options.keys()\n\n options = theme.get_options(cfg.html_theme_options)\n assert options['testopt'] == 'foo'\n assert options['nosidebar'] == 'false'\n\n # cleanup temp directories\n theme.cleanup()\n assert not os.path.exists(themedir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_toctree.py__Test_the_HTML_builder__test_relations.assert_quux_not_in_app_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_toctree.py__Test_the_HTML_builder__test_relations.assert_quux_not_in_app_", "embedding": null, "metadata": {"file_path": "tests/test_toctree.py", "file_name": "test_toctree.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 21, "span_ids": ["test_relations", "docstring", "imports"], "tokens": 345}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the HTML builder and check output against XPath.\"\"\"\nimport re\n\nimport pytest\n\n\n@pytest.mark.sphinx(testroot='toctree-glob')\ndef test_relations(app, status, warning):\n app.builder.build_all()\n assert app.builder.relations['index'] == [None, None, 'foo']\n assert app.builder.relations['foo'] == ['index', 'index', 'bar/index']\n assert app.builder.relations['bar/index'] == ['index', 'foo', 'bar/bar_1']\n assert app.builder.relations['bar/bar_1'] == ['bar/index', 'bar/index', 'bar/bar_2']\n assert app.builder.relations['bar/bar_2'] == ['bar/index', 'bar/bar_1', 'bar/bar_3']\n assert app.builder.relations['bar/bar_3'] == ['bar/index', 'bar/bar_2', 'bar/bar_4/index']\n assert app.builder.relations['bar/bar_4/index'] == ['bar/index', 'bar/bar_3', 'baz']\n assert app.builder.relations['baz'] == ['index', 'bar/bar_4/index', 'qux/index']\n assert app.builder.relations['qux/index'] == ['index', 'baz', 'qux/qux_1']\n assert app.builder.relations['qux/qux_1'] == ['qux/index', 'qux/index', 'qux/qux_2']\n assert app.builder.relations['qux/qux_2'] == ['qux/index', 'qux/qux_1', None]\n assert 'quux' not in app.builder.relations", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms.py__Tests_the_post_transfo_test_nitpicky_warning.assert_p_code_class_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms.py__Tests_the_post_transfo_test_nitpicky_warning.assert_p_code_class_", "embedding": null, "metadata": {"file_path": "tests/test_transforms_post_transforms.py", "file_name": "test_transforms_post_transforms.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 15, "span_ids": ["docstring", "imports", "test_nitpicky_warning"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests the post_transforms\"\"\"\n\nimport pytest\nfrom docutils import nodes\n\n\n@pytest.mark.sphinx('html', testroot='transforms-post_transforms-missing-reference')\ndef test_nitpicky_warning(app, status, warning):\n app.build()\n assert ('index.rst:4: WARNING: py:class reference target '\n 'not found: io.StringIO' in warning.getvalue())\n\n content = (app.outdir / 'index.html').read_text()\n assert ('<p><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">'\n 'io.StringIO</span></code></p>' in content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms.py_test_missing_reference_test_missing_reference.assert_p_span_missing_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms.py_test_missing_reference_test_missing_reference.assert_p_span_missing_", "embedding": null, "metadata": {"file_path": "tests/test_transforms_post_transforms.py", "file_name": "test_transforms_post_transforms.py", "file_type": "text/x-python", "category": "test", "start_line": 18, "end_line": 35, "span_ids": ["test_missing_reference"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='transforms-post_transforms-missing-reference',\n freshenv=True)\ndef test_missing_reference(app, status, warning):\n def missing_reference(app, env, node, contnode):\n assert app is app\n assert env is app.env\n assert node['reftarget'] == 'io.StringIO'\n assert contnode.astext() == 'io.StringIO'\n\n return nodes.inline('', 'missing-reference.StringIO')\n\n warning.truncate(0)\n app.connect('missing-reference', missing_reference)\n app.build()\n assert warning.getvalue() == ''\n\n content = (app.outdir / 'index.html').read_text()\n assert '<p><span>missing-reference.StringIO</span></p>' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms.py_test_missing_reference_conditional_pending_xref_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_transforms_post_transforms.py_test_missing_reference_conditional_pending_xref_", "embedding": null, "metadata": {"file_path": "tests/test_transforms_post_transforms.py", "file_name": "test_transforms_post_transforms.py", "file_type": "text/x-python", "category": "test", "start_line": 38, "end_line": 51, "span_ids": ["test_missing_reference_conditional_pending_xref"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx('html', testroot='domain-py-python_use_unqualified_type_names',\n freshenv=True)\ndef test_missing_reference_conditional_pending_xref(app, status, warning):\n def missing_reference(app, env, node, contnode):\n return contnode\n\n warning.truncate(0)\n app.connect('missing-reference', missing_reference)\n app.build()\n assert warning.getvalue() == ''\n\n content = (app.outdir / 'index.html').read_text()\n assert '<span class=\"n\"><span class=\"pre\">Age</span></span>' in content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py__Tests_util_functions__test_encode_uri.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util.py__Tests_util_functions__test_encode_uri.None_1", "embedding": null, "metadata": {"file_path": "tests/test_util.py", "file_name": "test_util.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 28, "span_ids": ["test_encode_uri", "docstring", "imports"], "tokens": 378}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests util functions.\"\"\"\n\nimport os\nimport tempfile\nfrom unittest.mock import patch\n\nimport pytest\n\nfrom sphinx.errors import ExtensionError\nfrom sphinx.testing.util import strip_escseq\nfrom sphinx.util import (SkipProgressMessage, display_chunk, encode_uri, ensuredir,\n import_object, logging, parselinenos, progress_message,\n status_iterator, xmlname_checker)\n\n\ndef test_encode_uri():\n expected = ('https://ru.wikipedia.org/wiki/%D0%A1%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D0%B0_'\n '%D1%83%D0%BF%D1%80%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F_'\n '%D0%B1%D0%B0%D0%B7%D0%B0%D0%BC%D0%B8_%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85')\n uri = ('https://ru.wikipedia.org/wiki'\n '/\u0421\u0438\u0441\u0442\u0435\u043c\u0430_\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f_\u0431\u0430\u0437\u0430\u043c\u0438_\u0434\u0430\u043d\u043d\u044b\u0445')\n assert expected == encode_uri(uri)\n\n expected = ('https://github.com/search?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+is%3A'\n 'sprint-friendly+user%3Ajupyter&type=Issues&ref=searchresults')\n uri = ('https://github.com/search?utf8=\u2713&q=is%3Aissue+is%3Aopen+is%3A'\n 'sprint-friendly+user%3Ajupyter&type=Issues&ref=searchresults')\n assert expected == encode_uri(uri)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docstrings.py__Test_sphinx_util_docst_test_separate_metadata.None_14": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docstrings.py__Test_sphinx_util_docst_test_separate_metadata.None_14", "embedding": null, "metadata": {"file_path": "tests/test_util_docstrings.py", "file_name": "test_util_docstrings.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 45, "span_ids": ["test_separate_metadata", "docstring", "imports"], "tokens": 358}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test sphinx.util.docstrings.\"\"\"\n\nfrom sphinx.util.docstrings import prepare_commentdoc, prepare_docstring, separate_metadata\n\n\ndef test_separate_metadata():\n # metadata only\n text = (\":meta foo: bar\\n\"\n \":meta baz:\\n\")\n docstring, metadata = separate_metadata(text)\n assert docstring == ''\n assert metadata == {'foo': 'bar', 'baz': ''}\n\n # non metadata field list item\n text = (\":meta foo: bar\\n\"\n \":param baz:\\n\")\n docstring, metadata = separate_metadata(text)\n assert docstring == ':param baz:\\n'\n assert metadata == {'foo': 'bar'}\n\n # field_list like text following just after paragraph is not a field_list\n text = (\"blah blah blah\\n\"\n \":meta foo: bar\\n\"\n \":meta baz:\\n\")\n docstring, metadata = separate_metadata(text)\n assert docstring == text\n assert metadata == {}\n\n # field_list like text following after blank line is a field_list\n text = (\"blah blah blah\\n\"\n \"\\n\"\n \":meta foo: bar\\n\"\n \":meta baz:\\n\")\n docstring, metadata = separate_metadata(text)\n assert docstring == \"blah blah blah\\n\\n\"\n assert metadata == {'foo': 'bar', 'baz': ''}\n\n # non field_list item breaks field_list\n text = (\":meta foo: bar\\n\"\n \"blah blah blah\\n\"\n \":meta baz:\\n\")\n docstring, metadata = separate_metadata(text)\n assert docstring == (\"blah blah blah\\n\"\n \":meta baz:\\n\")\n assert metadata == {'foo': 'bar'}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docutils.py__Tests_util_utils_funct_test_register_node.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_docutils.py__Tests_util_utils_funct_test_register_node.None_3", "embedding": null, "metadata": {"file_path": "tests/test_util_docutils.py", "file_name": "test_util_docutils.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 28, "span_ids": ["test_register_node", "docstring", "test_register_node.custom_node:2", "imports", "test_register_node.custom_node"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests util.utils functions.\"\"\"\n\nimport os\n\nfrom docutils import nodes\n\nfrom sphinx.util.docutils import (SphinxFileOutput, SphinxTranslator, docutils_namespace,\n new_document, register_node)\n\n\ndef test_register_node():\n class custom_node(nodes.Element):\n pass\n\n with docutils_namespace():\n register_node(custom_node)\n\n # check registered\n assert hasattr(nodes.GenericNodeVisitor, 'visit_custom_node')\n assert hasattr(nodes.GenericNodeVisitor, 'depart_custom_node')\n assert hasattr(nodes.SparseNodeVisitor, 'visit_custom_node')\n assert hasattr(nodes.SparseNodeVisitor, 'depart_custom_node')\n\n # check unregistered outside namespace\n assert not hasattr(nodes.GenericNodeVisitor, 'visit_custom_node')\n assert not hasattr(nodes.GenericNodeVisitor, 'depart_custom_node')\n assert not hasattr(nodes.SparseNodeVisitor, 'visit_custom_node')\n assert not hasattr(nodes.SparseNodeVisitor, 'depart_custom_node')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_fileutil.py__Tests_sphinx_util_file_test_copy_asset_file.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_fileutil.py__Tests_sphinx_util_file_test_copy_asset_file.None_9", "embedding": null, "metadata": {"file_path": "tests/test_util_fileutil.py", "file_name": "test_util_fileutil.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 58, "span_ids": ["DummyTemplateLoader", "test_copy_asset_file", "docstring", "imports"], "tokens": 454}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests sphinx.util.fileutil functions.\"\"\"\n\nfrom unittest import mock\n\nfrom sphinx.jinja2glue import BuiltinTemplateLoader\nfrom sphinx.util.fileutil import copy_asset, copy_asset_file\n\n\nclass DummyTemplateLoader(BuiltinTemplateLoader):\n def __init__(self):\n super().__init__()\n builder = mock.Mock()\n builder.config.templates_path = []\n builder.app.translator = None\n self.init(builder)\n\n\ndef test_copy_asset_file(tempdir):\n renderer = DummyTemplateLoader()\n\n # copy normal file\n src = (tempdir / 'asset.txt')\n src.write_text('# test data')\n dest = (tempdir / 'output.txt')\n\n copy_asset_file(src, dest)\n assert dest.exists()\n assert src.read_text() == dest.read_text()\n\n # copy template file\n src = (tempdir / 'asset.txt_t')\n src.write_text('# {{var1}} data')\n dest = (tempdir / 'output.txt_t')\n\n copy_asset_file(src, dest, {'var1': 'template'}, renderer)\n assert not dest.exists()\n assert (tempdir / 'output.txt').exists()\n assert (tempdir / 'output.txt').read_text() == '# template data'\n\n # copy template file to subdir\n src = (tempdir / 'asset.txt_t')\n src.write_text('# {{var1}} data')\n subdir1 = (tempdir / 'subdir')\n subdir1.makedirs()\n\n copy_asset_file(src, subdir1, {'var1': 'template'}, renderer)\n assert (subdir1 / 'asset.txt').exists()\n assert (subdir1 / 'asset.txt').read_text() == '# template data'\n\n # copy template file without context\n src = (tempdir / 'asset.txt_t')\n subdir2 = (tempdir / 'subdir2')\n subdir2.makedirs()\n\n copy_asset_file(src, subdir2)\n assert not (subdir2 / 'asset.txt').exists()\n assert (subdir2 / 'asset.txt_t').exists()\n assert (subdir2 / 'asset.txt_t').read_text() == '# {{var1}} data'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py__Test_i18n_util__test_catalog_info_for_sub_domain_file_and_path.assert_cat_mo_path_os_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py__Test_i18n_util__test_catalog_info_for_sub_domain_file_and_path.assert_cat_mo_path_os_", "embedding": null, "metadata": {"file_path": "tests/test_util_i18n.py", "file_name": "test_util_i18n.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 26, "span_ids": ["test_catalog_info_for_file_and_path", "test_catalog_info_for_sub_domain_file_and_path", "docstring", "imports"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test i18n util.\"\"\"\n\nimport datetime\nimport os\n\nimport pytest\nfrom babel.messages.mofile import read_mo\n\nfrom sphinx.errors import SphinxError\nfrom sphinx.util import i18n\n\n\ndef test_catalog_info_for_file_and_path():\n cat = i18n.CatalogInfo('path', 'domain', 'utf-8')\n assert cat.po_file == 'domain.po'\n assert cat.mo_file == 'domain.mo'\n assert cat.po_path == os.path.join('path', 'domain.po')\n assert cat.mo_path == os.path.join('path', 'domain.mo')\n\n\ndef test_catalog_info_for_sub_domain_file_and_path():\n cat = i18n.CatalogInfo('path', 'sub/domain', 'utf-8')\n assert cat.po_file == 'sub/domain.po'\n assert cat.mo_file == 'sub/domain.mo'\n assert cat.po_path == os.path.join('path', 'sub/domain.po')\n assert cat.mo_path == os.path.join('path', 'sub/domain.mo')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_get_filename_for_language_test_get_filename_for_language.None_18": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_i18n.py_test_get_filename_for_language_test_get_filename_for_language.None_18", "embedding": null, "metadata": {"file_path": "tests/test_util_i18n.py", "file_name": "test_util_i18n.py", "file_type": "text/x-python", "category": "test", "start_line": 89, "end_line": 139, "span_ids": ["test_get_filename_for_language"], "tokens": 670}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Path separators don't match on windows\")\ndef test_get_filename_for_language(app):\n app.env.temp_data['docname'] = 'index'\n\n # language is en\n app.env.config.language = 'en'\n assert i18n.get_image_filename_for_language('foo.png', app.env) == 'foo.en.png'\n assert i18n.get_image_filename_for_language('foo.bar.png', app.env) == 'foo.bar.en.png'\n assert i18n.get_image_filename_for_language('dir/foo.png', app.env) == 'dir/foo.en.png'\n assert i18n.get_image_filename_for_language('../foo.png', app.env) == '../foo.en.png'\n assert i18n.get_image_filename_for_language('foo', app.env) == 'foo.en'\n\n # modify figure_language_filename and language is 'en'\n app.env.config.language = 'en'\n app.env.config.figure_language_filename = 'images/{language}/{root}{ext}'\n assert i18n.get_image_filename_for_language('foo.png', app.env) == 'images/en/foo.png'\n assert i18n.get_image_filename_for_language(\n 'foo.bar.png', app.env) == 'images/en/foo.bar.png'\n assert i18n.get_image_filename_for_language(\n 'subdir/foo.png', app.env) == 'images/en/subdir/foo.png'\n assert i18n.get_image_filename_for_language(\n '../foo.png', app.env) == 'images/en/../foo.png'\n assert i18n.get_image_filename_for_language('foo', app.env) == 'images/en/foo'\n\n # new path and basename tokens\n app.env.config.language = 'en'\n app.env.config.figure_language_filename = '{path}{language}/{basename}{ext}'\n assert i18n.get_image_filename_for_language('foo.png', app.env) == 'en/foo.png'\n assert i18n.get_image_filename_for_language(\n 'foo.bar.png', app.env) == 'en/foo.bar.png'\n assert i18n.get_image_filename_for_language(\n 'subdir/foo.png', app.env) == 'subdir/en/foo.png'\n assert i18n.get_image_filename_for_language(\n '../foo.png', app.env) == '../en/foo.png'\n assert i18n.get_image_filename_for_language('foo', app.env) == 'en/foo'\n\n # invalid figure_language_filename\n app.env.config.figure_language_filename = '{root}.{invalid}{ext}'\n with pytest.raises(SphinxError):\n i18n.get_image_filename_for_language('foo.png', app.env)\n\n # docpath (for a document in the top of source directory)\n app.env.config.language = 'en'\n app.env.config.figure_language_filename = '/{docpath}{language}/{basename}{ext}'\n assert (i18n.get_image_filename_for_language('foo.png', app.env) ==\n '/en/foo.png')\n\n # docpath (for a document in the sub directory)\n app.env.temp_data['docname'] = 'subdir/index'\n assert (i18n.get_image_filename_for_language('foo.png', app.env) ==\n '/subdir/en/foo.png')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_images.py__Test_images_util__test_get_image_size.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_images.py__Test_images_util__test_get_image_size.None_3", "embedding": null, "metadata": {"file_path": "tests/test_util_images.py", "file_name": "test_util_images.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 18, "span_ids": ["test_get_image_size", "impl", "docstring", "imports"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test images util.\"\"\"\n\nimport pytest\n\nfrom sphinx.util.images import (get_image_extension, get_image_size, guess_mimetype,\n parse_data_uri)\n\nGIF_FILENAME = 'img.gif'\nPNG_FILENAME = 'img.png'\nPDF_FILENAME = 'img.pdf'\nTXT_FILENAME = 'index.txt'\n\n\ndef test_get_image_size(rootdir):\n assert get_image_size(rootdir / 'test-root' / GIF_FILENAME) == (200, 181)\n assert get_image_size(rootdir / 'test-root' / PNG_FILENAME) == (200, 181)\n assert get_image_size(rootdir / 'test-root' / PDF_FILENAME) is None\n assert get_image_size(rootdir / 'test-root' / TXT_FILENAME) is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py__Tests_util_inspect_fun_test_TypeAliasNamespace.None_1.assert_type_alias_unknow": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py__Tests_util_inspect_fun_test_TypeAliasNamespace.None_1.assert_type_alias_unknow", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 33, "span_ids": ["docstring", "imports", "test_TypeAliasNamespace"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests util.inspect functions.\"\"\"\n\nimport ast\nimport datetime\nimport enum\nimport functools\nimport sys\nimport types\nfrom inspect import Parameter\n\nimport pytest\n\nfrom sphinx.util import inspect\nfrom sphinx.util.inspect import TypeAliasNamespace, stringify_signature\n\n\ndef test_TypeAliasNamespace():\n import logging.config\n type_alias = TypeAliasNamespace({'logging.Filter': 'MyFilter',\n 'logging.Handler': 'MyHandler',\n 'logging.handlers.SyslogHandler': 'MySyslogHandler'})\n\n assert type_alias['logging'].Filter == 'MyFilter'\n assert type_alias['logging'].Handler == 'MyHandler'\n assert type_alias['logging'].handlers.SyslogHandler == 'MySyslogHandler'\n assert type_alias['logging'].Logger == logging.Logger\n assert type_alias['logging'].config == logging.config\n\n with pytest.raises(KeyError):\n assert type_alias['log']\n\n with pytest.raises(KeyError):\n assert type_alias['unknown']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_test_signature_partial.assert_stringify_signatur": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_test_signature_partial.assert_stringify_signatur", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 36, "end_line": 67, "span_ids": ["test_signature", "test_signature_partial"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_signature():\n # literals\n with pytest.raises(TypeError):\n inspect.signature(1)\n\n with pytest.raises(TypeError):\n inspect.signature('')\n\n # builtins are supported on a case-by-case basis, depending on whether\n # they define __text_signature__\n if getattr(list, '__text_signature__', None):\n sig = inspect.stringify_signature(inspect.signature(list))\n assert sig == '(iterable=(), /)'\n else:\n with pytest.raises(ValueError):\n inspect.signature(list)\n\n # normal function\n def func(a, b, c=1, d=2, *e, **f):\n pass\n\n sig = inspect.stringify_signature(inspect.signature(func))\n assert sig == '(a, b, c=1, d=2, *e, **f)'\n\n\ndef test_signature_partial():\n def fun(a, b, c=1, d=2):\n pass\n p = functools.partial(fun, 10, c=11)\n\n sig = inspect.signature(p)\n assert stringify_signature(sig) == '(b, *, c=11, d=2)'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_annotations_test_signature_annotations.sig_16.inspect_signature_f15_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_annotations_test_signature_annotations.sig_16.inspect_signature_f15_", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 142, "end_line": 223, "span_ids": ["test_signature_annotations"], "tokens": 861}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_signature_annotations():\n from .typing_test_data import (Node, f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12,\n f13, f14, f15, f16, f17, f18, f19, f20, f21)\n\n # Class annotations\n sig = inspect.signature(f0)\n assert stringify_signature(sig) == '(x: int, y: numbers.Integral) -> None'\n\n # Generic types with concrete parameters\n sig = inspect.signature(f1)\n assert stringify_signature(sig) == '(x: typing.List[int]) -> typing.List[int]'\n\n # TypeVars and generic types with TypeVars\n sig = inspect.signature(f2)\n if sys.version_info < (3, 7):\n assert stringify_signature(sig) == ('(x: typing.List[typing.T],'\n ' y: typing.List[typing.T_co],'\n ' z: typing.T'\n ') -> typing.List[typing.T_contra]')\n else:\n assert stringify_signature(sig) == ('(x: typing.List[tests.typing_test_data.T],'\n ' y: typing.List[tests.typing_test_data.T_co],'\n ' z: tests.typing_test_data.T'\n ') -> typing.List[tests.typing_test_data.T_contra]')\n\n # Union types\n sig = inspect.signature(f3)\n assert stringify_signature(sig) == '(x: typing.Union[str, numbers.Integral]) -> None'\n\n # Quoted annotations\n sig = inspect.signature(f4)\n assert stringify_signature(sig) == '(x: str, y: str) -> None'\n\n # Keyword-only arguments\n sig = inspect.signature(f5)\n assert stringify_signature(sig) == '(x: int, *, y: str, z: str) -> None'\n\n # Keyword-only arguments with varargs\n sig = inspect.signature(f6)\n assert stringify_signature(sig) == '(x: int, *args, y: str, z: str) -> None'\n\n # Space around '=' for defaults\n sig = inspect.signature(f7)\n if sys.version_info < (3, 11):\n assert stringify_signature(sig) == '(x: typing.Optional[int] = None, y: dict = {}) -> None'\n else:\n assert stringify_signature(sig) == '(x: int = None, y: dict = {}) -> None'\n\n # Callable types\n sig = inspect.signature(f8)\n assert stringify_signature(sig) == '(x: typing.Callable[[int, str], int]) -> None'\n\n sig = inspect.signature(f9)\n assert stringify_signature(sig) == '(x: typing.Callable) -> None'\n\n # Tuple types\n sig = inspect.signature(f10)\n assert stringify_signature(sig) == '(x: typing.Tuple[int, str], y: typing.Tuple[int, ...]) -> None'\n\n # Instance annotations\n sig = inspect.signature(f11)\n assert stringify_signature(sig) == '(x: CustomAnnotation, y: 123) -> None'\n\n # tuple with more than two items\n sig = inspect.signature(f12)\n assert stringify_signature(sig) == '() -> typing.Tuple[int, str, int]'\n\n # optional\n sig = inspect.signature(f13)\n assert stringify_signature(sig) == '() -> typing.Optional[str]'\n\n # optional union\n sig = inspect.signature(f20)\n assert stringify_signature(sig) in ('() -> typing.Optional[typing.Union[int, str]]',\n '() -> typing.Optional[typing.Union[str, int]]')\n\n # Any\n sig = inspect.signature(f14)\n assert stringify_signature(sig) == '() -> typing.Any'\n\n # ForwardRef\n sig = inspect.signature(f15)\n # ... other code\n if sys.version_info < (3, 11):\n # ... other code\n # ... other code\n if sys.version_info < (3, 11):\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_annotations.None_14_test_signature_annotations.None_3.else_.assert_stringify_signatur": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_signature_annotations.None_14_test_signature_annotations.None_3.else_.assert_stringify_signatur", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 224, "end_line": 269, "span_ids": ["test_signature_annotations"], "tokens": 555}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_signature_annotations():\n # ... other code\n assert stringify_signature(sig) == '(x: typing.Union[str, numbers.Integral]) -> None'\n # ... other code\n assert stringify_signature(sig) == '(x: str, y: str) -> None'\n # ... other code\n assert stringify_signature(sig) == '(x: Unknown, y: int) -> typing.Any'\n\n # keyword only arguments (1)\n sig = inspect.signature(f16)\n assert stringify_signature(sig) == '(arg1, arg2, *, arg3=None, arg4=None)'\n\n # keyword only arguments (2)\n sig = inspect.signature(f17)\n assert stringify_signature(sig) == '(*, arg3, arg4)'\n\n sig = inspect.signature(f18)\n assert stringify_signature(sig) == ('(self, arg1: typing.Union[int, typing.Tuple] = 10) -> '\n 'typing.List[typing.Dict]')\n\n # annotations for variadic and keyword parameters\n sig = inspect.signature(f19)\n assert stringify_signature(sig) == '(*args: int, **kwargs: str)'\n\n # default value is inspect.Signature.empty\n sig = inspect.signature(f21)\n assert stringify_signature(sig) == \"(arg1='whatever', arg2)\"\n\n # type hints by string\n sig = inspect.signature(Node.children)\n assert stringify_signature(sig) == '(self) -> typing.List[tests.typing_test_data.Node]'\n\n sig = inspect.signature(Node.__init__)\n assert stringify_signature(sig) == '(self, parent: typing.Optional[tests.typing_test_data.Node]) -> None'\n\n # show_annotation is False\n sig = inspect.signature(f7)\n assert stringify_signature(sig, show_annotation=False) == '(x=None, y={})'\n\n # show_return_annotation is False\n sig = inspect.signature(f7)\n if sys.version_info < (3, 11):\n assert stringify_signature(sig, show_return_annotation=False) == '(x: typing.Optional[int] = None, y: dict = {})'\n else:\n assert stringify_signature(sig, show_return_annotation=False) == '(x: int = None, y: dict = {})'\n\n # unqualified_typehints is True\n sig = inspect.signature(f7)\n if sys.version_info < (3, 11):\n assert stringify_signature(sig, unqualified_typehints=True) == '(x: ~typing.Optional[int] = None, y: dict = {}) -> None'\n else:\n assert stringify_signature(sig, unqualified_typehints=True) == '(x: int = None, y: dict = {}) -> None'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_safe_getattr_with_default_test_object_description_enum.assert_inspect_object_des": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_safe_getattr_with_default_test_object_description_enum.assert_inspect_object_des", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 422, "end_line": 530, "span_ids": ["test_safe_getattr_with_property_exception", "test_dict_customtype", "test_object_description_enum.MyEnum:2", "test_safe_getattr_with_property_exception.Foo", "test_safe_getattr_with___dict___override.Foo", "test_safe_getattr_with_default", "test_safe_getattr_with_exception", "test_dictionary_sorting", "test_safe_getattr_with_property_exception.Foo.bar", "test_safe_getattr_with_exception.Foo", "test_safe_getattr_with___dict___override", "test_set_sorting", "test_frozenset_sorting_fallback", "test_object_description_enum.MyEnum", "test_safe_getattr_with_exception.Foo.__getattr__", "test_dict_customtype.CustomType", "test_object_description_enum", "test_frozenset_sorting", "test_safe_getattr_with_default.Foo.__getattr__", "test_set_sorting_fallback", "test_dict_customtype.CustomType.__init__", "test_safe_getattr_with_default.Foo", "test_safe_getattr_with___dict___override.Foo.__dict__"], "tokens": 716}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_safe_getattr_with_default():\n class Foo:\n def __getattr__(self, item):\n raise Exception\n\n obj = Foo()\n\n result = inspect.safe_getattr(obj, 'bar', 'baz')\n\n assert result == 'baz'\n\n\ndef test_safe_getattr_with_exception():\n class Foo:\n def __getattr__(self, item):\n raise Exception\n\n obj = Foo()\n\n try:\n inspect.safe_getattr(obj, 'bar')\n except AttributeError as exc:\n assert exc.args[0] == 'bar'\n else:\n pytest.fail('AttributeError not raised')\n\n\ndef test_safe_getattr_with_property_exception():\n class Foo:\n @property\n def bar(self):\n raise Exception\n\n obj = Foo()\n\n try:\n inspect.safe_getattr(obj, 'bar')\n except AttributeError as exc:\n assert exc.args[0] == 'bar'\n else:\n pytest.fail('AttributeError not raised')\n\n\ndef test_safe_getattr_with___dict___override():\n class Foo:\n @property\n def __dict__(self):\n raise Exception\n\n obj = Foo()\n\n try:\n inspect.safe_getattr(obj, 'bar')\n except AttributeError as exc:\n assert exc.args[0] == 'bar'\n else:\n pytest.fail('AttributeError not raised')\n\n\ndef test_dictionary_sorting():\n dictionary = {\"c\": 3, \"a\": 1, \"d\": 2, \"b\": 4}\n description = inspect.object_description(dictionary)\n assert description == \"{'a': 1, 'b': 4, 'c': 3, 'd': 2}\"\n\n\ndef test_set_sorting():\n set_ = set(\"gfedcba\")\n description = inspect.object_description(set_)\n assert description == \"{'a', 'b', 'c', 'd', 'e', 'f', 'g'}\"\n\n\ndef test_set_sorting_fallback():\n set_ = {None, 1}\n description = inspect.object_description(set_)\n assert description in (\"{1, None}\", \"{None, 1}\")\n\n\ndef test_frozenset_sorting():\n frozenset_ = frozenset(\"gfedcba\")\n description = inspect.object_description(frozenset_)\n assert description == \"frozenset({'a', 'b', 'c', 'd', 'e', 'f', 'g'})\"\n\n\ndef test_frozenset_sorting_fallback():\n frozenset_ = frozenset((None, 1))\n description = inspect.object_description(frozenset_)\n assert description in (\"frozenset({1, None})\", \"frozenset({None, 1})\")\n\n\ndef test_dict_customtype():\n class CustomType:\n def __init__(self, value):\n self._value = value\n\n def __repr__(self):\n return \"<CustomType(%r)>\" % self._value\n\n dictionary = {CustomType(2): 2, CustomType(1): 1}\n description = inspect.object_description(dictionary)\n # Type is unsortable, just check that it does not crash\n assert \"<CustomType(2)>: 2\" in description\n\n\ndef test_object_description_enum():\n class MyEnum(enum.Enum):\n FOO = 1\n BAR = 2\n\n assert inspect.object_description(MyEnum.FOO) == \"MyEnum.FOO\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isattributedescriptor_test_isattributedescriptor.try_.except_ImportError_.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inspect.py_test_isattributedescriptor_test_isattributedescriptor.try_.except_ImportError_.pass", "embedding": null, "metadata": {"file_path": "tests/test_util_inspect.py", "file_name": "test_util_inspect.py", "file_type": "text/x-python", "category": "test", "start_line": 630, "end_line": 657, "span_ids": ["test_isattributedescriptor.Descriptor", "test_isattributedescriptor.Descriptor.__get__", "test_isattributedescriptor"], "tokens": 369}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.sphinx(testroot='ext-autodoc')\ndef test_isattributedescriptor(app):\n from target.methods import Base\n\n class Descriptor:\n def __get__(self, obj, typ=None):\n pass\n\n assert inspect.isattributedescriptor(Base.prop) is True # property\n assert inspect.isattributedescriptor(Base.meth) is False # method\n assert inspect.isattributedescriptor(Base.staticmeth) is False # staticmethod\n assert inspect.isattributedescriptor(Base.classmeth) is False # classmetho\n assert inspect.isattributedescriptor(Descriptor) is False # custom descriptor class # NOQA\n assert inspect.isattributedescriptor(str.join) is False # MethodDescriptorType # NOQA\n assert inspect.isattributedescriptor(object.__init__) is False # WrapperDescriptorType # NOQA\n assert inspect.isattributedescriptor(dict.__dict__['fromkeys']) is False # ClassMethodDescriptorType # NOQA\n assert inspect.isattributedescriptor(types.FrameType.f_locals) is True # GetSetDescriptorType # NOQA\n assert inspect.isattributedescriptor(datetime.timedelta.days) is True # MemberDescriptorType # NOQA\n\n try:\n # _testcapi module cannot be importable in some distro\n # refs: https://github.com/sphinx-doc/sphinx/issues/9868\n import _testcapi\n\n testinstancemethod = _testcapi.instancemethod(str.__repr__)\n assert inspect.isattributedescriptor(testinstancemethod) is False # instancemethod (C-API) # NOQA\n except ImportError:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inventory.py__Test_inventory_util_fu_test_read_inventory_v1.assert_invdata_py_class_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_inventory.py__Test_inventory_util_fu_test_read_inventory_v1.assert_invdata_py_class_", "embedding": null, "metadata": {"file_path": "tests/test_util_inventory.py", "file_name": "test_util_inventory.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 60, "span_ids": ["impl", "docstring", "imports", "test_read_inventory_v1"], "tokens": 560}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test inventory util functions.\"\"\"\n\nimport posixpath\nimport zlib\nfrom io import BytesIO\n\nfrom sphinx.ext.intersphinx import InventoryFile\n\ninventory_v1 = b'''\\\n# Sphinx inventory version 1\n# Project: foo\n# Version: 1.0\nmodule mod foo.html\nmodule.cls class foo.html\n'''\n\ninventory_v2 = b'''\\\n# Sphinx inventory version 2\n# Project: foo\n# Version: 2.0\n# The remainder of this file is compressed with zlib.\n''' + zlib.compress(b'''\\\nmodule1 py:module 0 foo.html#module-module1 Long Module desc\nmodule2 py:module 0 foo.html#module-$ -\nmodule1.func py:function 1 sub/foo.html#$ -\nmodule1.Foo.bar py:method 1 index.html#foo.Bar.baz -\nCFunc c:function 2 cfunc.html#CFunc -\nstd cpp:type 1 index.html#std -\nstd::uint8_t cpp:type 1 index.html#std_uint8_t -\nfoo::Bar cpp:class 1 index.html#cpp_foo_bar -\nfoo::Bar::baz cpp:function 1 index.html#cpp_foo_bar_baz -\nfoons cpp:type 1 index.html#foons -\nfoons::bartype cpp:type 1 index.html#foons_bartype -\na term std:term -1 glossary.html#term-a-term -\nls.-l std:cmdoption 1 index.html#cmdoption-ls-l -\ndocname std:doc -1 docname.html -\nfoo js:module 1 index.html#foo -\nfoo.bar js:class 1 index.html#foo.bar -\nfoo.bar.baz js:method 1 index.html#foo.bar.baz -\nfoo.bar.qux js:data 1 index.html#foo.bar.qux -\na term including:colon std:term -1 glossary.html#term-a-term-including-colon -\n''')\n\ninventory_v2_not_having_version = b'''\\\n# Sphinx inventory version 2\n# Project: foo\n# Version:\n# The remainder of this file is compressed with zlib.\n''' + zlib.compress(b'''\\\nmodule1 py:module 0 foo.html#module-module1 Long Module desc\n''')\n\n\ndef test_read_inventory_v1():\n f = BytesIO(inventory_v1)\n invdata = InventoryFile.load(f, '/util', posixpath.join)\n assert invdata['py:module']['module'] == \\\n ('foo', '1.0', '/util/foo.html#module-module', '-')\n assert invdata['py:class']['module.cls'] == \\\n ('foo', '1.0', '/util/foo.html#module.cls', '-')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py__Test_logging_util__test_Exception.assert_class_Exception": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py__Test_logging_util__test_Exception.assert_class_Exception", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 46, "span_ids": ["test_info_and_warning", "test_Exception", "docstring", "imports"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test logging util.\"\"\"\n\nimport codecs\nimport os\n\nimport pytest\nfrom docutils import nodes\n\nfrom sphinx.errors import SphinxWarning\nfrom sphinx.testing.util import strip_escseq\nfrom sphinx.util import logging\nfrom sphinx.util.console import colorize\nfrom sphinx.util.logging import is_suppressed_warning, prefixed_warnings\nfrom sphinx.util.parallel import ParallelTasks\n\n\ndef test_info_and_warning(app, status, warning):\n app.verbosity = 2\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.debug('message1')\n logger.info('message2')\n logger.warning('message3')\n logger.critical('message4')\n logger.error('message5')\n\n assert 'message1' in status.getvalue()\n assert 'message2' in status.getvalue()\n assert 'message3' not in status.getvalue()\n assert 'message4' not in status.getvalue()\n assert 'message5' not in status.getvalue()\n\n assert 'message1' not in warning.getvalue()\n assert 'message2' not in warning.getvalue()\n assert 'WARNING: message3' in warning.getvalue()\n assert 'CRITICAL: message4' in warning.getvalue()\n assert 'ERROR: message5' in warning.getvalue()\n\n\ndef test_Exception(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n logger.info(Exception)\n assert \"<class 'Exception'>\" in status.getvalue()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_is_suppressed_warning_test_is_suppressed_warning.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_is_suppressed_warning_test_is_suppressed_warning.None_8", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 115, "end_line": 126, "span_ids": ["test_is_suppressed_warning"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_is_suppressed_warning():\n suppress_warnings = [\"ref\", \"files.*\", \"rest.duplicated_labels\"]\n\n assert is_suppressed_warning(None, None, suppress_warnings) is False\n assert is_suppressed_warning(\"ref\", None, suppress_warnings) is True\n assert is_suppressed_warning(\"ref\", \"numref\", suppress_warnings) is True\n assert is_suppressed_warning(\"ref\", \"option\", suppress_warnings) is True\n assert is_suppressed_warning(\"files\", \"image\", suppress_warnings) is True\n assert is_suppressed_warning(\"files\", \"stylesheet\", suppress_warnings) is True\n assert is_suppressed_warning(\"rest\", None, suppress_warnings) is False\n assert is_suppressed_warning(\"rest\", \"syntax\", suppress_warnings) is False\n assert is_suppressed_warning(\"rest\", \"duplicated_labels\", suppress_warnings) is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_suppress_warnings_test_suppress_warnings.None_14": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_suppress_warnings_test_suppress_warnings.None_14", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 129, "end_line": 169, "span_ids": ["test_suppress_warnings"], "tokens": 419}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_suppress_warnings(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n app._warncount = 0 # force reset\n\n app.config.suppress_warnings = []\n warning.truncate(0)\n logger.warning('message0', type='test')\n logger.warning('message1', type='test', subtype='logging')\n logger.warning('message2', type='test', subtype='crash')\n logger.warning('message3', type='actual', subtype='logging')\n assert 'message0' in warning.getvalue()\n assert 'message1' in warning.getvalue()\n assert 'message2' in warning.getvalue()\n assert 'message3' in warning.getvalue()\n assert app._warncount == 4\n\n app.config.suppress_warnings = ['test']\n warning.truncate(0)\n logger.warning('message0', type='test')\n logger.warning('message1', type='test', subtype='logging')\n logger.warning('message2', type='test', subtype='crash')\n logger.warning('message3', type='actual', subtype='logging')\n assert 'message0' not in warning.getvalue()\n assert 'message1' not in warning.getvalue()\n assert 'message2' not in warning.getvalue()\n assert 'message3' in warning.getvalue()\n assert app._warncount == 5\n\n app.config.suppress_warnings = ['test.logging']\n warning.truncate(0)\n logger.warning('message0', type='test')\n logger.warning('message1', type='test', subtype='logging')\n logger.warning('message2', type='test', subtype='crash')\n logger.warning('message3', type='actual', subtype='logging')\n assert 'message0' in warning.getvalue()\n assert 'message1' not in warning.getvalue()\n assert 'message2' in warning.getvalue()\n assert 'message3' in warning.getvalue()\n assert app._warncount == 8", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_logging_in_ParallelTasks_test_output_with_unencodable_char.assert_status_getvalue_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_logging_in_ParallelTasks_test_output_with_unencodable_char.assert_status_getvalue_", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 310, "end_line": 338, "span_ids": ["test_output_with_unencodable_char.StreamWriter", "test_output_with_unencodable_char", "test_logging_in_ParallelTasks", "test_output_with_unencodable_char.StreamWriter.write"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(os.name != 'posix', reason=\"Not working on windows\")\ndef test_logging_in_ParallelTasks(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n def child_process():\n logger.info('message1')\n logger.warning('message2', location='index')\n\n tasks = ParallelTasks(1)\n tasks.add_task(child_process)\n tasks.join()\n assert 'message1' in status.getvalue()\n assert 'index.txt: WARNING: message2' in warning.getvalue()\n\n\ndef test_output_with_unencodable_char(app, status, warning):\n class StreamWriter(codecs.StreamWriter):\n def write(self, object):\n self.stream.write(object.encode('cp1252').decode('cp1252'))\n\n logging.setup(app, StreamWriter(status), warning)\n logger = logging.getLogger(__name__)\n\n # info with UnicodeEncodeError\n status.truncate(0)\n status.seek(0)\n logger.info(\"unicode \\u206d...\")\n assert status.getvalue() == \"unicode ?...\\n\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_skip_warningiserror_test_skip_warningiserror.None_3.with_logging_pending_warn.with_logging_skip_warning.logger_warning_message_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_logging.py_test_skip_warningiserror_test_skip_warningiserror.None_3.with_logging_pending_warn.with_logging_skip_warning.logger_warning_message_", "embedding": null, "metadata": {"file_path": "tests/test_util_logging.py", "file_name": "test_util_logging.py", "file_type": "text/x-python", "category": "test", "start_line": 341, "end_line": 362, "span_ids": ["test_skip_warningiserror"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_skip_warningiserror(app, status, warning):\n logging.setup(app, status, warning)\n logger = logging.getLogger(__name__)\n\n app.warningiserror = True\n with logging.skip_warningiserror():\n logger.warning('message')\n\n # if False, warning raises SphinxWarning exception\n with pytest.raises(SphinxWarning):\n with logging.skip_warningiserror(False):\n logger.warning('message')\n\n # It also works during pending_warnings.\n with logging.pending_warnings():\n with logging.skip_warningiserror():\n logger.warning('message')\n\n with pytest.raises(SphinxWarning):\n with logging.pending_warnings():\n with logging.skip_warningiserror(False):\n logger.warning('message')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_matching.py__Tests_sphinx_util_matc_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_matching.py__Tests_sphinx_util_matc_", "embedding": null, "metadata": {"file_path": "tests/test_util_matching.py", "file_name": "test_util_matching.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 83, "span_ids": ["test_Matcher", "docstring", "imports", "test_compile_matchers"], "tokens": 629}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests sphinx.util.matching functions.\"\"\"\nfrom sphinx.util.matching import Matcher, compile_matchers\n\n\ndef test_compile_matchers():\n # exact matching\n pat = compile_matchers(['hello.py']).pop()\n assert pat('hello.py')\n assert not pat('hello-py')\n assert not pat('subdir/hello.py')\n\n # wild card (*)\n pat = compile_matchers(['hello.*']).pop()\n assert pat('hello.py')\n assert pat('hello.rst')\n\n pat = compile_matchers(['*.py']).pop()\n assert pat('hello.py')\n assert pat('world.py')\n assert not pat('subdir/hello.py')\n\n # wild card (**)\n pat = compile_matchers(['hello.**']).pop()\n assert pat('hello.py')\n assert pat('hello.rst')\n assert pat('hello.py/world.py')\n\n pat = compile_matchers(['**.py']).pop()\n assert pat('hello.py')\n assert pat('world.py')\n assert pat('subdir/hello.py')\n\n pat = compile_matchers(['**/hello.py']).pop()\n assert not pat('hello.py')\n assert pat('subdir/hello.py')\n assert pat('subdir/subdir/hello.py')\n\n # wild card (?)\n pat = compile_matchers(['hello.?']).pop()\n assert pat('hello.c')\n assert not pat('hello.py')\n\n # pattern ([...])\n pat = compile_matchers(['hello[12\\\\].py']).pop()\n assert pat('hello1.py')\n assert pat('hello2.py')\n assert pat('hello\\\\.py')\n assert not pat('hello3.py')\n\n pat = compile_matchers(['hello[^12].py']).pop() # \"^\" is not negative identifier\n assert pat('hello1.py')\n assert pat('hello2.py')\n assert pat('hello^.py')\n assert not pat('hello3.py')\n\n # negative pattern ([!...])\n pat = compile_matchers(['hello[!12].py']).pop()\n assert not pat('hello1.py')\n assert not pat('hello2.py')\n assert not pat('hello/.py') # negative pattern does not match to \"/\"\n assert pat('hello3.py')\n\n # non patterns\n pat = compile_matchers(['hello[.py']).pop()\n assert pat('hello[.py')\n assert not pat('hello.py')\n\n pat = compile_matchers(['hello[].py']).pop()\n assert pat('hello[].py')\n assert not pat('hello.py')\n\n pat = compile_matchers(['hello[!].py']).pop()\n assert pat('hello[!].py')\n assert not pat('hello.py')\n\n\ndef test_Matcher():\n matcher = Matcher(['hello.py', '**/world.py'])\n assert matcher('hello.py')\n assert not matcher('subdir/hello.py')\n assert matcher('world.py')\n assert matcher('subdir/world.py')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py__Tests_uti_nodes_functi_assert_node_count.assert_count_expect_co": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_nodes.py__Tests_uti_nodes_functi_assert_node_count.assert_count_expect_co", "embedding": null, "metadata": {"file_path": "tests/test_util_nodes.py", "file_name": "test_util_nodes.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 43, "span_ids": ["_transform", "create_new_document", "docstring", "imports", "assert_node_count", "_get_doctree"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests uti.nodes functions.\"\"\"\nfrom textwrap import dedent\nfrom typing import Any\n\nimport pytest\nfrom docutils import frontend, nodes\nfrom docutils.parsers import rst\nfrom docutils.utils import new_document\n\nfrom sphinx.transforms import ApplySourceWorkaround\nfrom sphinx.util.nodes import (NodeMatcher, clean_astext, extract_messages, make_id,\n split_explicit_title)\n\n\ndef _transform(doctree):\n ApplySourceWorkaround(doctree).apply()\n\n\ndef create_new_document():\n settings = frontend.OptionParser(\n components=(rst.Parser,)).get_default_values()\n settings.id_prefix = 'id'\n document = new_document('dummy.txt', settings)\n return document\n\n\ndef _get_doctree(text):\n document = create_new_document()\n rst.Parser().parse(text, document)\n _transform(document)\n return document\n\n\ndef assert_node_count(messages, node_type, expect_count):\n count = 0\n node_list = [node for node, msg in messages]\n for node in node_list:\n if isinstance(node, node_type):\n count += 1\n\n assert count == expect_count, (\n \"Count of %r in the %r is %d instead of %d\"\n % (node_type, node_list, count, expect_count))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py__Tests_sphinx_util_rst__test_escape.assert_escape_toctree": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_rst.py__Tests_sphinx_util_rst__test_escape.assert_escape_toctree", "embedding": null, "metadata": {"file_path": "tests/test_util_rst.py", "file_name": "test_util_rst.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 13, "span_ids": ["docstring", "imports", "test_escape"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests sphinx.util.rst functions.\"\"\"\n\nfrom docutils.statemachine import StringList\nfrom jinja2 import Environment\n\nfrom sphinx.util.rst import append_epilog, escape, heading, prepend_prolog, textwidth\n\n\ndef test_escape():\n assert escape(':ref:`id`') == r'\\:ref\\:\\`id\\`'\n assert escape('footnote [#]_') == r'footnote \\[\\#\\]\\_'\n assert escape('sphinx.application') == r'sphinx.application'\n assert escape('.. toctree::') == r'\\.. toctree\\:\\:'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_template.py__Tests_sphinx_util_temp_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_template.py__Tests_sphinx_util_temp_", "embedding": null, "metadata": {"file_path": "tests/test_util_template.py", "file_name": "test_util_template.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 30, "span_ids": ["docstring", "imports", "test_ReSTRenderer_escape", "test_ReSTRenderer_heading"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests sphinx.util.template functions.\"\"\"\n\nfrom sphinx.util.template import ReSTRenderer\n\n\ndef test_ReSTRenderer_escape():\n r = ReSTRenderer()\n template = '{{ \"*hello*\" | e }}'\n assert r.render_string(template, {}) == r'\\*hello\\*'\n\n\ndef test_ReSTRenderer_heading():\n r = ReSTRenderer()\n\n template = '{{ \"hello\" | heading }}'\n assert r.render_string(template, {}) == 'hello\\n====='\n\n template = '{{ \"hello\" | heading(1) }}'\n assert r.render_string(template, {}) == 'hello\\n====='\n\n template = '{{ \"\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a\" | heading(2) }}'\n assert r.render_string(template, {}) == ('\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a\\n'\n '------------')\n\n # language: ja\n r.env.language = 'ja'\n template = '{{ \"\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a\" | heading }}'\n assert r.render_string(template, {}) == ('\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a\\n'\n '=======================')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py__Tests_util_typing_func_BrokenType.__args__.int": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py__Tests_util_typing_func_BrokenType.__args__.int", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 33, "span_ids": ["impl", "MyList", "impl:2", "docstring", "MyClass2", "imports", "BrokenType", "MyClass1"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests util.typing functions.\"\"\"\n\nimport sys\nfrom numbers import Integral\nfrom struct import Struct\nfrom types import TracebackType\nfrom typing import (Any, Callable, Dict, Generator, List, NewType, Optional, Tuple, TypeVar,\n Union)\n\nimport pytest\n\nfrom sphinx.ext.autodoc import mock\nfrom sphinx.util.typing import restify, stringify\n\n\nclass MyClass1:\n pass\n\n\nclass MyClass2(MyClass1):\n __qualname__ = '<MyClass2>'\n\n\nT = TypeVar('T')\nMyInt = NewType('MyInt', int)\n\n\nclass MyList(List[T]):\n pass\n\n\nclass BrokenType:\n __args__ = int", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_test_restify.assert_restify_str_sm": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_test_restify.assert_restify_str_sm", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 36, "end_line": 59, "span_ids": ["test_restify"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_restify():\n assert restify(int) == \":py:class:`int`\"\n assert restify(int, \"smart\") == \":py:class:`int`\"\n\n assert restify(str) == \":py:class:`str`\"\n assert restify(str, \"smart\") == \":py:class:`str`\"\n\n assert restify(None) == \":py:obj:`None`\"\n assert restify(None, \"smart\") == \":py:obj:`None`\"\n\n assert restify(Integral) == \":py:class:`numbers.Integral`\"\n assert restify(Integral, \"smart\") == \":py:class:`~numbers.Integral`\"\n\n assert restify(Struct) == \":py:class:`struct.Struct`\"\n assert restify(Struct, \"smart\") == \":py:class:`~struct.Struct`\"\n\n assert restify(TracebackType) == \":py:class:`types.TracebackType`\"\n assert restify(TracebackType, \"smart\") == \":py:class:`~types.TracebackType`\"\n\n assert restify(Any) == \":py:obj:`~typing.Any`\"\n assert restify(Any, \"smart\") == \":py:obj:`~typing.Any`\"\n\n assert restify('str') == \"str\"\n assert restify('str', \"smart\") == \"str\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_Union_test_restify_type_hints_Union.if_sys_version_info_3.else_.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_Union_test_restify_type_hints_Union.if_sys_version_info_3.else_.None_3", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 105, "end_line": 131, "span_ids": ["test_restify_type_hints_Union"], "tokens": 432}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_restify_type_hints_Union():\n assert restify(Optional[int]) == \":py:obj:`~typing.Optional`\\\\ [:py:class:`int`]\"\n assert restify(Union[str, None]) == \":py:obj:`~typing.Optional`\\\\ [:py:class:`str`]\"\n assert restify(Union[int, str]) == (\":py:obj:`~typing.Union`\\\\ \"\n \"[:py:class:`int`, :py:class:`str`]\")\n\n if sys.version_info >= (3, 7):\n assert restify(Union[int, Integral]) == (\":py:obj:`~typing.Union`\\\\ \"\n \"[:py:class:`int`, :py:class:`numbers.Integral`]\")\n assert restify(Union[int, Integral], \"smart\") == (\":py:obj:`~typing.Union`\\\\ \"\n \"[:py:class:`int`,\"\n \" :py:class:`~numbers.Integral`]\")\n\n assert (restify(Union[MyClass1, MyClass2]) ==\n (\":py:obj:`~typing.Union`\\\\ \"\n \"[:py:class:`tests.test_util_typing.MyClass1`, \"\n \":py:class:`tests.test_util_typing.<MyClass2>`]\"))\n assert (restify(Union[MyClass1, MyClass2], \"smart\") ==\n (\":py:obj:`~typing.Union`\\\\ \"\n \"[:py:class:`~tests.test_util_typing.MyClass1`,\"\n \" :py:class:`~tests.test_util_typing.<MyClass2>`]\"))\n else:\n assert restify(Union[int, Integral]) == \":py:class:`numbers.Integral`\"\n assert restify(Union[int, Integral], \"smart\") == \":py:class:`~numbers.Integral`\"\n\n assert restify(Union[MyClass1, MyClass2]) == \":py:class:`tests.test_util_typing.MyClass1`\"\n assert restify(Union[MyClass1, MyClass2], \"smart\") == \":py:class:`~tests.test_util_typing.MyClass1`\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_typevars_test_restify_type_hints_typevars.if_sys_version_info_3.else_.assert_restify_MyInt_sm": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_typevars_test_restify_type_hints_typevars.if_sys_version_info_3.else_.assert_restify_MyInt_sm", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 134, "end_line": 157, "span_ids": ["test_restify_type_hints_typevars"], "tokens": 371}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.')\ndef test_restify_type_hints_typevars():\n T = TypeVar('T')\n T_co = TypeVar('T_co', covariant=True)\n T_contra = TypeVar('T_contra', contravariant=True)\n\n assert restify(T) == \":py:obj:`tests.test_util_typing.T`\"\n assert restify(T, \"smart\") == \":py:obj:`~tests.test_util_typing.T`\"\n\n assert restify(T_co) == \":py:obj:`tests.test_util_typing.T_co`\"\n assert restify(T_co, \"smart\") == \":py:obj:`~tests.test_util_typing.T_co`\"\n\n assert restify(T_contra) == \":py:obj:`tests.test_util_typing.T_contra`\"\n assert restify(T_contra, \"smart\") == \":py:obj:`~tests.test_util_typing.T_contra`\"\n\n assert restify(List[T]) == \":py:class:`~typing.List`\\\\ [:py:obj:`tests.test_util_typing.T`]\"\n assert restify(List[T], \"smart\") == \":py:class:`~typing.List`\\\\ [:py:obj:`~tests.test_util_typing.T`]\"\n\n if sys.version_info >= (3, 10):\n assert restify(MyInt) == \":py:class:`tests.test_util_typing.MyInt`\"\n assert restify(MyInt, \"smart\") == \":py:class:`~tests.test_util_typing.MyInt`\"\n else:\n assert restify(MyInt) == \":py:class:`MyInt`\"\n assert restify(MyInt, \"smart\") == \":py:class:`MyInt`\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_custom_class_test_restify_type_hints_custom_class.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_custom_class_test_restify_type_hints_custom_class.None_3", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 165, "span_ids": ["test_restify_type_hints_custom_class"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_restify_type_hints_custom_class():\n assert restify(MyClass1) == \":py:class:`tests.test_util_typing.MyClass1`\"\n assert restify(MyClass1, \"smart\") == \":py:class:`~tests.test_util_typing.MyClass1`\"\n\n assert restify(MyClass2) == \":py:class:`tests.test_util_typing.<MyClass2>`\"\n assert restify(MyClass2, \"smart\") == \":py:class:`~tests.test_util_typing.<MyClass2>`\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_alias_test_restify_type_Literal.assert_restify_Literal_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_hints_alias_test_restify_type_Literal.assert_restify_Literal_1_", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 168, "end_line": 184, "span_ids": ["test_restify_type_ForwardRef", "test_restify_type_hints_alias", "test_restify_type_Literal"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_restify_type_hints_alias():\n MyStr = str\n MyTuple = Tuple[str, str]\n assert restify(MyStr) == \":py:class:`str`\"\n assert restify(MyTuple) == \":py:class:`~typing.Tuple`\\\\ [:py:class:`str`, :py:class:`str`]\"\n\n\n@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.')\ndef test_restify_type_ForwardRef():\n from typing import ForwardRef # type: ignore\n assert restify(ForwardRef(\"myint\")) == \":py:class:`myint`\"\n\n\n@pytest.mark.skipif(sys.version_info < (3, 8), reason='python 3.8+ is required.')\ndef test_restify_type_Literal():\n from typing import Literal # type: ignore\n assert restify(Literal[1, \"2\", \"\\r\"]) == \":py:obj:`~typing.Literal`\\\\ [1, '2', '\\\\r']\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_pep_585_test_restify_pep_585.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_pep_585_test_restify_pep_585.None_2", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 187, "end_line": 194, "span_ids": ["test_restify_pep_585"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 9), reason='python 3.9+ is required.')\ndef test_restify_pep_585():\n assert restify(list[str]) == \":py:class:`list`\\\\ [:py:class:`str`]\" # type: ignore\n assert restify(dict[str, str]) == (\":py:class:`dict`\\\\ \" # type: ignore\n \"[:py:class:`str`, :py:class:`str`]\")\n assert restify(dict[str, tuple[int, ...]]) == (\":py:class:`dict`\\\\ \" # type: ignore\n \"[:py:class:`str`, :py:class:`tuple`\\\\ \"\n \"[:py:class:`int`, ...]]\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_union_operator_test_restify_type_union_operator.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_type_union_operator_test_restify_type_union_operator.None_2", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 197, "end_line": 202, "span_ids": ["test_restify_type_union_operator"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 10), reason='python 3.10+ is required.')\ndef test_restify_type_union_operator():\n assert restify(int | None) == \":py:class:`int` | :py:obj:`None`\" # type: ignore\n assert restify(int | str) == \":py:class:`int` | :py:class:`str`\" # type: ignore\n assert restify(int | str | None) == (\":py:class:`int` | :py:class:`str` | \" # type: ignore\n \":py:obj:`None`\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_broken_type_hints_test_restify_mock.with_mock_unknown_.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_restify_broken_type_hints_test_restify_mock.with_mock_unknown_.None_2", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 205, "end_line": 215, "span_ids": ["test_restify_broken_type_hints", "test_restify_mock"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_restify_broken_type_hints():\n assert restify(BrokenType) == ':py:class:`tests.test_util_typing.BrokenType`'\n assert restify(BrokenType, \"smart\") == ':py:class:`~tests.test_util_typing.BrokenType`'\n\n\ndef test_restify_mock():\n with mock(['unknown']):\n import unknown\n assert restify(unknown) == ':py:class:`unknown`'\n assert restify(unknown.secret.Class) == ':py:class:`unknown.secret.Class`'\n assert restify(unknown.secret.Class, \"smart\") == ':py:class:`~unknown.secret.Class`'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_test_stringify.assert_stringify_Any_sm": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_test_stringify.assert_stringify_Any_sm", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 218, "end_line": 239, "span_ids": ["test_stringify"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stringify():\n assert stringify(int) == \"int\"\n assert stringify(int, \"smart\") == \"int\"\n\n assert stringify(str) == \"str\"\n assert stringify(str, \"smart\") == \"str\"\n\n assert stringify(None) == \"None\"\n assert stringify(None, \"smart\") == \"None\"\n\n assert stringify(Integral) == \"numbers.Integral\"\n assert stringify(Integral, \"smart\") == \"~numbers.Integral\"\n\n assert stringify(Struct) == \"struct.Struct\"\n assert stringify(Struct, \"smart\") == \"~struct.Struct\"\n\n assert stringify(TracebackType) == \"types.TracebackType\"\n assert stringify(TracebackType, \"smart\") == \"~types.TracebackType\"\n\n assert stringify(Any) == \"Any\"\n assert stringify(Any, \"fully-qualified\") == \"typing.Any\"\n assert stringify(Any, \"smart\") == \"~typing.Any\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_containers_test_stringify_type_hints_containers.None_29": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_containers_test_stringify_type_hints_containers.None_29", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 242, "end_line": 290, "span_ids": ["test_stringify_type_hints_containers"], "tokens": 731}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stringify_type_hints_containers():\n assert stringify(List) == \"List\"\n assert stringify(List, \"fully-qualified\") == \"typing.List\"\n assert stringify(List, \"smart\") == \"~typing.List\"\n\n assert stringify(Dict) == \"Dict\"\n assert stringify(Dict, \"fully-qualified\") == \"typing.Dict\"\n assert stringify(Dict, \"smart\") == \"~typing.Dict\"\n\n assert stringify(List[int]) == \"List[int]\"\n assert stringify(List[int], \"fully-qualified\") == \"typing.List[int]\"\n assert stringify(List[int], \"smart\") == \"~typing.List[int]\"\n\n assert stringify(List[str]) == \"List[str]\"\n assert stringify(List[str], \"fully-qualified\") == \"typing.List[str]\"\n assert stringify(List[str], \"smart\") == \"~typing.List[str]\"\n\n assert stringify(Dict[str, float]) == \"Dict[str, float]\"\n assert stringify(Dict[str, float], \"fully-qualified\") == \"typing.Dict[str, float]\"\n assert stringify(Dict[str, float], \"smart\") == \"~typing.Dict[str, float]\"\n\n assert stringify(Tuple[str, str, str]) == \"Tuple[str, str, str]\"\n assert stringify(Tuple[str, str, str], \"fully-qualified\") == \"typing.Tuple[str, str, str]\"\n assert stringify(Tuple[str, str, str], \"smart\") == \"~typing.Tuple[str, str, str]\"\n\n assert stringify(Tuple[str, ...]) == \"Tuple[str, ...]\"\n assert stringify(Tuple[str, ...], \"fully-qualified\") == \"typing.Tuple[str, ...]\"\n assert stringify(Tuple[str, ...], \"smart\") == \"~typing.Tuple[str, ...]\"\n\n if sys.version_info < (3, 11):\n assert stringify(Tuple[()]) == \"Tuple[()]\"\n assert stringify(Tuple[()], \"fully-qualified\") == \"typing.Tuple[()]\"\n assert stringify(Tuple[()], \"smart\") == \"~typing.Tuple[()]\"\n else:\n assert stringify(Tuple[()]) == \"Tuple\"\n assert stringify(Tuple[()], \"fully-qualified\") == \"typing.Tuple\"\n assert stringify(Tuple[()], \"smart\") == \"~typing.Tuple\"\n\n assert stringify(List[Dict[str, Tuple]]) == \"List[Dict[str, Tuple]]\"\n assert stringify(List[Dict[str, Tuple]], \"fully-qualified\") == \"typing.List[typing.Dict[str, typing.Tuple]]\"\n assert stringify(List[Dict[str, Tuple]], \"smart\") == \"~typing.List[~typing.Dict[str, ~typing.Tuple]]\"\n\n assert stringify(MyList[Tuple[int, int]]) == \"tests.test_util_typing.MyList[Tuple[int, int]]\"\n assert stringify(MyList[Tuple[int, int]], \"fully-qualified\") == \"tests.test_util_typing.MyList[typing.Tuple[int, int]]\"\n assert stringify(MyList[Tuple[int, int]], \"smart\") == \"~tests.test_util_typing.MyList[~typing.Tuple[int, int]]\"\n\n assert stringify(Generator[None, None, None]) == \"Generator[None, None, None]\"\n assert stringify(Generator[None, None, None], \"fully-qualified\") == \"typing.Generator[None, None, None]\"\n assert stringify(Generator[None, None, None], \"smart\") == \"~typing.Generator[None, None, None]\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_pep_585_test_stringify_type_hints_pep_585.None_15": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_pep_585_test_stringify_type_hints_pep_585.None_15", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 293, "end_line": 317, "span_ids": ["test_stringify_type_hints_pep_585"], "tokens": 295}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 9), reason='python 3.9+ is required.')\ndef test_stringify_type_hints_pep_585():\n assert stringify(list[int]) == \"list[int]\"\n assert stringify(list[int], \"smart\") == \"list[int]\"\n\n assert stringify(list[str]) == \"list[str]\"\n assert stringify(list[str], \"smart\") == \"list[str]\"\n\n assert stringify(dict[str, float]) == \"dict[str, float]\"\n assert stringify(dict[str, float], \"smart\") == \"dict[str, float]\"\n\n assert stringify(tuple[str, str, str]) == \"tuple[str, str, str]\"\n assert stringify(tuple[str, str, str], \"smart\") == \"tuple[str, str, str]\"\n\n assert stringify(tuple[str, ...]) == \"tuple[str, ...]\"\n assert stringify(tuple[str, ...], \"smart\") == \"tuple[str, ...]\"\n\n assert stringify(tuple[()]) == \"tuple[()]\"\n assert stringify(tuple[()], \"smart\") == \"tuple[()]\"\n\n assert stringify(list[dict[str, tuple]]) == \"list[dict[str, tuple]]\"\n assert stringify(list[dict[str, tuple]], \"smart\") == \"list[dict[str, tuple]]\"\n\n assert stringify(type[int]) == \"type[int]\"\n assert stringify(type[int], \"smart\") == \"type[int]\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_Annotated_test_stringify_type_hints_string.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_Annotated_test_stringify_type_hints_string.None_9", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 320, "end_line": 341, "span_ids": ["test_stringify_type_hints_string", "test_stringify_Annotated"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 9), reason='python 3.9+ is required.')\ndef test_stringify_Annotated():\n from typing import Annotated # type: ignore\n assert stringify(Annotated[str, \"foo\", \"bar\"]) == \"str\" # NOQA\n assert stringify(Annotated[str, \"foo\", \"bar\"], \"smart\") == \"str\" # NOQA\n\n\ndef test_stringify_type_hints_string():\n assert stringify(\"int\") == \"int\"\n assert stringify(\"int\", \"smart\") == \"int\"\n\n assert stringify(\"str\") == \"str\"\n assert stringify(\"str\", \"smart\") == \"str\"\n\n assert stringify(List[\"int\"]) == \"List[int]\"\n assert stringify(List[\"int\"], \"smart\") == \"~typing.List[int]\"\n\n assert stringify(\"Tuple[str]\") == \"Tuple[str]\"\n assert stringify(\"Tuple[str]\", \"smart\") == \"Tuple[str]\"\n\n assert stringify(\"unknown\") == \"unknown\"\n assert stringify(\"unknown\", \"smart\") == \"unknown\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_Callable_test_stringify_type_hints_Callable.if_sys_version_info_3.else_.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_Callable_test_stringify_type_hints_Callable.if_sys_version_info_3.else_.None_5", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 344, "end_line": 364, "span_ids": ["test_stringify_type_hints_Callable"], "tokens": 312}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stringify_type_hints_Callable():\n assert stringify(Callable) == \"Callable\"\n assert stringify(Callable, \"fully-qualified\") == \"typing.Callable\"\n assert stringify(Callable, \"smart\") == \"~typing.Callable\"\n\n if sys.version_info >= (3, 7):\n assert stringify(Callable[[str], int]) == \"Callable[[str], int]\"\n assert stringify(Callable[[str], int], \"fully-qualified\") == \"typing.Callable[[str], int]\"\n assert stringify(Callable[[str], int], \"smart\") == \"~typing.Callable[[str], int]\"\n\n assert stringify(Callable[..., int]) == \"Callable[[...], int]\"\n assert stringify(Callable[..., int], \"fully-qualified\") == \"typing.Callable[[...], int]\"\n assert stringify(Callable[..., int], \"smart\") == \"~typing.Callable[[...], int]\"\n else:\n assert stringify(Callable[[str], int]) == \"Callable[str, int]\"\n assert stringify(Callable[[str], int], \"fully-qualified\") == \"typing.Callable[str, int]\"\n assert stringify(Callable[[str], int], \"smart\") == \"~typing.Callable[str, int]\"\n\n assert stringify(Callable[..., int]) == \"Callable[..., int]\"\n assert stringify(Callable[..., int], \"fully-qualified\") == \"typing.Callable[..., int]\"\n assert stringify(Callable[..., int], \"smart\") == \"~typing.Callable[..., int]\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_Union_test_stringify_type_hints_Union.if_sys_version_info_3.else_.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_Union_test_stringify_type_hints_Union.if_sys_version_info_3.else_.None_5", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 367, "end_line": 398, "span_ids": ["test_stringify_type_hints_Union"], "tokens": 518}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stringify_type_hints_Union():\n assert stringify(Optional[int]) == \"Optional[int]\"\n assert stringify(Optional[int], \"fully-qualified\") == \"typing.Optional[int]\"\n assert stringify(Optional[int], \"smart\") == \"~typing.Optional[int]\"\n\n assert stringify(Union[str, None]) == \"Optional[str]\"\n assert stringify(Union[str, None], \"fully-qualified\") == \"typing.Optional[str]\"\n assert stringify(Union[str, None], \"smart\") == \"~typing.Optional[str]\"\n\n assert stringify(Union[int, str]) == \"Union[int, str]\"\n assert stringify(Union[int, str], \"fully-qualified\") == \"typing.Union[int, str]\"\n assert stringify(Union[int, str], \"smart\") == \"~typing.Union[int, str]\"\n\n if sys.version_info >= (3, 7):\n assert stringify(Union[int, Integral]) == \"Union[int, numbers.Integral]\"\n assert stringify(Union[int, Integral], \"fully-qualified\") == \"typing.Union[int, numbers.Integral]\"\n assert stringify(Union[int, Integral], \"smart\") == \"~typing.Union[int, ~numbers.Integral]\"\n\n assert (stringify(Union[MyClass1, MyClass2]) ==\n \"Union[tests.test_util_typing.MyClass1, tests.test_util_typing.<MyClass2>]\")\n assert (stringify(Union[MyClass1, MyClass2], \"fully-qualified\") ==\n \"typing.Union[tests.test_util_typing.MyClass1, tests.test_util_typing.<MyClass2>]\")\n assert (stringify(Union[MyClass1, MyClass2], \"smart\") ==\n \"~typing.Union[~tests.test_util_typing.MyClass1, ~tests.test_util_typing.<MyClass2>]\")\n else:\n assert stringify(Union[int, Integral]) == \"numbers.Integral\"\n assert stringify(Union[int, Integral], \"fully-qualified\") == \"numbers.Integral\"\n assert stringify(Union[int, Integral], \"smart\") == \"~numbers.Integral\"\n\n assert stringify(Union[MyClass1, MyClass2]) == \"tests.test_util_typing.MyClass1\"\n assert stringify(Union[MyClass1, MyClass2], \"fully-qualified\") == \"tests.test_util_typing.MyClass1\"\n assert stringify(Union[MyClass1, MyClass2], \"smart\") == \"~tests.test_util_typing.MyClass1\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_typevars_test_stringify_type_hints_typevars.if_sys_version_info_3.else_.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_typevars_test_stringify_type_hints_typevars.if_sys_version_info_3.else_.None_1", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 401, "end_line": 436, "span_ids": ["test_stringify_type_hints_typevars"], "tokens": 385}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stringify_type_hints_typevars():\n T = TypeVar('T')\n T_co = TypeVar('T_co', covariant=True)\n T_contra = TypeVar('T_contra', contravariant=True)\n\n if sys.version_info < (3, 7):\n assert stringify(T) == \"T\"\n assert stringify(T, \"smart\") == \"T\"\n\n assert stringify(T_co) == \"T_co\"\n assert stringify(T_co, \"smart\") == \"T_co\"\n\n assert stringify(T_contra) == \"T_contra\"\n assert stringify(T_contra, \"smart\") == \"T_contra\"\n\n assert stringify(List[T]) == \"List[T]\"\n assert stringify(List[T], \"smart\") == \"~typing.List[T]\"\n else:\n assert stringify(T) == \"tests.test_util_typing.T\"\n assert stringify(T, \"smart\") == \"~tests.test_util_typing.T\"\n\n assert stringify(T_co) == \"tests.test_util_typing.T_co\"\n assert stringify(T_co, \"smart\") == \"~tests.test_util_typing.T_co\"\n\n assert stringify(T_contra) == \"tests.test_util_typing.T_contra\"\n assert stringify(T_contra, \"smart\") == \"~tests.test_util_typing.T_contra\"\n\n assert stringify(List[T]) == \"List[tests.test_util_typing.T]\"\n assert stringify(List[T], \"smart\") == \"~typing.List[~tests.test_util_typing.T]\"\n\n if sys.version_info >= (3, 10):\n assert stringify(MyInt) == \"tests.test_util_typing.MyInt\"\n assert stringify(MyInt, \"smart\") == \"~tests.test_util_typing.MyInt\"\n else:\n assert stringify(MyInt) == \"MyInt\"\n assert stringify(MyInt, \"smart\") == \"MyInt\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_custom_class_test_stringify_type_hints_alias.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_hints_custom_class_test_stringify_type_hints_alias.None_1", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 439, "end_line": 455, "span_ids": ["test_stringify_type_hints_alias", "test_stringify_type_hints_custom_class"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stringify_type_hints_custom_class():\n assert stringify(MyClass1) == \"tests.test_util_typing.MyClass1\"\n assert stringify(MyClass1, \"smart\") == \"~tests.test_util_typing.MyClass1\"\n\n assert stringify(MyClass2) == \"tests.test_util_typing.<MyClass2>\"\n assert stringify(MyClass2, \"smart\") == \"~tests.test_util_typing.<MyClass2>\"\n\n\ndef test_stringify_type_hints_alias():\n MyStr = str\n MyTuple = Tuple[str, str]\n\n assert stringify(MyStr) == \"str\"\n assert stringify(MyStr, \"smart\") == \"str\"\n\n assert stringify(MyTuple) == \"Tuple[str, str]\" # type: ignore\n assert stringify(MyTuple, \"smart\") == \"~typing.Tuple[str, str]\" # type: ignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_Literal_test_stringify_type_Literal.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_Literal_test_stringify_type_Literal.None_2", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 458, "end_line": 463, "span_ids": ["test_stringify_type_Literal"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 8), reason='python 3.8+ is required.')\ndef test_stringify_type_Literal():\n from typing import Literal # type: ignore\n assert stringify(Literal[1, \"2\", \"\\r\"]) == \"Literal[1, '2', '\\\\r']\"\n assert stringify(Literal[1, \"2\", \"\\r\"], \"fully-qualified\") == \"typing.Literal[1, '2', '\\\\r']\"\n assert stringify(Literal[1, \"2\", \"\\r\"], \"smart\") == \"~typing.Literal[1, '2', '\\\\r']\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_union_operator_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_util_typing.py_test_stringify_type_union_operator_", "embedding": null, "metadata": {"file_path": "tests/test_util_typing.py", "file_name": "test_util_typing.py", "file_type": "text/x-python", "category": "test", "start_line": 466, "end_line": 489, "span_ids": ["test_stringify_type_union_operator", "test_stringify_mock", "test_stringify_broken_type_hints"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(sys.version_info < (3, 10), reason='python 3.10+ is required.')\ndef test_stringify_type_union_operator():\n assert stringify(int | None) == \"int | None\" # type: ignore\n assert stringify(int | None, \"smart\") == \"int | None\" # type: ignore\n\n assert stringify(int | str) == \"int | str\" # type: ignore\n assert stringify(int | str, \"smart\") == \"int | str\" # type: ignore\n\n assert stringify(int | str | None) == \"int | str | None\" # type: ignore\n assert stringify(int | str | None, \"smart\") == \"int | str | None\" # type: ignore\n\n\ndef test_stringify_broken_type_hints():\n assert stringify(BrokenType) == 'tests.test_util_typing.BrokenType'\n assert stringify(BrokenType, \"smart\") == '~tests.test_util_typing.BrokenType'\n\n\ndef test_stringify_mock():\n with mock(['unknown']):\n import unknown\n assert stringify(unknown) == 'unknown'\n assert stringify(unknown.secret.Class) == 'unknown.secret.Class'\n assert stringify(unknown.secret.Class, \"smart\") == 'unknown.secret.Class'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_versioning.py__Test_the_versioning_im_setup_module.app_cleanup_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_versioning.py__Test_the_versioning_im_setup_module.app_cleanup_", "embedding": null, "metadata": {"file_path": "tests/test_versioning.py", "file_name": "test_versioning.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 34, "span_ids": ["impl", "imports:6", "impl:2", "docstring", "setup_module", "imports", "imports:7", "impl:3"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the versioning implementation.\"\"\"\n\nimport pickle\n\nimport pytest\n\nfrom sphinx import addnodes\nfrom sphinx.testing.util import SphinxTestApp\nfrom sphinx.versioning import add_uids, get_ratio, merge_doctrees\n\ntry:\n from docutils.nodes import meta\nexcept ImportError:\n # docutils-0.18.0 or older\n from docutils.parsers.rst.directives.html import MetaBody\n meta = MetaBody.meta\n\napp = original = original_uids = None\n\n\n@pytest.fixture(scope='module', autouse=True)\ndef setup_module(rootdir, sphinx_test_tempdir):\n global app, original, original_uids\n srcdir = sphinx_test_tempdir / 'test-versioning'\n if not srcdir.exists():\n (rootdir / 'test-versioning').copytree(srcdir)\n app = SphinxTestApp(srcdir=srcdir)\n app.builder.env.app = app\n app.connect('doctree-resolved', on_doctree_resolved)\n app.build()\n original = doctrees['original']\n original_uids = [n.uid for n in add_uids(original, is_paragraph)]\n yield\n app.cleanup()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_writer_latex.py__Test_the_LaTeX_writer__": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/tests/test_writer_latex.py__Test_the_LaTeX_writer__", "embedding": null, "metadata": {"file_path": "tests/test_writer_latex.py", "file_name": "test_writer_latex.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 29, "span_ids": ["test_rstdim_to_latexdim", "docstring", "imports"], "tokens": 338}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Test the LaTeX writer\"\"\"\n\nimport pytest\n\nfrom sphinx.writers.latex import rstdim_to_latexdim\n\n\ndef test_rstdim_to_latexdim():\n # Length units docutils supported\n # https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#length-units\n assert rstdim_to_latexdim('160em') == '160em'\n assert rstdim_to_latexdim('160px') == '160\\\\sphinxpxdimen'\n assert rstdim_to_latexdim('160in') == '160in'\n assert rstdim_to_latexdim('160cm') == '160cm'\n assert rstdim_to_latexdim('160mm') == '160mm'\n assert rstdim_to_latexdim('160pt') == '160bp'\n assert rstdim_to_latexdim('160pc') == '160pc'\n assert rstdim_to_latexdim('30%') == '0.300\\\\linewidth'\n assert rstdim_to_latexdim('160') == '160\\\\sphinxpxdimen'\n\n # float values\n assert rstdim_to_latexdim('160.0em') == '160.0em'\n assert rstdim_to_latexdim('.5em') == '.5em'\n\n # unknown values (it might be generated by 3rd party extension)\n with pytest.raises(ValueError):\n rstdim_to_latexdim('unknown')\n assert rstdim_to_latexdim('160.0unknown') == '160.0unknown'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/doclinter.py__A_linter_for_Sphinx_do_": {"__data__": {"id_": "/tmp/repos/swe-bench_sphinx-doc__sphinx/utils/doclinter.py__A_linter_for_Sphinx_do_", "embedding": null, "metadata": {"file_path": "utils/doclinter.py", "file_name": "doclinter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 78, "span_ids": ["impl", "main", "docstring", "impl:9", "imports", "lint"], "tokens": 528}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"A linter for Sphinx docs\"\"\"\n\nimport os\nimport re\nimport sys\nfrom typing import List\n\nMAX_LINE_LENGTH = 85\nLONG_INTERPRETED_TEXT = re.compile(r'^\\s*\\W*(:(\\w+:)+)?`.*`\\W*$')\nCODE_BLOCK_DIRECTIVE = re.compile(r'^(\\s*)\\.\\. code-block::')\nLEADING_SPACES = re.compile(r'^(\\s*)')\n\n\ndef lint(path: str) -> int:\n with open(path) as f:\n document = f.readlines()\n\n errors = 0\n in_code_block = False\n code_block_depth = 0\n for i, line in enumerate(document):\n if line.endswith(' '):\n print('%s:%d: the line ends with whitespace.' %\n (path, i + 1))\n errors += 1\n\n matched = CODE_BLOCK_DIRECTIVE.match(line)\n if matched:\n in_code_block = True\n code_block_depth = len(matched.group(1))\n elif in_code_block:\n if line.strip() == '':\n pass\n else:\n spaces = LEADING_SPACES.match(line).group(1)\n if len(spaces) <= code_block_depth:\n in_code_block = False\n elif LONG_INTERPRETED_TEXT.match(line):\n pass\n elif len(line) > MAX_LINE_LENGTH:\n if re.match(r'^\\s*\\.\\. ', line):\n # ignore directives and hyperlink targets\n pass\n elif re.match(r'^\\s*__ ', line):\n # ignore anonymous hyperlink targets\n pass\n elif re.match(r'^\\s*``[^`]+``$', line):\n # ignore a very long literal string\n pass\n else:\n print('%s:%d: the line is too long (%d > %d).' %\n (path, i + 1, len(line), MAX_LINE_LENGTH))\n errors += 1\n\n return errors\n\n\ndef main(args: List[str]) -> int:\n errors = 0\n for path in args:\n if os.path.isfile(path):\n errors += lint(path)\n elif os.path.isdir(path):\n for root, _dirs, files in os.walk(path):\n for filename in files:\n if filename.endswith('.rst'):\n path = os.path.join(root, filename)\n errors += lint(path)\n\n if errors:\n return 1\n else:\n return 0\n\n\nif __name__ == '__main__':\n sys.exit(main(sys.argv[1:]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}}}