copy_docstrings

(function from pyomo.common.docutils)

pyomo.common.docutils.copy_docstrings(reference_class: type, methods: list[str] | None = None)[source]

Decorator to copy docstrings from a reference class to the decorated class.

Note that only docstrings for methods, generators, and functions are copied.

Parameters:
  • reference_class (type) – The source class to copy docstrings from

  • methods (list[str] | None) – The list of methods from the reference_class to copy docstrings from. If empty or None, then all method docstrings are checked / copied.