MCPcopy
hub / github.com/pydata/xarray / _remove_unused_reference_labels

Function _remove_unused_reference_labels

xarray/ufuncs.py:100–115  ·  view source on GitHub ↗
(doc)

Source from the content-addressed store, hash-verified

98
99
100def _remove_unused_reference_labels(doc):
101 if not isinstance(doc, str):
102 return doc
103
104 max_references = 5
105 for num in range(max_references):
106 label = f".. [{num}]"
107 reference = f"[{num}]_"
108 index = f"{num}. "
109
110 if label not in doc or reference in doc:
111 continue
112
113 doc = doc.replace(label, index)
114
115 return doc
116
117
118def _dedent(doc):

Callers 1

_create_docMethod · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…