Suppose I have:
@dataclass(match_args = True)
class Foo:
# a ton of attributes
...
def update(self, **kwargs):
"""Update the Foo.
Keyword Args:
(a ton of text)
"""
for arg in self.__match_args__:
if arg in kwargs:
self.__dict__[arg] = kwargs[arg]
class Bar:
cfg = Foo()
def set_cfg(self, **kwargs):
"""Set the cfg.
Keyword Args:
see Foo.update
"""
self.cfg.update(**kwargs)
What is the defensible (or proper) way to back-reference Foo's kwargs documentation, so that I can have 100% documentation but avoid copy pasting?
Preferably, it is in a way the IDE will maintain when I refactor. But if it isn't, that is cool too.