I feel like we could possible use the slots being a dict here, this is already a supported feature and is able to document attributes indivually, and dataclasses does have a slots argument now in 3.10
class Foo: """docstring for Foo""" __slots__ = {"bar": "docstring for bar"} def __init__(self, bar): self.bar = bar