Document special methods in a class e.g. __call__
-{% extends "!autosummary/class.rst" %}
+{{ fullname }}
+{{ underline }}
-{% block methods %} {% if methods %}
+.. currentmodule:: {{ module }}
+
+.. autoclass:: {{ objname }}
+
+ ..
+ Methods
+
+{% block methods %}
.. rubric:: Methods
+ ..
+ Special methods
+
+{% for item in ('__call__', '__enter__', '__exit__') %}
+{% if item in all_methods %}
+ .. automethod:: {{ item }}
+{% endif %}
+{%- endfor %}
+
+ ..
+ Ordinary methods
+
{% for item in methods %}
+{% if item not in ('__init__',) %}
.. automethod:: {{ item }}
+{% endif %}
{%- endfor %}
-{% endif %} {% endblock %}
+
+ ..
+ Special methods
+
+{% for item in ('__eq__', '__ne__', '__lt__', '__le__', '__gt__', '__ge__', '__nonzero__', '__bool__') %}
+{% if item in all_methods %}
+ .. automethod:: {{ item }}
+{% endif %}
+{%- endfor %}
+{% endblock %}
+
+ ..
+ Atributes
{% block attributes %} {% if attributes %}
