From 12b3b49f2220207add2cce5713c072d5f66181e8 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 12 Jan 2014 17:19:58 +0100 Subject: [PATCH] Closes #1233: Allow finding both Python classes and exceptions with the "class" and "exc" roles in intersphinx. --- CHANGES | 3 +++ sphinx/domains/python.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 53974c525..a7dd57209 100644 --- a/CHANGES +++ b/CHANGES @@ -66,6 +66,9 @@ Bugs fixed * #1155: Fix autodocumenting C-defined methods as attributes in Python 3. +* #1233: Allow finding both Python classes and exceptions with the "class" and + "exc" roles in intersphinx. + Documentation ------------- diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 0c08b60bc..a7ed7557d 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -559,8 +559,8 @@ class PythonDomain(Domain): object_types = { 'function': ObjType(l_('function'), 'func', 'obj'), 'data': ObjType(l_('data'), 'data', 'obj'), - 'class': ObjType(l_('class'), 'class', 'obj'), - 'exception': ObjType(l_('exception'), 'exc', 'obj'), + 'class': ObjType(l_('class'), 'class', 'exc', 'obj'), + 'exception': ObjType(l_('exception'), 'exc', 'class', 'obj'), 'method': ObjType(l_('method'), 'meth', 'obj'), 'classmethod': ObjType(l_('class method'), 'meth', 'obj'), 'staticmethod': ObjType(l_('static method'), 'meth', 'obj'),