I have a bunch of classes which use \"special-methods\":
class Foo(object): \"Foo docstring\" attr1 = \"Attribute!\" #: first attribute attr2 = \"Anoth
What worked for me is adding the ".. automethod:: methodName"
directive in the docstring of the class, instead of doing it in the .rst file.
So, you can change "Foo docstring" to
""" Foo docstring .. automethod:: __contains__ """