From 485a6b2170fe7d62a7ce9b29ccd874ed0f280d77 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Wed, 5 Jun 2019 09:11:57 -0700 Subject: [PATCH] Exclude constants from autodoc Since the 2.1.0 release of Sphinx, the docs fail to build because of the warnings-treated-as-errors of the now autodoc'd imported external modules[1]. This change configures sphinx-autodoc to ignore those constants so that the docs can build and the documentation from the external modules isn't included in keystone's. [1] https://github.com/sphinx-doc/sphinx/issues/6447 Change-Id: I7b1c2c740727446d5460dc0025e47e0e9b388d10 --- doc/source/conf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index 01d94c00bd..d0196cdd19 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -53,6 +53,16 @@ apidoc_excluded_paths = [ 'test'] apidoc_separate_modules = True +autodoc_default_options = { + 'exclude-members': 'Column,Index,String,Integer,Enum,ForeignKey,DateTime,' + 'Date,TIMESTAMP,IntegrityError,OperationalError,' + 'NotFound,Boolean,Text,UniqueConstraint,' + 'PrimaryKeyConstraint,joinedload,Unicode,' + 'RequestValidator,Client,AccessTokenEndpoint,' + 'ResourceEndpoint,AuthorizationEndpoint,SIG_HMAC,' + 'RequestTokenEndpoint,oRequest' +} + # sphinxcontrib.seqdiag options seqdiag_antialias = True seqdiag_html_image_format = 'SVG'