diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-11-03 10:00:35 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-11-06 20:39:24 +0900 |
commit | f04adb1aa6dce9ff2b74883345c91c2916ae7e43 (patch) | |
tree | de3fbf19fe15c4a41bf394c526bd95f3c8304cd2 /sphinx/ext/autodoc.py | |
parent | 4250052eda05717d8069b0c4820d3978c3760fe5 (diff) | |
download | sphinx-git-f04adb1aa6dce9ff2b74883345c91c2916ae7e43.tar.gz |
Fix py3.6b3 crashes with empty Callable annotation
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r-- | sphinx/ext/autodoc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 208a228f0..1006d78b4 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -283,7 +283,7 @@ def format_annotation(annotation): # arguments are in __parameters__. params = None if hasattr(annotation, '__args__'): - if len(annotation.__args__) <= 2: + if annotation.__args__ is None or len(annotation.__args__) <= 2: params = annotation.__args__ else: # typing.Callable args = ', '.join(format_annotation(a) for a in annotation.__args__[:-1]) |