From 5038191710c76e3c70b8d22826d1622641aceb89 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Thu, 18 Feb 2016 12:30:54 -0600 Subject: [PATCH] Fix (static) labels in docs --- doc/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 4f5281e..5e8b292 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -256,7 +256,7 @@ def autodoc_process_signature(app, what, name, obj, options, signature, def autodoc_process_docstring(app, what, name, obj, options, lines): - from inspect import isclass, isroutine, ismethod + from inspect import isclass, isroutine UNDERSCORE_WHITELIST = ["__len__", "__hash__", "__eq__", "__ne__"] if isclass(obj) and obj.__name__[0].isupper(): methods = [nm for nm in dir(obj) @@ -265,7 +265,7 @@ def autodoc_process_docstring(app, what, name, obj, options, lines): def gen_method_string(meth): result = ":meth:`%s`" % meth - if not ismethod(getattr(obj, meth)): + if getattr(obj, "_" + meth + "_is_static", False): result += " (static)" return result -- GitLab