From c0a9510280dffbc563e2960b9b844112d09ef15d Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 18 Jan 2024 18:34:22 -0500 Subject: [PATCH] Remove unparseable attributes from all nodes (#14780) In my initial pass through enabling Breathe I tried to leave a minimal footprint of external modification to the generated files. In this particular case it looks like the problematic attributes can appear in more places than I originally observed. I never observed this behavior in that PR, but I don't know if these now appear due to something that merged after #13846 or something else changing in the environment (e.g. a Sphinx or doxygen behavior etc). Nonetheless, blanket wiping these is the simpler and safer option. The docs build successfully locally with this change. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) URL: https://github.com/rapidsai/cudf/pull/14780 --- docs/cudf/source/conf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/cudf/source/conf.py b/docs/cudf/source/conf.py index b997c78fba8..a0bb555365e 100644 --- a/docs/cudf/source/conf.py +++ b/docs/cudf/source/conf.py @@ -109,12 +109,12 @@ def clean_definitions(root): # All of these in type declarations cause Breathe to choke. # For friend, see https://github.com/breathe-doc/breathe/issues/916 strings_to_remove = ("__forceinline__", "CUDF_HOST_DEVICE", "decltype(auto)", "friend") - for field in (".//type", ".//definition"): - for type_ in root.findall(field): - if type_.text is not None: - for string in strings_to_remove: - type_.text = type_.text.replace(string, "") - + for node in root.iter(): + for string in strings_to_remove: + if node.text is not None: + node.text = node.text.replace(string, "") + if node.tail is not None: + node.tail = node.tail.replace(string, "") def clean_all_xml_files(path): for fn in glob.glob(os.path.join(path, "*.xml")):