doc: fix regression that deleted all methods from the reference manual

Regressed in commit bfb12222c3.

This needs to iterate over all methods, process them, and add them to a
list. Instead, it deleted all methods, processed all remaining methods,
and appended them to the in-use iterator.

Use a second list, instead.

Fixes #9922
pull/9920/head
Eli Schwartz 3 years ago
parent 0185f2ed61
commit 8d64853229
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 6
      docs/refman/loaderyaml.py

@ -274,12 +274,12 @@ class LoaderYAML(LoaderBase):
methods = raw.pop('methods', [])
obj = Object(methods=[], obj_type=obj_type, **raw)
methods = []
newmethods = []
for x in methods:
if not self.strict:
x = {**self.template.s_function, **x}
methods += [self._process_function_base(x, obj)]
obj.methods = as_methods(methods)
newmethods += [self._process_function_base(x, obj)]
obj.methods = as_methods(newmethods)
return obj
def _load_module(self, path: Path) -> T.List[Object]:

Loading…
Cancel
Save