From ca66cc5aa1873b005c88f2b3027fb320dd6f4c8b Mon Sep 17 00:00:00 2001 From: Dmitry Litvinenko Date: Thu, 5 Nov 2015 17:32:16 +0300 Subject: [PATCH] Fixed IndexError when using @staticmethod with *args combination --- sphinx_autodoc_typehints.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sphinx_autodoc_typehints.py b/sphinx_autodoc_typehints.py index 14d16c0c..7029b91b 100644 --- a/sphinx_autodoc_typehints.py +++ b/sphinx_autodoc_typehints.py @@ -46,7 +46,8 @@ def process_signature(app, what: str, name: str, obj, options, signature, return return if what in ('method', 'class'): - del argspec.args[0] + if argspec.args: + del argspec.args[0] return formatargspec(*argspec[:-1]), None