Skip to content

Commit

Permalink
fix(docs): fix {cls} formatting (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Sep 6, 2024
1 parent 01b8fe0 commit 90816c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion a_sync/iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__}`")

Expand Down

0 comments on commit 90816c3

Please sign in to comment.