diff --git a/setup.cfg b/setup.cfg index db20980..27fbca2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,6 @@ classifiers = Development Status :: 3 - Alpha Intended Audience :: Developers Programming Language :: Python - Programming Language :: Python :: 2 Programming Language :: Python :: 3 Operating System :: OS Independent License :: OSI Approved :: BSD License diff --git a/sphinx_automodapi/autodoc_enhancements.py b/sphinx_automodapi/autodoc_enhancements.py index e32f00a..7721043 100644 --- a/sphinx_automodapi/autodoc_enhancements.py +++ b/sphinx_automodapi/autodoc_enhancements.py @@ -1,21 +1,11 @@ """ Miscellaneous enhancements to help autodoc along. """ - -import inspect -import sys -import types - -from sphinx.ext.autodoc import AttributeDocumenter, ModuleDocumenter -from sphinx.util.inspect import isdescriptor +from sphinx.ext.autodoc import AttributeDocumenter __all__ = [] -if sys.version_info[0] == 3: - class_types = (type,) -else: - class_types = (type, types.ClassType) - +class_types = (type,) MethodDescriptorType = type(type.__subclasses__)