diff --git a/a_sync/iter.py b/a_sync/iter.py index 7c569e94..fd11a322 100644 --- a/a_sync/iter.py +++ b/a_sync/iter.py @@ -108,7 +108,8 @@ def __init_subclass__(cls, **kwargs) -> None: cls.__doc__ += f"\n\n{new}" # format the member docstrings - for attr in cls.__dict__.values(): + for attr_name in dir(cls): + attr = getattr(cls, attr_name) if attr.__doc__ and "{cls}" in attr.__doc__: attr.__doc__ = attr.__doc__.replace("{cls}", f":class:`{cls.__name__}`")