We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c09f127 commit 4b92a3eCopy full SHA for 4b92a3e
1 file changed
sphinxcontrib/prettyspecialmethods.py
@@ -204,6 +204,11 @@ def apply(self):
204
if method_name in SPECIAL_METHODS:
205
parameters_node = ref.next_node(SphinxNodes.desc_parameterlist)
206
207
+ # Some special methods might not be functions (e.g. `__hash__ = None`).
208
+ # In this case, skip.
209
+ if parameters_node is None:
210
+ continue
211
+
212
name_node.replace_self(
213
SPECIAL_METHODS[method_name](name_node, parameters_node)
214
)
0 commit comments